Imported Upstream version 2.8 upstream/2.8
authorYoungbok Shin <youngb.shin@samsung.com>
Tue, 11 Jul 2017 09:49:15 +0000 (18:49 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Tue, 11 Jul 2017 09:49:15 +0000 (18:49 +0900)
681 files changed:
CMakeLists.txt
ChangeLog
ChangeLog.20
ChangeLog.21
ChangeLog.22
ChangeLog.23
ChangeLog.24
ChangeLog.25
ChangeLog.26 [new file with mode: 0644]
Jamfile
Jamrules
Makefile
README
README.git
autogen.sh
builds/amiga/README
builds/amiga/include/config/ftconfig.h
builds/amiga/include/config/ftmodule.h
builds/amiga/makefile
builds/amiga/makefile.os4
builds/amiga/smakefile
builds/amiga/src/base/ftdebug.c
builds/amiga/src/base/ftsystem.c
builds/ansi/ansi-def.mk
builds/ansi/ansi.mk
builds/beos/beos-def.mk
builds/beos/beos.mk
builds/beos/detect.mk
builds/cmake/iOS.cmake
builds/cmake/testbuild.sh
builds/compiler/ansi-cc.mk
builds/compiler/bcc-dev.mk
builds/compiler/bcc.mk
builds/compiler/emx.mk
builds/compiler/gcc-dev.mk
builds/compiler/gcc.mk
builds/compiler/intelc.mk
builds/compiler/unix-lcc.mk
builds/compiler/visualage.mk
builds/compiler/visualc.mk
builds/compiler/watcom.mk
builds/compiler/win-lcc.mk
builds/detect.mk
builds/dos/detect.mk
builds/dos/dos-def.mk
builds/dos/dos-emx.mk
builds/dos/dos-gcc.mk
builds/dos/dos-wat.mk
builds/exports.mk
builds/freetype.mk
builds/link_dos.mk
builds/link_std.mk
builds/mac/ftmac.c
builds/modules.mk
builds/os2/detect.mk
builds/os2/os2-def.mk
builds/os2/os2-dev.mk
builds/os2/os2-gcc.mk
builds/symbian/bld.inf
builds/symbian/freetype.mmp
builds/toplevel.mk
builds/unix/aclocal.m4
builds/unix/config.guess
builds/unix/config.sub
builds/unix/configure
builds/unix/configure.ac
builds/unix/configure.raw
builds/unix/detect.mk
builds/unix/freetype-config.in
builds/unix/freetype2.m4
builds/unix/ft-munmap.m4
builds/unix/ftconfig.in
builds/unix/ftsystem.c
builds/unix/install.mk
builds/unix/pkg.m4
builds/unix/unix-cc.in
builds/unix/unix-def.in
builds/unix/unix-dev.mk
builds/unix/unix-lcc.mk
builds/unix/unix.mk
builds/unix/unixddef.mk
builds/vms/ftconfig.h
builds/vms/ftsystem.c
builds/wince/ftdebug.c
builds/wince/vc2005-ce/freetype.vcproj
builds/wince/vc2005-ce/index.html
builds/wince/vc2008-ce/freetype.vcproj
builds/wince/vc2008-ce/index.html
builds/windows/detect.mk
builds/windows/ftdebug.c
builds/windows/vc2005/freetype.vcproj
builds/windows/vc2005/index.html
builds/windows/vc2008/freetype.vcproj
builds/windows/vc2008/index.html
builds/windows/vc2010/freetype.vcxproj
builds/windows/vc2010/index.html
builds/windows/visualc/freetype.dsp
builds/windows/visualc/freetype.vcproj
builds/windows/visualc/index.html
builds/windows/visualce/freetype.dsp
builds/windows/visualce/freetype.vcproj
builds/windows/visualce/index.html
builds/windows/w32-bcc.mk
builds/windows/w32-bccd.mk
builds/windows/w32-dev.mk
builds/windows/w32-gcc.mk
builds/windows/w32-icc.mk
builds/windows/w32-intl.mk
builds/windows/w32-lcc.mk
builds/windows/w32-mingw32.mk
builds/windows/w32-vcc.mk
builds/windows/w32-wat.mk
builds/windows/win32-def.mk
configure
devel/ft2build.h
devel/ftoption.h
docs/CHANGES
docs/CUSTOMIZE
docs/DEBUG
docs/INSTALL
docs/INSTALL.ANY
docs/INSTALL.CROSS
docs/INSTALL.GNU
docs/INSTALL.MAC
docs/INSTALL.UNIX
docs/INSTALL.VMS
docs/TODO
docs/VERSIONS.TXT
docs/formats.txt
docs/freetype-config.1
docs/raster.txt
docs/reference/ft2-auto_hinter.html
docs/reference/ft2-base_interface.html
docs/reference/ft2-basic_types.html
docs/reference/ft2-bdf_fonts.html
docs/reference/ft2-bitmap_handling.html
docs/reference/ft2-bzip2.html
docs/reference/ft2-cache_subsystem.html
docs/reference/ft2-cff_driver.html
docs/reference/ft2-cid_fonts.html
docs/reference/ft2-computations.html
docs/reference/ft2-error_code_values.html
docs/reference/ft2-error_enumerations.html
docs/reference/ft2-font_formats.html
docs/reference/ft2-gasp_table.html
docs/reference/ft2-glyph_management.html
docs/reference/ft2-glyph_stroker.html
docs/reference/ft2-glyph_variants.html
docs/reference/ft2-gx_validation.html
docs/reference/ft2-gzip.html
docs/reference/ft2-header_file_macros.html
docs/reference/ft2-header_inclusion.html
docs/reference/ft2-incremental.html
docs/reference/ft2-index.html
docs/reference/ft2-lcd_filtering.html
docs/reference/ft2-list_processing.html
docs/reference/ft2-lzw.html
docs/reference/ft2-mac_specific.html
docs/reference/ft2-module_management.html
docs/reference/ft2-multiple_masters.html
docs/reference/ft2-ot_validation.html
docs/reference/ft2-outline_processing.html
docs/reference/ft2-pcf_driver.html [new file with mode: 0644]
docs/reference/ft2-pfr_fonts.html
docs/reference/ft2-quick_advance.html
docs/reference/ft2-raster.html
docs/reference/ft2-sfnt_names.html
docs/reference/ft2-sizes_management.html
docs/reference/ft2-system_interface.html
docs/reference/ft2-toc.html
docs/reference/ft2-truetype_engine.html
docs/reference/ft2-truetype_tables.html
docs/reference/ft2-tt_driver.html
docs/reference/ft2-type1_tables.html
docs/reference/ft2-user_allocation.html
docs/reference/ft2-version.html
docs/reference/ft2-winfnt_fonts.html
docs/release
include/freetype/config/ftconfig.h
include/freetype/config/ftheader.h
include/freetype/config/ftoption.h
include/freetype/config/ftstdlib.h
include/freetype/freetype.h
include/freetype/ftadvanc.h
include/freetype/ftautoh.h
include/freetype/ftbbox.h
include/freetype/ftbdf.h
include/freetype/ftbitmap.h
include/freetype/ftbzip2.h
include/freetype/ftcache.h
include/freetype/ftcffdrv.h
include/freetype/ftchapters.h
include/freetype/ftcid.h
include/freetype/fterrdef.h
include/freetype/fterrors.h
include/freetype/ftfntfmt.h
include/freetype/ftgasp.h
include/freetype/ftglyph.h
include/freetype/ftgxval.h
include/freetype/ftgzip.h
include/freetype/ftimage.h
include/freetype/ftincrem.h
include/freetype/ftlcdfil.h
include/freetype/ftlist.h
include/freetype/ftlzw.h
include/freetype/ftmac.h
include/freetype/ftmm.h
include/freetype/ftmodapi.h
include/freetype/ftmoderr.h
include/freetype/ftotval.h
include/freetype/ftoutln.h
include/freetype/ftpcfdrv.h [new file with mode: 0644]
include/freetype/ftpfr.h
include/freetype/ftrender.h
include/freetype/ftsizes.h
include/freetype/ftsnames.h
include/freetype/ftstroke.h
include/freetype/ftsynth.h
include/freetype/ftsystem.h
include/freetype/fttrigon.h
include/freetype/ftttdrv.h
include/freetype/fttypes.h
include/freetype/ftwinfnt.h
include/freetype/internal/autohint.h
include/freetype/internal/ftcalc.h
include/freetype/internal/ftdebug.h
include/freetype/internal/ftdriver.h
include/freetype/internal/ftgloadr.h
include/freetype/internal/ftmemory.h
include/freetype/internal/ftobjs.h
include/freetype/internal/ftpic.h
include/freetype/internal/ftrfork.h
include/freetype/internal/ftserv.h
include/freetype/internal/ftstream.h
include/freetype/internal/fttrace.h
include/freetype/internal/ftvalid.h
include/freetype/internal/internal.h
include/freetype/internal/psaux.h
include/freetype/internal/pshints.h
include/freetype/internal/services/svbdf.h
include/freetype/internal/services/svcid.h
include/freetype/internal/services/svfntfmt.h
include/freetype/internal/services/svgldict.h
include/freetype/internal/services/svgxval.h
include/freetype/internal/services/svkern.h
include/freetype/internal/services/svmetric.h [new file with mode: 0644]
include/freetype/internal/services/svmm.h
include/freetype/internal/services/svotval.h
include/freetype/internal/services/svpfr.h
include/freetype/internal/services/svpostnm.h
include/freetype/internal/services/svprop.h
include/freetype/internal/services/svpscmap.h
include/freetype/internal/services/svpsinfo.h
include/freetype/internal/services/svsfnt.h
include/freetype/internal/services/svttcmap.h
include/freetype/internal/services/svtteng.h
include/freetype/internal/services/svttglyf.h
include/freetype/internal/services/svwinfnt.h
include/freetype/internal/sfnt.h
include/freetype/internal/t1types.h
include/freetype/internal/tttypes.h
include/freetype/t1tables.h
include/freetype/ttnameid.h
include/freetype/tttables.h
include/freetype/tttags.h
include/freetype/ttunpat.h
include/ft2build.h
modules.cfg
src/Jamfile
src/autofit/Jamfile
src/autofit/afangles.c
src/autofit/afblue.c
src/autofit/afblue.cin
src/autofit/afblue.dat
src/autofit/afblue.h
src/autofit/afblue.hin
src/autofit/afcjk.c
src/autofit/afcjk.h
src/autofit/afcover.h
src/autofit/afdummy.c
src/autofit/afdummy.h
src/autofit/aferrors.h
src/autofit/afglobal.c
src/autofit/afglobal.h
src/autofit/afhints.c
src/autofit/afhints.h
src/autofit/afindic.c
src/autofit/afindic.h
src/autofit/aflatin.c
src/autofit/aflatin.h
src/autofit/aflatin2.c
src/autofit/aflatin2.h
src/autofit/afloader.c
src/autofit/afloader.h
src/autofit/afmodule.c
src/autofit/afmodule.h
src/autofit/afpic.c
src/autofit/afpic.h
src/autofit/afranges.c
src/autofit/afranges.h
src/autofit/afscript.h
src/autofit/afshaper.c
src/autofit/afshaper.h
src/autofit/afstyles.h
src/autofit/aftypes.h
src/autofit/afwarp.c
src/autofit/afwarp.h
src/autofit/afwrtsys.h
src/autofit/autofit.c
src/autofit/module.mk
src/autofit/rules.mk
src/base/Jamfile
src/base/basepic.c
src/base/basepic.h
src/base/ftadvanc.c
src/base/ftapi.c
src/base/ftbase.c
src/base/ftbase.h
src/base/ftbbox.c
src/base/ftbdf.c
src/base/ftbitmap.c
src/base/ftcalc.c
src/base/ftcid.c
src/base/ftdbgmem.c
src/base/ftdebug.c
src/base/ftfntfmt.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftgloadr.c
src/base/ftglyph.c
src/base/ftgxval.c
src/base/ftinit.c
src/base/ftlcdfil.c
src/base/ftmac.c
src/base/ftmm.c
src/base/ftobjs.c
src/base/ftotval.c
src/base/ftoutln.c
src/base/ftpatent.c
src/base/ftpfr.c
src/base/ftpic.c
src/base/ftrfork.c
src/base/ftsnames.c
src/base/ftstream.c
src/base/ftstroke.c
src/base/ftsynth.c
src/base/ftsystem.c
src/base/fttrigon.c
src/base/fttype1.c
src/base/ftutil.c
src/base/ftwinfnt.c
src/base/rules.mk
src/bdf/Jamfile
src/bdf/bdf.c
src/bdf/bdfdrivr.c
src/bdf/bdflib.c
src/bzip2/Jamfile
src/bzip2/ftbzip2.c
src/bzip2/rules.mk
src/cache/Jamfile
src/cache/ftcache.c
src/cache/ftcbasic.c
src/cache/ftccache.c
src/cache/ftccache.h
src/cache/ftccback.h
src/cache/ftccmap.c
src/cache/ftcerror.h
src/cache/ftcglyph.c
src/cache/ftcglyph.h
src/cache/ftcimage.c
src/cache/ftcimage.h
src/cache/ftcmanag.c
src/cache/ftcmanag.h
src/cache/ftcmru.c
src/cache/ftcmru.h
src/cache/ftcsbits.c
src/cache/ftcsbits.h
src/cache/rules.mk
src/cff/Jamfile
src/cff/cf2arrst.c
src/cff/cf2error.c
src/cff/cf2error.h
src/cff/cf2fixed.h
src/cff/cf2font.c
src/cff/cf2font.h
src/cff/cf2ft.c
src/cff/cf2ft.h
src/cff/cf2hints.c
src/cff/cf2intrp.c
src/cff/cf2stack.c
src/cff/cf2stack.h
src/cff/cff.c
src/cff/cffcmap.c
src/cff/cffcmap.h
src/cff/cffdrivr.c
src/cff/cffdrivr.h
src/cff/cfferrs.h
src/cff/cffgload.c
src/cff/cffgload.h
src/cff/cffload.c
src/cff/cffload.h
src/cff/cffobjs.c
src/cff/cffobjs.h
src/cff/cffparse.c
src/cff/cffparse.h
src/cff/cffpic.c
src/cff/cffpic.h
src/cff/cfftoken.h
src/cff/cfftypes.h
src/cff/module.mk
src/cff/rules.mk
src/cid/Jamfile
src/cid/ciderrs.h
src/cid/cidgload.c
src/cid/cidgload.h
src/cid/cidload.c
src/cid/cidload.h
src/cid/cidobjs.c
src/cid/cidobjs.h
src/cid/cidparse.c
src/cid/cidparse.h
src/cid/cidriver.c
src/cid/cidriver.h
src/cid/cidtoken.h
src/cid/module.mk
src/cid/rules.mk
src/cid/type1cid.c
src/gxvalid/Jamfile
src/gxvalid/README
src/gxvalid/gxvalid.c
src/gxvalid/gxvalid.h
src/gxvalid/gxvbsln.c
src/gxvalid/gxvcommn.c
src/gxvalid/gxvcommn.h
src/gxvalid/gxverror.h
src/gxvalid/gxvfeat.c
src/gxvalid/gxvfeat.h
src/gxvalid/gxvfgen.c
src/gxvalid/gxvjust.c
src/gxvalid/gxvkern.c
src/gxvalid/gxvlcar.c
src/gxvalid/gxvmod.c
src/gxvalid/gxvmod.h
src/gxvalid/gxvmort.c
src/gxvalid/gxvmort.h
src/gxvalid/gxvmort0.c
src/gxvalid/gxvmort1.c
src/gxvalid/gxvmort2.c
src/gxvalid/gxvmort4.c
src/gxvalid/gxvmort5.c
src/gxvalid/gxvmorx.c
src/gxvalid/gxvmorx.h
src/gxvalid/gxvmorx0.c
src/gxvalid/gxvmorx1.c
src/gxvalid/gxvmorx2.c
src/gxvalid/gxvmorx4.c
src/gxvalid/gxvmorx5.c
src/gxvalid/gxvopbd.c
src/gxvalid/gxvprop.c
src/gxvalid/gxvtrak.c
src/gxvalid/module.mk
src/gxvalid/rules.mk
src/gzip/Jamfile
src/gzip/ftgzip.c
src/gzip/ftzconf.h [moved from src/gzip/zconf.h with 100% similarity]
src/gzip/rules.mk
src/gzip/zlib.h
src/lzw/Jamfile
src/lzw/ftlzw.c
src/lzw/ftzopen.c
src/lzw/ftzopen.h
src/lzw/rules.mk
src/otvalid/Jamfile
src/otvalid/module.mk
src/otvalid/otvalid.c
src/otvalid/otvalid.h
src/otvalid/otvbase.c
src/otvalid/otvcommn.c
src/otvalid/otvcommn.h
src/otvalid/otverror.h
src/otvalid/otvgdef.c
src/otvalid/otvgpos.c
src/otvalid/otvgpos.h
src/otvalid/otvgsub.c
src/otvalid/otvjstf.c
src/otvalid/otvmath.c
src/otvalid/otvmod.c
src/otvalid/otvmod.h
src/otvalid/rules.mk
src/pcf/Jamfile
src/pcf/pcf.c
src/pcf/pcf.h
src/pcf/pcfdrivr.c
src/pcf/pcfread.c
src/pfr/Jamfile
src/pfr/module.mk
src/pfr/pfr.c
src/pfr/pfrcmap.c
src/pfr/pfrcmap.h
src/pfr/pfrdrivr.c
src/pfr/pfrdrivr.h
src/pfr/pfrerror.h
src/pfr/pfrgload.c
src/pfr/pfrgload.h
src/pfr/pfrload.c
src/pfr/pfrload.h
src/pfr/pfrobjs.c
src/pfr/pfrobjs.h
src/pfr/pfrsbit.c
src/pfr/pfrsbit.h
src/pfr/pfrtypes.h
src/pfr/rules.mk
src/psaux/Jamfile
src/psaux/afmparse.c
src/psaux/afmparse.h
src/psaux/module.mk
src/psaux/psaux.c
src/psaux/psauxerr.h
src/psaux/psauxmod.c
src/psaux/psauxmod.h
src/psaux/psconv.c
src/psaux/psconv.h
src/psaux/psobjs.c
src/psaux/psobjs.h
src/psaux/rules.mk
src/psaux/t1cmap.c
src/psaux/t1cmap.h
src/psaux/t1decode.c
src/psaux/t1decode.h
src/pshinter/Jamfile
src/pshinter/module.mk
src/pshinter/pshalgo.c
src/pshinter/pshalgo.h
src/pshinter/pshglob.c
src/pshinter/pshglob.h
src/pshinter/pshinter.c
src/pshinter/pshmod.c
src/pshinter/pshmod.h
src/pshinter/pshnterr.h
src/pshinter/pshpic.c
src/pshinter/pshpic.h
src/pshinter/pshrec.c
src/pshinter/pshrec.h
src/pshinter/rules.mk
src/psnames/Jamfile
src/psnames/module.mk
src/psnames/psmodule.c
src/psnames/psmodule.h
src/psnames/psnamerr.h
src/psnames/psnames.c
src/psnames/pspic.c
src/psnames/pspic.h
src/psnames/pstables.h
src/psnames/rules.mk
src/raster/Jamfile
src/raster/ftmisc.h
src/raster/ftraster.c
src/raster/ftraster.h
src/raster/ftrend1.c
src/raster/ftrend1.h
src/raster/module.mk
src/raster/raster.c
src/raster/rasterrs.h
src/raster/rastpic.c
src/raster/rastpic.h
src/raster/rules.mk
src/sfnt/Jamfile
src/sfnt/module.mk
src/sfnt/pngshim.c
src/sfnt/pngshim.h
src/sfnt/rules.mk
src/sfnt/sfdriver.c
src/sfnt/sfdriver.h
src/sfnt/sferrors.h
src/sfnt/sfnt.c
src/sfnt/sfntpic.c
src/sfnt/sfntpic.h
src/sfnt/sfobjs.c
src/sfnt/sfobjs.h
src/sfnt/ttbdf.c
src/sfnt/ttbdf.h
src/sfnt/ttcmap.c
src/sfnt/ttcmap.h
src/sfnt/ttcmapc.h
src/sfnt/ttkern.c
src/sfnt/ttkern.h
src/sfnt/ttload.c
src/sfnt/ttload.h
src/sfnt/ttmtx.c
src/sfnt/ttmtx.h
src/sfnt/ttpost.c
src/sfnt/ttpost.h
src/sfnt/ttsbit.c
src/sfnt/ttsbit.h
src/smooth/Jamfile
src/smooth/ftgrays.c
src/smooth/ftgrays.h
src/smooth/ftsmerrs.h
src/smooth/ftsmooth.c
src/smooth/ftsmooth.h
src/smooth/ftspic.c
src/smooth/ftspic.h
src/smooth/module.mk
src/smooth/rules.mk
src/smooth/smooth.c
src/tools/afblue.pl
src/tools/apinames.c
src/tools/docmaker/content.py
src/tools/docmaker/docmaker.py
src/tools/docmaker/formatter.py
src/tools/docmaker/sources.py
src/tools/docmaker/tohtml.py
src/tools/docmaker/utils.py
src/tools/ftfuzzer/README
src/tools/ftfuzzer/ftfuzzer.cc
src/tools/ftfuzzer/ftmutator.cc
src/tools/ftfuzzer/rasterfuzzer.cc
src/tools/ftfuzzer/runinput.cc
src/tools/ftrandom/Makefile
src/tools/ftrandom/README
src/tools/ftrandom/ftrandom.c
src/tools/glnames.py
src/tools/update-copyright-year
src/truetype/Jamfile
src/truetype/module.mk
src/truetype/rules.mk
src/truetype/truetype.c
src/truetype/ttdriver.c
src/truetype/ttdriver.h
src/truetype/tterrors.h
src/truetype/ttgload.c
src/truetype/ttgload.h
src/truetype/ttgxvar.c
src/truetype/ttgxvar.h
src/truetype/ttinterp.c
src/truetype/ttinterp.h
src/truetype/ttobjs.c
src/truetype/ttobjs.h
src/truetype/ttpic.c
src/truetype/ttpic.h
src/truetype/ttpload.c
src/truetype/ttpload.h
src/truetype/ttsubpix.c
src/truetype/ttsubpix.h
src/type1/Jamfile
src/type1/module.mk
src/type1/rules.mk
src/type1/t1afm.c
src/type1/t1afm.h
src/type1/t1driver.c
src/type1/t1driver.h
src/type1/t1errors.h
src/type1/t1gload.c
src/type1/t1gload.h
src/type1/t1load.c
src/type1/t1load.h
src/type1/t1objs.c
src/type1/t1objs.h
src/type1/t1parse.c
src/type1/t1parse.h
src/type1/t1tokens.h
src/type1/type1.c
src/type42/Jamfile
src/type42/module.mk
src/type42/rules.mk
src/type42/t42drivr.c
src/type42/t42drivr.h
src/type42/t42error.h
src/type42/t42objs.c
src/type42/t42objs.h
src/type42/t42parse.c
src/type42/t42parse.h
src/type42/t42types.h
src/type42/type42.c
src/winfonts/Jamfile
src/winfonts/fnterrs.h
src/winfonts/module.mk
src/winfonts/rules.mk
src/winfonts/winfnt.c
src/winfonts/winfnt.h
vms_make.com

index 0cd492a..d1b053e 100644 (file)
@@ -1,6 +1,6 @@
 # CMakeLists.txt
 #
-# Copyright 2013-2016 by
+# Copyright 2013-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # Written originally by John Cary <cary@txcorp.com>
@@ -153,8 +153,8 @@ endif ()
 
 
 set(VERSION_MAJOR "2")
-set(VERSION_MINOR "6")
-set(VERSION_PATCH "5")
+set(VERSION_MINOR "8")
+set(VERSION_PATCH "0")
 
 set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
 set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
@@ -362,7 +362,7 @@ if (BUILD_FRAMEWORK)
   )
 endif ()
 
-if (NOT CMAKE_VERSION VERSION_LESS 2.8.11)
+if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
   target_include_directories(freetype
     PUBLIC $<INSTALL_INTERFACE:include/freetype2>)
 endif ()
index a8cba88..b81af15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
-2016-07-12  Werner Lemberg  <wl@gnu.org>
+2017-05-13  Werner Lemberg  <wl@gnu.org>
 
-       * Version 2.6.5 released.
-       =========================
-
-
-       Tag sources with `VER-2-6-5'.
-
-       * include/freetype/config/ftoption.h
-       (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out.
-
-       * docs/VERSION.TXT: Add entry for version 2.6.5.
-
-       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
-       builds/windows/vc2005/index.html,
-       builds/windows/vc2008/freetype.vcproj,
-       builds/windows/vc2008/index.html,
-       builds/windows/vc2010/freetype.vcxproj,
-       builds/windows/vc2010/index.html,
-       builds/windows/visualc/freetype.dsp,
-       builds/windows/visualc/freetype.vcproj,
-       builds/windows/visualc/index.html,
-       builds/windows/visualce/freetype.dsp,
-       builds/windows/visualce/freetype.vcproj,
-       builds/windows/visualce/index.html,
-       builds/wince/vc2005-ce/freetype.vcproj,
-       builds/wince/vc2005-ce/index.html,
-       builds/wince/vc2008-ce/freetype.vcproj,
-       builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/.
+       * Version 2.8 released.
+       =======================
 
-       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
 
-       * builds/unix/configure.raw (version_info): Set to 18:5:12.
-       * CMakeLists.txt (VERSION_PATCH): Set to 5.
+       Tag sources with `VER-2-8'.
 
+       * docs/VERSION.TXT: Add entry for version 2.8.
        * docs/CHANGES: Updated.
 
-2016-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
-
-       [mac] Fix ftexport.sym target in Jamfile.
-
-       * Jamfile: Update the directories of the header files scanned for
-       ftexport.sym.  They were incorrect since the migration of the
-       header files, on 2015-06-22.  Either inexisting include/cache
-       (removed on 2006-03-20) is not needed to be listed explicitly.
-       Now ftmac.h is scanned only in the case of Mac OS & Mac OS X.
-
-2016-07-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Sub-banding protocol revision.
-
-       Rasterization sub-banding is utilized at large sizes while using a
-       rather small fixed memory pool.  Indeed it is possible to make an
-       educated guess how much memory is necessary at a given size for a
-       given glyph.  It turns out that, for a large majority of European
-       glyphs, you should store about 8 times more boundary pixels than
-       their height.  Or, vice versa, if your memory pool can hold 800
-       pixels the band height should be 100 and you should sub-band
-       anything larger than that.  Should you still run out of memory,
-       FreeType bisects the band but you have wasted some time.  This is
-       what has been implemented in FreeType since the beginning.
-
-       It was overlooked, however, that the top band could grow to twice
-       the default band size leading to unnecessary memory overflows there.
-       This commit fixes that.  Now the bands are distributed more evenly
-       and cannot exceed the default size.
-
-       Now the magic number 8 is really suitable for rather simple European
-       scripts.  For complex Chinese logograms the magic number should be
-       13 but that is subject for another day.
-
-       * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding
-       protocol.
-
-2016-07-07  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
-
-       [mac] Fix Savannah bug #48417.
-
-       Mac OS X linker throws errors when `-exported_symbol_list' input
-       file includes non-existing symbols.  Reported by Ryan Schmidt.
-
-       * builds/exports.mk: Exclude ftmac.h from the headers for apinames
-       by default.  Include it when ftmac.c would be compiled.
-
-2016-07-06  Werner Lemberg  <wl@gnu.org>
-
-       * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused.
-
-2016-07-05  Werner Lemberg  <wl@gnu.org>
-
-       * Version 2.6.4 released.
-       =========================
-
-
-       Tag sources with `VER-2-6-4'.
-
-       * docs/VERSION.TXT: Update documentation and bump version number to
-       2.6.4.
-
        * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
        builds/windows/vc2005/index.html,
        builds/windows/vc2008/freetype.vcproj,
        builds/wince/vc2005-ce/freetype.vcproj,
        builds/wince/vc2005-ce/index.html,
        builds/wince/vc2008-ce/freetype.vcproj,
-       builds/wince/vc2008-ce/index.html: s/2.6.3/2.6.4/, s/263/264/.
-
-       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
-
-       * builds/unix/configure.raw (version_info): Set to 18:4:12.
-       * CMakeLists.txt (VERSION_PATCH): Set to 4.
-
-       * docs/CHANGES: Updated.
-
-2016-07-05  Werner Lemberg  <wl@gnu.org>
-
-       * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning.
-
-2016-07-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Variable type revision (part 2).
-
-       * src/smooth/ftgrays.c (TArea): Restore original definition as `int'.
-       (gray_render_line) [FT_LONG64]: Updated.
-       (gray_convert_glyph): 32-bit band bisection stack should be 32 bands.
-       (gray_convert_glyph_inner): Trace successes and failures.
-
-2016-07-04  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Handle single-point contours as segments.
-
-       Doing so allows us to link them to edges – some fonts like
-       `NotoSansGurmukhi-Regular' have such isolated points sitting exactly
-       on other outlines.
-
-       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't
-       ignore one-point contours but handle them specially as one-point
-       segments.
-       (af_latin_hints_compute_edges): Append one-point segments to edges
-       if possible.
-
-2016-07-02  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Remove unused structure members.
-
-       * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove
-       `num_linked'.
-
-       * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated.
-
-2016-07-02  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Update to Unicode 9.0.0.
-
-       * src/autofit/afranges.c (af_arab_nonbase_uniranges,
-       af_cyrl_uniranges): Add new data.
+       builds/wince/vc2008-ce/index.html: s/2.7.1/2.8/, s/271/28/.
 
-2016-07-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Variable type revision (part 1).
-
-       This patch restores original `TCoord' definition as `int' so that the
-       rendering pool is used more efficiently on LP64 platforms (unix).
-
-       * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some
-       fields to `TCoord'.
-       (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline,
-       gray_sweep, gray_convert_glyph): Updated.
-
-2016-06-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Minor clean-ups.
-
-       * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'.
-       (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated.
-
-2016-06-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Minor clean-ups.
-
-       * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile
-       qualifier.
-       (gray_raster_render): Move span initializations from here.
-       (gray_sweep): ... to here and remove unused `target' argument.
-
-2016-06-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [pcf] Fix handling of very large fonts (#47708).
-
-       * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an
-       unsigned short.
-       Only reject `0xFFFF' as an invalid encoding offset.
-
-2016-06-25  Werner Lemberg  <wl@gnu.org>
-
-       [truetype] Really fix deallocation in case of error (#47726).
-
-       * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize
-       `outline.points' also.
-
-2016-06-23  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Consolidate memory management.
-
-       * src/smooth/ftgrays.c (gray_init_cells): Remove function.
-       (gray_TWorker): Remove fields that become local variables.
-       (gray_raster_render): Move rendering buffer declaration from here.
-       (gray_convert_glyph): ... to here and update accordingly.
-
-2016-06-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Consolidate boundary checks.
-
-       Removing the checks from `gray_hline' shaves 1% off rendering speed.
-
-       * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'.
-       (gray_TWorker): No need to store `clip_box'.
-       (gray_hline): Remove unnecessary boundary checks.
-       (gray_convert_glyph): Move boundary checks from here.
-       (gray_raster_render): ... to here and consolidate.
-
-2016-06-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Use `FT_Outline_Get_CBox'.
-
-       * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'.
-       (gray_compute_cbox): Remove this function.
-       (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'.
-
-2016-06-20  Werner Lemberg  <wl@gnu.org>
-
-       [smooth] Remove compiler warnings.
-
-       * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
-
-2016-06-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Sanitize memory managenent.
-
-       * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
-
-2016-06-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Remove `band_shoot' that never worked.
-
-       * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'.
-       (gray_convert_glyph): Updated.
-
-2016-06-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [raster, smooth] Handle FT_RENDER_POOL_SIZE better.
-
-       * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro.
-       (ft_black_render): Updated.
-       * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro.
-       (gray_raster_render): Updated.
-
-2016-06-16  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/freetype.h (FREETYPE_MINOR): Set to 8.
+       (FREETYPE_PATCH): Set to 0.
 
-       * src/base/md5.c: Updated to recent version.
+       * builds/unix/configure.raw (version_info): Set to 20:0:14.
+       * CMakeLists.txt (VERSION_MINOR): Set to 8.
+       (VERSION_PATCH): Set to 0.
 
-2016-06-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+2017-05-12  Hin-Tak Leung  <htl10@users.sourceforge.net>
 
-       * src/smooth/ftgrays.c (gray_hline): Optimize if-condition.
+       Fix `FT_UINT_TO_POINTER' macro for Windows.
 
-2016-06-13  Werner Lemberg  <wl@gnu.org>
+       * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+       include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER) [_WIN64]:
+       Fix definition.
 
-       [autofit] Add support for Cherokee script.
+2017-05-11  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/autofit/afblue.dat: Add blue zone data for Cherokee.
+       [autofit] Add support for Chakma script.
 
+       * src/autofit/afblue.dat: Add blue zone data for Chakma.
        * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afscript.h: Add Cherokee standard characters.
-
-       * src/autofit/afranges.c: Add Cherokee data.
-
-       * src/autofit/afstyles.h: Add Cherokee data.
-
-2016-06-09  David Capello  <davidcapello@gmail.com>
-
-       [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files.
-
-       * CMakeLists.txt: Each time cmake is run those files are
-       modified and the whole FreeType library is recompiled.  With this
-       change we change the files only if there are real modifications, so
-       we can avoid recompilations.
-
-2016-06-09  Werner Lemberg  <wl@gnu.org>
-
-       [bdf] Check number of properties (#48166).
-
-       * src/bdf/bdflib.c (_bdf_parse_start): Implement.
+       * src/autofit/afscript.h: Add Chakma standard character.
 
-2016-06-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Chakma data.
 
-       [smooth] Re-enable new line renderer on 64-bit archs.
+2017-05-10  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new
-       implementation, where it is safe from overflows.
-
-2016-06-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Minor clean-ups.
-
-       * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way.
-       (gray_render_span): Remove spurious casts and streamline.
-
-2016-06-07  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add support for Ethiopic script.
-
-       * src/autofit/afblue.dat: Add blue zone data for Ethiopic.
+       [autofit] Add support for Kayah Li script.
 
+       * src/autofit/afblue.dat: Add blue zone data for Kayah Li.
        * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afscript.h: Add Ethiopic standard characters.
-
-       * src/autofit/afranges.c: Add Ethiopic data.
-
-       * src/autofit/afstyles.h: Add Ethiopic data.
-
-2016-06-07  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Fix compilation with VS2016 (#48126).
-
-       This compiler doesn't recognize the end-of-comment sequence `*/' if
-       it immediately follows non-ASCII characters.
-
-       * src/autofit/afscript.h: Ensure whitespace before `*/'.
-
-2016-06-04  Werner Lemberg  <wl@gnu.org>
-
-       Fix a test for named instances (#48122).
-
-       This was missed while giving negative face indices an extended
-       meaning.
-
-       * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement.
+       * src/autofit/afscript.h: Add Kayah Li standard character.
 
-2016-05-31  Nikolaus Waxweiler  <madigens@gmail.com>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Kayah Li data.
 
-       [truetype] Let SHPIX move points in the twilight zone in v40.
+2017-05-10  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
-       the twilight zone.  Otherwise, treat SHPIX the same as DELTAP.
-       Unbreaks various fonts such as older versions of Rokkitt and DTL
-       Argo T Light that would glitch severly after calling ALIGNRP after a
-       blocked SHPIX.
-
-2016-05-30  Werner Lemberg  <wl@gnu.org>
-
-       [type42] Support `CharStrings' entry format as created by LilyPond.
-
-       * src/type42/t42parse.c (t42_parse_charstrings): Handle entries
-       having the format
-
-         (foo) cvn 12345 def
-
-2016-05-28  Werner Lemberg  <wl@gnu.org>
-
-       * src/autofit/afranges.c: Remove `UL' postfix from hex numbers.
-
-       Suggested by Alexei.  `UL' is only needed for 16bit compilers, but
-       it seems noone is using this anymore (and we no longer test whether
-       FreeType compiles in such an environment).  Otherwise, it is easy to
-       add the postfix to the `AF_UNICODE_RANGE' macro.
-
-2016-05-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Shrink bisection stack.
-
-       The convergence of Bézier flatteners is fast with the deviation
-       from straight line being assymptotically cut 4-fold on each bisection.
-       This justifies smaller bisection stack size.
-
-       * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
-       (gray_render_conic): Create and use conic `bez_stack'. Move back the
-       band analysis from...
-       (gray_conic_to): ... here.
-       (gray_render_cubic): Create and use cubic `bez_stack'. Move back the
-       band analysis from...
-       (gray_cubic_to): ... here.
-       (gray_move_to): Updated.
-
-2016-05-25  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Fixes for Armenian and Gujarati ranges.
-
-       * src/autofit/afranges.c (af_armn_uniranges): Corrected.
-       (af_guru_nonbase_uniranges): Make U+0A3E a base character.
-
-2016-05-24  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add support for Armenian script.
-
-       * src/autofit/afblue.dat: Add blue zone data for Armenian.
+       [autofit] Add support for Bamum script.
 
+       * src/autofit/afblue.dat: Add blue zone data for Bamum.
        * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afscript.h: Add Armenian standard characters.
-
-       * src/autofit/afranges.c: Add Armenian data.
-
-       * src/autofit/afstyles.h: Add Armenian data.
-
-2016-05-23  Werner Lemberg  <wl@gnu.org>
-
-       * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'.
-
-       This was commented about 10 years ago – I think the reason then to
-       disable libtool's `-export-symbols' option was to give some badly
-       programmed applications access to internal FreeType functions.
-
-       I believe that we should no longer take care of such programs; the
-       number of symbols exported should be rather restricted as much as
-       possible.
-
-2016-05-22  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afscript.h: Add Bamum standard character.
 
-       [autofit] Add blue-zone support for Gurmukhi script.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Bamum data.
 
-       This essentially moves the Gurmukhi script from the `Indic' hinter to
-       the `Latin' hinter.
+2017-05-10  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/autofit/afblue.dat: Add blue zone data for Gurmukhi.
+       [autofit] Add support for Saurashtra script.
 
+       * src/autofit/afblue.dat: Add blue zone data for Saurashtra.
        * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afscript.h: Add Gurmukhi standard characters and move
-       data out of AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afranges.c: Move Gurmukhi data out of
-       AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afstyles.h: Update Gurmukhi data; in particular, use
-       AF_WRITING_SYSTEM_LATIN.
-
-2016-05-21  Werner Lemberg  <wl@gnu.org>
-
-       Minor clang++ fixes.
-
-       * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c
-       (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add
-       initializer.
-
-       * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit
-       conversion from NULL to boolean.
-
-2016-05-21  Werner Lemberg  <wl@gnu.org>
-
-       Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955).
-
-       * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use
-       braces for `extern "C++"'.
-
-2016-05-17  Nikolaus Waxweiler  <madigens@gmail.com>
-
-       [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3].
-
-       * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with...
-       (tt_loader_set_pp): ... this new function.
-       Update all callers.
-
-2016-05-17  Nikolaus Waxweiler  <madigens@gmail.com>
-
-       [truetype] New implementation of v38 bytecode interpreter [2/3].
-
-       This patch actually modifies the bytecode interpreter.
-
-       See added comments in `ttinterp.h' for more information on this and
-       the following commit in the series.
-
-       * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by...
-       (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY,
-       SUBPIXEL_HINTING_MINIMAL): ...new macros.
-       (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backwards
-       compatibility.
-       Updated.
-       (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD):
-       Updated.
-       (Ins_INSTCTRL): Handle native ClearType mode flag.
-       Updated.
-       (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backwards
-       compatibility.
-       (Move_Zp2_Point): Ditto.
-       (Ins_SHP): Updated.
-       (Ins_SHPIX): Handle backwards compatibility.
-       Updated.
-       (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated.
-       (Ins_ALIGNRP): Updated.
-       (Ins_IUP, Ins_DELTAP): Handle backwards compatibility.
-       Updated.
-       (Ins_GETINFO): Handle v38 flags.
-       Updated.
-       (TT_RunIns): Handle backwards compatibility mode.
-       Updated.
-
-2016-05-17  Nikolaus Waxweiler  <madigens@gmail.com>
-
-       [truetype] New implementation of v38 bytecode interpreter [1/3].
-
-       This patch prepares data structures and the like.
-
-       See added comments in `ttinterp.h' for more information on this and
-       the following commits in the series.
-
-       * devel/ftoption.h, include/freetype/config/ftoption.h
-       (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate
-       between subpixel versions.
-       (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY,
-       TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros.
-
-       * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro.
-
-       * include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
-
-       * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
-       `subpixel_hinting_lean', `vertical_lcd_lean',
-       `backwards_compatibility', `iupx_called', iupy_called', and
-       `grayscale_cleartype' for new hinting mode.
-
-       * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
-       interpreters conditionally.
-
-       * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
-       in v38 backwards compatibility mode.
-       Updated.
-       (compute_glyph_metrics): Add v38 backwards compatibility mode
-       constraint for adjusting advance widths.
-       Updated.
-       (tt_loader_init): Handle new flags `subpixel_hinting_lean',
-       `grayscale_cleartype', and `vertical_lcd_lean'.
-       Updated.
-       (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP):
-       Updated.
-
-       * src/truetype/ttobjs.c (tt_driver_init): Conditionally set
-       default interpreter version number.
-
-       * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated.
-
-2016-05-17  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Fix matrix scaling (#47848).
-
-       * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro.
-
-       * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling
-       value of all matrix coefficients to scale matrix.
-
-       * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for
-       matrix normalization if `matrix->yy' is zero.
-
-2016-05-16  Werner Lemberg  <wl@gnu.org>
-
-       [base] Reject invalid sfnt Mac resource (#47891).
-
-       * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity
-       of `CID ' and `TYPE1' table offset and length.
-
-2016-05-16  Werner Lemberg  <wl@gnu.org>
-
-       [cid] Fix scanning for `StartData' and `/sfnts' (#47892).
-
-       * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN):
-       New macros.
-       (cid_parser_new): Fix and document algorithm.
-
-2016-05-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
-
-       [truetype] Improve the recursive reference detector.
-
-       The previous fix for #46372 misunderstood a composite glyph referring
-       same component twice as a recursive reference.  See the discussion
-
-         http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
-
-       Thanks to Khaled Hosny for finding this issue.
-
-       * src/truetype/ttgload.c (ft_list_get_node_at): A function to get
-       the i-th node from FT_List.
-       (load_truetype_glyph): In the traversal scan of the reference tree
-       in the composite glyph, we clear the nodes filled by previous
-       sibling chain.
-
-2016-05-07  Werner Lemberg  <wl@gnu.org>
-
-       [cache] Allow value 0 for face ID.
-
-       We never dereference `face_id', and some implementations might use a
-       running number instead of a pointer.  Additionally, disallowing
-       value zero was undocumented.
-
-       * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c
-       (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for
-       `face_id'.
-
-2016-05-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] More efficient accounting of conic splits and draws.
-
-       A single decrement counter of segments to draw, instead of an array,
-       contains all the information necessary to decide when to split and
-       when to draw a conic segment. The number of splits before each draw is
-       equal to the number of trailing zeros in the counter.
-
-       * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'.
-       (gray_render_conic): Updated to use decrement counter of segments.
-
-2016-05-05  Werner Lemberg  <wl@gnu.org>
-
-       [cff, truetype] Fix logic for `FT_Property_Set'.
-
-       Otherwise some properties could be set to arbitrary values, which is
-       harmless, but querying could give wrong positive results.
+       * src/autofit/afscript.h: Add Saurashtra standard character.
 
-       * src/cff/cffdrivr.c (cff_property_set) [hinting-engine],
-       * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]:
-       Only allow defined values.
-
-2016-04-25  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add blue-zone support for Gujarati script.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Saurashtra
+       data.
 
-       This essentially moves the Gujarati script from the `Indic' hinter to
-       the `Latin' hinter.
+2017-05-10  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/autofit/afblue.dat: Add blue zone data for Gujarati.
+       [autofit] Add support for Buhid script.
 
+       * src/autofit/afblue.dat: Add blue zone data for Buhid.
        * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afscript.h: Add Gujarati standard characters and move
-       data out of AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afranges.c: Move Gujarati data out of
-       AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afstyles.h: Update Gujarati data; in particular, use
-       AF_WRITING_SYSTEM_LATIN.
-
-2016-04-24  Werner Lemberg  <wl@gnu.org>
-
-       Minor.
-
-       * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro
-       argument with parentheses.
-
-2016-04-24  Werner Lemberg  <wl@gnu.org>
-
-       [truetype] Fix deallocation in case of error (#47726).
-
-       * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in
-       `outline' that are going to be deallocated in case of error.
-
-2016-04-23  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Improve Georgian blue zone characters.
+       * src/autofit/afscript.h: Add Buhid standard character.
 
-       Suggested by Akaki Razmadze <razmadzekoko@gmail.com>.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Buhid data.
 
-       * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM):
-       Updated.
-
-       * src/autofit/afblue.c: Regenerated.
+2017-05-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-2016-04-16  David Capello  <davidcapello@gmail.com>
+       [autofit] Add support for Shavian script.
 
-       [cmake] Honor SKIP_INSTALL_* settings (as used in zlib).
-
-       As FreeType depends on zlib, if we don't install zlib (e.g., because
-       we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too
-       (cmake triggers an error saying that FreeType cannot be installed
-       because zlib target isn't in the export set).
+       * src/autofit/afblue.dat: Add blue zone data for Shavian.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS',
-       `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings.
+       * src/autofit/afscript.h: Add Shavian standard character.
 
-2016-04-16  Behdad Esfahbod  <behdad@behdad.org>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Shavian data.
 
-       [truetype] Another fix for non-intermediate GX tuples.
+2017-05-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing
-       cases.
+       [autofit] Add support for Vai script.
 
-2016-04-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/autofit/afblue.dat: Add blue zone data for Vai.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       Remove forgotten macro.
+       * src/autofit/afscript.h: Add Vai standard character.
 
-       * include/freetype/internal/internal.h
-       [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Vai data.
 
-2016-04-09  Werner Lemberg  <wl@gnu.org>
+2017-05-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       [autofit] Add support for Georgian scripts.
+       [autofit] Add support for Osmanya script.
 
-       Georgian is problematic, since `uppercase' forms of Mkhedruli
-       (called Mtavruli) are not yet defined in Unicode, which means that
-       proper blue zones can't be defined.  However, there is already a
-       proposal submitted to Unicode; see
+       * src/autofit/afblue.dat: Add blue zone data for Osmanya.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-         http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
+       * src/autofit/afscript.h: Add Osmanya standard character.
 
-       Additionally, due to historical reasons, Unicode treats Khutsuri as
-       the same script as Mkhedruli, and so does OpenType.  However, since
-       the two scripts have completely different shapes it can happen that
-       blue zones differ considerably.  The tag `geok' used here (derived
-       from ISO 15924) to differentiate the two scripts is not an OpenType
-       tag in use.  If we now have a font that contains both glyphs for
-       Mkhedruli and Khutsuri, and it uses OpenType features for both also,
-       HarfBuzz unavoidably treats all glyphs as `geor'.  As a consequence,
-       blue zones for `geok' are not used for glyphs involved in the
-       OpenType features.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osmanya data.
 
-       An issue not yet resolved is which OpenType feature should be used
-       to access Mtavruli glyph shapes; right now, FreeType doesn't set up
-       support for them, but it is easy to add them later on as soon as
-       more information is available.
+2017-05-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/autofit/afblue.dat: Add blue zone data for Georgian.
+       [autofit] Add support for Coptic script.
 
+       * src/autofit/afblue.dat: Add blue zone data for Coptic.
        * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afscript.h: Add Georgian standard characters.
-
-       * src/autofit/afranges.c: Add Georgian data.
-
-       * src/autofit/afstyles.h: Add Georgian data.
+       * src/autofit/afscript.h: Add Coptic standard character.
 
-2016-04-05  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Coptic data.
 
-       [autofit] Provide dummy blue zone for pseudo script `none'.
+2017-05-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       Even if the dummy hinter is used as the handler for `none' (which
-       doesn't use blue zones), it is more consistent than the old value
-       (which was 0), pointing to Arabic...
+       [autofit] Add support for Carian script.
 
-       * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'.
+       * src/autofit/afblue.dat: Add blue zone data for Carian.
        * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE.
+       * src/autofit/afscript.h: Add Carian standard character.
 
-2016-03-30  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Carian data.
 
-       * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
+2017-05-07  Werner Lemberg  <wl@gnu.org>
 
-2016-03-30  Werner Lemberg  <wl@gnu.org>
+       [truetype] Add tricky font `DFGirl-W6-WIN-BF' (from Dynalab).
 
-       * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate.
+       Reported by Roy Tam <roytam@gmail.com>.
 
-2016-03-30  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it.
 
-       * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567).
-
-2016-03-29  Werner Lemberg  <wl@gnu.org>
+2017-05-07  Roy Tam  <roytam@gmail.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift.
+       [truetype] More tricky fonts (mainly from Dynalab).
 
-2016-03-29  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttobjs.c (tt_check_trickyness_family,
+       tt_check_trickyness_sfnt_ids): Add them.
 
-       [pfr] Fix binary search (#47514).
+2017-05-07  Werner Lemberg  <wl@gnu.org>
 
-       * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border
-       conditions correctly.
+       [truetype] Add tricky font `DLCHayMedium' (from Dynalab).
 
-2016-03-29  Werner Lemberg  <wl@gnu.org>
+       Reported by Roy Tam <roytam@gmail.com>.
 
-       [pfr] Minor.
+       * src/truetype/ttobjs.c (tt_check_trickyness_family): Implement it.
 
-       * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left',
-       `right', and `middle' with `min', `max', and `mid' as used in other
-       FreeType binary search code.
-       (pfr_load_bitmap_metrics): Fix invalid left shift.
+2017-05-03  Werner Lemberg  <wl@gnu.org>
 
-2016-03-29  Werner Lemberg  <wl@gnu.org>
+       */*: s/backwards compatibility/backward compatibility/.
 
-       * src/pfr/pfrtypes.h: Replace all enums with macros.
+2017-05-03  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       We need `~FOO' to unset bits, and only with unsigned values (which
-       `enum' isn't normally) this works cleanly.
+       [autofit] Add support for Unified Canadian Syllabics script.
 
-2016-03-26  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afblue.dat: Add blue zone data for Unified Canadian
+       Syllabics.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       [pfr] Robustify bitmap strike handling (#47514).
+       * src/autofit/afscript.h: Add Unified Canadian Syllabics standard
+       character.
 
-       We did a binary search for a charcode without ensuring that the
-       searched data is ordered.  Validating the order is now done lazily,
-       this is, the first access to a bitmap glyph triggers the order check
-       in the corresponding bitmap strike.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Unified
+       Canadian Syllabics data.
 
-       * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values
-       `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'.
+2017-05-03  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument
-       a pointer.  Handle new PFR_BITMAP_XXX flags.
-       (pfr_slot_load_bitmap): Updated.
+       [autofit] Add blue-zone support for Sundanese script.
 
-2016-03-26  Werner Lemberg  <wl@gnu.org>
+       This essentially moves the Sundanese script from the `Indic' hinter
+       to the `Latin' hinter.
 
-       [pfr] Fix handling of compound glyphs.
+       * src/autofit/afblue.dat: Add blue zone data for Sundanese.
 
-       Extra items are indicated with different bit positions.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace
-       `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and
-       `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'.
+       * src/autofit/afscript.h: Add Sundanese standard character and move
+       data out of AF_CONFIG_OPTION_INDIC block.
 
-       * src/pfr/pfrgload.c (pfr_glyph_load_simple,
-       pfr_glyph_load_compound): Use them.
-
-2016-03-25  Werner Lemberg  <wl@gnu.org>
-
-       [pfr] Minor.
-
-       * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of
-       bare numbers.
-
-2016-03-25  Werner Lemberg  <wl@gnu.org>
-
-       [pfr] Various clang sanitizer fixes.
-
-       * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle
-       signed nibbles.
-       (pfr_slot_load_bitmap): Correctly exit frame in case of error.
-       Fix invalid left shifts.
-
-2016-03-23  Werner Lemberg  <wl@gnu.org>
-
-       Rename `VERSION.DLL' (#47472).
-
-       * docs/VERSION.DLL: Renamed to...
-       * docs/VERSIONS.TXT: ...this.
-
-2016-03-23  Werner Lemberg  <wl@gnu.org>
-
-       [raster, smooth] Directly test outline size (#47500).
-
-       This improves stand-alone compilation.
-
-       * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to...
-
-       * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c
-       (gray_raster_render): ...these functions.
-
-2016-03-23  Werner Lemberg  <wl@gnu.org>
-
-       [raster, smooth] Fix some clang sanitizer runtime issues.
-
-       * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode,
-       ft_black_render): Harmonize signatures with `ftimage.h'.
-
-       * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset):
-       Ditto.
-
-2016-03-22  Werner Lemberg  <wl@gnu.org>
-
-       * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor.
-
-       This fixes an AddressSanitizer issue:
-
-         ttgload.c:430:7: runtime error: null pointer passed as argument 1,
-                          which is declared to never be null
-
-2016-03-21  Werner Lemberg  <wl@gnu.org>
-
-       * src/autofit/afhints.c (af_glyph_hints_reload): Thinko.
-
-       This fixes the previous commit to this file.
-
-2016-03-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Partly revert recent changes.
-
-       * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework
-       conditions to fix rendering issues.
-
-2016-03-20  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Show `near' points in tracing.
-
-       * src/autofit/afhints.h (AF_FLAG_NEAR): New macro.
-
-       * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it.
-       (af_glyph_hints_reload): Handle AF_FLAG_NEAR.
-
-2016-03-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Minor refactoring and microoptimizations.
-
-       * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
-       band clipping from here.
-       (gray_conic_to, gray_cubic_to): ... to here.
-       (gray_rander_line, gray_render_scanline): Initialize variables closer
-       to their use.
-
-2016-03-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Minor refactoring.
-
-       * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
-       upscaling from here.
-       (gray_conic_to, gray_cubic_to): ... to here.
-
-2016-03-15  Werner Lemberg  <wl@gnu.org>
-
-       * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize.
-
-2016-03-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Temporarily revert 6eb6158dd787 (#47114).
-
-       * src/smooth/ftgrays.c (gray_render_line): Old implementation.
-
-2016-03-12  Werner Lemberg  <wl@gnu.org>
-
-       [ftfuzzer] Improve coverage of rasterfuzzer.
-
-       * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use
-       input data for `tags' array also.
-       Trim input data to get more positive hits.
-
-2016-03-11  Pavlo Denysov  <paul.kiev+savannah@gmail.com>
-
-       Fix CMake issues for iOS (patch #8941).
-
-       * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory.
-       * builds/cmake/iOS.cmake: No longer enforce gcc.
-
-2016-03-09  Behdad Esfahbod  <behdad@behdad.org>
-
-       [truetype] Fix handling of non-intermediate GX tuples.
-
-       We probably did not notice this as all fonts we tested had only
-       tuple_coords[i] be +1 or -1 for non-intermediate tuples.
-
-       * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it.
-
-2016-03-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [base] Refuse to render enormous outlines (#47114).
-
-       The goal is to avoid integer overflows in the rendering algorithms.
-       The limit is chosen arbitrarily at some 2^18 pixels, which should be
-       enough for modern devices including printers.
-
-       * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject
-       enormous outlines.
-
-2016-03-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Replace left shifts with multiplications (#47114).
-
-       * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it.
-
-2016-03-05  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Avoid excessive stem length rounding (#25392).
-
-       * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument
-       to pass difference between hinted and unhinted position of base
-       point; use this to adjust the stem width depending on the PPEM so
-       that it doesn't become too large under certain circumstances.
-       Update all callers using value 0 for this argument except...
-       (af_latin_align_linked_edge): Pass position delta of base point to
-       `af_latin_compute_stem_width'.
-
-2016-03-05  J Raynor  <jxraynor@gmail.com>
-
-       Make FreeType compile on AIX out of the box.
-
-       * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on
-       AIX.
-
-2016-03-01  Werner Lemberg  <wl@gnu.org>
-           Kostya Serebryany  <kcc@google.com>
-
-       [ftfuzzer] Add unit for testing smooth and black rasterizers.
-
-       * src/tools/ftfuzzer/rasterfuzzer.cc: New file.
-
-2016-03-01  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
-
-       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
-       `prev_segment' after reallocation.
-
-2016-03-01  Werner Lemberg  <wl@gnu.org>
-
-       Fix clang warnings.
-
-       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
-       FT_UShort for `min_flags' and `max_flags'.
-       Initialize `prev_*' variables.
-
-       * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
-       types of local variables.
-
-       * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
-       Update `printf' format string.
-
-       * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
-       (LLVMFuzzerTestOneInput): Fix loop type.
-
-2016-02-29  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add blue-zone support for Sinhala script.
-
-       This essentially moves the Sinhala script from the `Indic' hinter to
-       the `Latin' hinter.
-
-       * src/autofit/afblue.dat: Add blue zone data for Sinhala.
-
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
-
-       * src/autofit/afscript.h: Add Sinhala standard character and move data
-       out of AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afranges.c: Move Sinhala data out of
-       AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afstyles.h: Update Sinhala data; in particular, use
-       AF_WRITING_SYSTEM_LATIN.
-
-2016-02-27  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Properly handle spikes pointing to the x-axis.
-
-       An example that gets better rendered is glyph `uusignTaml' (glyph
-       index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem.
-
-       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly
-       handle segments where the last point of the first segment is
-       identical to the first point in the second one.  This can happen for
-       malformed fonts or spikes.  We either merge the new segment with the
-       previous one (both segments point into the same direction), or we
-       discard the shorter segment if they point into different directions.
-
-2016-02-27  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Minor code clean-up.
-
-       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change
-       some local variable names to better differentiate between values
-       along a segment and values orthogonal to it.
-
-2016-02-26  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Improve BOUND action.
-
-       In complex glyph shapes, the original logic was too simple to cater
-       for situations that would actually need something similar to PS Hint
-       masks.  This fix should alleviate the worst cases.
-
-       * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow
-       complete disappearance of stems.
-
-2016-02-25  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add blue-zone support for Tamil script.
-
-       This essentially moves the Tamil script from the `Indic' hinter to
-       the `Latin' hinter.
-
-       * src/autofit/afblue.dat: Add blue zone data for Tamil.
-
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
-
-       * src/autofit/afscript.h: Add Tamil standard character and move data
-       out of AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afranges.c: Move Tamil data out of
-       AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afstyles.h: Update Tamil data; in particular, use
-       AF_WRITING_SYSTEM_LATIN.
-
-2016-02-18  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add blue-zone support for Malayalam script.
-
-       This essentially moves the Malayalam script from the `Indic' hinter
-       to the `Latin' hinter.
-
-       * src/autofit/afblue.dat: Add blue zone data for Malayalam.
-
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
-
-       * src/autofit/afscript.h: Add Malayalam standard characters and move
-       data out of AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afranges.c: Move Malayalam data out of
-       AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afstyles.h: Update Malayalam data; in particular, use
-       AF_WRITING_SYSTEM_LATIN.
-
-2016-02-16  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [smooth] Fix integer overflow (#47114).
-
-       * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
-
-2016-02-15  Werner Lemberg  <wl@gnu.org>
-
-       * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
-
-2016-02-15  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Handle T2 operator only with old CFF engine (#47157).
-
-       * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with
-       #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif.
-
-2016-02-15  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Partially handle `load' and `store' ops in old CFF engine.
-
-       Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be
-       displayed.
-
-       * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store,
-       cff_op_load>: Partially implement it.
-
-       * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass
-       the number of Multiple Master axes.
-       Update all callers.
-       (cff_parse_multiple_master): Get number of axes.
-       (cff_parser_run) <opcode 31>: Updated.
-       * src/cff/cffparse.h: Updated.
-       (CFF_ParserRec): Add `num_axes' field.
-
-       * src/cff/cffload.c: Updated.
-
-       * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field.
-
-2016-02-15  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Correctly trace SIDs that contain NULL bytes.
-
-       We need this to properly trace Multiple Master CFFs, which contain
-       two SIDs that are charstrings.
-
-       This commit makes FreeType also show the last SID, omitted
-       previously due to a bug.
-
-       * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field.
-
-       * src/cff/cffload.c (cff_index_get_pointers): Add argument to return
-       the pool size.
-       Update all callers.
-
-       * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly
-       access `cff->strings' to display the non-default strings.
-
-2016-02-14  Werner Lemberg  <wl@gnu.org>
-
-       * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H.
-
-2016-02-14  Werner Lemberg  <wl@gnu.org>
-
-       * src/cff/cffparse.c: Include `cffgload.h'.
-
-       Problem reported by Colin Walters <walters@verbum.org>.
-
-2016-02-14  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Make old CFF engine show MM CFFs (without variations).
-
-       The new code only displays the first master in the font.
-
-       * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new
-       parameter to allow function calls from dictionaries also.
-       <cff_op_blend>: Partially implement it.
-       Update all callers.
-       * src/cff/cffgload.h: Updated.
-
-       * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the
-       number of Multiple Master designs.
-       Update all callers.
-       (cff_parse_multiple_master): New function to rudimentarily parse
-       operator.
-       (cff_parser_run): Handle `T2' operator.
-       * src/cff/cffparse.h: Updated.
-       (CFF_ParserRec): Add `num_designs' field.
-
-       * src/cff/cffload.c: Updated.
-
-       * src/cff/cfftoken.h: Handle `MultipleMaster' operator.
-
-       * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field.
-
-       * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for
-       MM CFFs.
-
-2016-02-09  Werner Lemberg  <wl@gnu.org>
-
-       [docmaker] Don't emit trailing newlines.
-
-       * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
-       Use `rstrip'.
-
-2016-02-07  Werner Lemberg  <wl@gnu.org>
-
-       * Version 2.6.3 released.
-       =========================
-
-
-       Tag sources with `VER-2-6-3'.
-
-       * docs/VERSION.DLL: Update documentation and bump version number to
-       2.6.3.
-
-       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
-       builds/windows/vc2005/index.html,
-       builds/windows/vc2008/freetype.vcproj,
-       builds/windows/vc2008/index.html,
-       builds/windows/vc2010/freetype.vcxproj,
-       builds/windows/vc2010/index.html,
-       builds/windows/visualc/freetype.dsp,
-       builds/windows/visualc/freetype.vcproj,
-       builds/windows/visualc/index.html,
-       builds/windows/visualce/freetype.dsp,
-       builds/windows/visualce/freetype.vcproj,
-       builds/windows/visualce/index.html,
-       builds/wince/vc2005-ce/freetype.vcproj,
-       builds/wince/vc2005-ce/index.html,
-       builds/wince/vc2008-ce/freetype.vcproj,
-       builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/.
-
-       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
-
-       * builds/unix/configure.raw (version_info): Set to 18:3:12.
-       * CMakeLists.txt (VERSION_PATCH): Set to 3.
-
-       * docs/CHANGES: Updated.
-
-2016-02-07  Werner Lemberg  <wl@gnu.org>
-
-       Fix another runtime error found by clang's sanitizer (#47082).
-
-       * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
-       empty input buffer.
-
-2016-02-07  Werner Lemberg  <wl@gnu.org>
-
-       Fix runtime errors found by clang's sanitizer (#47082).
-
-       * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
-       (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
-       Properly handle empty input buffer.
-
-2016-02-07  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Minor.
-
-       * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
-       Remove dead code.
-
-2016-02-07  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Implement missing operators in new engine (except `random').
-
-       * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
-
-       * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
-       following operators: abs, add, and, div, drop, dup, eq, exch, get,
-       ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
-
-       * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
-       auxiliary function for `roll' operator.
-
-2016-02-06  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Fix some Type 2 operators in old CFF engine.
-
-       * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
-       operator, add `not' and (unsupported) `blend' operators.
-
-2016-02-05  Sebastian Rasmussen  <sebras@gmail.com>
-
-       Make direct call of `make install' work (#47072).
-
-       * builds/unix/unix-def.in (freetype-config): Make sure
-       `freetype-config' is generated for both make targets (`all' and
-       `install').
-
-2016-02-05  Werner Lemberg  <wl@gnu.org>
-
-       [base] Fix advance width loading for MM and GX fonts (#47064).
-
-       * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
-       MM and GX fonts.
-       Update callers.
-
-2016-02-03  Werner Lemberg  <wl@gnu.org>
-
-       [cff] Fix handling of face_index == -1 for pure CFF.
-
-       * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
-
-2016-01-30  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Minor tracing improvement.
-
-       * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
-       at the start of a new contour.
-
-2016-01-28  Nikolaus Waxweiler  <madigens@gmail.com>
-
-       Remove unpatented hinter (3/3).
-
-       * include/freetype/config/ftoption.h
-       (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
-
-       * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
-       `ignore_unpatented_hinter' field.
-       Update users.
-       (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
-       Update users.
-
-       * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
-       `unpatented_hinting' field.
-       Update users.
-
-       * src/base/ftpatent.c (_tt_check_patents_in_range,
-       _tt_check_patents_in_table, _tt_face_check_patents): Remove.
-       (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
-       Replace code with dummies.
-
-       * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
-       * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
-       field.
-
-2016-01-28  Nikolaus Waxweiler  <madigens@gmail.com>
-
-       Remove unpatented hinter (2/3).
-
-       * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
-
-2016-01-28  Nikolaus Waxweiler  <madigens@gmail.com>
-
-       Remove unpatented hinter (1/3).
-
-       * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
-       Remove all code related to this macro.
-
-2016-01-28  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add blue-zone support for Kannada script.
-
-       This essentially moves the Kannada script from the `Indic' hinter to
-       the `Latin' hinter.
-
-       * src/autofit/afblue.dat: Add blue zone data for Kannada.
-
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
-
-       * src/autofit/afscript.h: Add Kannada standard characters and move
-       data out of AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afranges.c: Move Kannada data out of
-       AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afstyles.h: Update Kannada data; in particular, use
-       AF_WRITING_SYSTEM_LATIN.
-
-2016-01-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       Better access to 64-bit integers for C99 compilers.
-
-       * include/freetype/config/ftconfig.h [FT_LONG64]: Use
-       __STDC_VERSION__ to define 64-bit integers.
-       * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
-       * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
-
-2016-01-21  Werner Lemberg  <wl@gnu.org>
-
-       [gxvalid] Remove commented out code.
-
-       * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
-
-2016-01-20  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Complete last autofit commit.
-
-       Problem reported by Kostya Serebryany <kcc@google.com>.
-
-       * src/autofit/afshaper.c (af_shaper_get_coverage)
-       [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
-
-2016-01-20  Werner Lemberg  <wl@gnu.org>
-
-       Still handle `__FTERRORS_H__'.
-
-       We need this for backwards compatibility.
-
-       Problem reported by John Emmas <johne53@tiscali.co.uk>.
-
-       * include/freetype/fterrors.h: Fix inclusion guard so that
-       undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
-       expected.
-
-2016-01-19  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Fix handling of default script.
-
-       Patch taken from ttfautohint, commit
-       071ae2c00e0d67f9d19418f4fade1c23d27dc185.
-
-       There were two bugs.
-
-         - We now use non-standard script tags like `khms' for special
-           purposes.  However, HarfBuzz maps such tags to `DFLT', and
-           without this commit the associated lookups were incorrectly
-           assigned to the non-standard tags.
-
-         - Let's assume we have a Bengali font, and the font's `DFLT'
-           script tag handles the necessary lookups for Bengali, too.
-           Without this commit, the `DFLT' lookups were assigned to
-           ttfautohint's default script (usually `latn') before the
-           standard lookups for Bengali were handled.
-
-           We now have the following order while searching for covered
-           glyph indices.
-
-             special features of scripts (e.g. `sups' for Cyrillic)
-             Unicode mappings of scripts
-             remaining features of scripts (especially important for Indic
-               scripts)
-             default features of default script
-
-       * src/autofit/afshaper.c, src/autofit/afshaper.h
-       (af_shaper_get_coverage): Add boolean parameter to indicate default
-       script.
-       Update all callers.
-
-       * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
-       Fix search order for coverages.
-
-2016-01-19  Werner Lemberg  <wl@gnu.org>
-
-       Various minor clang fixes.
-
-       * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
-       src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
-       `ch'.
-
-       * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
-
-       * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
-
-       * src/base/fthash.c (hash_num_lookup): Add cast.
-
-       * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
-
-       * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
-       redundant code.
-
-       * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
-       cast.
-
-       * src/type1/t1load.c (parse_subrs): Fix type of `count'.
-
-2016-01-19  Derek B. Noonburg  <derekn@glyphandcog.com>
-
-       [truetype] Add another tricky font.
-
-       * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
-       (sfnt_id): Add variant of `DFKaiShu'.
-
-2016-01-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
-
-       [base] Empower `FT_Library_SetLcdFilterWeights'.
-
-       * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
-       in addition to setting weights.
-       (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
-       FT_FORCE_LEGACY_LCD_FILTER.
-       * include/freetype/ftlcdfil.h: Documentation update.
-
-2016-01-12  Werner Lemberg  <wl@gnu.org>
-
-       Don't use macro names that start with `_[A-Z]' [3/3].
-
-       Such macro names are reserved for both C and C++.
-
-       * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
-       Update all callers.
-       (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
-       * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
-
-2016-01-12  Werner Lemberg  <wl@gnu.org>
-
-       Don't use macro names that start with `_[A-Z]' [2/3].
-
-       Such macro names are reserved for both C and C++.
-
-       * include/freetype/ftimage.h, src/raster/ftraster.c,
-       src/smooth/ftgrays.c, src/smooth/ftgrays.h:
-       s/_STANDALONE_/STANDALONE_/.
-
-2016-01-12  Werner Lemberg  <wl@gnu.org>
-
-       Don't use macro names that start with `_[A-Z]' [1/3].
-
-       Such macro names are reserved for both C and C++.
-
-       * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
-       `BDF_XXX_'.
-
-2016-01-12  Werner Lemberg  <wl@gnu.org>
-
-       Don't use macro names that contain `__' [2/2].
-
-       Such macro names are reserved for both C and C++.
-
-       * src/cache/*: s/__/_/.
-
-2016-01-12  Werner Lemberg  <wl@gnu.org>
-
-       Don't use macro names that contain `__' [1/2].
-
-       Such macro names are reserved for both C and C++.
-
-       * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
-
-2016-01-10  Jered Gray  <jegray@google.com>
-
-       [cff] Fix usage of `|' operator.
-
-       * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
-       default]: `|' is not guaranteed to be processed from left to right
-       by the compiler.  However, the code repeatedly calls
-       `cf2_buf_readByte' to get the arguments to `|' ...  Fix this.
-
-2015-12-25  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Make top-to-bottom hinting work in latin auto-hinter.
-
-       This improves rendering of scripts like Bengali or Devanagari.
-
-       * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
-       pass top-to-bottom hinting flag.  This makes the function sort edges
-       in descending vertical position.
-
-       * src/autofit/afhints.c: Updated.
-
-       * src/autofit/aflatin.c (af_latin_hints_compute_edges,
-       af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
-
-       * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
-       src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
-
-2015-12-24  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add hinting direction to `AF_ScriptClassRec'.
-
-       Still unused.
-
-       * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
-
-       * src/autofit/aftypes.h (AF_ScriptClassRec): Add
-       `top_to_bottom_hinting' field.
-       (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
-       (AF_DEFINE_SCRIPT_CLASS): Updated.
-
-2015-12-23  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Start implementing hinting direction (up/down, down/up).
-
-       Right now, it does nothing.
-
-       * src/autofit/afscript.h: Add another parameter to `SCRIPT',
-       specifying hinting direction.
-
-       * src/autofit/afglobal.c, src/autofit/afglobal.h,
-       src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
-       src/autofit/aftypes.h: Extend `SCRIPT' definitions.
-
-2015-12-22  Werner Lemberg  <wl@gnu.org>
-
-       * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
-
-2015-12-22  Werner Lemberg  <wl@gnu.org>
-
-       [base] Make hash interface symmetric.
-
-       Use `num' and `str' infixes everywhere.
-
-       * src/base/fthash.c (ft_hash_init): Renamed to...
-       (hash_init): ... This.
-       (ft_hash_str_init, ft_hash_num_init): New functions.
-       (ft_hash_free): Renamed to...
-       (ft_hash_str_free): ... This.
-
-       * include/freetype/internal/fthash.h: Updated.
-
-       * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
-
-2015-12-21  Werner Lemberg  <wl@gnu.org>
-
-       [type1] Avoid shift of negative numbers (#46732).
-
-       * src/type1/t1load.c (parse_subrs): Do it.
-
-2015-12-20  Werner Lemberg  <wl@gnu.org>
-
-       [type1, psaux] Handle large values of num_subrs correctly (#46692).
-
-       We now use a hash to map from subr indices to array elements holding
-       the subroutines, if necessary.
-
-       * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
-       (T1_FontRec): Add `subrs_hash' field.
-
-       * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
-       (T1_DecoderRec): Add `subrs_hash' field.
-
-       * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
-
-       * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
-       (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
-
-       * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
-       (parse_subrs): Use hash for subr indices that exceed the allocated
-       number of subr slots.
-       (t1_init_loader): Remove unnecessary code.
-       (t1_done_loader, T1_Open_Face): Updated.
-
-       * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
-       T1_Load_Glyph): Updated.
-
-       * src/type1/t1objs.c (T1_Face_Done): Updated.
-
-       * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
-       (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
-       necessary.
-
-       * src/cid/cidgload.c (cid_load_glyph): Updated.
-
-2015-12-20  Werner Lemberg  <wl@gnu.org>
-
-       [base] Thinko: Remove free function pointer.
-
-       We don't copy keys or values while hashing.
-
-       * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
-       (FT_HashRec): Remove `free' field.
-
-       * src/base/fthash.c (hash_str_free): Removed.
-       (ft_hash_init, ft_hash_free): Updated.
-
-2015-12-20  Werner Lemberg  <wl@gnu.org>
-
-       [base, bdf] Don't expose `FT_Hashnode' in hash functions.
-
-       * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
-       ft_hash_num_lookup): Return pointer to `size_t' instead of
-       `FT_Hashnode'.
-
-       * include/freetype/internal/fthash.h: Updated.
-
-       * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
-       bdf_get_font_property): Updated.
-
-2015-12-20  Werner Lemberg  <wl@gnu.org>
-
-       [base, bdf] Add number hashing.
-
-       * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
-       functions.
-       (ft_hash_init): Add argument to select between number and string
-       hashing.
-       (ft_hash_num_insert, ft_hash_num_lookup): New functions.
-
-       * include/freetype/internal/fthash.h: Updated.
-
-       * src/bdf/bdflib.c (_bdf_parse_start): Updated.
-
-2015-12-20  Werner Lemberg  <wl@gnu.org>
-
-       [base] Introduce hash lookup, compare, and free function pointers.
-
-       * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
-       FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
-       (FT_HashRec): Add `lookup', `compare', and `free' fields.
-
-       * src/base/fthash.c (hash_str_lookup, hash_str_compare,
-       hash_str_free): New functions.
-       (ft_hash_init): Set function pointers.
-       (hash_bucket, ft_hash_free): Use them.
-
-2015-12-20  Werner Lemberg  <wl@gnu.org>
-
-       [base, bdf] Use a union as a hash key.
-
-       We want to support both an integer and a string key later on.
-
-       * include/freetype/internal/fthash.h (FT_Hashkey): New union.
-       (FT_HashnodeRec): Updated.
-       (ft_hash_insert, ft_hash_lookup): Renamed to ...
-       (ft_hash_str_insert, ft_hash_str_lookup): ... this.
-
-       * src/base/fthash.c (hash_bucket): Updated.
-       (ft_hash_insert, ft_hash_lookup): Renamed to ...
-       (hash_insert, hash_lookup): ... this.
-       (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
-
-       * src/bdf/bdflib.c: Updated.
-
-2015-12-19  Werner Lemberg  <wl@gnu.org>
-
-       [bdf] Use new hash functions.
-
-       * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
-       (hashnode, hashtable): Removed.
-       (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
-
-       * src/bdf/bdflib.c: Remove all hash functions.
-       Update code for new hash structure and function names.
-
-2015-12-19  Werner Lemberg  <wl@gnu.org>
-
-       [bdf, base] Lift hash functions from bdf driver to base module.
-
-       * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
-       containing (massaged) code from `bdflib.c' and `bdf.h'.
-
-       * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
-       macro.
-
-       * src/base/ftbase.c: Include `fthash.c'.
-
-       * src/base/Jamfile (_sources): Add `fthash'.
-
-       * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
-
-       * docs/LICENSE.TXT: Updated.
-
-2015-12-15  Werner Lemberg  <wl@gnu.org>
-
-       [autofit] Add blue-zone support for Bengali script.
-
-       This essentially moves the Bengali script from the `Indic' hinter to
-       the `Latin' hinter.
-
-       * src/autofit/afblue.dat: Add blue zone data for Bengali.
-
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
-
-       * src/autofit/afscript.h: Add Bengali standard characters and move
-       data out of AF_CONFIG_OPTION_INDIC block.
-
-       * src/autofit/afranges.c: Move Bengali data out of
+       * src/autofit/afranges.c: Move Sundanese data out of
        AF_CONFIG_OPTION_INDIC block.
 
-       * src/autofit/afstyles.h: Update Bengali data; in particular, use
-       AF_WRITING_SYSTEM_LATIN.
-
-2015-12-14  Ben Wagner  <bungeman@gmail.com>
-
-       [bdf] Remove dead code (#46625).
-
-       The BDF specification only allows decimal numbers, no octal or
-       hexadecimal decoding is needed.
-
-       * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
-       _bdf_atos): Remove unused code and parameters.
-       Update all callers.
-       (odigits): Remove.
-
-2015-12-14  Werner Lemberg  <wl@gnu.org>
-
-       [base] Fix calls to `FT_Stream_Seek'.
-
-       * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
-       `error'.
+       * src/autofit/afstyles.h: Update Sundanese data; in particular, use
+       AF_WRITING_SYSTEM_LATIN.
 
-2015-12-14  Ben Wagner  <bungeman@gmail.com>
+2017-05-03  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       [base] Check error when seeking to data supplied offset (#46635).
+       [autofit] Add support for Avestan script.
 
-       * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
-       `ft_lookup_PS_in_sfnt_stream' returns offset and length from
-       user supplied data.  Use of this these values must be checked.
+       * src/autofit/afblue.dat: Add blue zone data for Avestan.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-2015-12-13  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afscript.h: Add Avestan standard character.
 
-       [autofit] Add support for Myanmar script.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Avestan data.
 
-       * src/autofit/afblue.dat: Add blue zone data for Myanmar.
+2017-05-02  Behdad Esfahbod  <behdad@behdad.org>
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+       [truetype] Make `IUP' gvar deltas do the same as Apple (#50832).
 
-       * src/autofit/afscript.h: Add Myanmar standard characters.
+       When points are not touched by gvar interpolation deltas, FreeType
+       gave a slightly different result than Apple's CoreText.
 
-       * src/autofit/afranges.c: Add Myanmar data.
+       The OpenType working group will update the specification to document
+       the following behaviour: If the two points with deltas to the `left'
+       and `right' of the untouched point have the same coordinate, then
+       the inferred delta for the untouched point should be zero.
 
-       * src/autofit/afstyles.h: Add Myanmar data.
+       * src/truetype/ttgxvar.c (tt_delta_interpolate): Implement new
+       behaviour.
 
-2015-12-12  Werner Lemberg  <wl@gnu.org>
+2017-05-02  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
+       [autofit] Remove `slight' auto-hint mode again.
 
-2015-12-12  Werner Lemberg  <wl@gnu.org>
+       A poll on freetype-devel favoured changes directly applied to
+       `light'.
 
-       * src/autofit/afscript.h: Avoid potential crash.
+       * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT,
+       FT_RENDER_MODE_SLIGHT): Removed.
 
-2015-12-10  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
+       (af_latin_hints_init), src/autofit/aflatin2.c
+       (af_latin2_hints_init): Revert change from 2017-04-22.
 
-       [autofit] Restore OpenType feature check.
+       * src/autofit/afloader.c (af_loader_load_glyph) Remove references to
+       FT_RENDER_MODE_SLIGHT.
+       [AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics
+       unconditionally.
 
-       This was removed while rewriting the HarfBuzz interface.
+       * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from
+       2017-04-22.
 
-       * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
-       hold internal HarfBuzz buffer, needed for feature comparison.
+       * src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22.
 
-       * src/autofit/afglobal.c (af_face_globals_new,
-       af_face_globals_free): Initialize and destroy `hb_buf'.
+       * src/pshinter/pshalgo.c (ps_hints_apply): Revert change from
+       2017-04-22.
 
-       * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
-       (cluster) with and without applied feature.
+       * src/smooth/ftsmooth.c (ft_smooth_render): Revert change from
+       2017-04-22.
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
-       message.
+       * docs/CHANGES: Updated.
 
-2015-12-10  Werner Lemberg  <wl@gnu.org>
+2017-04-30  Werner Lemberg  <wl@gnu.org>
 
-       [autofit] Remove redundant code.
+       [autofit] Fix metrics computation.
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
+       Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and
+       Nikolaus Waxweiler <madigens@gmail.com>.
 
-2015-12-09  Werner Lemberg  <wl@gnu.org>
+       * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of
+       auto-hinter metrics.  Without this change, multiple size changing
+       calls for a single face fail.
 
-       [autofit] Thinko.
+2017-04-29  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
-       empty blue zones (bug introduced 2015-12-06).
+       * src/truetype/ttdriver.c (tt_size_request): Properly check `error'.
 
-2015-12-09  Werner Lemberg  <wl@gnu.org>
+       Reported by Earnestly <zibeon@googlemail.com> in
 
-       [autofit] Introduce subscript top blue zones.
+         http://lists.nongnu.org/archive/html/freetype/2017-04/msg00031.html
 
-       This feature is mainly for Khmer: The idea is to avoid a clash
-       between the top of subscript glyphs and the bottom of normal
-       baseline glyphs.
+2017-04-27  Werner Lemberg  <wl@gnu.org>
 
-       This only works for character clusters mapped to multiple glyphs.
+       Introduce AF_CONFIG_OPTION_TT_SIZE_METRICS configuration option.
 
-       * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
+       * include/freetype/config/ftoption.h
+       (AF_CONFIG_OPTION_TT_SIZE_METRICS): New option, commented out by
+       default.
 
-       * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
-       macro.
+       * src/autofit/afloader.c (af_loader_load_glyph): Use
+       AF_CONFIG_OPTION_TT_SIZE_METRICS to guard the corresponding code.
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+2017-04-26  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
-       AF_LATIN_BLUE_SUB_TOP): New macros.
+       * include/freetype/freetype.h (FT_Render_Mode): Fix order.
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
-       blue zone property.
-       Update tracing messages.
-       (af_latin_metrics_scale_dim): Handle new blue zone property.
-       (af_latin_hints_compute_blue_edges): Updated.
+       This retains backward compatibility.
 
-2015-12-09  Werner Lemberg  <wl@gnu.org>
+       Noted by Alexei.
 
-       [autofit] Fix tracing message.
+2017-04-22  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
-       inactive blue zones also.
+       [truetype] Do linear scaling for FT_LOAD_NO_HINTING (#50470).
 
-2015-12-06  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttobs.h (TT_SizeRec): Add field `hinted_metrics' to
+       hold hinted metrics.
+       Make `metrics' a pointer so that `tt_glyph_load' can easily switch
+       between metrics.
 
-       * src/autofit/afblue.dat: Add more Khmer clusters.
+       * src/truetype/ttdriver.c (tt_size_request): Updated.
+       (tt_glyph_load): Use top-level metrics if FT_LOAD_NO_HINTING is
+       used.
 
-       Some fonts have incorrect ligatures; we need more samples to get a
-       good mean value.
+       * src/truetype/ttgload.c (TT_Hint_Glyph, TT_Process_Simple_Glyph,
+       TT_Process_Composite_Component, load_truetype_glyph,
+       compute_glyph_metrics, TT_Load_Glyph): Updated.
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+       * src/truetype/ttinterp.c (TT_Load_Context): Updated.
 
-2015-12-06  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttobjs.c (tt_size_reset): Updated.
 
-       [autofit] Typos.
+       * src/truetype/ttsubpix.c (sph_set_tweaks): Updated.
 
-       * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
-       [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
+2017-04-22  Werner Lemberg  <wl@gnu.org>
 
-2015-12-06  Werner Lemberg  <wl@gnu.org>
+       Add new `slight' auto-hinting mode.
 
-       [autofit] Add support for Khmer script.
+       This mode uses fractional advance widths and doesn't scale glyphs
+       horizontally, only applying vertical scaling and hinting.
 
-       We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
-       `Khmer symbols' (`khms', U+19E0-U+19FF).
+       At the same time, the behaviour of the `light' auto-hinter gets
+       restored for backward compatibility: Both vertical and horizontal
+       scaling is again based on rounded metrics values (this was changed
+       in a commit from 2017-03-30 as a side effect).  To be more precise,
+       the behaviour is restored for TrueType fonts only; for other font
+       formats like Type 1, this is a new feature of the `light' hinting
+       mode.
 
-       * src/autofit/afblue.dat: Add blue zone data for Khmer.
+       * include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro.
+       (FT_RENDER_MODE_SLIGHT): New render mode.
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+       * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add
+       `autohint_mode' and `autohint_metrics' fields.
 
-       * src/autofit/afscript.h: Add Khmer standard characters.
+       * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
+       (af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init):
+       Updated.
 
-       * src/autofit/afranges.c: Add Khmer data.
+       * src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use
+       `autohint_metrics'.
+       (af_loader_load_glyph): s/internal/slot_internal/.
+       Initialize `autohint_metrics' and `autohint_mode' depending on
+       current auto-hint mode.
+       Use `autohint_metrics'.
+       Updated.
 
-       * src/autofit/afstyles.h: Add Khmer data.
+       * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated.
 
-2015-12-06  Werner Lemberg  <wl@gnu.org>
+       * src/base/ftobjs.c (FT_Load_Glyph): Updated.
+       (FT_New_Size): Allocate `internal' object.
 
-       [autofit] Rewrite HarfBuzz interface to support character clusters.
+       * src/pshinter/pshalgo.c (ps_hints_apply): Updated.
 
-       Scripts like Khmer have blue zones that can't be directly
-       represented by Unicode characters.  Instead, it is necessary to let
-       HarfBuzz convert character clusters into proper glyph representation
-       forms, then deriving the blue zone information from the resulting
-       glyphs.
+       * src/smooth/ftsmooth.c (ft_smooth_render): Updated.
 
-       * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
-       * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
-       files, providing a new API to access HarfBuzz.
+2017-04-22  Werner Lemberg  <wl@gnu.org>
 
-       The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
-       and `af_shaper_buf_destroy'.  The buffer receives a UTF8 encoded
-       string with function `af_shaper_get_cluster', and the resulting
-       glyph data (indices, advance widths, vertical offsets) can be
-       iteratively accessed with function `af_shaper_get_elem'.
+       Introduce `FT_Size_InternalRec' structure.
 
-       * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
-       af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
+       We are going to extend this later on.
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_widths,
-       af_latin_metrics_init_blues, af_latin_metrics_check_digits):
-       Updated.
+       * include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New
+       structure with a single field `module_data'.
 
-       * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
+       * src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of
+       `FT_Size' structure.
 
-       * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
-       (af_face_globals_compute_style_coverage): Updated.
+       * src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use
+       `size->internal->module_data' instead of `size->internal'.
 
-       * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/.
+       * src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'.
+       (cff_size_init, cff_size_select, cff_size_request): Use
+       `size->internal->module_data' instead of `size->internal'.
 
-       * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
+       * src/cif/cidobjs.c (cid_size_done, cid_size_init,
+       cid_size_request): Use `size->internal->module_data' instead of
+       `size->internal'.
 
-       * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
-       Updated.
+       * src/psaux/psobjs.c (t1_builder_ini): Use
+       `size->internal->module_data' instead of `size->internal'.
 
-2015-12-06  Werner Lemberg  <wl@gnu.org>
+       * src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request):
+       Use `size->internal->module_data' instead of `size->internal'.
 
-       [autofit] Prepare forthcoming changes.
+2017-04-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       This makes it easier to control the commits.
+       * src/smooth/ftsmooth.h: Remove unused guards and declaration.
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
-       loop.  No functional change.
+2017-04-16  Hin-Tak Leung  <htl10@users.sourceforge.net>
 
-2015-12-06  Werner Lemberg  <wl@gnu.org>
+       Fix tracing messages.
 
-       [autofit] Use string of standard characters.
+       * src/base/ftobjs.c (FT_Face_GetCharVariantIndex,
+       FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print
+       correct function name.
 
-       This is more flexible; additionally, it would allow character
-       clusters.
+2017-04-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
-       (AF_ScriptClassRec): Replace `standard_char[123]' with
-       `standard_charstring'.
+       [autofit] Add support for Old Turkic script.
 
-       * src/autofit/afscript.h: Replace last three character arguments
-       of the `SCRIPT' calls with a string parameter, holding the standard
-       characters (in UTF-8 encoding) separated with spaces.
+       * src/autofit/afblue.dat: Add blue zone data for Old Turkic.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afglobal.c, src/autofit/afglobal.h,
-       src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
-       (SCRIPT): Updated.
+       * src/autofit/afscript.h: Add Old Turkic standard characters.
 
-       * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
-       src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Old Turkic data.
 
-2015-12-05  Werner Lemberg  <wl@gnu.org>
+2017-04-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/autofit/afblue.dat: Separate blue zone characters with spaces.
+       [autofit] Add support for Gothic script.
 
-       Another preparation for character cluster support.
+       * src/autofit/afblue.dat: Add blue zone data for Gothic.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
+       * src/autofit/afscript.h: Add Gothic standard characters.
 
-2015-12-05  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Gothic data.
 
-       * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
+2017-04-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       Instead, reduce multiple spaces to a single one.  We need this later
-       for supporting character clusters in `afblue.dat'.
+       [autofit] Add support for Cypriot script.
 
-2015-12-05  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afblue.dat: Add blue zone data for Cypriot.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
+       * src/autofit/afscript.h: Add Cypriot standard characters.
 
-       * src/autofit/afblue.h: Regenerated.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Cypriot data.
 
-2015-12-05  Werner Lemberg  <wl@gnu.org>
+2017-04-08  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
+       [autofit] Add support for Deseret script.
 
-2015-12-03  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afblue.dat: Add blue zone data for Deseret.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * builds/unix/install.mk (install): Remove stale `ft2build.h'.
+       * src/autofit/afscript.h: Add Deseret standard characters.
 
-2015-12-01  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Deseret data.
 
-       [type1] Avoid dangling pointer (#46572).
+2017-04-07  Werner Lemberg  <wl@gnu.org>
 
-       * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
-       `face->afm_data'.
+       [autofit] Fix invalid character range description (#50745).
 
-2015-11-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       Also reported as
 
-       * include/freetype/ftlcdfil.h: Documentation tweak.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1034
 
-2015-11-28  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afranges.c (af_glag_nonbase_uniranges): Fix typo in
+       recent commit.
 
-       * Version 2.6.2 released.
-       =========================
+2017-04-07  Werner Lemberg  <wl@gnu.org>
 
+       [ftfuzzer] Fix clang warnings.
 
-       Tag sources with `VER-2-6-2'.
+       * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Add
+       casts.
 
-       * docs/VERSION.DLL: Update documentation and bump version number to
-       2.6.2.
+2017-04-06  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
-       builds/windows/vc2005/index.html,
-       builds/windows/vc2008/freetype.vcproj,
-       builds/windows/vc2008/index.html,
-       builds/windows/vc2010/freetype.vcxproj,
-       builds/windows/vc2010/index.html,
-       builds/windows/visualc/freetype.dsp,
-       builds/windows/visualc/freetype.vcproj,
-       builds/windows/visualc/index.html,
-       builds/windows/visualce/freetype.dsp,
-       builds/windows/visualce/freetype.vcproj,
-       builds/windows/visualce/index.html,
-       builds/wince/vc2005-ce/freetype.vcproj,
-       builds/wince/vc2005-ce/index.html,
-       builds/wince/vc2008-ce/freetype.vcproj,
-       builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
+       [autofit] Add support for Lisu script.
 
-       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
+       * src/autofit/afblue.dat: Add blue zone data for Lisu.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * builds/unix/configure.raw (version_info): Set to 18:2:12.
-       * CMakeLists.txt (VERSION_PATCH): Set to 2.
+       * src/autofit/afscript.h: Add Lisu standard characters.
 
-       * docs/CHANGES: Updated.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Lisu data.
 
-2015-11-28  Werner Lemberg  <wl@gnu.org>
+2017-04-06  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       Fix C++ compilation.
+       [autofit] Add support for Osage script.
 
-       * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
+       * src/autofit/afblue.dat: Add blue zone data for Osage.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
+       * src/autofit/afscript.h: Add Osage standard characters.
 
-2015-11-28  Nikolaus Waxweiler  <madigens@gmail.com>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Osage data.
 
-       Change default LCD filter to be normalized and color-balanced.
+2017-04-06  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
-       `default_filter'.
+       [autofit] Add support for Glagolitic script.
 
-2015-11-28  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afblue.dat: Add blue zone data for Glagolitic.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       [docmaker] Allow references to section names.
+       * src/autofit/afscript.h: Add Glagolitic standard characters.
 
-       In the reference, we show the section's title enclosed in single
-       quotes.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Glagolitic data.
 
-       * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
-       section names as identifiers.
+2017-04-06  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * src/tools/docmaker/tohtml.py (section_title_header): Split into...
-       (section_title_header1, section_title_header2): ... these two
-       strings.
-       (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
-       Handle sections.
-       (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
+       [autofit] Add support for Tai Viet script.
 
-2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+       * src/autofit/afblue.dat: Add blue zone data for Tai Viet.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       [cmake] Add script to test the config module.
+       * src/autofit/afscript.h: Add Tai Viet standard characters.
 
-       * builds/cmake/testbuild.sh: New file.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tai Viet data.
 
-2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+2017-04-06  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * CMakeLists.txt: Create `freetype-config.cmake' config module.
+       [autofit] Add support for Tifinagh script.
 
-2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+       * src/autofit/afblue.dat: Add blue zone data for Tifinagh.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
+       * src/autofit/afscript.h: Add Tifinagh standard characters.
 
-2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Tifinagh data.
 
-       [cmake] Add better control of library dependencies.
+2017-04-06  Sascha Brawer  <sascha@google.com>
+           Werner Lemberg  <wl@gnu.org
 
-       * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
-       ZLIB/BZip2/PNG/HarfBuzz.
+       [autofit] Add support for N'Ko script.
 
-2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+       * src/autofit/afblue.dat: Add blue zone data for N'Ko.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       [cmake] Make `FindHarfBuzz' observe the REQUIRED option.
+       * src/autofit/afscript.h: Add N'Ko standard characters.
 
-       * builds/cmake/FindHarfBuzz.cmake: Implement it.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add N'Ko data.
 
-2015-11-27  Werner Lemberg  <wl@gnu.org>
+2017-04-06  Sascha Brawer  <sascha@google.com>
 
-       [cmake] Collect files specific to cmake in `builds/cmake'.
+       [autofit] Add support for Adlam script.
 
-       * builds/FindHarfBuzz.cmake: Move to ...
-       * builds/cmake/FindHarfBuzz.cmake: ... this place.
+       * src/autofit/afblue.dat: Add blue zone data for Adlam.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
+       * src/autofit/afscript.h: Add Adlam standard characters.
 
-2015-11-27  Alexander Bock  <alexander.j.bock@nasa.gov>
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Adlam data.
 
-       CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
+2017-04-06  Sascha Brawer  <sascha@google.com>
 
-2015-11-26  Werner Lemberg  <wl@gnu.org>
+       [autofit] Add support for Ol Chiki script.
 
-       [docmaker] Allow `foo[bar]' as identifier.
+       * src/autofit/afblue.dat: Add blue zone data for Ol Chiki.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       We need this to handle equally named properties in different
-       modules.
+       * src/autofit/afscript.h: Add Ol Chiki standard character.
 
-       * src/tools/docmaker/content.py (re_identifier),
-       src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
+       * src/autofit/afranges.c, src/autofit/afstyles.h: Add Ol Chiki data.
 
-       * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
-       HtmlFormatter::index_exit, HtmlFormatter::section_enter,
-       HtmlFormatter::block_enter): Handle `foo[bar]'.
+2017-04-03  Werner Lemberg  <wl@gnu.org>
 
-2015-11-25  Werner Lemberg  <wl@gnu.org>
+       [truetype] Avoid reexecution of `fpgm' and `prep' in case of error.
 
-       * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
+       Reported as
 
-       (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
-       contents.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=981
 
-2015-11-21  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/fterrdef.h (FT_Err_DEF_In_Glyf_Bytecode): New
+       error code.
 
-       * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
+       * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Prohibit execution
+       of these two opcodes in `glyf' bytecode.
+       (TT_RunIns): Don't enforce reexecution of `fpgm' and `prep' bytecode
+       in case of error since function tables can no longer be modified
+       (due to the changes in `Ins_FDEF' and `Ins_IDEF').  This change can
+       enormously speed up handling of broken fonts.
 
-       This fixes compiler warnings.
+2017-04-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       Reported by Behdad.
+       [autofit] Disable metrics adjustment for `FT_LOAD_TARGET_LCD'.
 
-2015-11-20  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/aflatin.c (af_latin_hints_init): Updated.
+       * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
 
-       Add `FT_LCD_FILTER_LEGACY1' enum value.
+2017-04-01  Werner Lemberg  <wl@gnu.org>
 
-       This does the same as `FT_LCD_FILTER_LEGACY'.
+       * src/truetype/ttgload.c: Include FT_CONFIG_CONFIG_H.
 
-       See
+       Otherwise FT_UINT_TO_POINTER might not be defined.
 
-         https://bugs.freedesktop.org/show_bug.cgi?id=92981
+       Problem reported by Alexei.
 
-       for the reasoning.
+2017-03-31  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
-       `FT_LCD_FILTER_LEGACY1'.
+       [autofit] Disable stem adjustment for `FT_LOAD_TARGET_LCD'.
 
-       * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
+       * include/freetype/freetype.h (FT_LOAD_TARGET_LCD): Document it.
+       * src/autofit/afcjk.c (af_cjk_hints_init): Updated.
+       * src/autofit/aflatin.c (af_latin_hints_init): Ditto.
+       * src/autofit/aflatin2.c (af_latin2_hints_init): Ditto.
 
-2015-11-15  Werner Lemberg  <wl@gnu.org>
+2017-03-31  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afhints.c (af_get_segment_index): Fix it.
+       * src/cff/cffload.c (cff_font_load): Improve fix from 2017-01-04.
 
-       The old code was too simple, returning invalid values in most cases
-       where a segment crosses the contour start.
+       Allow CFFs containing a single font to have an empty font name.
 
-2015-11-15  Werner Lemberg  <wl@gnu.org>
+       Problem reported by 張俊芝 <418092625@qq.com> in
 
-       * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
+         http://lists.nongnu.org/archive/html/freetype-devel/2017-03/msg00074.html
 
-2015-11-11  Werner Lemberg  <wl@gnu.org>
+2017-03-30  Werner Lemberg  <wl@gnu.org>
 
-       [cff, autofit] Switch off stem darkening by default.
+       * src/cff/cffparse.h (CFF2_DEFAULT_STACK): Set to 513 also.
 
-       * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
-       (cff_driver_init): Do it.
+       Requested by Dave Arnold.
 
-2015-11-10  Jan Alexander Steffens (heftig)  <jan.steffens@gmail.com>
+2017-03-30  Werner Lemberg  <wl@gnu.org>
 
-       Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
+       [truetype] Fix HVAR and VVAR handling (#50678).
 
-       Both the native CFF hinter and the auto-hinter now have a very
-       similar rendering style.
+       * src/truetype/ttgxvar.c (tt_hvadvance_adjust): Handle
+       glyph indices larger than `mapCount' as described in the
+       specification.
 
-       * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
-       longer implies FT_LOAD_FORCE_AUTOHINT.
+2017-03-30  Werner Lemberg  <wl@gnu.org>
 
-       * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
-       macro.
+       [truetype] Allow linear scaling for unhinted rendering (#50470).
 
-       * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
-       macro.
+       * src/truetype/ttdriver.c (tt_size_request): Revert change from
+       2011-07-16; the intended metrics fix seems now to be implemented in
+       a different way, making the patch unnecessary.  Note that this
+       change was usually patched out by all major GNU/Linux distributions
+       due to heavy side effects.
 
-       * src/cff/cffdrivr.c (cff_driver_class): Use it.
+       * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph):
+       Refer to the metrics of the `TT_Size' object.
 
-       * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
-       logic.
+2017-03-29  Werner Lemberg  <wl@gnu.org>
 
-2015-11-09  Werner Lemberg  <wl@gnu.org>
+       [truetype] Fix thinko related to PS name of default named instance.
 
-       * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
+       * src/truetype/ttgxvar.c (TT_Get_MM_Var): `strid' and `psid' are
+       name ID values, not indices into the array of name entries.
 
-2015-11-09  Werner Lemberg  <wl@gnu.org>
+2017-03-27  Werner Lemberg  <wl@gnu.org>
 
-       [truetype] Remove integer to pointer conversion compiler warning.
+       [cid, truetype] Don't use `index' as a variable name.
 
-       Problem reported by Alexei.
+       At least on FreeBSD there is a global declaration of `index' in file
+       `/usr/include/strings.h'.
 
-       * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
-       in the glib library to fix the issue.
+       * src/cff/cf2intrp.c, src/truetype/ttgload.c: s/index/idx/ where
+       appropriate.
 
-2015-11-08  Behdad Esfahbod  <behdad@behdad.org>
+2017-03-27  Wojciech Mamrak  <wmamrak@gmail.com>
 
-       [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
+       [sfnt] Minor improvement for handling kern tables.
 
-       * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
+       * src/sfnt/ttkern.c (tt_face_load_kern): Don't check for
+       cross-stream kerning tables since we reject format 2 tables later
+       on anyways.
+       Modify code for limit test...
+       (tt_face_get_kerning): ... to avoid a limit test here.
 
-2015-11-08  Philipp Knechtges  <philipp-dev@knechtges.com>
+2017-03-27  Werner Lemberg  <wl@gnu.org>
 
-       [autofit] Don't distort (latin) glyphs too much (#46195).
+       [pcf] Fix compiler warnings.
 
-       * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
-       `descender' fields.
+       Reported by Alexander Hedges <ahedges@student.ethz.ch>.
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
-       ascender and descender data for blue zones.
-       (af_latin_metrics_scale_dim): Reject vertical scaling values that
-       change the result by more than two pixels.
+       * src/pcf/pcfdrivr.c (pcf_property_set, pcf_property_get): Tag
+       `property_name' with `FT_UNUSED' where necessary.
 
-2015-11-05  Werner Lemberg  <wl@gnu.org>
+2017-03-26  Werner Lemberg  <wl@gnu.org>
 
-       [sfnt] Ignore embedded bitmaps with zero size (#46379).
+       * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard.
 
-       * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
-       it.
+       Reported as
 
-2015-11-04  Werner Lemberg  <wl@gnu.org>
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941
 
-       [truetype] Catch infinite recursion in subglyphs (#46372).
+2017-03-23  Werner Lemberg  <wl@gnu.org>
 
-       * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
-       `composites'.
+       [psaux] Better protect `flex' handling.
 
-       * src/truetype/ttgload.c: Include FT_LIST_H.
-       (load_truetype_glyph): Add composite subglyph index to a list;
-       abort if index is already in list.
-       (tt_loader_init): Updated.
-       (tt_loader_done): New function.
-       (TT_Load_Glyph): Call `tt_loader_done'.
+       Reported as
 
-2015-11-04  Werner Lemberg  <wl@gnu.org>
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935
 
-       [truetype] Better tracing of composite glyphs.
+       * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+       <callothersubr>: Since there is not a single flex operator but a
+       series of subroutine calls, malformed fonts can call arbitrary other
+       operators after the start of a flex, possibly adding points.  For
+       this reason we have to check the available number of points before
+       inserting a point.
 
-       * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
-       load_truetype_glyph): Implement it.
+2017-03-23  Werner Lemberg  <wl@gnu.org>
 
-2015-11-03  Werner Lemberg  <wl@gnu.org>
+       [sfnt] Fix check for default named instance.
 
-       [sfnt] Protect against zero-size bitmaps (#46345).
+       * src/sfnt/sfobjs.c (sfnt_init_face): A `fixed' number needs four
+       bytes, not two...
 
-       * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
-       `glyph_size'.
+2017-03-23  Werner Lemberg  <wl@gnu.org>
 
-2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+       Make MM fonts work (again).
 
-       * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
+       * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
+       FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore
+       return value of `ft_face_get_mvar_service'; instead, check whether a
+       service is actually returned.
 
-2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+2017-03-20  Werner Lemberg  <wl@gnu.org>
 
-       [autofit] Implement darkening computation function.
+       [truetype] Some variable renamings.
 
-       This is a crude adaption of the original `cf2_computeDarkening'
-       function.
+       Too much local variables holding different structures were called
+       `metrics'.
 
-       * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
-       af_floatToFixed): New macros, taken from `cf2fixed.h'.
-       (af_loader_compute_darkening): New function.
-       * src/autofit/afloader.h: Updated.
+       * src/truetype/ttdriver.c (tt_size_select): s/metrics/size_metrics/.
 
-2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+       * src/truetype/ttgload.c (tt_get_metrics_incr_overrides,
+       compute_glyph_metrics): s/metrics/incr_metrics/.
+       (load_sbit_image): s/metrics/sbit_metrics/.
 
-       [autofit] Add functions to get standard widths for writing systems.
+       * src/truetype/ttobjs.c (tt_size_run_fpgm): s/metrics/size_metrics/.
+       (tt_size_init_bytecode): s/metrics/tt_metrics/.
+       (tt_size_reset): s/metrics/size_metrics/.
 
-       We need the computed standard horizontal and vertical widths for the
-       emboldening calculation.  This method provides a convenient way to
-       extract it from writing-system-specific metrics structures, which
-       all script definitions must implement.
+2017-03-20  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
-       function type.
-       (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
-       (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
+       [sfnt] Don't add instances to non-variation fonts.
 
-       * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
-       (af_cjk_writing_system_class): Updated.
-       * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
-       * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
-       (af_indic_writing_system_class): Updated.
-       * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
-       (af_indic_writing_system_class): Updated.
-       * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
-       (af_indic_writing_system_class): Updated.
+       * src/sfnt/sfobjs.c (sfnt_init_face): Fix it.
 
-2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+2017-03-20  Werner Lemberg  <wl@gnu.org>
 
-       [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
+       * src/cff/cffgload.c (cff_builder_init): Add safety guard (#50578).
 
-       * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
+2017-03-18  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afglobal.c (af_face_globals_new): Initialize new
-       fields.
-       (af_face_globals_free): Reset new fields.
+       Introduce FT_UINT_TO_POINTER macro (#50560).
 
-2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+       We have to make a separate case for Windows 64's LLP64 data model.
 
-       [autofit] Add stem-darkening properties.
+       * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+       include/freetype/config/ftconfig.h (FT_UINT_TO_POINTER): New macro.
 
-       Actual code follows in a later commit.
+       * src/truetype/ttgload.c (load_truetype_glyph): Use it.
 
-       * include/freetype/ftautoh.h: Document `no-stem-darkening' and
-       `darkening-parameters'.
+2017-03-18  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afmodule.h: New fields `no_stem_darkening' and
-       `darken_params'.
+       * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#50573).
 
-       * src/autofit/afmodule.c (af_property_set, af_property_get):
-       Handle them.
-       (af_autofitter_init): Initialize them.
+       The problematic font that exceeds the old limit is Lato-Regular,
+       version 2.007, containing bytecode generated by a buggy version of
+       ttfautohint.
 
-2015-11-02  Ben Wagner  <bungeman@gmail.com>
+2017-03-18  Werner Lemberg  <wl@gnu.org>
 
-       [ftfuzzer] Add support for multiple files (patch #8779).
+       [truetype] Another limitation for bytecode loop count maximum.
 
-       Currently, libFuzzer only supports mutation of a single file.  We
-       circumvent this problem by using an uncompressed tar archive as
-       multiple-file input for the fuzzer.
+       Reported as
 
-       This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
-       a constructed tarball should contain a font file as the first
-       element, and files to be attached as further elements.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=900
 
-       * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
-       (archive_read_entry_data, parse_data): New functions.
-       (LLVMFuzzerTestOneInput): Updated.
+       * src/truetype/ttinterp.c (TT_RunIns): Limit `loopcall_counter_max'
+       by number of glyphs also.
 
-       * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
-       mutator for libFuzzer that can mutate tarballs in a sensible way.
+2017-03-18  Werner Lemberg  <wl@gnu.org>
 
-2015-10-31  Werner Lemberg  <wl@gnu.org>
+       [ftfuzzer] Minor improvement.
 
-       [sfnt] Fix cmap 14 validation (#46346).
+       * src/tools/ftfuzzer/ftfuzzer.cc: Don't set intermediate axis if
+       bitmap strikes are active.
 
-       * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
-       accessing `numRanges' and `numMappings'.
-       Fix size check for non-default UVS table.
+2017-03-18  Werner Lemberg  <wl@gnu.org>
 
-2015-10-31  Werner Lemberg  <wl@gnu.org>
+       Improve `make multi'.
 
-       [sfnt] Handle infinite recursion in bitmap strikes (#46344).
+       * src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.
 
-       * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
-       tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
-       tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
-       argument for recursion depth.
-       (tt_sbit_decoder_load_compound): Add argument for recursion depth.
-       Increase recursion counter for recursive call.
-       (tt_sbit_decoder_load_image): Add argument for recursion depth.
-       Check recurse depth.
-       (tt_face_load_sbit_image): Updated.
+       * src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.
 
-2015-10-29  Werner Lemberg  <wl@gnu.org>
+       * src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
 
-       * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
+       * src/sfnt/pngshim.c: Guard file with
+       TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.
 
-2015-10-29  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/ttbdf.c: Avoid empty source file.
+       * src/sfnt/ttpost.c: Guard file with
+       TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
+       * src/sfnt/ttsbit.c: Guard file with
+       TT_CONFIG_OPTION_EMBEDDED_BITMAPS.
 
-       * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
+       * src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
+       source file.
 
-       Problem reported by David Capello <davidcapello@gmail.com>; see
+       * src/truetype/ttsubpix.c: Guard file with
+       TT_USE_BYTECODE_INTERPRETER also.
 
-         http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
+       * src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
 
-       for details.
+       * src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
+       src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
+       src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
+       src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
+       src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
+       src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
+       entries.
 
-2015-10-27  Werner Lemberg  <wl@gnu.org>
+2017-03-17  Werner Lemberg  <wl@gnu.org>
 
-       [pfr] Add some safety guards (#46302).
+       Fixes for conditional compilation.
 
-       * src/pfr/pfrload.h (PFR_CHECK): Rename to...
-       (PFR_CHECK_SIZE): ... this.
-       (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
+       * src/autofit/afcjk.c, src/autofit/afindic.c: Include `afcjk.h'
+       earlier.
 
-       * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
-       (pfr_extra_item_load_kerning_pairs): Remove tracing message.
-       (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
-       Allocate `chars' after doing a size checks.
+       * src/sfnt/sfobjs.c (sfnt_init_face): Put `memory' variable into
+       TT_CONFIG_OPTION_GX_VAR_SUPPORT block.
+       (sfnt_done_face): Protect some code with
+       TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-       * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
-       bitmap format to...
-       (pfr_slot_load_bitmap): ... this function.
-       Check bitmap size.
+       * src/sfnt/ttsbit.c (tt_face_load_sbix_image): Remove compiler
+       warning.
 
-2015-10-26  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Put `tmp' variable
+       into TT_USE_BYTECODE_INTERPRETER block.
 
-       [truetype] Fix sanitizing logic for `loca' (#46223).
+       (tt_loader_init): Put `error' variable into
+       TT_USE_BYTECODE_INTERPRETER block.
 
-       * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
-       incorrect adjustment of the number of glyphs, most often using far
-       too large values.
+2017-03-17  Werner Lemberg  <wl@gnu.org>
 
-2015-10-25  Werner Lemberg  <wl@gnu.org>
+       Fix preprocessor warning.
 
-       [autofit] Improve tracing.
+       * devel/ftoption.h, include/freetype/config/ftoption.h: Test whether
+       TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined before checking its
+       value.
 
-       * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
-       af_get_edge_index): New functions.
+2017-03-17  Werner Lemberg  <wl@gnu.org>
 
-       (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
-       Add segment and edge index for each point.
-       Slightly change printing order of some elements.
-       Don't print `-1' but `--' for missing elements.
+       `make multi' fixes; compiler warnings.
 
-       (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
-       unnecessary `|', `[', and `]'.
-       Don't print `-1' but `--' for missing elements.
+       * src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H.
 
-2015-10-24  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
+       FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
 
-       [sfnt] Sanitize bitmap strike glyph height.
+       * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
+       FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
+       (get_win_string, get_apple_string): Initialize `result'.
 
-       Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
+2017-03-17  Dave Arnold <darnold@adobe.com>
 
-       * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
-       for `metrics->height' by applying some heuristics.
+       [cff] Fix potential bugs in default NDV for CFF2.
 
-2015-10-22  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffload.c (cff_blend_build_vector): Explicitly build blend
+       vector when `lenNDV' is zero; don't rely on zero-init.
+       Save `lenNDV' as part of cache key even when `lenNDV' is zero.
 
-       [sfnt, type42] Fix clang compiler warnings.
+2017-03-17  Dave Arnold <darnold@adobe.com>
 
-       * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
+       [cff] Fix CFF2 stack allocation.
 
-       * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
+       * src/cff/cffparse.c (cff_parser_init) add 1 for operator.
 
-2015-10-22  Dave Arnold  <darnold@adobe.com>
-           Werner Lemberg  <wl@gnu.org>
+2017-03-16  Werner Lemberg  <wl@gnu.org>
 
-       [cff] Avoid overflow/module arithmetic.
+       * src/truetype/ttgxvar.c (tt_done_blend): Free `vvar_table'.
 
-       This modifies the addition of subroutine number to subroutine bias
-       from unsigned to signed, but does not change any results.
+       Reported as
 
-       * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
-       cf2_initLocalRegionBuffer): Change variable names from (unsigned)
-       `idx' to (signed) `subrNum', since it is not an index until after
-       the bias is added.
-       * src/cff/cf2ft.h: Updated.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=883
 
-       * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
-       Updated similarly.
+2017-03-15  Werner Lemberg  <wl@gnu.org>
 
-2015-10-22  Werner Lemberg  <wl@gnu.org>
+       Remove clang compiler warnings (#50548).
 
-       [cid] Better check of `SubrCount' dictionary entry (#46272).
+       * include/freetype/internal/tttypes.h (TT_FaceRec): Make
+       `var_postscript_prefix_len' unsigned.
 
-       * src/cid/cidload.c (cid_face_open): Add more sanity tests for
-       `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
+       * src/autofit/afwarp.c (af_warper_compute_line_best): Remove
+       redundant assignment.
 
-2015-10-21  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffload.c (cff_subfont_load): Add casts.
 
-       [base] Pacify compiler (#46266).
+       * src/cff/cffparse.c (cff_parse_blend): Remove redundant assignment.
 
-       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
-       `anchor'.
+       * src/sfnt/sfdriver.c (fmix32, murmur_hash_3_128): Add `static'
+       keyword.
+       Add casts.
+       (fixed2float): Add cast.
+       (sfnt_get_var_ps_name): Make `p' always initialized.
+       Add casts.
 
-2015-10-21  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (TT_Get_MM_Var): Add casts.
 
-       [type42] Fix heap buffer overflow (#46269).
+2017-03-15  Werner Lemberg  <wl@gnu.org>
 
-       * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
-       bounds checking.
+       [ftfuzzer] Limit number of tested faces and instances.
 
-2015-10-21  Dave Arnold  <darnold@adobe.com>
+       This is inspired by the discussion in and analysis of
 
-       [cff] Fix limit in assert for max hints.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=859
 
-       * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
-       limit (96 bits).
+       * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Use only
+       up to 20 face indices.
+       Use only up to 20 instance indices.
 
-2015-10-21  Dave Arnold  <darnold@adobe.com>
+2017-03-15  Werner Lemberg  <wl@gnu.org>
 
-       [cff] Remove an assert (#46107).
+       * src/tools/ftfuzzer/ftfuzzer.cc: Improve readability; formatting.
 
-       * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
-       in wrong order.
+2017-03-14  Werner Lemberg  <wl@gnu.org>
 
-2015-10-21  Werner Lemberg  <wl@gnu.org>
+       [sfnt] Implement PS names for font instances [3/3].
 
-       [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
+       Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-       * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
-       only after thorough checks.
-       Add tracing messages.
+       * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
+       `var_postscript_prefix' and `var_postscript_prefix_len'.
 
-2015-10-21  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfdriver.c: Include FT_TRUETYPE_IDS_H.
+       (sfnt_is_alphanumeric): New wrapperfunction for `ft_isalnum'.
+       (get_win_string, get_apple_string): Remove `const' from return
+       value.
+       (MAX_VALUE_DESCRIPTOR_LEN, MAX_PS_NAME_LEN): New macros.
+       (hexdigits): New array.
+       (sfnt_get_var_ps_name): New function, implementing Adobe TechNote
+       5902 to construct a PS name for a variation font instance.
+       (sfnt_get_ps_name): Call `sfnt_get_var_ps_name' for font instances.
 
-       [type42] Better check invalid `sfnts' array data (#46255).
+       * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
 
-       * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
-       checked individually against available data size.
+       * src/truetype/ttgxvar.c (tt_set_mm_blend): Reset
+       `face->postscript_name' to trigger recalculation for new instance
+       parameters.
 
-2015-10-20  Werner Lemberg  <wl@gnu.org>
+2017-03-14  Werner Lemberg  <wl@gnu.org>
 
-       [cid] Add a bunch of safety checks.
+       [sfnt] Implement PS names for font instances [2/3].
 
-       * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
-       stream size.
-       (cid_read_subrs): Check largest offset against stream size.
-       (cid_parse_dict): Move safety check to ...
-       (cid_face_open): ... this function.
-       Also test length of binary data and values of `SDBytes',
-       `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
+       * src/sfnt/sfdriver.c (fix2float) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
+       New function to find the shortest representation of a 16.16
+       fractional number.
 
-2015-10-20  Werner Lemberg  <wl@gnu.org>
+2017-03-14  Werner Lemberg  <wl@gnu.org>
 
-       [cid] Avoid segfault with malformed input (#46250).
+       [sfnt] Implement PS names for font instances [1/3].
 
-       * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
-       unsorted offsets.
+       Add 128bit MurmurHash 3 function.
 
-2015-10-20  StudioEtrange  <nomorgan@gmail.com>
+       Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-       * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
+       * src/sfnt/sfdriver.c (ROTL32): New macro.
+       (fmix32, murmur_hash_3_128): New functions.
 
-2015-10-20  Werner Lemberg  <wl@gnu.org>
+2017-03-13  Werner Lemberg  <wl@gnu.org>
 
-       * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
+       [truetype] Ignore invalid MVAR tags.
 
-2015-10-19  Ben Wagner  <bungeman@gmail.com>
+       Reported as
 
-       [cid] Better handle invalid glyph stream offsets (#46221).
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=838
 
-       * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
-       length.
+       * src/truetype/ttgxvar.c (ft_var_load_mvar): Ignore value and emit
+       warning for invalid tags.
+       (tt_apply_mvar): Ignore invalid tags.
 
-2015-10-18  Werner Lemberg  <wl@gnu.org>
+2017-03-12  Werner Lemberg  <wl@gnu.org>
 
-       [psaux] Fix tracing of negative numbers.
+       [truetype] Store and use design coordinates also.
 
-       Due to incorrect casting negative numbers were shown as very large
-       (positive) integers on 64bit systems.
+       * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
+       Add `normalizedcoords' argument.
 
-       * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
-       Use division instead of shift.
+       * src/truetype/ttgxvar.h (GX_BlendRec): Add `coords' field to store
+       the design coordinates of the current instance.
+       Updated.
 
-2015-10-18  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Move functionality to...
+       (tt_set_mm_blend): ... New function.
+       Convert data in `normalizedcoords' array to `coords' array on
+       demand.
+       (TT_Set_Var_Design): Store argument data in `coords' array.
+       (TT_Get_Var_Design): Get data from `coords' array.
+       (tt_get_var_blend): Updated.
+       (tt_done_blend): Updated.
 
-       [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
+       * src/cff/cffload.c, src/cff/cffload.h (cff_get_var_blend): Updated.
 
-       * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
-       with #ifndef ... #endif, as suggested in the tracker issue.
+       * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
 
-2015-10-18  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffobjs.c (cff_face_init): Updated.
 
-       [truetype] Better protection against malformed `fpgm' (#46223).
+2017-03-12  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
-       malformed `fpgm' table more than once.
+       src/truetype/ttgxvar.[ch]: s/avar_checked/avar_loaded/.
 
-2015-10-17  Werner Lemberg  <wl@gnu.org>
+2017-03-08  Werner Lemberg  <wl@gnu.org>
 
-       * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
+       [sfnt] Another fix for buggy variation fonts.
 
-       Reported by Kostya Serebryany <kcc@google.com>.
+       Reported as
 
-2015-10-17  Werner Lemberg  <wl@gnu.org>
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=759
 
-       [bdf] Prevent memory leak (#46217).
+       * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of
+       instances to zero for `CFF' fonts table, ensure that there is no
+       `CFF2' present also (which gets priority).
 
-       * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
-       _BDF_GLYPH_BITS.
+2017-03-07  Werner Lemberg  <wl@gnu.org>
 
-2015-10-17  Werner Lemberg  <wl@gnu.org>
+       [sfnt] Improve handling for buggy variation fonts.
 
-       [bdf] Use stream size to adjust number of glyphs.
+       Reported as
 
-       * src/bdf/bdflib.c (ACMSG17): New message macro.
-       (_bdf_parse_t): Add member `size'.
-       (bdf_load_font): Set `size'.
-       (_bdf_parse_glyphs): Adjust `cnt' if necessary.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=738
 
-2015-10-17  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfobjs.c (sfnt_init_face): While setting number of
+       instances to zero for `CFF' fonts table, ensure that there is no
+       `glyf' table present also (which gets priority).
 
-       * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
+2017-03-06  Werner Lemberg  <wl@gnu.org>
 
-2015-10-17  Werner Lemberg  <wl@gnu.org>
+       [sfnt, truetype] Always provide default instance.
 
-       * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
+       As documented in the OpenType specification, an entry for the
+       default instance may be omitted in the named instance table.  In
+       particular this means that even if there is no named instance table
+       in the font we actually do have a named instance, namely the default
+       instance.
 
-2015-10-17  Werner Lemberg  <wl@gnu.org>
+       For consistency, we always want the default instance in our list of
+       named instances.  If it is missing, we try to synthesize it.
 
-       [psaux] Fix heap buffer overflow (#46221).
+       * src/sfnt/sfobjs.c (sfnt_init_face): Check whether the default
+       instance is in the table of named instances.  Otherwise adjust
+       number of instances.
 
-       * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
-       Fix limit check.
+       * src/truetype/ttgxvar.c: Include FT_TRUETYPE_IDS_H.
+       (TT_Get_MM_Var): Use `face->root.style_flags' as the number of named
+       instances.
+       Sythesize a named instance entry if necessary.
+       (tt_done_blend): Free `normalized_stylecoords'.
 
-2015-10-17  Werner Lemberg  <wl@gnu.org>
+2017-03-05  Werner Lemberg  <wl@gnu.org>
 
-       * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
+       [sfnt] Remove redundant code.
 
-2015-10-15  Kostya Serebryany  <kcc@google.com>
+       * src/sfnt/sfobjs.c (sfnt_init_face): Remove second test for
+       `num_instances', which will always succeed.
 
-       [ftfuzzer] Add README.
+2017-03-04  Werner Lemberg  <wl@gnu.org>
 
-       * src/tools/ftfuzzer/README: New file.
+       [sfnt] Add `get_name_id' service.
 
-2015-10-15  Ben Wagner  <bungeman@gmail.com>
+       * include/freetype/internal/sfnt.h (TT_Get_Name_ID_Func): New
+       typedef.
+       (SFNT_Interface): Add `get_name_id' field.
+       (FT_DEFINE_SFNT_INTERFACE): Updated.
 
-       [bdf] Fix memory leak (#46213).
+       * src/sfnt/sfdriver.c (search_name_id): Rename to...
+       (sfnt_get_name_id): ... this.
+       (sfnt_get_ps_name, sfnt_interface): Udpated.
 
-       * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
-       case of error.
+2017-03-04  Werner Lemberg  <wl@gnu.org>
 
-2015-10-15  Werner Lemberg  <wl@gnu.org>
+       [truetype] Make `TT_Set_MM_Blend' set named instance index.
 
-       [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
+       * src/truetype/ttgxvar.h (GX_Blend): New array
+       `normalized_stylecoords'.
 
-       * devel/ftoption.h, include/freetype/config/ftoption.h
-       (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
+       * src/truetype/ttgxvar.c (TT_Get_MM_Var): Allocate and fill
+       `normalized_stylecoords'.
+       (TT_Set_MM_Blend): Check instance tuple and adjust `face_index'
+       accordingly.
 
-       * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
-       (TT_RunIns): Updated.
+2017-03-02  Werner Lemberg  <wl@gnu.org>
 
-2015-10-15  Werner Lemberg  <wl@gnu.org>
+       [truetype] Split off designer/normalized conversion routines.
 
-       * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
+       * src/truetype/ttgxvar.c (TT_Set_Var_Design): Split off conversion
+       code designer->normalized coordinates to...
+       (ft_var_to_normalized): ... New function.
+       (TT_Get_Var_Design): Split off conversion code normalized->designer
+       coordinates to...
+       (ft_var_to_design): ... New function.
 
-       The used indices were off by 1.
+2017-02-28  Werner Lemberg  <wl@gnu.org>
 
-2015-10-15  Ben Wagner  <bungeman@gmail.com>
-           Werner Lemberg  <wl@gnu.org>
+       [sfnt] Further generalize `sfnt_get_ps_name'; report invalid data.
 
-       * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
+       * src/sfnt/sfdriver.c (sfnt_ps_map): New array.
+       (sfnt_is_postscript): New function.
+       (char_type_func): New typedef.
+       (get_win_string, get_apple_string): Add argument to specify
+       character checking function.
+       Add argument whether argument checking failures should be reported.
+       Update callers.
+       (search_name_id): Fix return value.
 
-2015-10-15  Werner Lemberg  <wl@gnu.org>
+2017-02-23  Werner Lemberg  <wl@gnu.org>
 
-       [base] Compute MD5 checksums only if explicitly requested.
+       [sfnt] Split off another bit of `sfnt_get_ps_name'.
 
-       This improves profiling accuracy.
+       * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some
+       functionality into...
+       (search_name_id): ... New function.
 
-       * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
+2017-02-23  Werner Lemberg  <wl@gnu.org>
 
-2015-10-14  Werner Lemberg  <wl@gnu.org>
+       [sfnt] Modularize `sfnt_get_ps_name'.
 
-       [base] Use `FT_' namespace for MD5 functions (#42366).
+       * src/sfnt/sfdriver.c (sfnt_get_ps_name): Split off some
+       functionality into...
+       (IS_WIN, IS_APPLE): ... New macros.
+       (get_win_string, get_apple_string): ... New functions.
 
-       * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
-       Undefine HAVE_OPENSSL.
+2017-02-23  Werner Lemberg  <wl@gnu.org>
 
-2015-10-13  Werner Lemberg  <wl@gnu.org>
+       [truetype] Minor improvement.
 
-       [type1] Correctly handle missing MM axis names (#46202).
+       * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+       load_truetype_glyph): Remove unnecessary tests.
 
-       * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
+2017-02-23  Werner Lemberg  <wl@gnu.org>
 
-2015-10-13  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/internal/tttypes.h (TT_Face): s/isCFF2/is_cff2/.
 
-       [pcf] Quickly exit if font index < 0.
+       For orthogonality with other structure field names.
 
-       Similar to other font formats, this commit makes the parser no
-       longer check the whole PCF file but only the header and the TOC if
-       we just want to get the number of available faces (and a proper
-       recognition of the font format).
+       Update all users.
 
-       * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
-       Exit quickly if face_index < 0.
+2017-02-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * src/pcfread.c (pcf_load_font): Add `face_index' argument.
-       Exit quickly if face_index < 0.
+       * src/smooth/ftgrays.c (gray_hline): Improve code.
 
-       * src/pcf/pcf.h: Updated.
+2017-02-20  Dominik Röttsches  <drott@google.com>
 
-2015-10-13  Werner Lemberg  <wl@gnu.org>
+       Fix some `ttnameid.h' entries (#50313).
 
-       [ftfuzzer] Handle TTCs and MM/GX variations.
+       * include/freetype/ttnameid.h:
+       s/TT_MS_LANGID_SPANISH_INTERNATIONAL_SORT/TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT/,
+       s/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIA/TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN/.
 
-       This patch also contains various other improvements.
+2017-02-20  Werner Lemberg  <wl@gnu.org>
 
-       * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
-       pre-C++11 compilers.
-       (FT_Global): New class.  Use it to provide a global constructor and
-       destructor for the `FT_Library' object.
-       (setIntermediateAxis): New function to select an (arbitrary)
-       instance.
-       (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
-       Also call `FT_Set_Char_Size'.
+       [cff] Finish support for `random' operator.
 
-2015-10-13  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cfftypes.h (CFF_SubFontRec): Add `random' field.
 
-       [truetype] Refine some GX sanity tests.
+       * src/cff/cffobjs.c: Updated.
+       (cff_driver_init): Initialize random seed value.
 
-       Use the `gvar' table size instead of the remaining bytes in the
-       stream.
+       * src/cff/cffload.c (cff_random): New function.
+       (cff_subfont_load): Add `face' argument.
+       Update all callers.
+       Initialize random number generator with a proper seed value.
+       (cff_font_load): Add `face' argument.
+       Update all callers.
 
-       * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
+       * src/cff/cffload.h: Updated.
 
-       * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
-       (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
-       `size'.
-       (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
+       * src/cff/cf2intrp.c (CF2_FIXME): Removed.
+       (cf2_interpT2CharString) <cf2_escRANDOM>: Implement opcode.
 
-2015-10-13  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffgload.c (cff_decoder_parse_charstrings): Don't
+       initialize random seed value.
+       <cff_op_random>: Use new random seed framework.
 
-       [truetype] Another GX sanity test.
+2017-02-20  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
-       `tupleCount'.
-       Add tracing message.
+       [cff] Sanitize `initialRandomSeed'.
 
-2015-10-13  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffload.c (cff_load_private_dict): Make
+       `initial_random_seed' value always positive.
 
-       [truetype] Fix memory leak for broken GX fonts (#46188).
+2017-02-20  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
-       deallocation.
+       [cff] Introduce `random-seed' property (2/2).
 
-2015-10-13  Werner Lemberg  <wl@gnu.org>
+       * src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'.
+       (open_face): Initialize `face->internal->random_seed'.
+       (FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'.
 
-       [truetype] Fix commit from 2015-10-10.
+       * src/cff/cffdrivr.c (cff_property_set): Handle `random-seed'
+       property.
 
-       * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
-       handling body to condition.
+2017-02-20  Werner Lemberg  <wl@gnu.org>
 
-2015-10-12  Werner Lemberg  <wl@gnu.org>
+       [cff] Introduce `random-seed' property (1/2).
 
-       [unix] Make MKDIR_P actually work.
+       We need this for support of the `random' operator.
 
-       * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
-       `MKDIR_P'.
+       * include/freetype/ftcffdrv.h (FT_PARAM_TAG_RANDOM_SEED): New macro.
 
-       Problem reported by Dan Liddell <lddll@yahoo.com>.
+       * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
+       field `random_seed'.
 
-2015-10-11  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffobjs.h (CFF_DriverRec): New field `random_seed'.
 
-       [sfnt] Improve extraction of number of named instances.
+2017-02-17  Werner Lemberg  <wl@gnu.org>
 
-       * src/sfnt/sfobjs.c (sfnt_init_face)
-       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
-       `fvar' table size.
+       Remove clang warnings.
 
-2015-10-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static'
+       keyword.
 
-       * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
-       (#46149).
+       * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
+       FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates):
+       Initialize some variables.
 
-2015-10-10  Werner Lemberg  <wl@gnu.org>
+2017-02-16  Nikolaus Waxweiler  <madigens@gmail.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       [sfnt] Fix infinite loops with broken cmaps (#46167).
+       Add face property for stem darkening.
 
-       * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
-       of border conditions (i.e., if the loops exit naturally).
+       * include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New
+       macro.
 
-2015-10-10  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add
+       `no_stem_darkening' field.
 
-       [truetype] More sanity tests for GX handling.
+       * src/autofit/afloader.c (af_loader_load_glyph),
+       src/autofit/afmodule.c (af_property_set): Updated.
 
-       These tests should mainly help avoid unnecessarily large memory
-       allocations in case of malformed fonts.
+       * src/base/ftobjs.c: Include FT_AUTOHINTER_H.
+       (ft_open_face_internal): Updated.
+       (FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING.
 
-       * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
-       ft_var_readpackeddeltas): Check number of points against stream
-       size.
-       (ft_var_load_avar): Check `pairCount' against table length.
-       (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
-       against table length.
-       (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
-       Fix trace.
-       (TT_Vary_Apply_Glyph_Deltas): Fix trace.
-       Free `sharedpoints' to avoid memory leak.
+       * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated.
 
-2015-10-10  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffdrivr.c (cff_property_set): Updated.
 
-       [truetype] Better protection against malformed GX data (#46166).
+2017-02-16  Nikolaus Waxweiler  <madigens@gmail.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
-       handle empty `localpoints' array.
+       Add face property for LCD filter weights.
 
-2015-10-10  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS,
+       FT_LCD_FILTER_FIVE_TAPS): New macros.
+       (FT_LcdFiveTapFilter): New typedef.
 
-       * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
+       * include/freetype/ftobjs.h (FT_Face_InternalRec)
+       [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field.
+       (FT_Bitmap_LcdFilterFunc): Change third argument to weights array.
+       (ft_lcd_filter_fir): New prototype.
+       (FT_LibraryRec): Updated.
 
-2015-10-09  Werner Lemberg  <wl@gnu.org>
+       * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to...
+       (ft_lcd_filter_fir): ... this base function.
+       Updated.
+       (_ft_lcd_filter_legacy): Updated.
+       (FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated.
 
-       * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
+       * src/base/ftobjs.c (ft_open_face_internal): Updated.
+       (FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
 
-2015-10-08  Werner Lemberg  <wl@gnu.org>
+       * src/smooth/ftsmooth.c (ft_smooth_render_generic)
+       [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Handle LCD weights from
+       `FT_Face_Internal'.
 
-       [pcf] Protect against invalid number of TOC entries (#46159).
+2017-02-14  Nikolaus Waxweiler  <madigens@gmail.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
-       against size of data stream.
+       Add new function `FT_Face_Properties'.
 
-2015-10-08  Werner Lemberg  <wl@gnu.org>
+       This commit provides the framework, to be filled with something
+       useful in the next commits.
 
-       [type42] Protect against invalid number of glyphs (#46159).
+       * include/freetype/freetype.h (FT_Face_Properties): Declare.
 
-       * src/type42/t42parse.c (t42_parse_charstrings): Check number of
-       `CharStrings' dictionary entries against size of data stream.
+       * src/base/ftobjs.c (FT_Face_Properties): New function.
 
-2015-10-08  Werner Lemberg  <wl@gnu.org>
+2017-02-13  Werner Lemberg  <wl@gnu.org>
 
-       [sfnt] Fix some signed overflows (#46149).
+       [autofit] Prevent overlapping blue zones.
 
-       * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
-       <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
+       Problem reported as
 
-2015-10-08  Werner Lemberg  <wl@gnu.org>
+         https://github.com/google/fonts/issues/632
 
-       [type1] Protect against invalid number of subroutines (#46150).
+       The font in question (Nunito) has values 705 and 713 for the
+       reference and overshoot values, respectively, of the first blue
+       zone.  Blue zone 2, however, has value 710 for both the reference
+       and overshoot.  At 12ppem, reference and overshoot of blue zone 0
+       becomes 8px, while blue zone 2 becomes 9px.
 
-       * src/type1/t1load.c (parse_subrs): Check number of
-       `Subrs' dictionary entries against size of data stream.
+       A peculiarity of this font is that the tops of isolated vertical
+       stems like `N' have a slight overshoot also.  The auto-hinter tries
+       to find the nearest blue zone using the *original* coordinates.  For
+       vertical stems, this is value 713.  For normal horizontal tops like
+       in character `E', this is value 710.  Since value 713 is mapped to
+       8px but value 710 to 9px, `N' and similar characters are one pixel
+       higher than `E', which looks very bad.
 
-2015-10-07  Kostya Serebryany  <kcc@google.com>
+       This commit sanitizes blue zones to avoid such a behaviour.
 
-       [ftfuzzer] Add support for LLVM's LibFuzzer.
+       * src/autofit/aflatin.c (af_latin_sort_blue): New function.
+       (af_latin_metrics_init_blues): Sort blue values and remove overlaps.
 
-       * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
+2017-02-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-2015-10-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/smooth/ftgrays.c (gray_sweep): Improve code.
 
-       [smooth] Faster alternative line renderer.
+2017-02-06  Werner Lemberg  <wl@gnu.org>
 
-       This implementation renders the entire line segment at once without
-       subdividing it into scanlines.  The main speed improvement comes from
-       reducing the number of divisions to just two per line segment, which
-       is a bare minimum to calculate cell coverage in a smooth rasterizer.
-       Notably, the progression from cell to cell does not itself require any
-       divisions at all.  The speed improvement is more noticeable at larger
-       sizes.
+       [truetype] Implement `VVAR' table support.
 
-       * src/smooth/ftgrays.c (gray_render_line): New implementation.
+       * src/truetype/ttgxvar.h (GX_HVarTable): Renamed to...
+       (GX_HVVarTable): ...This.
+       (GX_Blend): Add fields for `VVAR' table handling.
+       Other minor updates.
 
-2015-10-06  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (ft_var_load_hvar): Renamed to...
+       (ft_var_load_hvvar): ...This.
+       Handle VVAR loading also (controlled by an additional parameter).
+       (tt_hadvance_adjust): Renamed to...
+       (tt_hvadvance_adjust): ...This.
+       Handle application of advance height also (controlled by an
+       additional parameter).
+       (tt_hadvance_adjust, tt_vadvance_adjust): Wrappers for
+       `tt_hvadvance_adjust'.
 
-       [cff] Return correct PS names from pure CFF (#46130).
+       * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
 
-       * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
-       SFNT.
+2017-02-05  Werner Lemberg  <wl@gnu.org>
 
-2015-10-04  Werner Lemberg  <wl@gnu.org>
+       [autofit] Use better blue zone characters for lowercase latin.
 
-       [base] Replace left shifts with multiplication (#46118).
+       The number of lowercase characters for computing the top flat blue
+       zone value was too small (in most cases only `x' and `z').  If one
+       of the two characters has a large serif, say, it can happen that
+       FreeType must select between two different values, having a 50%
+       chance to use the wrong one.  As a result, rendering at larger PPEM
+       values could yield uneven lowercase glyph heights.
 
-       * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
+       Problem reported by Christoph Koeberlin <christoph@koe.berlin>.
 
-2015-10-04  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afblue.dat (AF_BLUE_STRING_LATIN_SMALL): Replaced
+       with...
+       (AF_BLUE_STRING_LATIN_SMALL_TOP, AF_BLUE_STRING_LATIN_SMALL_BOTTOM):
+       ... New, extended sets.
+       (AF_BLUE_STRINGSET_LATN): Updated.
 
-       * Version 2.6.1 released.
-       =========================
+       * src/autofit/afblue.c, scr/autofit/afblue.h: Regenerated.
 
+2017-02-04  Werner Lemberg  <wl@gnu.org>
 
-       Tag sources with `VER-2-6-1'.
+       Make `freetype-config' a wrapper of `pkg-config' if possible.
 
-       * docs/VERSION.DLL: Update documentation and bump version number to
-       2.6.1.
+       Based on ideas taken from
 
-       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
-       builds/windows/vc2005/index.html,
-       builds/windows/vc2008/freetype.vcproj,
-       builds/windows/vc2008/index.html,
-       builds/windows/vc2010/freetype.vcxproj,
-       builds/windows/vc2010/index.html,
-       builds/windows/visualc/freetype.dsp,
-       builds/windows/visualc/freetype.vcproj,
-       builds/windows/visualc/index.html,
-       builds/windows/visualce/freetype.dsp,
-       builds/windows/visualce/freetype.vcproj,
-       builds/windows/visualce/index.html,
-       builds/wince/vc2005-ce/freetype.vcproj,
-       builds/wince/vc2005-ce/index.html,
-       builds/wince/vc2008-ce/freetype.vcproj,
-       builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
+         http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-multilib.patch
+         http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/tree/freetype-2.5.3-freetype-config-prefix.patch
 
-       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
+       * builds/unix/freetype-config.in: Rewritten.  Use `pkg-config' to
+       set output variables if program is available.
 
-       * builds/unix/configure.raw (version_info): Set to 18:1:12.
-       * CMakeLists.txt (VERSION_PATCH): Set to 1.
+       * docs/CHANGES, docs/freetype-config.1: Updated.
 
-       * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
-       dumping functions.
+2017-02-04  Werner Lemberg  <wl@gnu.org>
 
-2015-10-04  Werner Lemberg  <wl@gnu.org>
+       * builds/unix/unix-def.in (freetype-config): Fix permissions.
 
-       [bzip2, gzip] Avoid access of uninitialized memory (#46109).
+2017-02-03  Werner Lemberg  <wl@gnu.org>
 
-       * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
-       (ft_gzip_file_fill_input): In case of an error, adjust the limit to
-       avoid copying uninitialized memory.
+       * src/autofit/afglobal.c (af_face_globals_free): Erase useless code.
 
-2015-10-03  Werner Lemberg  <wl@gnu.org>
+2017-02-03  Werner Lemberg  <wl@gnu.org>
 
-       [bzip2, gzip] Avoid access of uninitialized memory (#46109).
+       * include/freetype/ftgasp.h (FT_GASP_SYMMETRIC_GRIDFIT): Fix value.
 
-       * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
-       (ft_gzip_file_fill_output): In case of an error, adjust the limit to
-       avoid copying uninitialized memory.
+       Reported by Behdad.
 
-2015-10-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
+2017-02-02  Werner Lemberg  <wl@gnu.org>
 
-       [smooth] Clean up worker.
+       [truetype] Fix MVAR post-action handling.
 
-       * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
+       Reported as
 
-2015-10-01  Werner Lemberg  <wl@gnu.org>
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=509
 
-       [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
+       * src/truetype/ttobjs.c (tt_size_reset): Do nothing for CFF2.  This
+       is important to make `tt_size_reset_iterator' (called in
+       `tt_apply_mvar') always work.
 
-       * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
-       border conditions (i.e., if the loop exits naturally).
+2017-02-02  Werner Lemberg  <wl@gnu.org>
 
-2015-10-01  Werner Lemberg  <wl@gnu.org>
+       Make compilation with FT_CONFIG_OPTION_PIC work again.
 
-       * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
-       They should be a subset of `af_deva_uniranges'.
+       All code committed here is guarded with `FT_CONFIG_OPTION_PIC'.
 
-2015-10-01  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/internal/services/svmetric.h
+       (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon.
 
-       [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
+       * src/autofit/aflatin.c (af_latin_hints_compute_edges,
+       af_latin_hint_edges): Provide `globals' variable.
 
-       * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
-       reject too large glyph indices.
+       * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing
+       variable.
 
-2015-09-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET,
+       AF_STYLE_CLASSES_GET): Redefine.
 
-       [smooth] Clean up worker.
+       * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo.
 
-       * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
-       (gray_start_cell, gray_render_line): Update.
+       * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it.
 
-2015-09-30  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffpic.h (CffModulePIC): Fix typo.
 
-       [autofit] Replace `no-base' with `non-base'.
+2017-01-31  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * src/autofit/*: Do it.
+       * src/smooth/ftgrays.c (gray_render_scanline): Improve code.
 
-2015-09-30  Werner Lemberg  <wl@gnu.org>
+2017-01-31  Werner Lemberg  <wl@gnu.org>
 
-       [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
+       [cff] Provide metrics variation service interface (#50196).
 
-       * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
-       skip invalid segments.
-       If searching the next character, provide a more efficient logic to
-       speed up the code.
+       Only now I've got an OTF with an HVAR table for testing...
 
-2015-09-30  Werner Lemberg  <wl@gnu.org>
+       The code in `ftmm.c' uses `FT_FACE_LOOKUP_SERVICE' to get the
+       metrics variations interface.  However, this didn't work with
+       `FT_FACE_FIND_GLOBAL_SERVICE' used in `sfnt_init_face'.
 
-       [truetype] Adjust number of glyphs for malformed `loca' tables.
+       * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+       (cff_hadvance_adjust, cff_metrics_adjust): Wrapper functions for
+       metric service functions from the `truetype' module.
+       (cff_service_metrics_variations): New service.
+       (cff_services): Updated.
 
-       * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
+       * src/cff/cffpic.h (CFF_SERVICE_METRICS_VAR_GET): New macro.
+       [FT_CONFIG_OPTION_PIC]: Synchronize code.
 
-2015-09-29  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfobjs.c (sfnt_init_face): Replace call to
+       FT_FACE_FIND_GLOBAL_SERVICE with `ft_module_get_service' to always
+       load the service from the `truetype' module.
 
-       [pshinter] Avoid harmless overflow (#45984).
+2017-01-31  Werner Lemberg  <wl@gnu.org>
 
-       * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
+       Add framework to support services with 9 functions.
 
-2015-09-28  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC9):
+       New macro.
 
-       [autofit] Add support for Lao script.
+2017-01-31  Werner Lemberg  <wl@gnu.org>
 
-       Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
-       characters!
+       [base] Fix error handing in MM functions.
 
-       * src/autofit/afblue.dat: Add blue zone data for Lao.
+       * src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
+       FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates):
+       Implement it.
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+2017-01-31  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afscript.h: Add Lao standard characters.
+       [truetype] Fix sanity check for `gvar' table (#50184).
 
-       * src/autofit/afranges.c: Add Lao data.
+       * src/truetype/ttgxvar.c (ft_var_load_gvar): There might be missing
+       variation data for some glyphs.
 
-       * src/autofit/afstyles.h: Add Lao data.
+2017-01-31  Werner Lemberg  <wl@gnu.org>
 
-2015-09-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+       [autofit] Avoid uninitialized jumps (#50191).
 
-       [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
+       * src/autofit/afcjk.c (af_cjk_metrics_check_digits),
+       src/autofit/aflatin.c (af_latin_metrics_check_digits): Initialize
+       `advance'.
 
-       open_face_from_buffer() frees passed buffer if valid font
-       is not found.  But if copying to the buffer is failed,
-       the allocated buffer should be freed within the caller.
+2017-01-27  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
-       the buffer `sfnt_ps' if an error caused before calling
-       open_face_from_buffer().
-       (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
-       an error caused before calling open_face_from_buffer();
+       s/GB2312/PRC/.
 
-2015-09-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+       * include/freetype/freetype.h (FT_ENCODING_PRC): New enum value.
+       (FT_ENCODING_GB2312): Deprecated.
 
-       [mac] Fix buffer size calculation for LWFN font.
+       * include/freetype/ttnameid.h (TT_MS_ID_PRC): New macro.
+       (TT_MS_ID_GB2312): Deprecated.
 
-       * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
-       to prevent confused copy by too large chunk size.
+       * src/sfnt/sfobjs.c (sfnt_find_encoding): Updated.
 
-2015-09-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * docs/CHANGES: Updated.
 
-       * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
+2017-01-26  Werner Lemberg  <wl@gnu.org>
 
-2015-09-26  Werner Lemberg  <wl@gnu.org>
+       [base] Add `FT_Get_Sfnt_LangTag' function.
 
-       [autofit] Minor tracing improvement.
+       * include/freetype/ftsnames.h (FT_SfntLangTag): New structure.
+       (FT_Get_Sfnt_LangTag): New declaration.
 
-       * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
-       blue zones header line if there are no blue zones.
+       * src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New funtion.
 
-2015-09-26  Werner Lemberg  <wl@gnu.org>
+       * docs/CHANGES: Updated.
 
-       [bzip2, gzip, lzw] Harmonize function signatures with prototype.
+2017-01-26  Werner Lemberg  <wl@gnu.org>
 
-       Suggested by Hin-Tak Leung.
+       [sfnt] Support `name' table format 1.
 
-       * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
-       (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
+       * include/freetype/internal/tttypes.h (TT_LangTagRec): New
+       structure.
+       (TT_NameTableRec): Add fields `numLangTagRecords' and `langTags'.
 
-2015-09-26  Hin-Tak Leung  <htl10@users.sourceforge.net>
+       * src/sfnt/ttload.c (tt_face_load_name): Add support for language
+       tags.
+       Reduce array size of name strings in case of invalid entries.
+       (tt_face_free_name): Updated.
 
-       Add new FT_LOAD_COMPUTE_METRICS load flag.
+       * docs/CHANGES: Updated.
 
-       * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
-       * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
+2017-01-25  Werner Lemberg  <wl@gnu.org>
 
-2015-09-26  Werner Lemberg  <wl@gnu.org>
+       [sfnt] s/TT_NameEntry/TT_Name/.
 
-       * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
+       * include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed
+       to...
+       (TT_NameRec): This.
+       (TT_NameTableRec): Updated.
 
-2015-09-25  Werner Lemberg  <wl@gnu.org>
+       * src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated.
 
-       [type1] Protect against invalid number of glyphs (#46029).
+       * src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated.
 
-       * src/type1/t1load.c (parse_charstrings): Check number of
-       `CharStrings' dictionary entries against size of data stream.
+       * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
+       tt_name_entry_ascii_from_other): Renamed to...
+       (tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This,
+       respectively.
+       (TT_NameEntry_ConvertFunc): Renamed to...
+       (TT_Name_ConvertFunc): This.
+       (tt_face_get_name): Updated.
 
-2015-09-23  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/ttload.c (tt_face_load_name, tt_face_free_name):
+       Updated.
 
-       [sfnt] Better checks for invalid cmaps (2/2) (#46019).
+2017-01-24  Werner Lemberg  <wl@gnu.org>
 
-       While the current code in `FT_Get_Next_Char' correctly rejects
-       out-of-bounds glyph indices, it can be extremely slow for malformed
-       cmaps that use 32bit values.  This commit tries to improve that.
+       [sfnt] Fix Postscript name service for symbol fonts.
 
-       * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
-       tt_cmap12_char_map_binary, tt_cmap13_next,
-       tt_cmap13_char_map_binary): Reject glyph indices larger than or
-       equal to the number of glyphs.
+       * src/sfnt/sfdriver.c (sfnt_get_ps_name): Accept PID/EID=3/0
+       entries also.
 
-2015-09-23  Werner Lemberg  <wl@gnu.org>
+2017-01-24  Werner Lemberg  <wl@gnu.org>
 
-       [base, sfnt] Better checks for invalid cmaps (1/2).
+       [truetype] For OpenType 1.7: s/preferred/typographic/ (sub)family.
 
-       * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
-       glyph indices.
-       (FT_Get_First_Char): Updated.
+       * include/freetype/ftsnames.h
+       (FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY,
+       FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY): New macros.
+       (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
+       FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Deprecated.
 
-       * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
-       codes greater than 0xFFFF.
+       * include/freetype/ttnameid.h (TT_NAME_ID_TYPOGRAPHIC_FAMILY,
+       TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY): New macros.
+       (TT_NAME_ID_PREFERRED_FAMILY, TT_NAME_ID_PREFERRED_SUBFAMILY):
+       Deprecated.
 
-       (tt_cmap8_char_index): Avoid integer overflow in computation of
-       glyph index.
-       (tt_cmap8_char_next): Avoid integer overflows in computation of
-       both next character code and glyph index.
+       * src/sfnt/sfobjs.c (sfnt_load_face): Updated.
 
-       (tt_cmap10_char_index): Fix unsigned integer logic.
-       (tt_cmap10_char_next): Avoid integer overflow in computation of
-       next character code.
+       * docs/CHANGES: Updated.
 
-       (tt_cmap12_next): Avoid integer overflows in computation of both
-       next character code and glyph index.
-       (tt_cmap12_char_map_binary): Ditto.
-       (tt_cmap12_char_next): Simplify.
+2017-01-23  Werner Lemberg  <wl@gnu.org>
 
-       (tt_cmap13_char_map_binary): Avoid integer overflow in computation
-       of next character code.
-       (tt_cmap13_char_next): Simplify.
+       [base] Add `FT_Set_Default_Properties' (#49187).
 
-2015-09-21  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+       * include/freetype/ftmodapi.h: Add declaration.
 
-       [base] Check too long POST and sfnt resource (#45919).
+       * src/base/ftinit.c (ft_set_default_properties): Renamed to...
+       (FT_Set_Default_Properties): ... this.
+       (FT_Init_FreeType): Updated.
 
-       * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
-       resource fork for Mac OS.  Resource forks larger than 16 MB can be
-       written but can't be handled correctly, at least in Carbon routine.
-       See https://support.microsoft.com/en-us/kb/130437.
+       * docs/CHANGES: Updated.
 
-       * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
-       prefix for `%p' formatter.
+2017-01-23  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
-       total size of the concatenated POST resource before buffer
-       allocation.
-       (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
-       before buffer allocation.
+       [truetype] Minor updates for OpenType 1.8.1.
 
-       * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
-       total resource size before buffer allocation.
+       * src/truetype/ttgxvar.h (GX_MVarTable): `axisCount' has been
+       removed from the specification; it is now reserved.
 
-2015-09-19  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (ft_var_load_mvar): Updated.
+       (GX_FVar_Head): Remove `countSizePairs'; the corresponding data
+       field in the `MVAR' table is now reserved.
+       (fvar_fields): Updated.
 
-       [sfnt] Improve handling of invalid SFNT table entries (#45987).
+2017-01-23  Werner Lemberg  <wl@gnu.org>
 
-       This patch fixes weaknesses in function `tt_face_load_font_dir'.
+       [truetype] Avoid segfault for invalid variation data.
 
-       - It incorrectly assumed that valid tables are always at the
-         beginning.  As a consequence, some valid tables after invalid
-         entries (which are ignored) were never seen.
+       * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Assure
+       `itemCount' is not zero.
 
-       - Duplicate table entries (this is, having the same tag) were not
-         rejected.
+       Reported as
 
-       - The number of valid tables was sometimes too large, leading to
-         access of invalid tables.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=441
 
-       * src/sfnt/ttload.c (check_table_dir): Add argument to return number
-       of valid tables.
-       Add another tracing message.
-       (tt_face_load_font_dir): Only allocate table array for valid
-       entries as returned by `check_table_dir'.
-       Reject duplicate tables and adjust number of valid tables
-       accordingly.
+2017-01-20  Werner Lemberg  <wl@gnu.org>
 
-2015-09-19  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttinterp.c (TT_RunIns): Adjust loop detector limits.
 
-       [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
+2017-01-17  Werner Lemberg  <wl@gnu.org>
 
-       * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
-       then take the absolute value.
-       Also apply FT_ABS to `height'.
+       * include/freetype/ttnameid.h: Updated to OpenType 1.8.1.
 
-2015-09-17  Werner Lemberg  <wl@gnu.org>
+       (TT_APPLE_ID_FULL_UNICODE): New macro.
 
-       [type42] Fix memory leak (#45989).
+       (TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC,
+       TT_MS_LANGID_UPPER_SORBIAN_GERMANY,
+       TT_MS_LANGID_LOWER_SORBIAN_GERMANY, TT_MS_LANGID_IRISH_IRELAND,
+       TT_MS_LANGID_INUKTITUT_CANADA_LATIN, TT_MS_LANGID_BASHKIR_RUSSIA,
+       TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG,
+       TT_MS_LANGID_GREENLANDIC_GREENLAND, TT_MS_LANGID_MAPUDUNGUN_CHILE,
+       TT_MS_LANGID_MOHAWK_MOHAWK, TT_MS_LANGID_BRETON_FRANCE,
+       TT_MS_LANGID_OCCITAN_FRANCE, TT_MS_LANGID_CORSICAN_FRANCE,
+       TT_MS_LANGID_ALSATIAN_FRANCE, TT_MS_LANGID_YAKUT_RUSSIA,
+       TT_MS_LANGID_KICHE_GUATEMALA, TT_MS_LANGID_KINYARWANDA_RWANDA,
+       TT_MS_LANGID_WOLOF_SENEGAL, TT_MS_LANGID_DARI_AFGHANISTAN): New
+       macros.
 
-       * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
-       `CharStrings' array.
+       (TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC): Fix value.
 
-2015-09-17  Werner Lemberg  <wl@gnu.org>
+       (TT_MS_LANGID_GERMAN_LIECHTENSTEIN, TT_MS_LANGID_CATALAN_CATALAN,
+       TT_MS_LANGID_CHINESE_MACAO, TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT,
+       TT_MS_LANGID_KOREAN_KOREA, TT_MS_LANGID_ROMANSH_SWITZERLAND,
+       TT_MS_LANGID_SLOVENIAN_SLOVENIA, TT_MS_LANGID_BASQUE_BASQUE,
+       TT_MS_LANGID_SETSWANA_SOUTH_AFRICA,
+       TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA,
+       TT_MS_LANGID_ISIZULU_SOUTH_AFRICA, TT_MS_LANGID_KAZAKH_KAZAKHSTAN,
+       TT_MS_LANGID_KYRGYZ_KYRGYZSTAN, TT_MS_LANGID_KISWAHILI_KENYA,
+       TT_MS_LANGID_TATAR_RUSSIA, TT_MS_LANGID_ODIA_INDIA,
+       TT_MS_LANGID_MONGOLIAN_PRC, TT_MS_LANGID_TIBETAN_PRC,
+       TT_MS_LANGID_WELSH_UNITED_KINGDOM, TT_MS_LANGID_GALICIAN_GALICIAN,
+       TT_MS_LANGID_SINHALA_SRI_LANKA, TT_MS_LANGID_TAMAZIGHT_ALGERIA,
+       TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA, TT_MS_LANGID_YI_PRC,
+       TT_MS_LANGID_UIGHUR_PRC): New aliases.
 
-       [psaux] Fix memory leak (#45986).
+       Remove commented out code.
 
-       * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
-       Free `temp' in case of error.
+       (TT_NAME_ID_LIGHT_BACKGROUND, TT_NAME_ID_DARK_BACKGROUND,
+       TT_NAME_ID_VARIATIONS_PREFIX): New macros.
 
-2015-09-17  Werner Lemberg  <wl@gnu.org>
+       (HAVE_LIMIT_ON_IDENTS): Remove macro (which was useless since many
+       years), use guarded long macros by default and define short versions
+       as aliases for the long ones.
 
-       [psaux] Improve tracing message.
+2017-01-15  Werner Lemberg  <wl@gnu.org>
 
-       * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
-       Handle plural correctly.
+       * src/truetype/ttgxvar.c (tt_apply_var): Handle underline parameters
+       also.
 
-2015-09-17  Werner Lemberg  <wl@gnu.org>
+2017-01-11  Werner Lemberg  <wl@gnu.org>
 
-       [pcf] Fix integer overflows (#45985).
+       * src/base/ftobjs.c (ft_open_face_internal): Improve tracing.
 
-       * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
+2017-01-11  Werner Lemberg  <wl@gnu.org>
 
-2015-09-17  Werner Lemberg  <wl@gnu.org>
+       [truetype] Actually use metrics variation service.
 
-       [pcf] Use FT_ABS for some property values (#45893).
+       * src/base/ftmm.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+       (ft_face_get_mvar_service): New auxiliary function to look up
+       metrics variation service.
+       (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
+       FT_Set_Var_Blend_Coordinates): Call metrics variation service.
 
-       * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
-       AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
-       RESOLUTION_Y.  In tracing mode, add warnings.
+       * src/truetype/ttobjs.c (tt_face_init): Use metrics variations for
+       named instances.
 
-2015-09-16  Werner Lemberg  <wl@gnu.org>
+2017-01-11  Werner Lemberg  <wl@gnu.org>
 
-       Minor fixes for some clang warnings.
+       [truetype] Provide metrics variation service.
 
-       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
-       initialization.
+       * include/freetype/internal/services/svmetric.h
+       (FT_Metrics_Adjust_Func): Reduce number of necessary parameters.
 
-       * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
+       * src/truetype/ttgxvar.c: Include FT_LIST_H.
+       (tt_size_reset_iterator): New auxiliary function for...
+       (tt_apply_var): New function.
 
-2015-09-15  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.h: Updated.
 
-       [type1, type42] Fix memory leaks (#45966).
+       * src/truetype/ttdriver.c (tt_service_metrics_variations): Add
+       `tt_apply_mvar'.
 
-       * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
-       names.
-       (parse_blend_design_map): Allow only a single design map.
-       (parse_encoding): Handle multiple encoding vectors.
+       * include/freetype/internal/ftserv.h (FT_ServiceCache): Add metrics
+       variation service.
 
-       * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
-       encoding vectors.
+2017-01-11  Werner Lemberg  <wl@gnu.org>
 
-2015-09-15  Werner Lemberg  <wl@gnu.org>
+       [truetype] Parse `MVAR' table.
 
-       [truetype] Fix integer type (#45965).
+       * src/truetype/ttgxvar.h (MVAR_TAG_XXX): New macros for MVAR tags.
+       (GX_Value, GX_MVarTable): New structures.
+       (GX_Blend): Add it.
 
-       * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
+       * src/truetype/ttgxvar.c (GX_VALUE_SIZE, GX_VALUE_CASE,
+       GX_GASP_CASE): New macros.
+       (ft_var_get_value_pointer): New auxiliary function to get a pointer
+       to a value from various SFNT tables already stored in `TT_Face'.
+       (ft_var_load_mvar): New function.
+       (TT_Get_MM_Var): Call it.
+       (tt_done_blend): Updated.
 
-2015-09-15  Werner Lemberg  <wl@gnu.org>
+2017-01-11  Werner Lemberg  <wl@gnu.org>
 
-       * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
+       [truetype] More preparations for MVAR support.
 
-2015-09-15  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttobjs.c (tt_size_reset): Add argument to make
+       function only recompute ascender, descender, and height.
 
-       [type1, type42] Check encoding array size (#45961).
+       * src/truetype/ttobjs.h: Updated.
 
-       * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
-       (t42_parse_encoding): Do it.
+       * src/truetype/ttdriver.c (tt_size_select, tt_size_request):
+       Updated.
 
-2015-09-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+2017-01-09  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
+       [pcf] Disable long family names by default.
 
-2015-09-14  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/config/ftoption.h
+       (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out.
 
-       [type1] Fix another potential buffer overflow (#45955).
+2017-01-09  Werner Lemberg  <wl@gnu.org>
 
-       * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
-       `eexec' doesn't exceed `limit'.
+       [pcf] Make long family names configurable.
 
-2015-09-13  Werner Lemberg  <wl@gnu.org>
+       The change from 2016-09-29 was too radical (except for people using
+       the openSuSE GNU/Linux distribution).  To ameliorate the situation,
+       PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls
+       the feature; if set, a new PCF property option
+       `no-long-family-names' can be used to switch this feature off.
 
-       Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
+       * include/freetype/config/ftoption.h, devel/ftoption.h
+       (PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option.
 
-       * builds/unix/mkinstalldirs: Removed, no longer needed.
+       * include/freetype/ftpcfdrv.h: New header file (only containing
+       comments currently, used for building the documentation).
 
-       * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
-       Update pwd call for `$INSTALL'.
+       * include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro.
 
-       * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
+       * src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field.
 
-       * autogen.sh: Updated.
+       * src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and
+       FT_PCF_DRIVER_H.
+       (pcf_property_set, pcf_property_get): New functions.
+       (pcf_service_properties): New service.
+       (pcf_services): Updated.
+       (pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle
+       `no_long_family_names'.
 
-2015-09-13  Werner Lemberg  <wl@gnu.org>
+       * src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names'
+       and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
 
-       [winfonts] Check alignment shift count for resource data (#45938).
+       * docs/CHANGES: Updated.
 
-       * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
+2017-01-09  Werner Lemberg  <wl@gnu.org>
 
-2015-09-13  Werner Lemberg  <wl@gnu.org>
+       [pcf] Introduce a driver structure.
 
-       [type1] Fix potential buffer overflow (#45923).
+       To be filled later on with something useful.
 
-       * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
-       point to end of file buffer.
+       * src/pcf/pcf.h (PCF_Driver): New structure.
 
-2015-09-13  Werner Lemberg  <wl@gnu.org>
+       * src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy
+       functions.
+       (pcf_driver_class): Updated.
 
-       [gzip] Fix access of small compressed files (#45937).
+2017-01-08  Werner Lemberg  <wl@gnu.org>
 
-       * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
+       [truetype] Again some GX code shuffling.
 
-       (ft_gzip_get_uncompressed_file): Correct byte order while reading
-       unsigned long value.  Without this change, the whole optimization of
-       accessing small files in `FT_Stream_OpenGzip' is never executed!  As
-       a consequence, access to PCF files in general (which are normally
-       small files) should be much improved now as originally intended.
+       We need this later on for MVAR also.
 
-2015-09-11  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (tt_hadvance_adjust): Split off computing
+       an item store variation delta into...
+       (ft_var_get_item_delta): ...new function.
 
-       [psaux] Fix potential buffer overflow (#45922).
+2017-01-08  Werner Lemberg  <wl@gnu.org>
 
-       * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
-       enclosed in balanced expressions, ensure that the cursor position
-       doesn't get larger than the current limit.
+       [truetype] Adjust font variation flags for MVAR.
 
-2015-09-11  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
+       Remove all flags related to MVAR; replace it with...
+       (TT_FACE_FLAG_VAR_MVAR): ...this new macro.
+       (TT_Face): Remove `mvar_support' field (which was still unused).
 
-       [base] Avoid crash while tracing `load_mac_face'.
+2017-01-06  Werner Lemberg  <wl@gnu.org>
 
-       Reported in Savannah bug #45919.
+       [truetype] More GX code shuffling.
 
-       * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
-       tracing.
+       We need this later on for MVAR also.
 
-2015-09-11  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (tt_done_blend): Split off handling of item
+       variation store into...
+       (ft_var_done_item_variation_store): ...new function.
 
-       [type42] Fix endless loop (#45920).
+2017-01-06  Werner Lemberg  <wl@gnu.org>
 
-       * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
-       type1's `parse_encoding'.
+       [truetype] More generalization of GX stuff.
 
-2015-09-10  Werner Lemberg  <wl@gnu.org>
+       We need this later on for MVAR also.
 
-       [docmaker] Allow `-' in bold and italic markup.
+       * src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add
+       parameters for delta-set index mapping and item variation store.
+       (ft_var_load_item_variation_store): Add parameter for item variation
+       store.
+       s/hvarData/varData/.
+       Move allocation of `hvar_table' to...
+       (ft_var_load_hvar): ...this function.
+       Updated.
 
-       * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
-       accordingly.
+2017-01-06  Werner Lemberg  <wl@gnu.org>
 
-2015-09-09  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       [truetype] Some GX structure renames for generalization.
 
-       * src/base/ftcalc.c (FT_RoundFix): Improve.
+       We need this later on for MVAR also.
 
-2015-09-09  Wojciech Mamrak  <wmamrak@gmail.com>
+       * src/truetype/ttgxvar.h (GX_HVarData): Renamed to...
+       (GX_ItemVarData): ...this.
+       (GX_HVarRegion): Renamed to...
+       (GX_VarRegion): ...this.
+       (GX_HVStore): Renamed to...
+       (GX_ItemVarStore): ...this.
+       (GX_WidthMap): Renamed to...
+       (GX_DeltaSetIdxMap): ...this.
 
-       * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
+       (GX_HVarTable): Updated.
 
-       This commit makes the functions behave as expected, this is,
-       rounding towards plus or minus infinity.
+       * src/truetype/ttgxvar.c: Updated.
 
-2015-09-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
+2017-01-06  Werner Lemberg  <wl@gnu.org>
 
-       * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
+       [truetype] Code shuffling.
 
-2015-09-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/truetype/ttgxvar.c (ft_var_load_hvar): Split off loading of
+       item variation store and delta set index mapping into...
+       (ft_var_load_item_variation_store,
+       ft_var_load_delta_set_index_mapping): ...new functions.
 
-       [raster,smooth] Microoptimizations.
+2017-01-06  Werner Lemberg  <wl@gnu.org>
 
-       * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
-       Bezier_Up, ): Use do-while loops.
+       [truetype] Add HVAR access without advance width map.
 
-       * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
-       gray_convert_glyph): Ditto.
+       * src/truetype/ttgxvar.c (ft_var_load_hvar): Handle case where
+       `offsetToAdvanceWidthMapping' is zero.
+       (tt_hadvance_adjust): Implement direct deltaSet access by glyph
+       index.
 
-2015-09-04  Werner Lemberg  <wl@gnu.org>
+2017-01-06  Werner Lemberg  <wl@gnu.org>
 
-       [autofit] Redesign code ranges (2/2).
+       [pcf] Revise driver.
 
-       This commit adds two fallback scripts (`latb', `latp') and
-       implements support for the no-base character ranges introduced in
-       the previous commit.
+       This commit improves tracing and handling of malformed fonts.  In
+       particular, the changes to `pcf_get_properties' fix
 
-       * src/autofit/aftypes.h (AF_ScriptClassRec): Add
-       `script_uni_nobase_ranges' field.
-       (AF_DEFINE_SCRIPT_CLASS): Updated.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=379
 
-       * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
-       `latp' fallback scripts.
+       * src/pcf/pcfread.c (tableNames): Use long names for better
+       readability.
+       (pcf_read_TOC): Allow at most 9 tables.
+       (pcf_get_properties): Allow at most 256 properties.
+       Limit strings array length to 256 * (65536 + 1) bytes.
+       Better tracing.
+       (pcf_get_metric): Trace metric data.
+       (pcf_get_metrics): Allow at most 65536 metrics.
+       Fix comparison of `metrics->ascent' and `metrics->descent' to avoid
+       potential overflow.
+       Better tracing.
+       (pcf_get_bitmaps): Allow at most 65536 bitmaps.
+       Better tracing.
+       (pcf_get_encodings, pcf_get_accel): Better tracing.
 
-       * src/autofit/afblue.dat: Add blue zones for Latin subscript and
-       superscript fallback scripts.
+       * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Don't trace `format' details.
+       These are now shown by `pcf_get_bitmaps'.
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+2017-01-04  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
-       characters.
-       (AF_STYLE_MASK): Updated.
+       * src/pcf/pcfdrivr.c (PCF_Face_Init): Trace compression format.
 
-       * src/autofit/afglobal.c (SCRIPT): Updated.
-       (af_face_globals_compute_style_coverage): Handle new style flag.
+2017-01-04  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
-       flag.
+       [cff] More consistency checks for pure CFFs.
 
-       * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
+       Reported as
 
-2015-09-04  Werner Lemberg  <wl@gnu.org>
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=378
 
-       [autofit] Redesign code ranges (1/2).
+       * src/cff/cffload.c (cff_font_load): Check element number and size
+       of Name and Top DICT indices.
 
-       This patch introduces auxiliary code ranges that identify no-base
-       characters; they refer to glyphs of a script that should be hinted
-       without alignments to blue zones (mostly diacritics).
+2017-01-04  Werner Lemberg  <wl@gnu.org>
 
-       It also splits off ranges for fallback scripts that handle subscript
-       and superscript characters not covered by OpenType features.  For
-       example, this greatly helps improve the hinting of various phonetic
-       alphabets, which contain a large amount characters that look like
-       superscript glyphs.
+       [cff, truetype] Minor tracing improvement.
 
-       Finally, code ranges are updated to Unicode 8.0, and enclosed
-       characters are removed in general since they normally look better if
-       they stay unhinted.
+       * src/cff/cffobjs.c (cff_face_init), src/truetype/ttobjs.c
+       (tt_face_init): Indent first tracing message from SFNT driver.
 
-       * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
-       8.0.
-       Split off superscript-like and subscript-like glyphs into...
+2017-01-03  Werner Lemberg  <wl@gnu.org>
 
-       (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
+       [truetype] Various minor fixes.
 
-       (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
-       of the corresponding character ranges.
+       * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check instruction
+       size only if we do native hinting.
+       (TT_Load_Glyph): Trace returned error code.
 
-2015-09-03  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Trace
+       returned error code.
+       (tt_size_ready_bytecode): Don't run `prep' table if `fpgm' table is
+       invalid.
 
-       [autofit] Pass glyph index to hinting function.
+2017-01-03  Werner Lemberg  <wl@gnu.org>
 
-       No functionality change yet.
+       [sfnt] Don't fail if PCLT, EBLC (and similar tables) are invalid.
 
-       * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
-       glyph index.
+       These tables are optional.
 
-       * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
-       src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
-       (af_indic_hints_apply), src/autofit/aflatin.c
-       (af_latin_hints_apply), src/autofit/aflatin2.c
-       (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
-       Updated.
+       * src/sfnt/sfobjs.c (sfnt_load_face): Implement it.
 
-2015-08-30  Werner Lemberg  <wl@gnu.org>
+2017-01-03  Werner Lemberg  <wl@gnu.org>
 
-       [autofit] Code clean-up.
+       * src/cff/cffparse.c (cff_parse_num): Simplify.
 
-       * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
-       (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
+2017-01-03  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
-       Updated.
+       Various fixes for clang's undefined behaviour sanitizer.
 
-2015-08-30  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffload.c (FT_fdot14ToFixed): Fix casting.
+       (cff_blend_doBlend): Don't left-shift negative numbers.
+       Handle 5-byte numbers byte by byte to avoid alignment issues.
 
-       [autofit] Make glyph style array use 16bit values.
+       * src/cff/cffparse.c (cff_parse_num): Handle 5-byte numbers byte by
+       byte to avoid alignment issues.
 
-       * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
-       `FT_UShort' for `map' field.
+       * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any
+       subrs.
 
-       * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
-       af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
-       (af_get_coverage): Use FT_UShort for `glyph_styles' array.
+       * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing.
 
-       * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
-       16 bits.
-       (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
+       * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around
+       definition of `ft_get_adobe_glyph_index'.
 
-2015-08-26  Werner Lemberg  <wl@gnu.org>
+       * src/psnames/pstables.h: Regenerated.
 
-       * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
+       * src/psnames/psmodule.c: Include `pstables.h' twice to get both
+       declaration and definition.
 
-2015-08-25  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix
+       casting.
 
-       [base] Improve kerning tracing and documentation.
+2017-01-01  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
-       scaled-down kerning values differ.
+       [cff] Handle multiple `blend' operators in a row correctly.
 
-2015-08-18  Werner Lemberg  <wl@gnu.org>
+       Reported as
 
-       [raster] Remove last remnants of `raster5' driver.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=368
 
-       * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
+       * src/cff/cffload.c (cff_blend_doBlend): Adjust `parser->stack'
+       pointers into `subFont->blend_stack' after reallocation.
 
-       * src/raster/rastpic.c, src/raster/rastpic.h
-       (ft_raster5_renderer_class_pic_init,
-       ft_raster5_renderer_class_pic_free): Removed.
+2017-01-01  Werner Lemberg  <wl@gnu.org>
 
-2015-08-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       [sfnt] Return correct number of named instances for TTCs.
 
-       [base] Improve emboldener (#45596).
+       Without this patch, requesting information for face index N returned
+       the data for face index N+1 (or index 0).
 
-       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
-       of zero-length segments.
+       * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index'
+       for negative `face_instance_index' values.
 
-2015-08-16  Alexei Podtelezhnikov  <apodtele@gmail.com>
+2016-12-31  Werner Lemberg  <wl@gnu.org>
 
-       [base] Reoptimize arithmetic.
+       */*: Use hex numbers for errors in tracing messages.
 
-       * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
-       special cases that slow down the general use.
+2016-12-31  Werner Lemberg  <wl@gnu.org>
 
-2015-08-15  pazer  <ibemad@gmail.com>
+       [truetype] Check axis count in HVAR table.
 
-       Fix C++ compilation (#45762).
+       Reported as
 
-       * src/base/ftstroke.c (ft_outline_glyph_class): Use
-       FT_CALLBACK_TABLE.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=362
 
-2015-08-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/truetype/ttgxvar.c (ft_var_load_hvar): Check axis count.
+       (ft_var_load_avar): Fix tracing message.
 
-       [truetype] Clean up.
+2016-12-30  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
-       `FT_Outline_Transform' and `FT_Outline_Translate'.
-       (translate_array): Dropped.
+       * Version 2.7.1 released.
+       =========================
 
-2015-08-14  Andreas Enge  <andreas.enge@inria.fr>
 
-       * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
+       Tag sources with `VER-2-7-1'.
 
-2015-08-13  Werner Lemberg  <wl@gnu.org>
+       * docs/VERSION.TXT: Add entry for version 2.7.1.
 
-       [truetype] Introduce named instance access to GX fonts.
+       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2005/index.html,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2008/index.html,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/index.html,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualc/index.html,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj,
+       builds/windows/visualce/index.html,
+       builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2005-ce/index.html,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/index.html: s/2.7/2.7.1/, s/27/271/.
 
-       For functions querying a face, bits 16-30 of the face index can hold
-       the named instance index if we have a GX font.  The indices start
-       with value 1; value 0 indicates font access without GX variation
-       data.
+       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
 
-       * include/freetype/freetype.h (FT_FaceRec): Update documentation.
-       * include/freetype/internal/sfnt.h: Ditto.
+       * builds/unix/configure.raw (version_info): Set to 19:0:13.
+       * CMakeLists.txt (VERSION_PATCH): Set to 1.
 
-       * src/sfnt/sfobjs.c (sfnt_init_face)
-       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
-       do argument checks.
-       (sfnt_load_face): Updated.
+2016-12-30  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttobjs.c (tt_face_init)
-       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
-       the style name.
+       [ftfuzzer] Replace `rand' with an xorshift algorithm.
 
-       * src/base/ftobjs.c (open_face_from_buffer,
-       open_face_PS_from_sfnt_stream): Updated.
-       * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
-       * src/cff/cffload.c (cff_font_load): Updated.
+       * src/tools/ftfuzzer/ftfuzzer.cc: Don't include `stdlib.h'.
+       (Random): Implement and use a 32bit `xorshift' algorithm.
 
-       * src/cff/cffobjs.c (cff_face_init): Make function exit early for
-       pure CFF fonts if `font_index < 0'.
-       Updated.
+2016-12-30  Werner Lemberg  <wl@gnu.org>
 
-       * src/cid/cidobjs.c (cid_face_init): Updated.
-       * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
-       * src/pfr/pfrobjs.c (pfr_face_init): Updated.
-       * src/type1/t1objs.c (T1_Face_Init): Updated.
-       * src/type42/t42objs.c (T42_Face_Init): Updated.
-       * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
-       Updated.
+       [ftfuzzer] Restrict number of tested bitmap strikes.
 
-       * docs/CHANGES: Updated.
+       Malformed fonts often have large values for the number of bitmap
+       strikes, and FreeType doesn't check the validity of all bitmap
+       strikes in advance.
 
-2015-08-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       Reported as
 
-       [type1,cff,cid] Streamline font matrix application.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=353
 
-       * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
-       if font matrix is not trivial.
-       * src/cff/cffgload.c (cff_slot_load): Ditto.
-       * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
-       entire outline.
+       * src/tools/ftfuzzer/ftfuzzer.cc: Include `stdlib.h' for `rand'.
+       (Random): Small class to provide n randomly selected numbers
+       (without repetition) out of the value set [1,N].
+       (LLVMFuzzerTestOneInput): Use it to test only up to 10 bitmap
+       strikes.
 
-2015-08-11  Werner Lemberg  <wl@gnu.org>
+2016-12-29  Werner Lemberg  <wl@gnu.org>
 
-       [builds/unix] Minor.
+       [truetype] Variation font API stability issues.
 
-       * builds/unix/configure.raw:
-       s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
-       similarly named uppercase variables.
+       Make some functions work before a call to `TT_Set_MM_Blend'.
 
-2015-08-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/truetype/ttgxvar.c (tt_hadvance_adjust): Exit immediately if
+       we don't blend.
+       (TT_Get_MM_Blend, TT_Get_Var_Design): Return default values if we
+       don't blend.
 
-       [type1,cid,type42] Minor improvements.
+2016-12-29  Werner Lemberg  <wl@gnu.org>
 
-       * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
-       when necessary. Refresh comments.
-       * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
-       * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
+       * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis data.
 
-2015-08-08  Werner Lemberg  <wl@gnu.org>
+       Reported as
 
-       [type42] Fix glyph access.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=348
 
-       This is a severe bug: We've missed one level of indirection, as
-       described in the Type 42 specification.  As a result, ftview
-       sometimes showed incorrect glyphs for given glyph names, and even
-       displayed `error 0x0006' (invalid argument!) in case the number of
-       glyph indices differed between the Type 42 font and the embedded
-       TTF.
+2016-12-29  Werner Lemberg  <wl@gnu.org>
 
-       Apparently, noone ever noticed it; this shows how much Type 42 fonts
-       are in use...
+       [truetype] Tracing fixes.
 
-       * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
-       to embedded TTF's glyph index.
+       * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct
+       information.
+       (TT_Set_Var_Design): Fix typo.
+       (TT_Get_Var_Design): Fix typos.
 
-2015-08-08  Werner Lemberg  <wl@gnu.org>
+2016-12-29  Werner Lemberg  <wl@gnu.org>
 
-       [type42] Minor clean-up.
+       */*: Use `0.5f' for tracing 16.16 numbers.
 
-       * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
-       variable.
+2016-12-29  Werner Lemberg  <wl@gnu.org>
 
-2015-08-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       [pcf] Protect against gzip bombs.
 
-       [type42] Parse FontMatrix according to specifications.
+       Fix suggested by Kostya; reported as
 
-       * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
-       does not need scaling by 1000. Units_per_EM are taken from the
-       embedded TrueType.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=345
 
-2015-08-06  Werner Lemberg  <wl@gnu.org>
+       * src/pcf/pcfread.c (pcf_read_TOC): Limit number of TOC entries to
+       1024.
 
-       [autofit] Improve Arabic hinting.
+2016-12-28  Werner Lemberg  <wl@gnu.org>
 
-       Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
-       ttfautohint).
+       [psnames] Only declare, not define, data in `pstables.h' (#49949).
 
-       * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
-       character.
+       Pdfium includes `pstables.h' a second time; moving the definition
+       from `pstables.h' to `psmodule.c' saves more than 60kByte data
+       segment space for this case.
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+       * src/tools/glnames.py (StringTable::dump,
+       StringTable::dump_sublist, dump_encoding, dump_array): Emit
+       additional code to only define tables if `DEFINE_PS_TABLES' is set.
 
-2015-08-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/psnames/pstables.h: Regenerated.
+       * src/psnames/psmodule.c (DEFINE_PS_TABLES): Define.
 
-       [truetype] Clean up types.
+2016-12-28  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
-       * include/freetype/internal/tttypes.h (TT_Size): ... to here.
-       (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
-       * src/truetype/ttgload.c: Remove corresponding type casts.
-       * src/truetype/ttsubpix.c: Ditto.
+       [cff] Catch `blend' op in non-variant fonts.
 
-2015-08-05  Werner Lemberg  <wl@gnu.org>
+       Reported as
 
-       [autofit] Improve recognition of flat vs. rounded segments.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=334
 
-       Lower the flatness threshold from upem/8 to upem/14, making the
-       auto-hinter accept shorter elements.
+       * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>: Don't
+       allow `blend' op for non-variant fonts.
 
-       Synchronize flat/round stem selection algorithm with blue zone code.
+2016-12-28  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
-       (af_latin_metrics_init_blues): Use it.
-       (af_latin_hints_compute_segments): Collect information on maximum
-       and minimum coordinates of `on' points; use this to add a constraint
-       for the flat/round decision similar to
-       `af_latin_metrics_init_blues'.
+       [cff] Better check of number of blends.
 
-2015-08-04  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdBLEND>,
+       src/cff/cffparse.c (cff_parse_blend): Compare number of blends with
+       stack size.
 
-       Another left-shift bug (#45681).
+2016-12-27  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
-       `dlen'.
+       Documentation updates.
 
-2015-08-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * docs/CHANGES: Add missing information.
 
-       [base] Fix `ft_corner_orientation'.
+       * docs/formats.txt: Rewritten and updated.
 
-       Remove casting from `FT_Long' to `FT_Int' that might change the sign
-       of the return value and make it faster too.
+2016-12-27  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
-       with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
-       * src/pshinter/pshalgo.c: Remove old unused code.
+       [truetype, type1] Implement `FT_Get_Var_Design_Coordinates'.
 
-2015-08-03  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (TT_Get_Var_Design): Implement.
+       (TT_Set_Var_Design): Fix tracing.
 
-       * src/truetype/ttgload.c (load_truetype_glyph)
-       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
-       having a depth greater than 1.
+       * src/type1/t1load.c (T1_Get_Var_Design): Implement.
 
-2015-08-03  Werner Lemberg  <wl@gnu.org>
+2016-12-24  Werner Lemberg  <wl@gnu.org>
 
-       Fix typo in clang bug from 2015-07-31 (#45678).
+       * src/truetype/ttpload.c (tt_face_load_hdmx): Ignore `version'.
 
-       * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
+       Problem reported by 張俊芝 <418092625@qq.com>.
 
-2015-08-02  Werner Lemberg  <wl@gnu.org>
+2016-12-24  Werner Lemberg  <wl@gnu.org>
 
-       * CMakeLists.txt: Improve shared library support.
+       * src/sfnt/ttsbit.c (tt_face_load_sbit): Allow more version values.
 
-       Based on a patch from John Cary <cary@txcorp.com>.
+       Some fonts seem to have the `version' field in the wrong byte order.
 
-2015-08-02  Werner Lemberg  <wl@gnu.org>
+       Problem reported by 張俊芝 <418092625@qq.com>.
 
-       * builds/unix/freetype-config.in (enable_shared): Remove.  Unused.
+2016-12-24  Werner Lemberg  <wl@gnu.org>
 
-2015-08-02  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttpload.c (tt_face_load_loca): Sanitize table length.
 
-       Fix more invalid left-shifts.
+       This trivial fix allows us to accept more fonts.
 
-       * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
-       not left-shift.
+       Problem reported by 張俊芝 <418092625@qq.com>.
 
-       * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
-       tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
-       not left-shift.
+2016-12-24  Werner Lemberg  <wl@gnu.org>
 
-2015-07-31  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfobjs.c (sfnt_init_face): Fix tracing.
 
-       Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
+2016-12-22  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
-       positive values from header.
-       Check overflow.
+       * CMakeLists.txt: Make it work with cmake 2.8.11.2 (#49909).
 
-       * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
-       negative values.
+2016-12-22  Werner Lemberg  <wl@gnu.org>
 
-       * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
-       _bdf_clear_glyph_modified): Use unsigned long constant.
+       Ensure used preprocessor symbols are defined (#49790).
 
-       * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
-       left-shift values that can be negative.
+       * builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+       include/freetype/config/ftconfig.h: Check `__GNUC__', `__IBMC__',
+       and `__SUNPRO_C' correctly.
 
-       * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
-       left-shift values that can be negative.
+2016-12-22  Werner Lemberg  <wl@gnu.org>
 
-       * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
-       negative values.
+       * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Check `count'.
 
-       * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
-       values that can be negative.
+       Reported as
 
-       * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
-       compute_glyph_metrics, load_sbit_image): Don't left-shift values
-       that can be negative.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=308
 
-2015-07-31  Werner Lemberg  <wl@gnu.org>
+2016-12-22  Werner Lemberg  <wl@gnu.org>
 
-       Define FT_LONG_MAX.
+       [cff] Protect against invalid `vsindex' and `blend' values.
 
-       * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
-       * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
+       Reported as
 
-2015-07-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=305
 
-       * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
+       * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVSINDEX,
+       cf2_cmdBLEND>: Implement it.
 
-2015-07-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
+2016-12-22  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
+       [ftfuzzer] Always use Adobe CFF engine.
 
-2015-07-26  Matthias Clasen  <matthias.clasen@gmail.com>
+       * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement
+       it.
 
-       [cff] Don't use `hmtx' table for LSB (#45520).
+2016-12-21  Werner Lemberg  <wl@gnu.org>
 
-       * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
-       width only.  Bug introduced 2015-04-10.
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
 
-2015-07-09  Werner Lemberg  <wl@gnu.org>
+       I should really stop coding late in the evening...
 
-       Better support of user-supplied C++ namespaces.
+       Thanks again to Ben for checking.
 
-       See
+2016-12-21  Werner Lemberg  <wl@gnu.org>
 
-         http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
+       [autofit] Support variation fonts.
 
-       for a rationale.
+       (This ChangeLog entry was added later on.)
 
-       * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
-       src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
-       src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
-       (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
-       header files that contain FT_{BEGIN,END}_HEADER macros by
-       themselves.
+       * src/autofit/afglobal.c (af_face_globals_free): Remove useless
+       code.
 
-       * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
-       FT_CONFIG_STANDARD_LIBRARY_H earlier.
+       * src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
+       * FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
+       FT_Set_Var_Blend_Coordinates): Finalize
+       auto-hinter data to enforce recomputation.  Note that this is a
+       brute-force method which should be improved.
 
-       * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H.
+2016-12-21  Werner Lemberg  <wl@gnu.org>
 
-2015-07-07  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
 
-       [sfnt] Make `tt_face_get_name' member of the SFNT interface.
+       Don't apply deltas twice for non-phantom points.
 
-       * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
-       prototype.
-       (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
+       Spotted by Ben Wagner.
 
-       * src/sfnt/sfdriver.c (sfnt_interface): Updated.
+2016-12-21  Werner Lemberg  <wl@gnu.org>
 
-       * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
-       * src/sfnt/sfobjs.h: Add prototype for it.
+       [cff, truetype] Another try for #49829.
 
-2015-06-30  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffdrivr.c: Don't include
+       `FT_SERVICE_METRICS_VARIATIONS_H'.
+       (cff_get_advances): Use `ttface->variation_support'.
 
-       Fix some clang compiler warnings.
+       * src/truetype/ttdriver.c (tt_get_advances): Use
+       `ttface->variation_support'.
 
-       * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
-       (cf2_interpT2CharString), src/truetype/ttgload.c
-       (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
-       src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
+       * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+       load_truetype_glyph): Use `ttface->variation_support'.
 
-2015-06-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
+2016-12-21  Werner Lemberg  <wl@gnu.org>
 
-       [truetype] Speed up bytecode interpreter.
+       [truetype, sfnt] Introduce font variation flags to `TT_Face'.
 
-       * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
+       * include/freetype/internal/tttypes.h (TT_FACE_FLAG_VAR_XXX):
+       New macros describing available functionality of various OpenType
+       tables related to font variation.
+       (TT_Face): New fields `variation_support' and `mvar_support',
+       replacing and extending `use_fvar'.
 
-2015-06-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/sfnt/sfobjs.c (sfnt_init_face, sfnt_load_face): Use
+       `variation_support'.
 
-       [base] Speed up emboldening.
+       * src/truetype/ttgxvar.c (ft_var_load_hvar): Set `variation_support'
+       field.
+       (TT_Vary_Apply_Glyph_Deltas): Updated.
 
-       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
-       `FT_Vector_NormLen'.
+2016-12-21  Werner Lemberg  <wl@gnu.org>
 
-2015-06-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       [base] Improve sanity check for Mac resources (#49888).
 
-       [base] Implement fast vector normalization.
+       * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Abort if `rlen' is not
+       positive.
 
-       The function uses Newton's iterations instead of dividing vector
-       components by its length, which needs a square root. This is,
-       literally, a bit less accurate but a lot faster.
+2016-12-20  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftcalc.c (FT_Vector_NormLen): New function.
+       [base] More sanity checks for Mac resources.
 
-2015-06-28  Werner Lemberg  <wl@gnu.org>
+       We use
 
-       * CMakeLists.txt: Always create `ftconfig.h'.
+         https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format
 
-       For non-UNIX builds, the file stays unmodified.  However, it's
-       better to have the main configuration files at the same place
-       regardless of the OS.
+       and
 
-2015-06-28  Werner Lemberg  <wl@gnu.org>
+         https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151
 
-       * CMakeLists.txt: Improve MSVC support (#43737).
+       as references.
 
-2015-06-28  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/internal/ftrfork.h (FT_RFork_Ref): Use FT_Short
+       for `res_id'.
 
-       [cmake] Check for libraries and create `ftoption.h'.
+       * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Extract map length
+       and use it to improve sanity checks.
+       Follow the specification more closely;in particular, all data types
+       are signed, not unsigned.
+       (FT_Raccess_Get_DataOffsets): Follow the specification more closely;
+       in particular, all data types are signed, not unsigned.
+       Add some sanity checks.
 
-       * builds/FindHarfBuzz.cmake: New file, taken from
+2016-12-20  Werner Lemberg  <wl@gnu.org>
 
-         https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
+       [truetype] Improve logic for getting fast advance widths.
 
-       * CMakeLists.Txt: Add path to local cmake modules.
-       Find dependencies for zlib, bzip2, libpng, and harfbuzz.
-       Create `ftoption.h' file.
-       Set up include and linker stuff for libraries.
+       * src/cff/cffdrivr.c (cff_get_advances), src/truetype/ttdriver.c
+       (tt_get_advances): Use `is_default_instance' for test; this gets
+       recomputed after changing blend coordinates.
 
-2015-06-28  Werner Lemberg  <wl@gnu.org>
+2016-12-20  Ben Wagner  <bungeman@google.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * CMakeLists.txt: Fix creation of `ftconfig.h'.
-       Check for UNIX header files using `check_include_file'.
-       Set up correct header include directories.
+       [truetype] Fix linear metrics of GX variation fonts (#49829).
 
-2015-06-28  Werner Lemberg  <wl@gnu.org>
+       When asking for an unhinted non-default variations,
+       `linearVertAdvance' is currently the value from the `hmtx' table
+       instead of the actual value after applying the variation.  `HVAR'
+       support fixes this, but fonts will exist without that table and will
+       need sane fallback.
 
-       * CMakeLists.txt: Disallow in-source builds.
+       Problem also reported as
 
-2015-06-27  Werner Lemberg  <wl@gnu.org>
+         https://bugs.chromium.org/p/skia/issues/detail?id=5917
 
-       * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
+       * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+       load_truetype_glyph): Implement linear advance adjustments if `HVAR'
+       or `VVAR' tables are missing.
 
-2015-06-26  Werner Lemberg  <wl@gnu.org>
+2016-12-20  Werner Lemberg  <wl@gnu.org>
 
-       * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
+       [cff, truetype] Fast advance width retrieval for fonts with HVAR.
 
-2015-06-25  Werner Lemberg  <wl@gnu.org>
+       Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-       * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
-       Additionally, do this for UNIX only.
+       * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Don't handle MM.
 
-2015-06-25  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffdrivr.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+       (cff_get_advances): Test for HVAR and VVAR.
 
-       * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
+       * src/truetype/ttdriver.c (tt_get_advances): Test for HVAR and VVAR.
 
-2015-06-25  Werner Lemberg  <wl@gnu.org>
+2016-12-18  Werner Lemberg  <wl@gnu.org>
 
-       Another adjustment to header locations.
+       [base] Fix invalid mac font recursion.
 
-       This change is a result of a discussion thread on freetype-devel
+       Reported as
 
-         http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=304
 
-       Re-introduce the `freetype2' subdirectory for all FreeType header
-       files after installation, and rename the `freetype2' subdirectory in
-       the git repository to `freetype'.
+       * src/base/ftobjs.c (FT_Open_Face): Code moved to...
+       (ft_open_face_internal): ... this function.
+       Add a parameter to control whether we try special Mac font handling
+       in case of failure.
+       (FT_Open_Face, FT_New_Face, FT_New_Memory_Face,
+       open_face_from_buffer): Use `ft_open_face_internal'.
 
-       * include/freetype2: Renamed to...
-       * include/freetype: This.
+2016-12-18  Werner Lemberg  <wl@gnu.org>
 
-       * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
-       PRIVATE_HEADERS): Updated.
-       Update creation of `ftconfig.h'.
-       Install generated `ftconfig.h'.
+       * src/cff/cffobjs.c (cff_face_init): Make named instances work.
 
-       * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
+2016-12-18  Werner Lemberg  <wl@gnu.org>
 
-       * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
-       (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
-       builds/unix/freetype2.in: Updated.
+       [truetype, cff] Extend `get_var_blend' function of MM service.
 
-       * builds/unix/freetype-config.in: Updated.
-       * builds/unix/configure.raw: Don't check for `rmdir'.
-       * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
-       according to the autoconf info manual.
-       * builds/unix/install.mk (install, uninstall,
-       distclean_project_unix): Update and simplify.
+       In particular, we need access to named instance data.
 
-       * builds/wince/*, builds/windows/*: Updated.
+       * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
+       Add argument for `FT_MM_Var'.
 
-       * devel/ft2build.h, include/ft2build.h: Updated.
+       * src/cff/cffload.c (cff_get_var_blend): Updated.
+       * src/cff/cffload.h: Updated.
 
-       * include/freetype2/config/ftheader.h,
-       include/freetype2/internal/ftserv.h,
-       include/freetype2/internal/internal.h: Update all header file
-       macros.
+       * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
 
-       * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
+       * src/truetype/ttgxvar.c (tt_get_var_blend): Updated.
+       Accept value `NULL' for arguments.
+       * src/truetype/ttgxvar.h: Updated.
 
-       * docs/*: Updated.
+2016-12-18  Werner Lemberg  <wl@gnu.org>
 
-2015-06-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       [sfnt] Handle `fvar' with zero axes as a non-MM font.
 
-       * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
+       This is better behaviour than exiting with an error.
 
-2015-06-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * include/freetype/internal/tttypes.h (TT_Face): Add `use_fvar'
+       field.
 
-       * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
+       * src/sfnt/sfobjs.c (sfnt_init_face): Compute `use_fvar', also
+       updating the validation code.
+       Use `use_fvar' to compute FT_FACE_FLAG_MULTIPLE_MASTERS.
 
-2015-06-23  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (TT_Get_MM_Var): Remove `fvar' validation
+       code.
 
-       s/TYPEOF/FT_TYPEOF/ (#45376).
+2016-12-18  Werner Lemberg  <wl@gnu.org>
 
-       * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
-       include/freetype2/config/ftconfig.h,
-       include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
+       Minor GX code shuffling.
 
-2015-06-22  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/internal/tttypes.h (TT_Face): Move
+       `is_default_instance' into TT_CONFIG_OPTION_GX_VAR_SUPPORT
+       block.
 
-       Fix Savannah bug #45097.
+       * src/sfnt/sfobjs.c (sfnt_init_face): Updated.
+       * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): New macro.
+       (TT_Load_Glyph): Use it.
 
-       We no longer `pollute' the namespace of possible header file names;
-       instead we move `ft2build.h' up by one level so that it gets
-       installed in the default include directory (e.g.,
-       /usr/local/include).  After this commit, only `ft2build.h' stays in
-       the compiler's include path.
+2016-12-18  Werner Lemberg  <wl@gnu.org>
 
-       No visible changes for the user who follows the standard FreeType
-       header inclusion rules.
+       [cff] Better handling of non-CFF font formats.
 
-       * include/*: Move to ...
-       * include/freetype2/*: This directory, except `ft2build.h'.
+       * src/cff/cffload.c (cff_font_load): Pure CFFs don't have a
+       signature, so return `FT_Err_Unknown_File_Format' more often.
 
-       * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
-       PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
+2016-12-17  Werner Lemberg  <wl@gnu.org>
 
-       * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
-       (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
-       builds/unix/install.mk (install, uninstall),
-       builds/unix/freetype2.in: Updated.
+       * src/cff/cffload.c (cff_build_blend_vector): Remove redundant code.
 
-       * builds/unix/freetype-config.in: Updated.
-       Emit -I directory only if it is not `/usr/include'.
+2016-12-17  Werner Lemberg  <wl@gnu.org>
 
-       * builds/wince/*, builds/windows/*: Updated.
+       * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code.
 
-       * devel/ft2build.h, include/ft2build.h: Updated.
+2016-12-17  Werner Lemberg  <wl@gnu.org>
 
-       * include/freetype2/config/ftheader.h,
-       include/freetype2/internal/ftserv.h,
-       include/freetype2/internal/internal.h: Update all header file
-       macros.
+       [sfnt, truetype] Various sanitizing fixes.
 
-       * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
+       * src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is
+       zero, set `num_instances' to zero.
 
-2015-06-21  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (TT_Get_MM_Var): Handle `fvar' table with
+       zero axes as invalid.
 
-       Make Jam support work again.
+       * src/truetype/ttobjs.c (tt_face_init): Improve logic of loading
+       `loca', `cvt', `fpgm', and `prep' table.
 
-       This is just very basic stuff and just a little bit tested on
-       GNU/Linux only.  I won't delve into this since I'm not a Jam user.
+2016-12-17  Werner Lemberg  <wl@gnu.org>
 
-       * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
-       (DEFINES): Replace with...
-       (CCFLAGS): ... this.
+       Improve tracing of `FT_Open_Face'.
 
-       * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
-       already handled in the top-level Jamfile.
+       * src/base/ftobjs.c (FT_Open_Face): Return info on number of
+       available faces and numbered instances, or the indices of the
+       requested face and numbered instance.
 
-       * src/autofit/Jamfile (DEFINES): Replace with...
-       (CCFLAGS): ... this.
-       (_sources): Add missing files.
+       * src/sfnt/sfobjs. (sfnt_open_font): Trace number of subfonts.
 
-       * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
-       longer contains macro header definitions.
+2016-12-17  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
-       src/truetype/Jamfile (_sources): Add missing files.
+       * src/cff/cffload.c (cff_load_private_dict): Always init `blend'.
 
-2015-06-16  Werner Lemberg  <wl@gnu.org>
+       Reported as
 
-       Fix Savannah bug #45326.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295
 
-       * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
-       definitions.
+2016-12-16  Werner Lemberg  <wl@gnu.org>
 
-2015-06-07  Werner Lemberg  <wl@gnu.org>
+       [truetype] Fix `cvar' sanity test.
 
-       * Version 2.6 released.
-       =======================
+       Reported by Dave Arnold.
 
+       * src/truetype/ttgxvar.c (tt_face_vary_cvt): Use tuple count mask.
 
-       Tag sources with `VER-2-6'.
+2016-12-16  Werner Lemberg  <wl@gnu.org>
 
-       * docs/VERSION.DLL: Update documentation and bump version number to
-       2.6.
+       [cff, truetype] Remove compiler warnings; fix `make multi'.
 
-       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
-       builds/windows/vc2005/index.html,
-       builds/windows/vc2008/freetype.vcproj,
-       builds/windows/vc2008/index.html,
-       builds/windows/vc2010/freetype.vcxproj,
-       builds/windows/vc2010/index.html,
-       builds/windows/visualc/freetype.dsp,
-       builds/windows/visualc/freetype.vcproj,
-       builds/windows/visualc/index.html,
-       builds/windows/visualce/freetype.dsp,
-       builds/windows/visualce/freetype.vcproj,
-       builds/windows/visualce/index.html,
-       builds/wince/vc2005-ce/freetype.vcproj,
-       builds/wince/vc2005-ce/index.html,
-       builds/wince/vc2008-ce/freetype.vcproj,
-       builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
+       * src/cff/cf2font.h: Include `cffload.h'.
 
-       * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
-       (FREETYPE_PATCH): Set to 0.
+       * src/cff/cffload.c: Include FT_MULTIPLE_MASTERS_H and
+       FT_SERVICE_MULTIPLE_MASTERS_H.
+       (cff_vstore_load): Eliminate `vsSize'.
+       (cff_load_private_dict): Tag as `FT_LOCAL_DEF'.
 
-       * builds/unix/configure.raw (version_info): Set to 18:0:12.
-       * CMakeLists.txt (VERSION_MINOR): Set to 6.
-       (VERSION_PATCH): Set to 0.
+       * src/cff/cffload.h: Include `cffobjs.h'.
+       Provide declaration for `cff_load_private_dict'.
 
-       * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
-       declarations for dumping functions.
+       * src/truetype/ttgxvar.c (ft_var_load_hvar): Eliminate
+       `minorVersion' and `map_offset'.
 
-       * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
+2016-12-16  Werner Lemberg  <wl@gnu.org>
 
-       * builds/toplevel.mk: Use `freetype.mk's code to compute the version
-       string.
-       Don't include a zero patch level in version string.
-       * builds/freetype.mk: Remove code for computing the version string.
+       [cff] Fix heap buffer overflow (#49858).
 
-2015-06-06  Ashish Azad  <ashish.azad@samsung.com>
+       * src/cff/cffparse.c (cff_parser_run): Add one more stack size
+       check.
 
-       Fix Savannah bug #45260.
+2016-12-15  Werner Lemberg  <wl@gnu.org>
 
-       * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
+       Fix clang warnings.
 
-2015-06-03  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffload.c (cff_blend_doBlend): Add cast.
+       (cff_subfont_load): Set `error' correctly.
 
-       [truetype] Fix memory leak.
+       * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
 
-       Problem reported by Grissiom <chaos.proton@gmail.com>; in
+2016-12-15  Dave Arnold  <darnold@adobe.com>
+           Werner Lemberg  <wl@gnu.org>
 
-         http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
+       [cff] Implement CFF2 support (2/2).
 
-       there is an example code to trigger the bug.
+       The font variation code.  All parts dependent on the GX code in the
+       `truetype' module are guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT. 
+       In other words, you can still compile the `cff' module without
+       defining TT_CONFIG_OPTION_GX_VAR_SUPPORT (which brings you CFF2
+       support without font variation).
 
-       * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
-       data before allocating again.  Bug most probably introduced four
-       years ago in version 2.4.3.
+       * src/cff/cf2font.c (cf2_font_setup): Add support for font
+       variation.
+       * src/cff/cf2font.h (CF2_Font): Add fields for variation data.
 
-2015-06-02  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cf2ft.c (cf2_free_instance): Free blend data.
+       (cf2_getVStore, cf2_getNormalizedVector): New functions.
+       * src/cff/cf2ft.h: Updated.
 
-       [raster] Add more tracing.
+       * src/cff/cf2intrp.c: Include `cffload.h'.
+       (cf2_cmdRESERVED_15, cf2_cmdRESERVED_16): Replace with...
+       (cf2_cmdVSINDEX, cf2_cmdBLEND): ... this new enum values.
+       (cf2_doBlend): New function.
+       (cf2_interpT2CharString): Handle `vsindex' and `blend' opcodes.
+
+       * src/cff/cffload.c (FT_fdot14ToFixed): New macro.
+       (cff_vstore_done, cff_vstore_load): New functions.
+       (cff_blend_clear, cff_blend_doBlend, cff_blend_build_vector,
+       cff_blend_check_vector): New functions.
+       (cff_load_private_dict): Add arguments for blend vector.
+       Handle blend data.
+       (cff_subfont_load, cff_subfont_done): Updated.
+       (cff_font_load): Handle CFF2 variation store data.
+       (cff_font_done): Updated.
+       * src/cff/cffload.h: Include `cffparse.h'.
+       Updated.
 
-       * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
-       (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
-       Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
+       * src/cff/cffobjs.c (cff_face_done): Updated.
 
-2015-06-01  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffparse.c: Include `cffload.h'.
+       (cff_parse_num): Handle internal value 255.
+       (cff_parse_vsindex, cff_parse_blend): New functions.
+       (CFF_FIELD_BLEND): New macro.
+       (cff_parser_run): Updated.
+       * src/cff/cffparse.h (cff_kind_blend): New enum value.
 
-       [truetype] While tracing opcodes, show code position and stack.
+       * src/cff/cfftoken.h: Handle `vstore', `vsindex', and `blend'
+       dictionary values.
 
-       * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
-       TRACE6.
-       (opcode_name): Add string lengths.
-       (TT_RunIns): Implement display of code position and stack.
+       * src/cff/cfftypes.h (CFF_VarData, CFF_AxisCoords, CFF_VarRegion,
+       CFF_VStore, CFF_Blend): New structures.
+       (CFF_FontRecDict): Add `vstore_offset' field.
+       (CFF_Private): Add `vsindex' field.
+       (CFF_SubFont): Add fields for blend data.
+       (CFF_Font): Add `vstore' field.
 
-2015-05-31  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (TT_Get_MM_Var): `CFF2' is equal to `gvar',
+       since glyph variation data is directly embedded.
+       (TT_Set_MM_Blend): Don't load `gvar' table for CFF2 fonts.
 
-       [truetype] In GX, make private point numbers work correctly.
+2016-12-15  Dave Arnold  <darnold@adobe.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       This is completely missing in Apple's documentation: If a `gvar'
-       tuple uses private point numbers (this is, deltas are specified for
-       some points only), the uncovered points must be interpolated for
-       this tuple similar to the IUP bytecode instruction.  Examples that
-       need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
+       [cff] Implement CFF2 support (1/2).
 
-       * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
-       tt_handle_deltas): New functions.
-       (TT_Vary_Get_Glyph_Deltas): Renamed to...
-       (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
-       points and does no longer return an array of deltas.
-       Add tracing information.
-       Call `tt_handle_deltas' to interpolate missing deltas.
-       Also fix a minor memory leak in case of error.
+       This commit does not contain the blend code for font variation
+       support, which follows in another commit.
 
-       * src/truetype/ttgxvar.h: Updated.
+       You should ignore whitespace while inspecting this commit.
 
-       * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
-       load_truetype_glyph): Updated.
+       * include/freetype/internal/tttypes.h (TT_Face): Add `isCFF2'
+       member.
 
-2015-05-31  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cf2font.h (CF2_Font): Add `isCFF2' member.
 
-       [truetype] In GX, make intermediate tuplets work at extrema.
+       * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Handle `isCFF2'
+       flag.
+       (cf2_getMaxstack): New function.
+       * src/cff/cf2ft.h: Updated.
 
-       * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
+       * src/cff/cf2intrp.c (cf2_escRESERVED_38): New enum.
+       (cf2_interpT2CharString): Handle CFF2 differences.
+       Add tracing message for errors.
 
-2015-05-31  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffdrivr.c (cff_get_glyph_name, cff_get_name_index):
+       Update for CFF2.
 
-       [truetype] Add tracing information to GX code.
+       * src/cff/cffload.c (FT_FIXED_ONE): New macro.
+       (cff_index_init, cff_index_load_offsets, cff_index_access_element,
+       cff_index_get_name, cff_ft_select_get, cff_load_private_dict,
+       cff_subfont_load, cff_font_load): Handle CFF2.
+       * src/cff/cffload.h: Updated.
 
-       * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
-       ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
-       TT_Set_Var_Design, tt_face_vary_cvt): Do it.
+       * src/cff/cffobjs.c (cff_face_init): Handle CFF2.
 
-2015-05-28  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffparse.c (cff_parse_maxstack): New function.
+       (CFFCODE_TOPDICT, CFFCODE_PRIVATE): Removed
+       * src/cff/cffparse.h (CFF2_MAX_STACK, CFF2_DEFAULT_STACK): New
+       macros.
+       (CFF2_CODE_TOPDICT, CFF2_CODE_FONTDICT, CFF2_CODE_PRIVATE): New
+       macros.
 
-       * src/tools/apinames.c (names_dump): Fix invalid reference.
+       * src/cff/cfftoken.h: Add fields for CFF2 dictionaries (but no blend
+       stuff).
 
-       Problem reported by Guzman Mosqueda, Jose R
-       <jose.r.guzman.mosqueda@intel.com>.
+       * src/cff/cfftypes.h (CFF_Index): Add `hdr_size' field.
+       (CFF_FontRecDict): Add `maxstack' field.
+       (CFF_Private): Add `subfont' field.
+       (CFF_Font): Add `top_dict_length' and `cff2' fields.
 
-2015-05-24  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfobjs.c (sfnt_load_face): Handle `CFF2' table.
 
-       [truetype] Fix commit from 2015-05-22.
+2016-12-15  Werner Lemberg  <wl@gnu.org>
+           Dave Arnold  <darnold@adobe.com>
 
-       * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
-       with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
+       [truetype] Provide HVAR advance width variation as a service.
 
-       Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
+       Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-2015-05-23  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttdriver.c (tt_service_metrics_variations): Updated.
 
-       [truetype] Fix return values of GETINFO bytecode instruction.
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Prevent
+       double adjustment of advance width.
 
-       * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
-       `vertical_lcd' and `gray_cleartype'.
+       * src/sfnt/ttmtx.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+       (tt_face_get_metrics): Apply metrics variations.
 
-       * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
-       Change `symmetrical smoothing' to TRUE, since FreeType produces
-       exactly this.
+2016-12-15  Dave Arnold  <darnold@adobe.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
-       values for symmetrical smoothing, namely 11/18.
-       Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
-       (12/19).
+       [truetype] Provide function to apply `HVAR' advance width variation.
 
-2015-05-23  Werner Lemberg  <wl@gnu.org>
+       Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-       [truetype] Minor.
+       * src/truetype/ttgxvar.c (tt_hadvance_adjust): New function.
+       * src/truetype/ttgxvar.h: Updated.
 
-       * src/truetype/ttinterp.h (TT_ExecContext):
-        s/subpixel/subpixel_hinting.
+2016-12-15  Dave Arnold  <darnold@adobe.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
+       [truetype] Add `HVAR' table parsing.
 
-2015-05-22  Werner Lemberg  <wl@gnu.org>
+       Note that this is not complete yet; it only handles advance width
+       variation.
 
-       [truetype] Support selector index 3 of the INSTCTRL instruction.
+       Activation of the code follows in another commit.
 
-       This flag activates `native ClearType hinting', disabling backwards
-       compatibility mode as described in Greg Hitchcocks whitepaper.  In
-       other words, it enables unrestricted functionality of all TrueType
-       instructions in ClearType.
+       Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-       * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
-       unconditionally.
-       (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
-       `GS.instruct_control' is active.
+       * include/freetype/ftmm.h (FT_Var_Named_Style): Add `psid' member.
 
-       * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
-       (Ins_GETINFO): Updated.
+       * src/truetype/ttgxvar.h (GX_HVarData, GX_AxisCoords, GX_HVarRegion,
+       GX_HVStore, GX_WidthMap): New auxiliary structures for...
+       (GX_HVarTable): ... HVAR main structure.
+       (GX_BlendRec): Add data for HVAR loading.
 
-       * docs/CHANGES: Document it.
+       * src/truetype/ttgxvar.c (FT_FIXED_ONE, FT_fdot14ToFixed,
+       FT_intToFixed, FT_fixedToInt): New macros.
+       (ft_var_load_hvar): New function.
+       (TT_Get_MM_Var): Updated.
+       (tt_done_blend): Deallocate HVAR data.
 
-2015-05-20  Werner Lemberg  <wl@gnu.org>
+2016-12-15  Dave Arnold  <darnold@adobe.com>
 
-       [truetype] Minor.
+       [cff] Extend number parsing.
 
-       * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
-       argument.
+       The forthcoming CFF2 support needs a dynamic parsing limit.
 
-2015-05-17  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffparse.c (cff_parse_num, do_fixed, cff_parse_fixed,
+       cff_parse_fixed_scaled, cff_parse_fixed_dynamic): Add argument for
+       parser.
+       (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_private_dict,
+       cff_parse_multiple_master, cff_parse_cid_ros, cff_parser_run): Updated.
 
-       [truetype] Fix loading of composite glyphs.
+       * src/cff/cffparse.h (cff_parse_num): Export locally.
 
-       * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
-       ARGS_ARE_XY_VALUES flag is not set, handle argument values as
-       unsigned.  I trust `ttx' (which has exactly such code) that it does
-       the right thing here...
+2016-12-15  Dave Arnold  <darnold@adobe.com>
 
-       The reason that noone has ever noticed this bug is probably the fact
-       that point-aligned subglyphs are rare, as are subglyphs with a
-       number of points in the range [128;255], which is quite large (or
-       even in the range [32768;65535], which is extremely unlikely).
+       [cff] Implement dynamic stack size for Adobe engine.
 
-2015-05-12  Chris Liddell  <chris.liddell@artifex.com>
+       This also adds `cf2_stack_setReal' and `cf2_stack_pop', needed for
+       the forthcoming CFF2 support.
 
-       [cff] Make the `*curveto' operators more tolerant.
+       * src/cff/cf2stack.c (cf2_stack_init): Add argument for stack size.
+       (cf2_stack_free): Deallocate stack.
+       (cf2_stack_count, cf2_stack_pushInt, cf2_stack_pushFixed,
+       cf2_stack_popInt, cf2_stack_popFixed, cf2_stack_getReal,
+       cf2_stack_clear): Updated.
+       (cf2_stack_setReal, cf2_stack_pop): New functions.
 
-       * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
-       `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
-       pulling values off the stack until the stack is exhausted.
-       Implicitly the stack must be a multiple (or for subtly different
-       behaviour) a multiple plus a specific number of extra values deep.
-       If that's not the case, enforce it (as the old code did).
+       * src/cff/cf2stack.h (CF2_Stack): Add `stackSize' member.
+       Update function declarations.
 
-2015-05-12  Chris Liddell  <chris.liddell@artifex.com>
+       * src/cff/cf2intrp.c (cf2_interpT2CharString): Updated.
 
-       [cff] fix incremental interface with new cff code.
+       * src/cff/cffparse.c (cff_parser_init): Add parameter for stack
+       size; return error code.
+       (cff_parser_done): New function.
+       (cff_parser_run): Updated.
 
-       * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
-       interface to retrieve glyph data for a SEAC, it be left to the
-       incremental interface callback to apply the encoding to raw
-       character index (as it was in the previous code).
+       * src/cff/cffparse.h (CFF_Parser): Add `stackSize' member and make
+       `stack' a pointer.
+       Update function declarations.
 
-2015-04-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/cff/cffload.c (cff_load_private_dict, cff_subfont_load):
+       Updated.
 
-       [autofit] Speed up IUP.
+2016-12-15  Dave Arnold  <darnold@adobe.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
-       the same position from true interpolation, use `scale' to reduce
-       divisions.
+       [cff] Code shuffling.
 
-2015-04-28  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cfftypes.h (CFF_Font): Add `library' and `base_offset'
+       fields.
 
-       [cff] Use `name' table for PS name if we have a SFNT-CFF.
+       * src/cff/cffload.c (cff_subfont_load): Change last argument to
+       `CFF_Font'
+       Split off parsing of private dictionary into...
+       (cff_load_private_dict): ...this new function.
+       (cff_font_load): Updated.
 
-       This follows the OpenType 1.7 specification.  See
+2016-12-14  Werner Lemberg  <wl@gnu.org>
 
-         http://tug.org/pipermail/tex-live/2015-April/036634.html
+       [sfnt, truetype] Add framework for Metrics Variations service.
 
-       for a discussion.
+       No effect yet; service functions will be implemented later on.
 
-       * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
-       have an SFNT.
+       Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-2015-04-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * include/freetype/internal/services/svmetric.h: New file.
 
-       [truetype] Speed up IUP.
+       * include/freetype/internal/ftserv.h
+       (FT_SERVICE_METRICS_VARIATIONS_H): New macro.
 
-       * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
-       snapping to the same position from true interpolation.
+       * include/freetype/internal/tttypes.h (TT_Face): New field `var'.
 
-2015-04-21  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfobjs.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+       (sfnt_init_face): Initialize `face->var'.
 
-       [autofit] By default, enable warping code but switch off warping.
+       * src/truetype/ttdriver.c: Include FT_SERVICE_METRICS_VARIATIONS_H.
+       (tt_service_metrics_variations): New service.
+       (tt_services): Updated.
 
-       Suggested by Behdad.
+       * src/truetype/ttpic.h: Updated.
 
-       * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
+2016-12-14  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
-       with `false'.
+       [cff] Add Multiple Masters service.
 
-2015-04-21  Werner Lemberg  <wl@gnu.org>
+       The code simply uses the MM functions from the `truetype' module.
 
-       * docs/CHANGES: Updated.
+       Everything is guarded with TT_CONFIG_OPTION_GX_VAR_SUPPORT.
 
-2015-04-21  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/internal/tttypes.h (TT_Face): New field `mm'.
 
-       [autofit] Introduce `warping' property.
+       * src/cff/cffdrivr.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
+       (cff_set_mm_blend, cff_get_mm_blend, cff_get_mm_var,
+       cff_set_var_design, cff_get_var_design): New functions.
+       (cff_service_multi_masters): New service.
+       (cff_services): Updated.
 
-       This code replaces the debugging hook from the previous commit with
-       a better, more generic solution.
+       * src/cff/cffload.c (cff_get_var_blend, cff_done_blend): New
+       functions.
+       * src/cff/cffload.h: Updated.
 
-       * include/ftautoh.h: Document it.
+       * src/cff/cffpic.h (CFF_SERVICE_MULTI_MASTERS_GET): New macro.
 
-       * src/autofit/afmodule.h (AF_ModuleRec)
-       [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
+       * src/sfnt/sfobjs.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
+       (sfnt_init_face): Initialize `face->mm'.
 
-       * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
-       (af_property_set, af_property_get, af_autofitter_init)
-       [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
+2016-12-14  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
-       longer existing `_af_debug_disable_warper'.
+       Extend functionality of `ft_module_get_service'.
 
-       * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
-       (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
-       [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
-       scaler flags if warping is off.
+       It can now differentiate between local and global searches.
 
-       * src/autofit/aftypes.h: Updated.
+       * src/base/ftobjs.c (ft_module_get_service): Add `global' argument.
+       (FT_Get_TrueType_Engine_Type): Updated.
 
-2015-04-16  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffdrivr.c (cff_get_ps_name, cff_get_cmap_info): Updated.
 
-       [autofit] Add debugging hook to disable warper.
+       * include/freetype/internal/ftobjs.h: Updated.
+       * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE):
+       Updated.
 
-       * src/autofit/afmodule.c (_af_debug_disable_warper)
-       [FT_DEBUG_AUTOFIT]: New global variable.
+2016-12-14  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aftypes.h: Updated.
-       (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
+       * src/truetype/ttgxvar.c (tt_get_var_blend): Fix compiler warning.
 
-       * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
+2016-12-14  Dave Arnold  <darnold@adobe.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/aflatin.c (af_latin_hints_apply)
-       [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
-       of warper.
+       [sfnt, cff] Minor preparations.
 
-       * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
-       [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
+       * include/freetype/tttags.h (TTAG_CFF2, TTAG_HVAR, TTAG_MVAR,
+       TTAG_VVAR): New SFNT table tags.
 
-       * src/autofit/aflatin2.c (af_latin2_hints_apply)
-       [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
+       * src/cff/cf2fixed.h (CF2_FIXED_ONE, CF2_FIXED_EPSILON): Add cast.
 
-2015-04-10  Werner Lemberg  <wl@gnu.org>
+2016-12-10  Werner Lemberg  <wl@gnu.org>
 
-       [cff] Update advance width handling to OpenType 1.7.
+       [truetype, type1] Add `get_var_blend' to MM service.
 
-       Problem reported by Behdad.
+       For internal use; we want to share code between the forthcoming CFF2
+       support and TrueType.
 
-       * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
-       separately.
+       * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
+       New typedef.
+       (MultiMasters): Add `get_var_blend'.
+       (FT_Service_MultiMasters): Updated.
 
-       * src/cff/cffgload.c (cff_slot_load): Use advance width and side
-       bearing values from `hmtx' table if present.
+       * src/truetype/ttgxvar.c (tt_get_var_blend): New function.
+       * src/truetype/ttgxvar.h: Updated.
 
-2015-04-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
+       * src/type1/t1driver.c (t1_service_multi_masters): Updated.
 
-       * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
+2016-12-10  Werner Lemberg  <wl@gnu.org>
 
-2015-04-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       [truetype, type1] Add `done_blend' to MM service.
 
-       * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
+       For internal use; we want to share code between the forthcoming CFF2
+       support and TrueType.
 
-2015-04-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func):
+       New typedef.
+       (MultiMasters): Add `done_blend'.
+       (FT_Service_MultiMasters): Updated.
 
-       [autofit] Finish the thought.
+       * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument.
+       * src/truetype/ttgxvar.h: Updated.
 
-       * src/autofit/afhints.c (af_direction_compute): make sure the long arm
-       is never negative so that its `FT_ABS' is not necessary.
+       * src/truetype/ttobjs.c (TT_Face_Done): Updated.
 
-2015-04-01  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
+       * src/type1/t1driver.c (t1_service_multi_masters): Updated.
 
-       [autofit] Call dumper functions for tracing.
+2016-12-09  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
-       * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
-       improvement.
-       * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
+       [sfnt] Revert change from 2016-12-08.
 
-2015-04-01  Werner Lemberg  <wl@gnu.org>
+       I missed the functionality of `ft_module_get_service', which makes
+       the change unnecessary.
 
-       [autofit] Make debugging stuff work again.
+2016-12-08  Werner Lemberg  <wl@gnu.org>
 
-       The interface to ftgrid was broken in the series of commits starting
-       with
+       Add framework to support services with 8 functions.
 
-         [autofit] Allocate AF_Loader on the stack instead of AF_Module.
+       We will need this for CFF variation font support.
 
-       from 2015-01-14.
+       * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC8):
+       New macro.
 
-       * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
-       Use a global AF_GlyphHintsRec object for debugging.
-       (af_autofitter_done, af_autofitter_load_glyph): Updated.
+2016-12-08  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
+       [sfnt] Add `get_glyph_name' and `get_name_index' to SFNT interface.
 
-2015-04-01  Werner Lemberg  <wl@gnu.org>
+       CFF2 fonts will need access to those two functions.
 
-       * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
+       * include/freetype/internal/sfnt.h: Include FT_SERVICE_GLYPH_DICT_H.
+       (SFNT_Interface): Add `get_glyph_name' and `get_name_index' members.
+       (FT_DEFINE_SFNT_INTERFACE): Updated.
 
-2015-03-29  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfdriver.c (sfnt_get_glyph_name, sfnt_get_name_index):
+       Fix signatures to exactly correspond to the glyph dict service
+       function typedefs.
+       (sfnt_interface): Updated.
 
-       [cff] Fix Savannah bug #44629.
+2016-12-06  Dave Arnold  <darnold@adobe.com>
 
-       * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
-       (CFF_MAX_SUBRS_CALLS): Set to 16.
+       Add `FT_Get_Var_Design_Coordinates' function.
 
-2015-03-29  Werner Lemberg  <wl@gnu.org>
+       Note that the low-level functions aren't implemented yet.
 
-       [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
+       * include/freetype/ftmm.h: Declare.
 
-       This commit allows `num_coords' to be larger or smaller than the
-       number of available axes while selecting a design instance, either
-       ignoring excess data or using defaults if data is missing.
+       * include/freetype/internal/services/svmm.h
+       (FT_Get_Var_Design_Func): New typedef.
+       (MultiMasters): New MM service function `get_var_design'.
+       (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
+       Update all callers.
 
-       * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
-       Implement it.
+       * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement.
 
-       * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
-       T1_Set_Var_Design): Ditto.
+       * src/truetype/ttdriver.c: Updated.
 
-2015-03-29  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to
+       handle `get_var_design' service.
+       * src/truetype/ttgxvar.h: Updated.
 
-       [type1] Minor.
+       * src/type1/t1driver.c: Updated.
 
-       * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
-       FT_THROW.
-       (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
+       * src/type1/t1load.c (T1_Get_Var_Design): New dump function to
+       handle `get_var_design' service.
+       * src/type1/t1load.h: Updated.
 
-2015-03-27  Werner Lemberg  <wl@gnu.org>
+2016-12-06  Werner Lemberg  <wl@gnu.org>
 
-       [cff] Trace charstring nesting levels.
+       * src/type1/t1load.c (parse_subrs): Fix memory leak.
 
-       * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
-       cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
+       The `subrs' keyword might erroneously occur multiple times.
 
-       * src/cff/cffgload.c (cff_decoder_parse_charstrings)
-       <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
+       Reported as
 
-2015-03-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=231
 
-       [base] Optimize `FT_Angle_Diff'.
+2016-12-01  Werner Lemberg  <wl@gnu.org>
 
-       Under normal circumstances we are usually close to the desired range
-       of angle values, so that the remainder is not really necessary.
+       [gzip] Improve building with external zlib (#49673).
 
-       * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
+       Building FreeType with external zlib 1.2.8 makes msvc 14 stop with
+       the following error.
 
-       * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
+         ftgzip.c
+         zlib-1.2.8\zlib.h(86): error C2061:
+                                syntax error: identifier 'z_const'
+         zlib-1.2.8\zlib.h(94): error C2054:
+                                expected '(' to follow 'z_const'
+         zlib-1.2.8\zlib.h(94): error C2085:
+                                'msg': not in formal parameter list
+         ...
+         zlib-1.2.8\zlib.h(877): fatal error C1003:
+                                 error count exceeds 100; stopping compilation
 
-2015-03-21  Werner Lemberg  <wl@gnu.org>
+       The error happens because FreeType keeps an own copy of zlib-1.1.4
+       under `src/gzip'.  When building `src/gzip/ftgzip.c' with
+       FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses
 
-       [truetype] Improve `gvar' handling.
+         #include <zlib.h>
 
-       * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
-       single-element runs.  Cf. glyph `Q' in Skia.ttf with weights larger
-       than the default.
+       which correctly finds an external `zlib.h', but `zlib.h' itself has
+       a line
 
-2015-03-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
+         #include "zconf.h"
 
-       * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
+       which makes Visual Studio 2015 find `src/gzip/zconf.h' while
+       compiling the files in `src/gzip'.
 
-2015-03-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/gzip/zconf.h: Rename to...
+       * src/gzip/ftzconf.h: ... this.
+       * src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
 
-       Fix Savannah bug #44412 (part 2).
+2016-12-01  Oleksandr Chekhovskyi  <oleksandr.chekhovskyi@gmail.com>
 
-       * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
+       [autofit] Fix Emscripten crash (patch #9180).
 
-2015-03-11  Werner Lemberg  <wl@gnu.org>
+       Function calls through pointers must use a matching signature to
+       work on Emscripten, since such calls are dispatched through lookup
+       tables grouped by signature.
 
-       [autofit] Add support for Arabic script.
+       * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix
+       typedef.
 
-       Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
+2016-11-29  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afblue.dat: Add blue zone data for Arabic.
+       [smooth] Revert previous commit.  Already fixed with 6ca54c64.
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+2016-11-29  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afscript.h: Add Arabic standard characters.
+       [smooth] Avoid conditional jump on uninitialized value (#49711).
 
-       * src/autofit/afranges.c: Add Arabic data.
+       * src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'.
 
-       * src/autofit/afstyles.h: Add Arabic data.
+2016-11-27  Nikolaus Waxweiler  <madigens@gmail.com>
 
-       * docs/CHANGES: Document it.
+       [autofit] Code shuffling.
 
-2015-03-11  Werner Lemberg  <wl@gnu.org>
+       Also improve some comments and remove unused code.
 
-       Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
+       No functional change.
 
-       * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
-       to...
-       (FT_SERVICE_FONT_FORMAT_H): This.
+       * src/autofit/afloader.c (af_loader_load_g): Merged with...
+       (af_loader_load_glyph): ...this function.
+       Split off emboldening code into...
+       (af_loader_embolden_glyph_in_slot): ... this function.
 
-       * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
-       to ...
-       (FT_FONT_FORMAT_*): This.
+2016-11-17  Werner Lemberg  <wl@gnu.org>
 
-       src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
-       src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
-       src/truetype/ttdriver.c, src/type1/t1driver.c,
-       src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
+       Better support of LLP64 systems with gcc (and clang).
 
-2015-03-11  Werner Lemberg  <wl@gnu.org>
+       * builds/unix/configure.raw: Call `AC_TYPE_LONG_LONG_INT'.
 
-       [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
+       * builds/unix/ftconfig.in (FT_LONG64): Enable for LLP64 systems (and
+       suppress warnings) even without `FT_CONFIG_OPTION_FORCE_INT64'.
 
-       * include/config/ftheader.h: Implement it.
-       * src/base/ftfntfmt.c, docs/CHANGES: Updated.
+2016-11-10  Werner Lemberg  <wl@gnu.org>
 
-2015-03-11  Werner Lemberg  <wl@gnu.org>
+       Fix `lcd_weights' array size.
 
-       [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
+       * include/freetype/internal/ftobjs.h (FT_LibraryRec): Do it.
 
-       * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
+       Reported by Nikolaus.
 
-       * docs/CHANGES: Updated.
+2016-11-06  Werner Lemberg  <wl@gnu.org>
 
-2015-03-11  Werner Lemberg  <wl@gnu.org>
+       * src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing.
 
-       Fix automatic copyright updating.
+2016-11-06  Werner Lemberg  <wl@gnu.org>
 
-       * src/tools/update-copyright: Make scanning of `no-copyright'
-       actually work.
+       [sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format.
 
-       * src/tools/no-copyright: Don't include README in general.
+       It's unavoidable to call the PNG engine, but to get the metrics it
+       is sufficient to read the PNG image's header only.
 
-2015-03-11  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the
+       allocation of the glyph slot.
+       * src/sfnt/pngshim.h: Updated.
+       * src/sfnt/ttsbit.c (tt_sbit_decoder_load_png,
+       tt_face_load_sbix_image, tt_face_load_sbit_image): Updated.
 
-       Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
+2016-11-06  Werner Lemberg  <wl@gnu.org>
 
-       CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
-       builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
-       builds/mac/FreeType.m68k_far.make.txt,
-       builds/mac/FreeType.ppc_carbon.make.txt,
-       builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
-       builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
-       builds/wince/vc2008-ce/freetype.vcproj,
-       builds/windows/vc2005/freetype.vcproj,
-       builds/windows/vc2008/freetype.vcproj,
-       builds/windows/vc2010/freetype.vcxproj,
-       builds/windows/vc2010/freetype.vcxproj.filters,
-       builds/windows/visualc/freetype.dsp,
-       builds/windows/visualc/freetype.vcproj,
-       builds/windows/visualce/freetype.dsp,
-       builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
-       include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
-       src/base/ftfntfmt.c, vms_make.com: Updated.
+       [sfnt] Speed up `sbix' lookup.
 
-2015-03-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       This also fixes a bug introduced in 2016-10-01 which prevents
+       display of embedded bitmap fonts that use the `sbix' format.
 
-       Fix Savannah bug #44412 (part 1).
+       * src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and
+       offset also in `ebdt_size' and `ebdt_start', respectively.  This
+       makes the test for an embedded bitmap data table succeed for this
+       format.
 
-       * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
+       (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use
+       `ebdt_size' and `ebdt_start'
+       (tt_face_load_sbix_image): Ditto.
 
-2015-03-10  Werner Lemberg  <wl@gnu.org>
+2016-11-06  Seigo Nonaka  <nona@google.com>
+           Werner Lemberg  <wl@gnu.org>
 
-       [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
+       Introduce a way of quickly retrieving (embedded) bitmap metrics.
 
-       * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
-       Update all callers.
+       `FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
+       until the user calls `FT_Render_Glyph'.  However, it always
+       allocates memory for bitmaps and copies or decodes the contents of a
+       bitmap glyph, which can be quite slow for PNG data.
 
-       * docs/CHANGES: Updated.
+       * include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
+       macro.
 
-2015-03-06  Werner Lemberg  <wl@gnu.org>
+       * src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
+       FT_LOAD_BITMAP_METRICS_ONLY is used.
 
-       * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
+       * src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
+       tt_sbit_decoder_load_bitmap): Add argument to control allocation of
+       the glyph slot.
+       (tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
+       tt_face_load_sbit_image): Updated.
 
-       Found by Alexei.
+       * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
+       `FT_LOAD_BITMAP_METRICS_ONLY' is set.
 
-2015-03-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
+       * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
+       argument to control allocation of the glyph slot.
+       * src/pfr/pfrobjs (pfr_slot_load): Updated.
 
-       * src/base/ftstroke.c: Simplify.
+       * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
 
-2015-03-04  Werner Lemberg  <wl@gnu.org>
+       * docs/CHANGES: Updated.
 
-       [truetype] Some fixes and code refactoring in `ttgxvar.c'.
+2016-11-06  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
-       of `point_cnt' if two bytes are read.
-       Use a more vertical coding style.
-       (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
-       Use a more vertical coding style.
+       Synchronize with gnulib (#49448).
 
-2015-03-03  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
+       builds/vms/ftconfig.h (FT_TYPEOF): Update code to use definition in
+       current version of `intprops.h'.
+       Other minor synchronization to reduce code differences between the
+       three files.
 
-       [autofit] Fix Savannah bug #44241.
+2016-11-03  Behdad Esfahbod  <behdad@behdad.org>
 
-       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
-       with less than 3 points.
+       [truetype] Clamp variation requests to valid range.
 
-2015-03-02  Werner Lemberg  <wl@gnu.org>
+       This is required by OpenType 1.8; it also avoids rounding surprises.
 
-       Simplify `TYPEOF' macro.
+       * src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates
+       outside of the allowed range to always stay within the range instead
+       of producing an error.
 
-       No need for two arguments.
+2016-10-29  Werner Lemberg  <wl@gnu.org>
 
-       * include/config/ftconfig.h, builds/unix/ftconfig.in,
-       builds/vms/ftconfig.h (TYPEOF): Updated.
+       [truetype] Remove clang warnings.
 
-       * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
-       src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
+       * src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for
+       loop counter handling.
 
-2015-03-01  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttinterp.c: Updated.
+       (Ins_SCANTYPE): Use signed constant.
+       (TT_RunIns): Ensure `num_twilight_points' is 16bit.
 
-       Various compiler warning fixes for `make multi'.
+2016-10-27  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
-       src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
-       af_latin_hint_edges), src/autofit/aflatin2.c
-       (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
-       as `static'.
+       [truetype] Fix commit from 2014-11-24.
 
-       * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
-       Removed.  Unused.
-       * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
-       * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed.  Unused.
+       Problem reported by Hin-Tak Leung  <htl10@users.sourceforge.net>.
 
-       * src/cff/cf2intrp.c: Include `cf2intrp.h'.
-       * src/cff/cffdrivr.c (PAIR_TAG): Removed.  Unused.
+       * src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking
+       logic.
 
-       * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed.  Unused.
+2016-10-26  Werner Lemberg  <wl@gnu.org>
 
-       * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
+       Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.
 
-       * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
-       Removed.  Unused.
+       * include/freetype/ftmm.h: Declare.
 
-       * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
+       * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func):
+       New typedef.
+       (MultiMasters): New MM service function `get_mm_blend'.
+       (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
+       Update all callers.
 
-       * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
+       * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates,
+       FT_Get_Var_Blend_Coordinates): Implement.
 
-       * src/truetype/ttdriver.c (PAIR_TAG): Removed.  Unused.
-       * src/truetype/ttsubpix.c (is_member_of_family_class,
-       is_member_of_style_class): Declare as `static'.
+       * src/truetype/ttdriver.c: Updated.
 
-       * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
-       as `static'.
-       * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
-       `static'.
-       (T1_FIELD_COUNT): Removed.  Unused.
-       * src/type1/t1parse.h (T1_Done_Table): Removed.  Unused.
+       * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle
+       `get_mm_blend' service.
+       * src/truetype/ttgxvar.h: Updated.
 
-       * src/type42/t42parse.c (T1_Done_Table): Removed.  Unused.
+       * src/type1/t1driver.c: Updated.
 
-2015-02-25  Werner Lemberg  <wl@gnu.org>
+       * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle
+       `get_mm_blend' service.
+       * src/type1/t1load.h: Updated.
 
-       [psaux] Signedness fixes.
+       * docs/CHANGES: Document.
 
-       * include/internal/psaux.h, src/psaux/afmparse.c,
-       src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
-       src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
+2016-10-26  Werner Lemberg  <wl@gnu.org>
 
-2015-02-25  Werner Lemberg  <wl@gnu.org>
+       * src/type1/t1load.c (parse_subrs): Fix limit check.
 
-       [otvalid] Signedness fixes.
+       Reported as
 
-       * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
-       src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
-       Apply.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81
 
-2015-02-25  Werner Lemberg  <wl@gnu.org>
+2016-10-25  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
+       [cff] Correct cmap format reporting (#24819).
 
-2015-02-25  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic
+       charmap instead of guessing its format and language.
 
-       [lzw] Signedness fixes.
+2016-10-22  Werner Lemberg  <wl@gnu.org>
 
-       * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
+       [truetype] Fix SCANTYPE instruction (#49394).
 
-2015-02-25  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits.
 
-       [gxvalid] Signedness fixes.
+2016-10-22  Werner Lemberg  <wl@gnu.org>
 
-       * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
-       src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
-       src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
-       src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
-       src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
-       src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
-       src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
+       [sfnt] Improve handling of invalid post 2.5 tables [#49393].
 
-2015-02-25  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/ttpost.c (load_format_25): We need at least a single
+       table entry.
 
-       [cache] Signedness fixes.
+2016-10-14  Werner Lemberg  <wl@gnu.org>
 
-       * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
-       src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
+       [truetype] Fix handling of `cvar' table data.
 
-2015-02-25  Werner Lemberg  <wl@gnu.org>
+       Reported as
 
-       Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53
 
-       This doesn't break ABI.
+       * src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT
+       indices.
 
-       * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
-       `width' and `height'.
+2016-10-11  Werner Lemberg  <wl@gnu.org>
 
-       * docs/CHANGES: Document it.
+       [psaux] Fix handling of invalid flex subrs.
 
-2015-02-25  Werner Lemberg  <wl@gnu.org>
+       Problem reported as
 
-       [cache] Don't use `labs'.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52
 
-       This is the only place in FreeType where this function was used.
+       * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+       <op_callothersubr>: Set `flex_state' after error checking.
 
-       * include/config/ftstdlib.h (ft_labs): Remove.
+2016-10-11  Werner Lemberg  <wl@gnu.org>
 
-       * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
-       `FT_ABS'.
+       * src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation.
 
-2015-02-23  Werner Lemberg  <wl@gnu.org>
+2016-10-08  Werner Lemberg  <wl@gnu.org>
 
-       [cache] Replace `FT_PtrDist' with `FT_Offset'.
+       * src/cid/cidload.c (cid_face_open): Properly propagate `error'.
 
-       * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
-       is a better choice for `hash' to hold a pointer than `FT_PtrDist'
-       (a.k.a. `ptrdiff_t'), especially since the latter is signed,
-       causing zillions of signedness warnings.  [Note that `hash' was of
-       type `FT_UInt32' before the change to `FT_PtrDist'.]
-       Update all users.
+2016-10-08  Werner Lemberg  <wl@gnu.org>
 
-       * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
-       src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
+       [cid] Fix parsing of subr offsets.
 
-2015-02-23  Werner Lemberg  <wl@gnu.org>
+       Bug introduced 2016-05-16.
 
-       [smooth, raster] Re-enable standalone compilation.
+       * src/cid/cidparse.c (cid_parser_new): Fix off-by-one error.
 
-       * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
-       [_STANDALONE_]: Define macros.
+2016-10-01  Werner Lemberg  <wl@gnu.org>
 
-       * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
-       FT_HYPOT) [_STANDALONE_]: Define macros.
+       [sfnt] Disable bitmap strikes if we don't have a bitmap data table.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
+       a bitmap data table.
 
-       [smooth] Signedness fixes.
+2016-10-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
+       [smooth] Remove impossibility.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       * src/smooth/ftgrays.c (TWorker): Rearrange fields.
+       (gray_convert_glyph): Remove impossible condition and clean up.
 
-       * src/raster/ftraster.c: Use the file's typedefs everywhere.
+2016-09-29  Werner Lemberg  <wl@gnu.org>
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       [pcf] Enrich family name with foundry name and glyph width info.
 
-       * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
+       This is a very old patch from openSuSE (from 2006, submitted to
+       FreeType in 2011) that I forgot to apply.
 
-       Bug introduced 6 commits earlier.
+         https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       Prepend the foundry name plus a space to the family name.  There are
+       many fonts just called `Fixed' which look completely different, and
+       which have nothing to do with each other.  When selecting `Fixed' in
+       KDE or Gnome one gets results that appear rather random, the style
+       changes often if one changes the size and one cannot select some
+       fonts at all.
 
-       [pshinter] Fix thinko.
+       We also check whether we have `wide' characters; all put together,
+       we get family names like `Sony Fixed' or `Misc Fixed Wide'.
 
-       * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
-       check `count'.
-       Bug introduced two commits earlier.
+       * src/pcf/pcfread.c (pcf_load_font): Implement it.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       * docs/CHANGES: Document it.
 
-       [raster] Signedness fixes.
+2016-09-29  Werner Lemberg  <wl@gnu.org>
 
-       * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
+       [ftfuzzer] Speed up.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't
+       check for embedded bitmaps if we have a non-default instance.
 
-       [pshinter] Signedness fixes.
+2016-09-29  Werner Lemberg  <wl@gnu.org>
 
-       * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
-       src/pshinter/pshrec.c: Apply.
+       [truetype] Disallow bitmap strikes for non-default instances.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       Also speed up access of default instances if GX variations are
+       active.
 
-       [pshinter] Use macros for (unsigned) flags, not enumerations.
+       * include/freetype/internal/tttypes.h (TT_FaceRec): Add
+       `is_default_instance' member.
 
-       * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
-       Updated.
-       * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
+       * src/sfnt/sfobjs.c (sfnt_init_face): Initialize
+       `is_default_instance'.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+       load_truetype_glyph): Add test for default instance.
+       (TT_Load_Glyph): Load embedded bitmaps for default instance only.
 
-       * src/pshinter/pshrec.c: Simplify.
-       (ps_hints_open, ps_hints_stem): Remove switch statement.
+       * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute
+       `is_default_instance'.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+2016-09-29  Werner Lemberg  <wl@gnu.org>
 
-       [sfnt] Signedness fixes.
+       [truetype] Clean up `TT_Face' structure.
 
-       * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
-       src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
-       src/sfnt/ttsbit.c: Apply.
-       * src/sfnt/sfdriver.c: Apply.
-       (sfnt_get_ps_name): Simplify.
+       * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
+       fields `horz_metrics' and `vert_metrics'.
+       Update documentation.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfobjs.c (sfnt_done_face): Updated.
 
-       [bdf] Signedness fixes.
+2016-09-28  Werner Lemberg  <wl@gnu.org>
 
-       * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
-       src/bdf/bdflib.c: Apply.
+       More FT_ZERO usage.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       * src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
+       s/ft_memset/FT_MEM_ZERO/.
 
-       * src/bdf/bdflib.c (_bdf_atous): New function.
-       (_bdf_parse_glyphs, _bdf_parse_start): Use it.
+       * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
+       s/ft_memset/FT_ARRAY_ZERO/.
 
-2015-02-22  Werner Lemberg  <wl@gnu.org>
+       * src/raster/ftraster.c (FT_ZERO): Define.
+       (ft_black_new): Use it.
+       * src/raster/ftrend1.c (ft_raster1_get_cbox):
+       s/FT_MEM_ZERO/FT_ZERO/.
 
-       [pcf] Signedness fixes.
+       * src/smooth/ftgrays.c (FT_ZERO): Define.
+       (gray_raster_new): Use it.
+       * src/smooth/ftsmooth.c (ft_smooth_get_cbox):
+       s/FT_MEM_ZERO/FT_ZERO/.
 
-       * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
-       * src/pcf/pcfread.c: Apply.
-       (pcf_get_encodings): Ignore invalid negative encoding offsets.
+2016-09-28  Werner Lemberg  <wl@gnu.org>
 
-2015-02-21  Werner Lemberg  <wl@gnu.org>
+       */*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
 
-       * src/winfonts/winfnt.c: Signedness fixes.
+2016-09-27  Werner Lemberg  <wl@gnu.org>
 
-2015-02-21  Werner Lemberg  <wl@gnu.org>
+       [truetype] Trace number of executed opcodes.
 
-       [type42] Signedness fixes.
+       * src/truetype/ttinterp.c (TT_RunIns): Implement it.
 
-       * src/type42/t42parse.c, src/type42/t42parse.h,
-       src/type42/t42types.h: Apply.
+2016-09-27  Werner Lemberg  <wl@gnu.org>
 
-2015-02-21  Werner Lemberg  <wl@gnu.org>
+       [truetype] Speed up `TT_Load_Glyph'.
 
-       [pfr] Signedness fixes.
+       This avoids additional calls to `tt_face_lookup_table' for the
+       `glyf' table, which can be expensive.
 
-       * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
-       src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
-       src/pfr/pfrtypes.h: Apply.
+       * include/freetype/internal/tttypes.h (TT_LoaderRec): Move
+       `glyf_offset' field to ...
+       (TT_FaceRec): ... this structure.
+       * src/truetype/ttgload.c (load_truetype_glyph): Updated.
+       (tt_loader_init): Move initialization of `glyf_offset' to ...
+       * src/truetype/ttpload.c (tt_face_load_loca): ... this function.
 
-2015-02-21  Werner Lemberg  <wl@gnu.org>
+2016-09-27  Werner Lemberg  <wl@gnu.org>
 
-       [cff] Minor signedness fixes related to last commit.
+       [truetype] Introduce dynamic limits for some bytecode opcodes.
 
-       * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
+       This speeds up FreeType's handling of malformed fonts.
 
-2015-02-20  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number
+       of twilight points, the total number of negative jumps, and the
+       total number of loops in LOOPCALL opcodes.  The values are based on
+       the number of points and entries in the CVT table.
+       (Ins_JMPR): Test negative jump counter.
+       (Ins_LOOPCALL): Test loopcall counter.
 
-       [cff] Thinkos in bias handling.
+       * src/truetype/ttinterp.h (TT_ExecContext): Updated.
 
-       Only the final result is always positive.
+       * docs/CHANGES: Updated.
 
-       Bug introduced three commits earlier.
+2016-09-25  Werner Lemberg  <wl@gnu.org>
 
-       * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
+       [truetype] Sanitize only last entry of `loca' table.
 
-2015-02-20  Werner Lemberg  <wl@gnu.org>
+       Without this patch, a loca sequence like `0 100000 0 100000 ...',
+       where value 100000 is larger than the `glyf' table size, makes
+       FreeType handle the whole `glyf' table as a single glyph again and
+       again, which is certainly invalid (and can be very slow, too).
 
-       [cid] Fix signedness issues and emit some better error codes.
+       * src/truetype/ttpload.c (tt_face_get_location): Implement.
+       Improve tracing messages.
 
-       * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
-       src/cid/cidparse.h: Apply.
-       * src/cid/cidload.c: Apply.
-       (parse_fd_array): Reject negative values for number of dictionaries.
-       * src/cid/cidparse.c: Apply.
-       (cid_parser_new): Reject negative values for hex data length.
+2016-09-25  Werner Lemberg  <wl@gnu.org>
 
-2015-02-20  Werner Lemberg  <wl@gnu.org>
+       * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo.
 
-       [cff] Signedness fixes for new engine.
+2016-09-24  Werner Lemberg  <wl@gnu.org>
 
-       * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
-       src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
+       [autofit] Tracing fixes.
 
-2015-02-20  Werner Lemberg  <wl@gnu.org>
+       * src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping
+       functions only if we actually do tracing.
 
-       [cff] Signedness fixes for basic infrastructure and old engine.
+2016-09-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * include/internal/pshints.h, src/cff/cffdrivr.c,
-       src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
-       src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
+       [smooth] Reduce divisions in the line renderer.
 
-2015-02-19  Werner Lemberg  <wl@gnu.org>
+       We don't need some divisions if a line segments stays within a single
+       row or a single column of pixels.
 
-       * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
+       * src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions
+       conditional.
 
-       This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
-       version exists), but some fonts set it incorrectly.
+2016-09-15  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       Problem reported by Adam Twardoch <adam@fontlab.com>.
+       * src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
 
-2015-02-19  Werner Lemberg  <wl@gnu.org>
+2016-09-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       [cff] Emit better error code for invalid private dict size.
+       [smooth] Another tiny speed-up.
 
-       * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
-       values for size and offset.
+       * src/smooth/ftgrays.c (gray_find_cell): Merge into...
+       (gray_record_cell): ... this function.
 
-2015-02-19  Werner Lemberg  <wl@gnu.org>
+2016-09-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       [autofit] Fix signedness issues.
+       * src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
 
-       * src/autofit/afangles.c, src/autofit/afcjk.c,
-       src/autofit/afglobal.c, src/autofit/afhints.c,
-       src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
-       src/autofit/hbshim.c: Apply.
+2016-09-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-2015-02-19  Werner Lemberg  <wl@gnu.org>
+       [smooth] Fix valgrind warning and reoptimize.
 
-       [autofit] Use macros for (unsigned) flags, not enumerations.
+       The algorithm calls `gray_set_cell' at the start of each new contour
+       or when the contours cross the cell boundaries. Double-checking for
+       that is wasteful.
 
-       This harmonizes with other code in FreeType (and reduces the number
-       of necessary casts to avoid compiler warnings).
+       * src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
+       (gray_convert_glyph): Remove initialization introduced by 44b172e88.
 
-       * src/autofit/afblue.hin: Make flag macros unsigned.
-       * src/autofit/afblue.h: Regenerated.
+2016-09-10  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afcjk.h: Replace flag enumeration with macros.
-       * src/autofit/afcjk.c: Updated.
+       [sfnt] Fix previous commit.
 
-       * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
-       macros.
-       * src/autofit/afhints.c: Updated.
+       Problems reported as
 
-       * src/autofit/aflatin.h: Replace flag enumerations with macros.
-       * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40
 
-       * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
+       We now map the strike index right before accessing the physical
+       data, not earlier.
 
-2015-02-18  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map'
+       after creating the map so that...
 
-       [type1] Fix signedness issues.
+       * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function
+       can be used before and after setting up `sbit_strike_map'.
+       (tt_face_set_sbit_strike): Revert change.
+       (tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index.
 
-       * include/internal/psaux.h, include/internal/t1types.h,
-       src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
-       src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
+       * src/truetype/ttdriver.c (tt_size_select): Revert change.
 
-2015-02-18  Werner Lemberg  <wl@gnu.org>
+2016-09-09  Werner Lemberg  <wl@gnu.org>
 
-       [psaux, type1] Fix minor AFM issues.
+       [ftfuzzer] Minor improvements.
 
-       * include/internal/t1types.h (AFM_KernPairRec): Make indices
-       unsigned.
-       Update users.
-       (AFM_FontInfoRec): Make element counters unsigned.
-       Update users.
-       * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
-       int.
+       * src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
+       invalid strikes.
+       Use better values for call to `FT_Set_Char_Size'.
 
-       * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
-       Reject negative values for number of kerning elements.
+2016-09-09  Werner Lemberg  <wl@gnu.org>
 
-       * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
+       [sfnt] Don't provide (completely) broken strike data.
 
-2015-02-18  Werner Lemberg  <wl@gnu.org>
+       FreeType tries to sanitize strike header data; we now reject
+       completely broken ones.
 
-       Don't use `FT_PtrDist' for lengths.
+       * include/freetype/internal/tttypes.h (TT_FaceRec): New
+       `sbit_strike_map' array pointer.
 
-       Use FT_UInt instead.
+       * src/base/ftobjs.c (FT_Match_Size): Reject matches where either
+       width or height would be zero.
+       Add tracing message in case of error.
 
-       * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
-       T1_DecoderRec): Do it.
+       * src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
+       only using (more or less) valid strike header data for
+       FT_Face's `available_sizes' array.
+       (sfnt_done_face): Updated.
 
-       * include/internal/t1types.h (T1_FontRec): Ditto.
+       * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
+       `sbit_strike_map'.
+       (tt_face_load_strike_metrics): Improve tracing.
 
-       * src/cid/cidload.c (cid_parse_dict): Updated.
-       * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
-       * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
-       * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
-       parse_charstrings, parse_dict): Ditto.
-       * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
-       t42_parse_dict): Ditto.
+       * src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
 
-2015-02-18  Werner Lemberg  <wl@gnu.org>
+2016-09-08  Werner Lemberg  <wl@gnu.org>
 
-       * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
-       This handles negative values better, avoiding many casts.
+       * Version 2.7 released.
+       =======================
 
-2015-02-17  Werner Lemberg  <wl@gnu.org>
 
-       [base] Fix Savannah bug #44284.
+       Tag sources with `VER-2-7'.
 
-       * src/base/ftcalc.c (FT_MulFix): Typos.
+       * docs/VERSION.TXT: Add entry for version 2.7.
 
-2015-02-17  Werner Lemberg  <wl@gnu.org>
+       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2005/index.html,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2008/index.html,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/index.html,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualc/index.html,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj,
+       builds/windows/visualce/index.html,
+       builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2005-ce/index.html,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/index.html: s/2.6.5/2.7/, s/265/27/.
 
-       [truetype] Finish compiler warning fixes for signedness issues.
+       * include/freetype/freetype.h (FREETYPE_MINOR): Set to 7.
+       (FREETYPE_PATCH): Set to 0.
 
-       * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
-       src/truetype/ttsubpix.h: Apply.
+       * builds/unix/configure.raw (version_info): Set to 18:6:12.
+       * CMakeLists.txt (VERSION_MINOR): Set to 7.
+       (VERSION_PATCH): Set to 0.
 
-2015-02-17  Werner Lemberg  <wl@gnu.org>
+       * docs/CHANGES: Updated.
 
-       * src/truetype/ttsubpix.c: Adding missing `static' keywords.
+2016-09-08  Werner Lemberg  <wl@gnu.org>
 
-2015-02-17  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttinterp.c: Include `ttgxvar.h'.
 
-       [truetype] More signedness fixes.
+       This fixes the `multi' build.
 
-       * include/internal/tttypes.h, src/truetype/ttinterp.h,
-       src/truetype/ttobjs.h, src/truetype/ttinterp.c,
-       src/truetype/ttobjs.c: Apply.
+2016-09-08  Werner Lemberg  <wl@gnu.org>
 
-2015-02-17  Werner Lemberg  <wl@gnu.org>
+       [autofit] Another improvement to Armenian support.
 
-       [truetype] Various signedness fixes.
+       Suggested by Hrant H Papazian <hpapazian@gmail.com>.
 
-       * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
+       * src/autofit/afscript.h: Use better suited characters to derive
+       default stem widths.
 
-       * src/truetype/ttgload.c: Apply.
-       (TT_Get_VMetrics): Protect against invalid ascenders and descenders
-       while constructing advance height.
+2016-09-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+       * src/smooth/ftgrays.c (gray_hline): Micro-optimize.
 
-       [base] Finish compiler warning fixes for signedness issues.
+2016-09-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
-       Apply.
+       [smooth] Operate in absolute bitmap coordinates.
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+       Simpler bitmap addressing improves performance by 1.5%.
 
-       * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
+       * src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
+       (gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
+       gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+2016-09-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       More minor signedness warning fixes.
+       [smooth] Improve contour start (take 2).
 
-       * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
-       src/base/ftutil.c: Apply.
+       * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
+       instead of...
+       (gray_start_cell): ... this function, which is removed.
+       (gray_convert_glyph): Make initial y-coordinate invalid.
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+2016-09-06  Werner Lemberg  <wl@gnu.org>
 
-       Next round of minor compiler warning fixes.
+       [type1] MM fonts support exactly zero named instances (#48748).
 
-       * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
-       type to `FT_Long'.
-       (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
+       * src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
 
-       * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
+2016-09-06  Jonathan Kew  <jfkthame@gmail.com>
 
-       * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
-       Signedness fixes.
+       [cff] Fix uninitialized memory.
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+       Problem reported as
 
-       Various minor signedness fixes.
+         https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
 
-       * include/ftadvanc.h, include/internal/ftobjs.h,
-       src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
+       * src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage'
+       array to handle a `get' opcode without a previous `put'.
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+2016-09-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       New `TYPEOF' macro.
+       * src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
 
-       This helps suppress signedness warnings, avoiding issues with
-       implicit conversion changes.
+2016-09-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * include/config/ftconfig.h, builds/unix/ftconfig.in,
-       builds/vms/ftconfig.h (TYPEOF): Define.
+       [smooth] Improve contour start.
 
-       * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
-       src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
+       * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
+       instead of...
+       (gray_start_cell): ... this function, which is removed.
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+2016-09-05  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftsystem.c: Use casts in standard C function wrappers.
-       (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
+       [cff] Fix memory initialization.
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+       * src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'.  The `Q'
+       variants of FreeType's memory allocation macros don't do zeroing.
 
-       Fix Savannah bug #44261.
+2016-09-05  Werner Lemberg  <wl@gnu.org>
 
-       * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
-       environment also while calling the configure script.
+       [ftrandom] Minor improvements.
 
-2015-02-16  Werner Lemberg  <wl@gnu.org>
+       * src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
+       500.
 
-       * include/internal/ftmemory.h: Add some `FT_Offset' casts.
-       (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
-       FT_MEM_MOVE): Do it.
+       * src/tools/ftrandom/Makefile (CFLAGS): Split off include
+       directories to ...
+       (INCLUDES): ... this new variable.
+       (LDFLAGS): New variable.
+       (ftrandom.o, ftrandom): Updated.
 
-2015-02-15  Werner Lemberg  <wl@gnu.org>
+2016-09-05  Werner Lemberg  <wl@gnu.org>
 
-       [base] Clean up signedness issues in `ftdbgmem.c'.
+       [autofit] Improve Armenian support.
 
-       Also fix other minor issues.
+       Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
 
-       * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
-       with FT_Long for consistency.
-       (ft_mem_primes): Change type to `FT_Int'.
-       (ft_mem_closest_prime, ft_mem_table_set): Updated.
+       * src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
+       selection of characters.
 
-       (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
-       ft_mem_debug_realloc): Use `static' keyword and fix signedness
-       warnings where necessary.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
 
-       (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
-       ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
-       and add or remove casts to avoid signedness warnings.
+2016-09-04  Werner Lemberg  <wl@gnu.org>
 
-2015-02-15  Werner Lemberg  <wl@gnu.org>
+       [ftrandom] Improve Makefile.
 
-       [base] Clean up signedness in arithmetic functions.
+       It now supports both a normal build (`./configure && make') and a
+       development build (`make devel').
 
-       This makes the code more readable and reduces compiler warnings.
+       * src/tools/ftrandom/Makefile (VPATH): Set it so that
+       `libfreetype.a' gets searched in both `objs' (for the development
+       build) and `objs/.libs' (for a normal build which uses libtool).
+       (LIBS): Add missing libraries.
+       (ftrandom.o): New rule.
+       (ftrandom): Use automatic variables.
 
-       * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
-       FT_DivFix): Convert input parameters to unsigned, do the
-       computation, then convert the result back to signed.
-       (ft_corner_orientation): Fix casts.
+2016-09-03  Werner Lemberg  <wl@gnu.org>
 
-2015-02-07  Werner Lemberg  <wl@gnu.org>
+       [truetype] More fixes for handling of GX deltas.
 
-       [sfnt] Fix Savannah bug #44184.
+       Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
 
-       * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
-       longer reject `htmx' and `vmtx' tables with invalid length but
-       sanitize them.
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
+       sanity test for glyph variation array header size.
+       Always set stream position before reading packed x and y deltas.
+       Fix thinko w.r.t. `localpoints' array.
 
-2015-02-06  Jon Anderson  <jon@websupergoo.com>
+2016-09-03  Werner Lemberg  <wl@gnu.org>
 
-       [truetype] Fix regression in the incremental glyph loader.
+       [ftrandom] Various fixes.
 
-       * src/truetype/ttgload.c (load_truetype_glyph): For incremental
-       fonts, the glyph index may be greater than the number of glyphs
-       indicated, so guard the check with a preprocessor conditional.
+       * src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
+       default.
+       (error_fraction): Make it of type `double' to work as advertized –
+       this was completely broken.
+       Update all related code.
+       (error_count, fcnt): Make it unsigned to fix compiler warnings.
+       Update all related code.
+       (fontlist): Change `len' member to `long' to fix compiler warnings.
+       (FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
+       unused variables.
+       (TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
+       (ExecuteTest): Ditto.
+       Call `FT_Done_FreeType'.
+       (getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
+       int'.
+       (usage): Improve output.
+       (main): Fix compiler warnings.
 
-2015-02-06  Werner Lemberg  <wl@gnu.org>
+       * src/tools/ftrandom/README: Updated.
 
-       [autofit] Fix potential memory leak.
+2016-09-03  Werner Lemberg  <wl@gnu.org>
 
-       While this doesn't show up with FreeType, exactly the same code
-       leaks with ttfautohint's modified auto-hinter code (which gets used
-       in a slightly different way).
+       [base] Avoid negative bitmap strike dimensions (#48985).
 
-       It certainly doesn't harm since it is similar to already existing
-       checks in the code for embedded arrays.
+       * src/base/ftobjs.c (FT_Open_Face): Check whether negation was
+       actually successful.  For example, this can fail for value
+       -32768 if the type is `signed short'.  If there are problems,
+       disable the strike.
 
-       * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
-       and `max_points' for all cases.
+2016-09-03  Werner Lemberg  <wl@gnu.org>
 
-2015-01-31  Werner Lemberg  <wl@gnu.org>
+       [cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
 
-       [autofit] Add support for Thai script.
+       * src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
 
-       Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
-       zone characters!
+2016-09-02  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afblue.dat: Add blue zone data for Thai.
+       [unix] Enable 64bit support in file system access (#48962).
 
-       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+       * builds/unix/configure.raw: Call `AC_SYS_LARGEFILE'.
 
-       * src/autofit/afscript.h: Add Thai standard characters.
+2016-09-02  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afranges.c: Add Thai data.
+       [sfnt] Avoid left shift of negative value (#48980).
 
-       * src/autofit/afstyles.h: Add Thai data.
+       * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
+       constant.
 
-2015-01-23  Behdad Esfahbod  <behdad@behdad.org>
+2016-09-02  Werner Lemberg  <wl@gnu.org>
 
-       [raster] Handle `FT_RASTER_FLAG_AA' correctly.
+       * src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
 
-       This fixes a breakage caused by the commit `[raster] Remove
-       5-level gray AA mode from monochrome rasterizer.'.
+2016-09-02  Werner Lemberg  <wl@gnu.org>
 
-       Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
+       Some preparations for the next release.
 
-       * src/raster/ftraster.c (ft_black_render): Handle
-       `FT_RASTER_FLAG_AA'.
+       * include/freetype/config/ftoption.h
+       (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Enable.
 
-       * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
-       remnants.
+       * docs/CHANGES: Updated.
 
-2015-01-18  Werner Lemberg  <wl@gnu.org>
+2016-09-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
+       [smooth] Simplify span rendering more.
 
-2015-01-18  Chris Liddell  <chris.liddell@artifex.com>
+       It turns out that there is significant cost associated with `FT_Span'
+       creation and calls to `gray_render_span' because it happens so
+       frequently. This removes these steps from our internal use but leaves
+       it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
+       is about 5%.
 
-       [raster] Fix Savannah bug #44022.
+       * src/smooth/ftgrays.c (gray_render_span): Removed. The code is
+       migrated to...
+       (gray_hline): ... here.
 
-       Add fallback for glyphs with degenerate bounding boxes.
+2016-08-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       If a glyph has only one very narrow feature, the bbox can end up
-       with either the width or height of the bbox being 0, in which case
-       no raster memory is allocated and no attempt is made to render the
-       glyph.  This is less than ideal when the drop-out compensation in
-       the rendering code would actually result in the glyph being
-       rendered.
+       [smooth] Streamline pixmap drawing a bit more.
 
-       This problem can be observed with the `I' glyph (gid 47) in the
-       Autodesk RomanS TrueType font.
+       Zero coverage is unlikely (1 out of 256) to warrant checking. This
+       gives 0.5% speed improvement in rendering simple glyphs.
 
-       * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
-       dimension is zero to explicitly round up/down (instead of simply
-       round).
+       * src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
 
-2015-01-17  Werner Lemberg  <wl@gnu.org>
+2016-08-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       Add some tools to handle yearly copyright notice updates.
+       [smooth] Streamline pixmap drawing.
 
-       We are now following the GNU guidelines: A new release automatically
-       means that the copyright year of all affected files gets updated; it
-       is no longer used to track years of modification changes.
+       This gives 2% speed improvement in rendering simple glyphs.
 
-       * src/tools/update-copyright-year: New Perl script.
-       * src/tools/update-copyright: New shell script that calls
-       `update-copyright-year' on all files.
-       * src/tools/no-copyright: Exceptions that should not be handled by
-       `update-copyright'
+       * src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
+       pointer to its bottom-left and pitch to be used in...
+       (gray_TWorker): ... here.
+       (gray_render_span): Move pixmap flow check from here...
+       (gray_raster_render): .. to here.
 
-2015-01-14  Werner Lemberg  <wl@gnu.org>
+2016-08-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * docs/CHANGES: Updated, using a description from Behdad.
+       [smooth] Reduce stack of band boundaries.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       * src/smooth/ftgrays.c (gray_TBand): Removed.
+       (gray_convert_glyph): Updated to stack band boundaries concisely.
 
-       * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
+2016-08-26  Werner Lemberg  <wl@gnu.org>
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       * src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
 
-       [autofit] Add embedded array of segments and edges.
+2016-08-26  Werner Lemberg  <wl@gnu.org>
 
-       Avoids multiple mallocs per typical glyphs.
+       [cid] Fix commit from 2016-05-16.
 
-       With this and recent changes to avoid mallocs, the thread-safe
-       stack-based loader is now as fast as the previous model that had one
-       cached singleton.
+       * src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
 
-       * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
-       New macros.
-       (AF_AxisHintsRec): Add two arrays for segments and edges.
+2016-08-26  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
-       data if number of segments exceeds given threshold value.
-       (af_axis_hints_new_edge):  Only allocate data if number of edges
-       exceeds given threshold value.
-       (af_glyph_hints_done): Updated.
+       [sfnt] Cache offset and size to bitmap data table.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       This commit avoids `EBDT' and friends being looked up again and
+       again while loading a single embedded bitmap.
 
-       [autofit] Add embedded arrays for points and contours.
+       * include/freetype/internal/tttypes.h (TT_FaceRec)
+       [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
+       `ebdt_size'.
 
-       This avoids at least two malloc calls for typical glyphs.
+       * src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
+       (tt_face_load_sbit): ... this function; also store the table size
+       and offset.
 
-       * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
-       New macros.
-       (AF_GlyphHintsRec): Add two arrays for contours and points.
+2016-08-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
-       Updated.
-       (af_glyph_hints_reload): Only allocate data if number of contours or
-       points exceeds given threshold values.
+       * src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+2016-08-26  Werner Lemberg  <wl@gnu.org>
 
-       [autofit] Allocate hints object on the stack.
+       [type1] Fix heap buffer overflow.
 
-       This avoids one malloc per load.
+       Reported as
 
-       * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
-       `AF_GlyphHints'.
-       Update prototype.
+         https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
 
-       * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
-       parameter instead of `FT_Memory'.
-       (af_loader_done): Directly reset `load_hints'.
-       (af_loader_load_g): Updated.
+       * src/type1/t1load.c (parse_charstrings): Reject fonts that don't
+       contain glyph names.
 
-       * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
-       `hints' object.
+2016-08-25  Werner Lemberg  <wl@gnu.org>
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       [sfnt] Fix previous commit (#48901).
 
-       [autofit] Reuse slot glyph loader.
+       * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
 
-       No need to create a new glyph loader; we can reuse the one from
-       `slot->internal->loader'.  It's hard to tell why it was written that
-       way originally, but new code looks sound and correct to me, and
-       avoids lots of allocations.
+2016-08-25  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afloader.c (af_loader_init): Change return type to
-       `void'.
-       Don't call `FT_GlyphLoader_New'.
-       (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
-       (af_loader_load_g): Update code to use `internal->loader', which
-       doesn't need copying of data.
+       [sfnt] Speed up handling of invalid format 4 cmaps.
 
-       * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
-       Update prototype.
+       * src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
+       tests for `num_glyph' from `tt_cmap4_char_map_linear'.
 
-       * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
+2016-08-25  Werner Lemberg  <wl@gnu.org>
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       * include/freetype/internal/ftdriver.h: Remove unused typedefs.
 
-       [autofit] Remove (unused) support for composite glyphs.
+2016-08-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       We never have to deal with composite glyphs in the autohinter, as
-       those will be loaded into FORMAT_OUTLINE by the recursed
-       `FT_Load_Glyph' function.
+       [smooth] Simplify span rendering.
 
-       In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
-       FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
-       FT_LOAD_NO_HINTING:
+       This removes unnecessary complexity of span merging and buffering.
+       Instead, the spans are rendered as they come, speeding up the
+       rendering by about 5% as a result.
 
-         /* resolve load flags dependencies */
+       * src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
+       (gray_TWorker): Remove span buffer and related fields.
+       (gray_sweep, gray_hline): Updated.
 
-         if ( load_flags & FT_LOAD_NO_RECURSE )
-           load_flags |= FT_LOAD_NO_SCALE         |
-                         FT_LOAD_IGNORE_TRANSFORM;
+       * include/freetype/ftimage.h: Remove documentation note about
+       `FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
 
-         if ( load_flags & FT_LOAD_NO_SCALE )
-         {
-           load_flags |= FT_LOAD_NO_HINTING |
-                         FT_LOAD_NO_BITMAP;
+2016-08-16  Werner Lemberg  <wl@gnu.org>
 
-           load_flags &= ~FT_LOAD_RENDER;
-         }
+       [truetype] Fix `MPS' instruction.
 
-       and as such the auto-hinter is never called.  Thus, the recursion in
-       `af_loader_load_g' never actually happens.  So remove the depth
-       counter as well.
+       According to Greg Hitchcock, MPS in DWrite really returns the point
+       size.
 
-       * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
-       parameter.
-       <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
-       (af_loader_load_glyph): Updated.
+       * src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       * src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
 
-       [raster] Fix uninitialized memory access.
+       * src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
+       member.
 
-       Apparently `ras.cProfile' might be uninitialized.  This will be the
-       case if `ras.top == ras.cProfile->offset', as can be seen in
-       `End_Profile'.  The overshoot code introduced in a change `Fix B/W
-       rasterization of subglyphs with different drop-out modes.' (from
-       2009-06-18) violated this, accessing `ras.cProfile->flags'
-       unconditionally just before calling `End_Profile' (which then
-       detected that `cProfile' is uninitialized and didn't touch it).
+       * src/truetype/ttinterp.c (TT_Load_Context): Updated.
+       (Ins_MPS): Fix instruction.
 
-       This was harmless, and was not detected by valgrind before because
-       the objects were allocated on the `raster_pool', which was always
-       initialized.  With recent change to allocate raster buffers on the
-       stack, valgrind now reported this invalid access.
+2016-08-16  Werner Lemberg  <wl@gnu.org>
 
-       * src/raster/ftraster.c (Convert_Glyph): Don't access an
-       uninitialized `cProfile'.
+       [lzw] Optimize last commit.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       * src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
+       conditional clause.
 
-       [smooth] Fix uninitialized memory access.
+2016-08-16  Werner Lemberg  <wl@gnu.org>
 
-       Looks like `ras.span_y' could always be used without initialization.
-       This was never detected by valgrind before because the library-wide
-       `raster_pool' was used for the worker object and `raster_pool' was
-       originally zero'ed.  But subsequent reuses of it were using `span_y'
-       uninitialized.  With the recent change to not use `render_pool' and
-       allocate worker and buffer on the stack, valgrind now detects this
-       uninitialized access.
+       [lzw] Avoid invalid left shift.
 
-       * src/smooth/ftgrays.c (gray_raster_render): Initialize
-       `ras.span_y'.
+       Reported as
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+         https://bugzilla.mozilla.org/show_bug.cgi?id=1295366
 
-       [base] Don't initialize unused `driver->glyph_loader'.
+       * src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
 
-       * src/base/ftobjs.c (Destroy_Driver): Don't call
-       `FT_GlyphLoader_Done'.
-       (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
+2016-08-16  Werner Lemberg  <wl@gnu.org>
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       [lzw] Avoid buffer overrun.
 
-       [base] Don't allocate `library->raster_pool' anymore.
+       Reported as
 
-       It's unused after the following commits:
+         https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
 
-         [raster] Allocate render pool for mono rasterizer on the stack.
-         [raster] Remove 5-level gray AA mode from monochrome rasterizer.
+       * src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
+       underflow.
 
-       The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
-       serve, which is, to adjust the pool size.  But the pool is now
-       allocated on the stack on demand.
+2016-08-16  Werner Lemberg  <wl@gnu.org>
 
-       * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
+       [truetype] Fix compiler warning.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       * src/truetype/ttgload.c (load_truetype_glyph): Add cast.
 
-       [base] Do not reorder library->renderers upon use.
+2016-08-13  Werner Lemberg  <wl@gnu.org>
 
-       Instead of keeping `library->renderers' in a MRU order, just leave
-       it as-is.  The MRU machinery wasn't thread-safe.
+       [winfonts] Avoid zero bitmap width and height.
 
-       With this patch, rasterizing glyphs from different faces from
-       different threads doesn't fail choosing rasterizer
-       (FT_Err_Cannot_Render_Glyph).
+       Reported as
 
-       Easiest to see that crash was to add a `printf' (or otherwise let
-       thread yield in FT_Throw with debugging enabled).
+         https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
 
-       * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
-       (FT_Outline_Render): Don't call `FT_Set_Renderer'.
+       * src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
+       (FNT_Load_Glyph): Check for zero pitch.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+2016-08-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       [raster] Allocate render pool for mono rasterizer on the stack.
+       * src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
 
-       Instead of using the `render_pool' member of `FT_Library' that is
-       provided down to the rasterizer, completely ignore that and allocate
-       needed objects on the stack instead.
+2016-08-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       With this patch, rasterizing glyphs from different faces from
-       different threads doesn't crash in the monochrome rasterizer.
+       * src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
 
-       * src/raster/ftraster.c (black_TRaster): Remove `buffer',
-       `buffer_size', and `worker' members.
+2016-08-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       (ft_black_render): Create `buffer' locally.
-       (ft_black_reset): Updated.
+       * src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+2016-08-10  Peter Klotz  <Peter.Klotz@ith-icoserve.com>
 
-       [raster] Remove 5-level gray AA mode from monochrome rasterizer.
+       * src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
 
-       It was off by default and couldn't be turned on at runtime.  And the
-       smooth rasterizer superceded it over ten years ago.  No point in
-       keeping.  Comments suggested that it was there for compatibility
-       with FreeType 1.
+2016-08-10  Werner Lemberg  <wl@gnu.org>
 
-       550 lines down.
+       [sfnt] Use correct type for `italicAngle' field (#48732).
 
-       * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
-       RASTER_GRAY_LINES): Remove macros and all associated code.
+       * src/sfnt/ttload.c (tt_face_load_post): Fix types.
 
-       (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
-       (black_TRaster): Remove `grays' and `gray_width'.
+2016-08-06  Jon Spencer  <jon@jonspencer.ca>
 
-       (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
-       ft_black_render): Updated.
+       [sfnt] Fix `FT_Get_Advance' for bitmap strikes.
 
-       * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
-       (ft_raster5_renderer_class): Removed.
+       `FT_Get_Advance' returns 0 for bitmap fonts.  It first gets the
+       advance value from the font table and then scales it by the
+       `font->size->metrics->x_scale' field.  But `FT_Select_Size' doesn't
+       set that value for bitmap fonts and the advance gets scaled to zero.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       Taken from
 
-       [smooth] Allocate render pool for smooth rasterizer on the stack.
+         https://github.com/behdad/harfbuzz/issues/252
 
-       Instead of using the `render_pool' member of `FT_Library' that is
-       provided down to the rasterizer, completely ignore that and allocate
-       needed objects on the stack instead.
+       * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
+       <TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
 
-       With this patch, rasterizing glyphs from different faces from
-       different threads doesn't crash in the smooth rasterizer.
+2016-08-06  Behdad Esfahbod  <behdad@behdad.org>
 
-       Bugs:
+       [truetype] Fix GX variation handling of composites.
 
-         https://bugzilla.redhat.com/show_bug.cgi?id=678397
-         https://bugzilla.redhat.com/show_bug.cgi?id=1004315
-         https://bugzilla.redhat.com/show_bug.cgi?id=1165471
-         https://bugs.freedesktop.org/show_bug.cgi?id=69034
+       * src/truetype/ttgload.c (load_truetype_glyph)
+       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
 
-       * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
-       `buffer_size', `band_size', and `worker' members.
+2016-08-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-       (gray_raster_render): Create `buffer', `buffer_size', and
-       `band_size' locally.
-       (gray_raster_reset): Updated.
+       [smooth] Minor refactoring.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
+       Updated.
 
-       [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
+2016-07-29  Werner Lemberg  <wl@gnu.org>
 
-       Previously the code had stipulation for using a per-TT_Size exec
-       context if `size->debug' was true.  But there was no way that
-       `size->debug' could *ever* be true.  As such, the code was always
-       using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
-       This was, clearly, not threadsafe.
+       [sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
 
-       With this patch, loading glyphs from different faces from different
-       threads doesn't crash in the bytecode loader code.
+       Since 2016-05-16 we detect infinite recursion directly.
 
-       * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
-       (TT_DriverRec): Remove `context' member.
+       * src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
+       `maxComponentDepth'.
+       * src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
+       `maxComponentDepth' is not valid.  Instead, simply adjust its value
+       and emit a tracing message.
 
-       * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
-       `TT_ExecContext' code related to a global `TT_Driver' object.
+2016-07-26  Werner Lemberg  <wl@gnu.org>
 
-       (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
-       (tt_size_done_bytecode): ... here.
+       * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
 
-       (tt_driver_init): Don't create `TT_ExecContext' object here but ...
-       (tt_size_init_bytecode): ... here, only on demand.
+       No functional change.
 
-       * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
-       code.
-       (TT_New_Context): Remove `TT_ExecContext' code related to a global
-       `TT_Driver' object.
+2016-07-22  Hin-Tak Leung  <htl10@users.sourceforge.net>
 
-       * src/truetype/ttinterp.h: Updated.
+       [truetype] Record the end of IDEFs.
 
-       * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
+       To match the logic in FDEF.  The value of the end is only used for
+       bound-checking in `Ins_JMPR', so it may not have been obvious that
+       it was not recorded.  Tested (as part of Font Validator 2.0) all the
+       fonts on Fedora and did not see any change.
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       * src/truetype/ttinterp.c (Ins_IDEF): Updated.
 
-       [autofit] Allocate AF_Loader on the stack instead of AF_Module.
+2016-07-19  Werner Lemberg  <wl@gnu.org>
 
-       Stop sharing a global `AF_Loader'.  Allocate one on the stack during
-       glyph load.
+       [truetype] Sanitizer fix, second try.
 
-       Right now this results in about 25% slowdown, to be fixed in a
-       following commit.
+       * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
+       tests and use only one slot more.
 
-       With this patch loading glyphs from different faces from different
-       threads doesn't immediately crash in the autohinting loader code.
+2016-07-19  Werner Lemberg  <wl@gnu.org>
 
-       Bugs:
+       [truetype] Sanitizer fix.
 
-         https://bugzilla.redhat.com/show_bug.cgi?id=1164941
+       * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
+       to fix nested loops.
 
-       * src/autofit/afloader.c (af_loader_init): Pass
-       `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
-       (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
-       argument.
-       (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
-       argument.
+2016-07-18  Werner Lemberg  <wl@gnu.org>
 
-       * src/autofit/afmodule.c (af_autofitter_init): Don't call
-       `af_loader_init'.
-       (af_autofitter_done): Don't call `af_loader_done'.
-       (af_autofitter_load_glyph): Use a local `AF_Loader' object.
+       [truetype] Make GETDATA work only for GX fonts.
 
-       * src/autofit/afloader.h: Include `afmodule.h'.
-       Update prototypes.
-       Move typedef for `AF_Module' to...
+       * src/truetype/ttinterp.c (opcode_name): Updated.
+       (Ins_GETDATA): Only define for `TT_CONFIG_OPTION_GX_VAR_SUPPORT'.
+       (TT_RunIns): Updated.
 
-       * src/autofit/afmodule.h: ... this place.
-       No longer include `afloader.h'.
+2016-07-17  Werner Lemberg  <wl@gnu.org>
 
-2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+       [truetype] Add support for Apple's
 
-       * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
+         GETDATA[], opcode 0x92
 
-2015-01-12  Werner Lemberg  <wl@gnu.org>
+       bytecode instruction.  It always returns 17, and we have absolutely
+       no idea what it is good for...
 
-       Fix Savannah bug #43976.
+       * src/truetype/ttinterp.c (Pop_Push_Count, opcode_name): Updated.
+       (Ins_GETDATA): New function.
+       (TT_RunIns): Add it.
 
-       Assure that FreeType's internal include directories are found before
-       `CPPFLAGS' (which might be set by the user in the environment), and
-       `CPPFLAGS' before `CFLAGS'.
+2016-07-16  Werner Lemberg  <wl@gnu.org>
 
-       * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
-       (FT_COMPILE): Make this a special variable for compiling only the
-       files handled in `freetype.mk'.
-       (.c.$O): Removed, unused.
+       [truetype] Add bytecode support for GX variation fonts.
 
-       * src/*/rules.mk (*_COMPILE): Fix order of include directories.
+       This commit implements undocumented (but confirmed) stuff from
+       Apple's old bytecode engine.
 
-2015-01-11  Werner Lemberg  <wl@gnu.org>
+         GETVARIATION[], opcode 0x91
+           This opcode pushes normalized variation coordinates for all axes
+           onto the stack (in 2.14 format).  Coordinate of first axis gets
+           pushed first.
 
-       [truetype] Prettifying.
+         GETINFO[], selector bit 3
+           If GX variation support is enabled, bit 10 of the result is set
+           to 1.
 
-       * src/truetype/ttinterp.c (project, dualproj, fast_project,
-       fast_dualproj): Rename to...
-       (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
+       * src/truetype/ttinterp.c: Include FT_MULTIPLE_MASTERS_H.
+       (opcode_name) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
+       (Ins_GETINFO) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle selector
+       bit 3, checking support for variation glyph hinting.
+       (Ins_GETVARIATION) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New function
+       to implement opcode 0x91.
+       (TT_RunIns) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Handle opcode 0x91.
 
-2015-01-11  Werner Lemberg  <wl@gnu.org>
+2016-07-16  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
+       [truetype] Fix GETINFO bytecode instruction.
 
-       Based on a patch from Behdad.
+       * src/truetype/ttinterp.c (Ins_GETINFO): Fix return value for
+       stretching information.
 
-2015-01-11  Werner Lemberg  <wl@gnu.org>
+2016-07-16  Behdad Esfahbod  <behdad@behdad.org>
 
-       * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
+       [truetype] Make all glyphs in `Zycon' GX font work.
 
-2015-01-11  Werner Lemberg  <wl@gnu.org>
+       * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
+       tests.
 
-       * src/truetype/ttinterp.c (Normalize): Remove unused argument.
+2016-07-16  Werner Lemberg  <wl@gnu.org>
 
-2015-01-11  Werner Lemberg  <wl@gnu.org>
+       [truetype] Fix GX delta tracing.
 
-       [truetype] More macro expansions.
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Trace
+       relative point movements.
 
-       * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
-       expansion.
+2016-07-16  Behdad Esfahbod  <behdad@behdad.org>
 
-2015-01-11  Werner Lemberg  <wl@gnu.org>
+       [truetype] More fixes for GX.
 
-       [truetype] More macro expansions.
+       This finally fixes the rendering of the cyclist and the lizard in
+       the `Zycon' font.
 
-       * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
-       adjusting function calls where necessary.
-       (FT_UNUSED_ARG): Removed, no longer needed.
+       * src/truetype/ttgxvar.c (ft_var_readpackedpoints): `first' point
+       index is always cumulative.
 
-2015-01-10  Werner Lemberg  <wl@gnu.org>
+       (tt_handle_deltas): Rename to...
+       (tt_interpolate_deltas): ... This.
+       Add new parameter for output point array.
+       Update caller.
 
-       [truetype] More macro expansions.
+       (TT_Vary_Apply_Glyph_Deltas): Add `points_out' array; it now holds
+       the intermediate results of `tt_interpolate_deltas' that are to be
+       added to `outline->points'.
 
-       Based on a patch from Behdad.
+2016-07-15  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
-       `Ins_*' functions.
-       (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
-       (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
-       needed.
-       (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
-       (Ins_SxyTCA): New function.
+       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Thinko.
 
-2015-01-10  Werner Lemberg  <wl@gnu.org>
+       `max_pos' is always larger than `min_pos' so `FT_ABS' is not needed.
 
-       [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
+       Reported by Alexei.
 
-       Behdad suggested this code simplification, and nobody objected...
+2016-07-16  Nikolaus Waxweiler  <madigens@gmail.com>
 
-       * include/config/ftoption.h, devel/ftoption.h
-       (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
+       * src/truetype/ttinterp.c (Ins_MIRP): Fix copy-and-paste error.
 
-       * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
-       Remove related code.
-       (ARRAY_BOUND_ERROR): Use do-while loop.
+       Problem reported by Hin-Tak Leung.
 
-2015-01-10  Werner Lemberg  <wl@gnu.org>
+2016-07-15  Werner Lemberg  <wl@gnu.org>
 
-       [truetype] More macro expansions.
+       [autofit] Update and improve segment and edge tracing.
 
-       * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
-       EXEC_ARG): Remove by replacing with expansion.
+       * src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
+       `delta' also.
+       Don't show first point of segment as a replacement for `pos'; this
+       is (a) misleading, since the difference to `pos' can be almost
+       arbitrarily large in corner cases, and (b) it is better to have all
+       segment data in font units instead of a single value given in output
+       space coordinates.
+       Improve layout.
+       (af_glyph_hints_dump_edges): Show px->units and units->px conversion
+       values for convenience.
+       Improve layout.
 
-2015-01-10  Werner Lemberg  <wl@gnu.org>
+2016-07-15  Werner Lemberg  <wl@gnu.org>
 
-       [truetype] More macro expansions.
+       [autofit] For edges, reject segments wider than 1px (#41334).
 
-       Based on a patch from Behdad.
+       * src/autofit/afhints.h (AF_SegmentRec): New member `delta'.
 
-       * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
-       SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
-       CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
-       CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
-       CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
-       COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
-       with expansion.
+       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Compute
+       `delta'.
+       (af_latin_hints_compute_edges): Reject segments with a delta larger
+       than 0.5px.
 
-       (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
-       CUR_fast_dualproj): Replace with macros `project', `dualproj',
-       `fast_project', `fast_dualproj'.
+2016-07-14  Werner Lemberg  <wl@gnu.org>
 
-2015-01-10  Werner Lemberg  <wl@gnu.org>
+       * include/freetype/freetype.h (FT_IS_NAMED_INSTANCE): New macro.
 
-       [truetype] More macro expansions.
+2016-07-14  Werner Lemberg  <wl@gnu.org>
 
-       * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
-       with expansion.
+       [sfnt] Fix `face_index' value in `FT_Face' for named instances.
 
-2015-01-10  Werner Lemberg  <wl@gnu.org>
+       * src/sfnt/sfobjs.c (sfnt_init_face): Don't strip off higher 16bits.
 
-       [truetype] Remove code for static TrueType interpreter.
+2016-07-14  Werner Lemberg  <wl@gnu.org>
 
-       This is a follow-up patch.
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix tracing.
 
-       * src/truetype/ttinterp.c, src/truetype/ttinterp.h
-       [TT_CONFIG_OPTION_STATIC_INTERPRETER,
-       TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
+2016-07-14  Behdad Esfahbod  <behdad@behdad.org>
 
-2015-01-10  Werner Lemberg  <wl@gnu.org>
+       [truetype] Fix gxvar delta interpolation.
 
-       * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
+       The coordinates of the base font should be used for interpolation
+       purposes, NOT the current points (i.e., the result of accumulation
+       of previous deltas).
 
-       This starts a series of patches that simplifies the code of the
-       bytecode interpreter.
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize
+       `points_org' before looping over all tuples.
 
 
 ----------------------------------------------------------------------------
 
-Copyright 2015-2016 by
+Copyright 2016-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
index 07775ff..11376e8 100644 (file)
        (cff_compute_bias): Use `U' for constant.
        * src/cid/cidload.c (cid_decrypt): Ditto.
        * src/psaux/psobjs.c (T1_Decrypt): Ditto.
-       * src/psaux/t1decode.c (T1_Decoder_Parse_CharStrings): Ditto.
+       * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
        * src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version'
        variable.
        * src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top'
 
        * src/base/ftcalc.c (FT_DivFix): Fixed a bug in the 64-bit code that
        created incorrect scale factors!
-       (FT_Round_Fix, FT_CeilFix, FT_FloorFix): Minor improvements.
+       (FT_RoundFix, FT_CeilFix, FT_FloorFix): Minor improvements.
 
 2001-05-12  Werner Lemberg  <wl@gnu.org>
 
 
        * include/freetype/internal/t2types.h,
        include/freetype/internal/cfftypes.h: Changed the structures for
-       CFF_Encoding and CFF_Encoding for the new implementations of the
+       CFF_Charset and CFF_Encoding for the new implementations of the
        charset and encoding parsers in the CFF driver.
 
        * src/cff/t2gload.c (t2_lookup_glyph_by_stdcharcode,
 
 ----------------------------------------------------------------------------
 
-Copyright 2000-2016 by
+Copyright 2000-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
index 855c86d..eff9f79 100644 (file)
        FTC_CACHE_TRYLOOP_END): New macros.
 
        * src/cache/ftccache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c
-       (ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACE_TRYLOOP_END.
+       (ftc_snode_compare): Use FT_CACHE_TRYLOOP and FTC_CACHE_TRYLOOP_END.
 
 2005-05-23  Werner Lemberg  <wl@gnu.org>
 
        `ft_get_adobe_glyph_index', a new function defined in `pstables.h'.
        (ps_get_macintosh_name, ps_get_standard_strings): Updated.
 
-       * src/base/ftobjs.c (FT_Set_Char_Sizes): Handle fractional sizes
+       * src/base/ftobjs.c (FT_Set_Char_Size): Handle fractional sizes
        more carefully.  This fixes Savannah bug #12263.
 
 2005-03-06  David Turner  <david@freetype.org>
 2004-08-11  Detlef Würkner  <TetiSoft@apg.lahn.de>
 
        * src/base/ftrfork.c (FT_Raccess_Guess)
-       [!FT_CONFIG_OPTION_GUESSING_EMBEDDED_FORK]: Remove compiler
+       [!FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK]: Remove compiler
        warnings.
 
 2004-08-06  Adam Piotrowski  <st_intel@poczta.onet.pl>
 
 2004-06-08  David Turner  <david@freetype.org>
 
-       * include/freetype/freetype.h (FT_GlyphMetrics): Move `lsb_delta'
+       * include/freetype/freetype.h (FT_Glyph_Metrics): Move `lsb_delta'
        and `rsb_delta' elements to...
        (FT_GlyphSlotRec): Here to retain binary compatibility with older
        FreeType versions.
        * src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
        ttgxvar.h.
        (TT_Process_Simple_Glyph, load_truetype_glyph)
-       [TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
+       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]Support GX var fonts.
 
        * src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
        ttgxvar.h.
        (psh_blues_snap_stem): Don't use blue_shift but blue_threshold.
 
        * src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD_MAXIMUM): New macro.
-       (psh_glyph_find_string_points): Use PSH_STRONG_THRESHOLD_MAXIMUM.
+       (psh_glyph_find_strong_points): Use PSH_STRONG_THRESHOLD_MAXIMUM.
        (psh_glyph_find_blue_points): New function.  Needed for fonts like
        p052003l.pfb (URW Palladio L Roman) which have flex curves at the
        base line within blue zones, but the flex curves aren't covered by
 
        * src/base/ftstroke.c: Include FT_INTERNAL_OBJECTS_H.
        (FT_Outline_GetOutsideBorder): Inverse result.
-       (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_GlyphStrokeBorder): New
+       (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_Glyph_StrokeBorder): New
        functions.
        (FT_Stroker_EndSubPath): Close path if needed.
        (FT_Stroker_Set, FT_Stroker_ParseOutline): Use FT_Stroker_Rewind.
 2003-12-23  David Turner  <david@freetype.org>
 
        * include/freetype/internal/ftobjs.h (FT_PAD_FLOOR, FT_PAD_ROUND,
-       FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_CEIL): New macros.  They
-       are used to avoid compiler warnings with very pedantic compilers.
+       FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_PIX_CEIL): New macros.
+       They are used to avoid compiler warnings with very pedantic compilers.
        Note that `(x) & -64' causes a warning if (x) is not signed.  Use
        `(x) & ~63' instead!
        Updated all related code.
        (t42_parse_encoding): Use `ft_isdigit'.
 
 
-       * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_OK if
+       * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_Ok if
        success.
 
 2003-10-05  Werner Lemberg  <wl@gnu.org>
        new POSTSCRIPT_NAMES service.
        * src/psaux/t1decode.h (t1_lookup_glyph_by_stdcharcode,
        t1_decode_init): Use new POSTSCRIPT_NAMES service.
-       * src/psaux/t1cmap.h, src/psaux/t1decode.h: Dont' include
+       * src/psaux/t1cmap.h, src/psaux/t1decode.h: Don't include
        FT_INTERNAL_POSTSCRIPT_NAMES_H.
 
        * src/psnames/psmodule.c:  Don't include
        * include/freetype/ttunpat.h: Fixing documentation comment.
 
        * include/freetype/config/ftoption.h, devel/ftoption.h
-       (TT_CONFIG_OPTION_OPTION_COMPILE_UNPATENTED_HINTING): Replaced
-       with...
+       (TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING): Replaced with...
        (TT_CONFIG_OPTION_UNPATENTED_HINTING): This.  Updated all users.
        (TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): Removed.
 
        drivers.
 
        * src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
-       (FT_Set_Pixel_Size): Assign value to `metrics' after validation of
+       (FT_Set_Pixel_Sizes): Assign value to `metrics' after validation of
        arguments.
 
 2003-06-20  Werner Lemberg  <wl@gnu.org>
        * src/cid/cidload.c (cid_load_keyword): Handle
        T1_FIELD_LOCATION_BBOX.
        (parse_font_bbox): Commented out.
-       (cid_field_record): Comment out element for parsing FontBBox.
+       (cid_field_records): Comment out element for parsing FontBBox.
 
        * src/type42/t42parse.c (t42_parse_font_bbox): Commented out.
        (t42_keywords): Handle FontBBox with T1_FIELD_BBOX, not with
 2003-04-23  Werner Lemberg  <wl@gnu.org>
 
        * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Use FT_PtrDist
-       instead of FT_Uint for `len'.
+       instead of FT_UInt for `len'.
 
 2003-04-22  Werner Lemberg  <wl@gnu.org>
 
        * src/cache/ftcsbits.c (ftc_sbit_node_load): Fixed a small bug that
        caused problems with embedded bitmaps.
 
-       * src/otlayout/otlayout.h, src/otlyaout/otlconf.h,
+       * src/otlayout/otlayout.h, src/otlayout/otlconf.h,
        src/otlayout/otlgsub.c, src/otlayout/otlgsub.h,
        src/otlayout/otlparse.c, src/otlayout/otlparse.h,
        src/otlayout/otlutils.h: Updating the OpenType Layout code, adding
        (ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v):
        New functions.
 
-       (ft_smooth_locd_renderer_class, ft_smooth_lcdv_renderer_class): New
+       (ft_smooth_lcd_renderer_class, ft_smooth_lcdv_renderer_class): New
        classes.
 
        * src/truetype/ttobjs.c (TT_{Done,New}_GlyphZone): Renamed to...
 
        * src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of
        horiBearingX.
-       * src/bdf/bdfdrivr.c (BDF_GlyphLoad): Fix computation of
+       * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix computation of
        horiBearingY.
 
 2002-08-16  George Williams  <gww@silcom.com>
 
        * include/freetype/cache/ftccache.h, src/cache/ftccache.i,
        src/cache/ftccache.c [!FTC_CACHE_USE_LINEAR_HASHING]: Removed.
-       (FTC_CACHE_USE_LINEAR_HASHING: Removed also.
+       (FTC_CACHE_USE_LINEAR_HASHING): Removed also.
 
        FT_CONFIG_OPTION_USE_CMAPS is now the default.
 
 
        * src/cid/cidriver.c (Cid_Get_Char_Index, Cid_Get_Next_Char):
        Removed.
-       (t1_cid_driver_class): Updated.
+       (t1cid_driver_class): Updated.
        * src/truetype/ttdriver.c (tt_driver_class): Updated.
        * src/type1/t1driver.c (Get_Char_Index, Get_Next_Char): Removed
        (t1_driver_class): Updated.
          CFF_Done_SubFont -> cff_subfont_done
          CFF_Load_Font -> cff_font_load
          CFF_Done_Font -> cff_font_done
-         CFF_Size_Get_Global_Funcs -> cff_size_get_global_funcs
+         CFF_Size_Get_Globals_Funcs -> cff_size_get_globals_funcs
          CFF_Size_Done -> cff_size_done
          CFF_Size_Init -> cff_size_init
          CFF_Size_Reset -> cff_size_reset
        src/pfr/*: New files.
 
        * include/freetype/config/ftmodule.h,
-       include/freetype/internal/fttrace.h, src/Jamefile: Updated.
+       include/freetype/internal/fttrace.h, src/Jamfile: Updated.
 
        * src/type1/t1gload.h (T1_Load_Glyph), src/type1/t1gload.c
        (T1_Load_Glyph): Fixed incorrect parameter sign-ness in callback
          FT_Glyph_Name_Requester => FT_Face_GetGlyphNameFunc
          FT_Name_Index_Requester => FT_Face_GetGlyphNameIndexFunc
 
-       * src/base/ftapi.c: New file.  It contains backwards compatibility
+       * src/base/ftapi.c: New file.  It contains backward compatibility
        functions.
 
        * include/freetype/internal/psaux.h, src/cid/cidload.c,
        FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
        * src/base/ftcalc.c (FT_MulFix): Ditto.
        * src/cff/cffdrivr.c (cff_get_name_index): Ditto.
-       * src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
+       * src/cff/cffobjs.c (CFF_Size_Get_Globals_Funcs, CFF_Size_Init,
        CFF_GlyphSlot_Init): Ditto.
        * src/cid/cidobjs.c (CID_GlyphSlot_Init,
        CID_Size_Get_Globals_Funcs): Ditto.
          {
          } PS_StructRec, *PS_Struct;
 
-         typedef PS_StructRec  T1_Struct;  /* backwards-compatibility */
+         typedef PS_StructRec  T1_Struct;  /* backward compatibility */
 
        Hence, we increase the coherency of the source code by effectively
        using the `Rec' prefix for structure types.
        * src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto.
        * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto.
        (pcf_get_bitmaps): The same for `sizebitmaps'.
-       * src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for
+       * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): The same for
        `orig_y'.
        (t1operator_seac): Comment out more dead code.
        * src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER'
 
 ----------------------------------------------------------------------------
 
-Copyright 2002-2016 by
+Copyright 2002-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
index ce08dc9..e3aec74 100644 (file)
 
        * src/base/ftdbgmem.c (_ft_debug_file, _ft_debug_lineno)
        [FT_DEBUG_MEMORY]: New global variables, replacing...
-       (FT_MemTable_Rec) [FT_DEBUG_MEMORY]: Remove `filename' and
+       (FT_MemTableRec) [FT_DEBUG_MEMORY]: Remove `filename' and
        `line_no'.  Update all callers.
        (ft_mem_debug_alloc) [FT_DEBUG_MEMORY]: Avoid possible integer
        overflow.
        FTC_MruList_Init, FTC_MruList_Reset, FTC_MruList_Done,
        FTC_MruList_New, FTC_MruList_Remove, FTC_MruList_RemoveSelection):
        Declare as FT_LOCAL_DEF.
-       (FTC_MruListFind, FTC_MruList_Lookup) [!FTC_INLINE]: Compile
+       (FTC_MruList_Find, FTC_MruList_Lookup) [!FTC_INLINE]: Compile
        conditionally.
        Declare as FT_LOCAL_DEF.
 
 
        * docs/release: Minor additions and clarifications.
 
-       * docs/CHANGES: Updated to reflect many fixes for backwards
+       * docs/CHANGES: Updated to reflect many fixes for backward
        compatibility.  Still incomplete.
 
 2006-02-26  David Turner  <david@freetype.org>
        * include/freetype/ftcache.h (FTC_IMAGE_TYPE_COMPARE,
        FTC_IMAGE_TYPE_HASH), src/cache/ftcbasic.c (FTC_OldFontRec,
        FTC_OldImageDescRec, FTC_ImageCache_Lookup, FTC_Image_Cache_New,
-       FTC_OldImage_Desc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx,
+       FTC_OldImageDesc, FTC_OLD_IMAGE_FORMAT, ftc_old_image_xxx,
        ftc_image_type_from_old_desc, FTC_Image_Cache_Lookup,
        FTC_SBitCache_Lookup, FTC_SBit_Cache_New, FTC_SBit_Cache_Lookup)
        [FT_CONFIG_OPTION_OLD_INTERNALS]: Try to revive old functions of the
 
        * src/gxvalid/gxvbsln.c (GXV_BSLN_VALUE_EMPTY): Add `U'.
 
-       * src/gxvalid/gxmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE),
-       src/gxvalid/gxmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix
+       * src/gxvalid/gxvmort1.c (GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE),
+       src/gxvalid/gxvmort2.c (GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE): Fix
        typo.
 
        * src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c,
 2005-06-15  Kirill Smelkov  <kirr@mns.spb.ru>
 
        The next release will be 2.2.0, so don't worry about source code
-       backwards compatibility.
+       backward compatibility.
 
        * include/freetype/ftimage.h (FT_Outline_MoveToFunc,
        FT_Outline_LineToFunc, FT_Outline_ConicToFunc,
 
 ----------------------------------------------------------------------------
 
-Copyright 2005-2016 by
+Copyright 2005-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
index b8a914b..834f34d 100644 (file)
        (ft_black_render): Initialize `worker->gray_lines' (problem found by
        valgrind).
 
-       (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just
+       (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Don't #undef, just
        comment out.
 
 2009-09-12  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
        * src/raster/rules.mk: Don't handle ftmisc.h.  It is needed for
        stand-alone mode only.
 
-       * src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func,
+       * src/raster/ftmisc.h (FT_MemoryRec, FT_Alloc_Func, FT_Free_Func,
        FT_Realloc_Func): Copy declarations from ftsystem.h.
 
 2009-09-02  Bram Tassyns  <bramt@enfocus.be>
        type1: Fix a data type mismatching with its source.
 
        * include/freetype/internal/t1types.h: The type of
-       T1_Face->buildchar is matched with T1_Decorder->top.
+       T1_Face->buildchar is matched with T1_Decoder->top.
 
 2009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 
        pfr: Fix a data type mismatching with its source.
 
-       * src/pfr/pfrtypes.h: The type of PFR_PhysFont->chars_offset
+       * src/pfr/pfrtypes.h: The type of PFR_PhyFont->chars_offset
        is extended from FT_UInt32 to FT_Offset, because it is
        calculated with the pointer difference in pfr_phy_font_load().
 
        psaux: Fix a data type mismatching with its source.
 
        * include/freetype/internal/psaux.h: The type of
-       T1_DecorderRec.buildchar is matched with
-       T1_DecorderRec.top.
+       T1_DecoderRec.buildchar is matched with
+       T1_DecoderRec.top.
 
 2009-07-31  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
        code unconditionally.
        Add support for random numbers and update remaining code
        accordingly; this should work now.
-       (t1_operator_seac): Updated.
+       (t1operator_seac): Updated.
        * src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H.
        (ps_hints_t1stem3, t1_hints_stem): Updated.
 
        Position Independent Code (PIC) support in smooth renderer.
 
        * src/smooth/ftsmooth.h declare ft_smooth_renderer_class,
-       ft_smooth_lcd_renderer_class and ft_smooth_lcd_v_renderer_class
+       ft_smooth_lcd_renderer_class and ft_smooth_lcdv_renderer_class
        using macros from ftrender.h,
        when FT_CONFIG_OPTION_PIC is defined create and destroy
        functions will be declared.
        * src/smooth/ftsmooth.c when FT_CONFIG_OPTION_PIC is defined
        the following structs:
        ft_smooth_renderer_class, ft_smooth_lcd_renderer_class
-       and ft_smooth_lcd_v_renderer_class
+       and ft_smooth_lcdv_renderer_class
        will have functions to init or create and destroy them
        instead of being allocated in the global scope.
        And macros will be used from ftspic.h in order to access
 2008-09-05  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
        * builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or
-       ApplicationService framework is missing.  Although this value is not
+       ApplicationServices framework is missing.  Although this value is not
        used in building of FreeType2, it is written in `freetype2.pc' and
        `freetype-config'.
 
 2008-04-14  Werner Lemberg  <wl@gnu.org>
 
        * src/pcf/pcfdrivr.c (PCF_Face_Init): Protect call to
-       `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZ'.  From Savannah
+       `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZW'.  From Savannah
        bug #22909.
 
 2008-04-13  Werner Lemberg  <wl@gnu.org>
        functions related to cmap type 14 support to the
        `FT_Object_ActionName' scheme:
 
-         FT_Get_Char_Variant_index     -> FT_Face_GetCharVariantIndex
+         FT_Get_Char_Variant_Index     -> FT_Face_GetCharVariantIndex
          FT_Get_Char_Variant_IsDefault -> FT_Face_GetCharVariantIsDefault
          FT_Get_Variant_Selectors      -> FT_Face_GetVariantSelectors
          FT_Get_Variants_Of_Char       -> FT_Face_GetVariantsOfChar
        * include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro.
        (FT_VALIDATE_OT): Updated.
 
-       * src/otvalid/otmath.c: New file.
+       * src/otvalid/otvmath.c: New file.
 
        * src/otvalid/otvalid.c: Include otvmath.c.
        * src/otvalid/otvmod.c (otv_validate): Handle `MATH' table.
        * src/truetype/ttinterp.c (Ins_IUP): Add missing variable
        initialization.
 
-       * src/autofit/aflatin.c (af_latin_metric_init_blues): Get rid of an
+       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Get rid of an
        infinite loop in the case of degenerate fonts.
 
 2007-06-26  Rahul Bhalerao  <b.rahul.pm@gmail.com>
        * include/freetype/config/ftstdlib.h,
        include/freetype/internal/ftobjs.h: As suggested by Graham Asher,
        ensure that ft_isalnum, ft_isdigit, etc., use hard-coded values
-       instead on relying on the locale-dependent functions provided by
+       instead of relying on the locale-dependent functions provided by
        <ctypes.h>.
 
 2007-05-15  Graham Asher  <graham.asher@btinternet.com>
        (_ft_lcd_filter_fir): This.
        Update parameters.
        (_ft_lcd_filter_legacy) [USE_LEGACY]: New filter function.
-       (FT_Library_Set_LcdFilter): Update parameters.
+       (FT_Library_SetLcdFilter): Update parameters.
        Handle new filter modes.
 
        * include/internal/ftobjs.h: Include FT_LCD_FILTER_H.
        to recognize a few fonts that require the automatic unpatented
        loader.
 
-       * src/smooth/ftgrays.c: Optmize the performance of the anti-aliased
+       * src/smooth/ftgrays.c: Optimize the performance of the anti-aliased
        rasterizer.  The speed improvement is between 15% and 25%, depending
        on the font data.
 
 2006-05-18  Werner Lemberg  <wl@gnu.org>
 
        * src/truetype/ttgload.c (TT_Load_Composite_Glyph)
-       [FT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.
+       [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again.
 
 2006-05-17  David Turner  <david@freetype.org>
 
 
 ----------------------------------------------------------------------------
 
-Copyright 2006-2016 by
+Copyright 2006-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
index cbbfd8c..796763c 100644 (file)
 
        * include/freetype/ftmoderr.h: Fix commit from 2013-03-11.
 
-       The previous version was not backwards compatible.  Reported by
+       The previous version was not backward compatible.  Reported by
        Behdad.
 
 2013-03-14  Werner Lemberg  <wl@gnu.org>
        and `const' where appropriate.
 
        (X_SCALING_Rules, X_SCALING_RULES_SIZE): Renamed to...
-       (spu_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
+       (sph_X_SCALING_Rules, SPH_X_SCALING_RULES_SIZE): This.
        Update all users.
 
 2013-01-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
        * include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it.
 
        * src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a
-       simplified embolding algorithm.
+       simplified emboldening algorithm.
        (FT_Outline_Embolden): Make it a special case of
        `FT_Outline_EmboldenXY'
 
 
        [type42] Remove casts.
 
-       * src/type42/t42driver.c (t42_driver_class): Remove all casts and
+       * src/type42/t42drivr.c (t42_driver_class): Remove all casts and
        update affected functions.
 
-       * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42driver
+       * src/type42/t42objs.c, src/type42/t42objs.h: Updated for t42 driver
        changes.
 
 2011-11-30  Werner Lemberg  <wl@gnu.org>
        [gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c.
 
        * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate):
-       Check different entries pointing same traking value.
+       Check different entries pointing same tracking value.
        (gxv_trak_validate): Remove unused variable `table_size'.
 
 2011-06-14  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
        (gxv_morx_chain_validate): Conditionalize unvalidated
        variable `defaultFlags'.
 
-       * src/gxvalid/gxmorx0.c
+       * src/gxvalid/gxvmorx0.c
        (gxv_morx_subtable_type0_entry_validate):
        Conditionalize unvalidated variables; `markFirst',
        `dontAdvance', `markLast', `verb'.
 
-       * src/gxvalid/gxmorx1.c
+       * src/gxvalid/gxvmorx1.c
        (gxv_morx_subtable_type1_entry_validate): Conditionalize
        unvalidated variables; `setMark', `dontAdvance'.
 
        (gxv_mort_chain_validate): Conditionalize unvalidated
        variable `defaultFlags'.
 
-       * src/gxvalid/gxmort0.c
+       * src/gxvalid/gxvmort0.c
        (gxv_mort_subtable_type0_entry_validate): Check the
        conflict of the marks for the glyphs.
 
-       * src/gxvalid/gxmort1.c
+       * src/gxvalid/gxvmort1.c
        (gxv_mort_subtable_type1_offset_to_subst_validate):
        Local variables `min_gid', `max_gid' are replaced by
        variables in the validator.
        af_latin_hints_compute_blue_edges.
        (af_cjk_metrics_init_blues): New function, CJK version of
        af_latin_metrics_init_blues.
-       (af_cjk_hints_edges): Add code to align the edge stems to blue zones.
+       (af_cjk_hint_edges): Add code to align the edge stems to blue zones.
 
        * src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
        instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
        Use defined macros to set {platform,encoding}_id.
 
        * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
-       set charmap.{platfom,encoding}_id.
+       set charmap.{platform,encoding}_id.
        * src/pcf/pcfdrivr.c: Ditto.
        * src/winfonts/winfnt.c: Ditto.
        * src/type1/t1objs.c: Ditto.
        * src/cff/cffobjs.c (cff_face_init): Check error value by
        `FT_CMap_New'.
        * src/pfr/pfrobjs.c (pfr_face_init): Ditto.
-       * src/type1/t1jobjs.c (T1_Face_Init): Ditto.
-       * src/type42/t42jobjs.c (T42_Face_Init): Ditto.
+       * src/type1/t1objs.c (T1_Face_Init): Ditto.
+       * src/type42/t42objs.c (T42_Face_Init): Ditto.
 
 2010-07-03  Werner Lemberg  <wl@gnu.org>
 
 
 ----------------------------------------------------------------------------
 
-Copyright 2010-2016 by
+Copyright 2010-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
index e85be5d..d7fed71 100644 (file)
 
        All public FreeType enumeration and flag values are uppercase...
 
-       * include/tttables.h (FT_Sfnt_Tag): Implement it.  For backwards
+       * include/tttables.h (FT_Sfnt_Tag): Implement it.  For backward
        compatibility, retain the old values as macros.
 
        * src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
 
 2014-10-14  Werner Lemberg  <wl@gnu.org>
 
-       [autofit] Adjust Devenagari character range.
+       [autofit] Adjust Devanagari character range.
 
        * src/autofit/afranges.c (af_deva_uniranges): Omit characters that
        are common to all other Indic scripts.
        * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast.
        * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto.
 
-       * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast.
+       * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use cast.
        * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto.
        * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto.
 
 
 ----------------------------------------------------------------------------
 
-Copyright 2013-2016 by
+Copyright 2013-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
diff --git a/ChangeLog.26 b/ChangeLog.26
new file mode 100644 (file)
index 0000000..c174b6d
--- /dev/null
@@ -0,0 +1,5711 @@
+2016-07-12  Werner Lemberg  <wl@gnu.org>
+
+       * Version 2.6.5 released.
+       =========================
+
+
+       Tag sources with `VER-2-6-5'.
+
+       This commit immediately follows `[mac] Fix ftexport.sym target in
+       Jamfile.' on a separate branch, which was then merged with master
+       after the release.
+
+       * include/freetype/config/ftoption.h
+       (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Comment out.
+
+       * docs/VERSION.TXT: Add entry for version 2.6.5.
+
+       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2005/index.html,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2008/index.html,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/index.html,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualc/index.html,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj,
+       builds/windows/visualce/index.html,
+       builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2005-ce/index.html,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/index.html: s/2.6.4/2.6.5/, s/264/265/.
+
+       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
+
+       * builds/unix/configure.raw (version_info): Set to 18:5:12.
+       * CMakeLists.txt (VERSION_PATCH): Set to 5.
+
+       * docs/CHANGES: Updated.
+
+2016-07-11  Werner Lemberg  <wl@gnu.org>
+
+       Conditionally compile environment support.
+
+       * include/freetype/internal/ftobjs.h, src/autofit/afmodule.c,
+       src/base/ftobjs.c, src/cff/cffdrivr.c, src/truetype/ttdriver.c:
+       Decorate with `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' where
+       necessary.
+
+2016-07-11  Werner Lemberg  <wl@gnu.org>
+
+       Handle properties in `FREETYPE_PROPERTIES' environment variable.
+
+       This commit covers the most important one.
+
+       * src/autofit/afmodule.c (af_property_set): Handle `warping',
+       `darkening-parameters', and `no-stem-darkening'.
+
+       * src/cff/cffdrivr.c (cff_property_set): Handle
+       `darkening-parameters', `hinting-engine', and `no-stem-darkening'.
+
+       * src/truetype/ttdriver.c (tt_property_set): Handle
+       `interpreter-version'.
+
+2016-07-11  Werner Lemberg  <wl@gnu.org>
+
+       Replace calls to `atol' with `strtol'.
+
+       We later on need strtol's `endptr' feature.
+
+       * include/freetype/config/ftstdlib.h (ft_atol): Replace with...
+       (ft_strtol): ... this.
+
+       * src/base/ftdbgmem.c (ft_mem_debug_init): Updated.
+       * src/cid/cidparse.c (cid_parser_new): Ditto.
+       * src/type42/t42drivr.c (t42_get_name_index), src/type42/t42objs.c
+       (T42_GlyphSlot_Load): Ditto.
+
+2016-07-10  Werner Lemberg  <wl@gnu.org>
+
+       Implement handling of `FREETYPE_PROPERTIES' environment variable.
+
+       Recognizing properties follows in another commit.
+
+       * devel/ftoption.h, include/freetype/config/ftoption.h
+       (FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES): New macro.
+
+       * include/freetype/config/ftstdlib.h (ft_getenv): New macro.
+
+       * src/base/ftinit.c (ft_set_default_properties): New function to
+       parse `FREETYPE_PROPERTIES' and calling `ft_property_string_set'.
+       (FT_Init_FreeType): Updated.
+
+2016-07-09  Werner Lemberg  <wl@gnu.org>
+
+       Add function `ft_property_string_set'.
+
+       This is a preparation for handling an `FREETYPE_PROPERTIES'
+       environment variable to control (some) driver properties.
+
+       No change in functionality.
+
+       * src/base/ftobjs.c (ft_property_do): Add `value_is_string'
+       parameter.
+       (ft_property_string_set): New function.
+       (FT_Property_Set, FT_Property_Get): Updated.
+
+       * include/freetype/internal/ftobjs.h: Updated.
+
+       * include/freetype/internal/services/svprop.h
+       (FT_Properties_SetFunc): Add `value_is_string' parameter.
+
+       * src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c
+       (cff_property_set), src/truetype/ttdriver.c (tt_property_set):
+       Updated, emitting an error currently if `value_is_string' is set.
+
+2016-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+       [mac] Fix ftexport.sym target in Jamfile.
+
+       * Jamfile: Update the directories of the header files scanned for
+       ftexport.sym.  They were incorrect since the migration of the
+       header files, on 2015-06-22.  Either inexisting include/cache
+       (removed on 2006-03-20) is not needed to be listed explicitly.
+       Now ftmac.h is scanned only in the case of Mac OS & Mac OS X.
+
+2016-07-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Sub-banding protocol revision.
+
+       Rasterization sub-banding is utilized at large sizes while using a
+       rather small fixed memory pool.  Indeed it is possible to make an
+       educated guess how much memory is necessary at a given size for a
+       given glyph.  It turns out that, for a large majority of European
+       glyphs, you should store about 8 times more boundary pixels than
+       their height.  Or, vice versa, if your memory pool can hold 800
+       pixels the band height should be 100 and you should sub-band
+       anything larger than that.  Should you still run out of memory,
+       FreeType bisects the band but you have wasted some time.  This is
+       what has been implemented in FreeType since the beginning.
+
+       It was overlooked, however, that the top band could grow to twice
+       the default band size leading to unnecessary memory overflows there.
+       This commit fixes that.  Now the bands are distributed more evenly
+       and cannot exceed the default size.
+
+       Now the magic number 8 is really suitable for rather simple European
+       scripts.  For complex Chinese logograms the magic number should be
+       13 but that is subject for another day.
+
+       * src/smooth/ftgrays.c (gray_convert_glyph): Revise sub-banding
+       protocol.
+
+2016-07-07  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+       [mac] Fix Savannah bug #48417.
+
+       Mac OS X linker throws errors when `-exported_symbol_list' input
+       file includes non-existing symbols.  Reported by Ryan Schmidt.
+
+       * builds/exports.mk: Exclude ftmac.h from the headers for apinames
+       by default.  Include it when ftmac.c would be compiled.
+
+2016-07-06  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttinterp.c (TInstruction_Function): Removed, unused.
+
+2016-07-05  Werner Lemberg  <wl@gnu.org>
+
+       * Version 2.6.4 released.
+       =========================
+
+
+       Tag sources with `VER-2-6-4'.
+
+       * docs/VERSION.TXT: Update documentation and bump version number to
+       2.6.4.
+
+       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2005/index.html,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2008/index.html,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/index.html,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualc/index.html,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj,
+       builds/windows/visualce/index.html,
+       builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2005-ce/index.html,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/index.html: s/2.6.3/2.6.4/, s/263/264/.
+
+       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
+
+       * builds/unix/configure.raw (version_info): Set to 18:4:12.
+       * CMakeLists.txt (VERSION_PATCH): Set to 4.
+
+       * docs/CHANGES: Updated.
+
+2016-07-05  Werner Lemberg  <wl@gnu.org>
+
+       * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Fix compiler warning.
+
+2016-07-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Variable type revision (part 2).
+
+       * src/smooth/ftgrays.c (TArea): Restore original definition as `int'.
+       (gray_render_line) [FT_LONG64]: Updated.
+       (gray_convert_glyph): 32-bit band bisection stack should be 32 bands.
+       (gray_convert_glyph_inner): Trace successes and failures.
+
+2016-07-04  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Handle single-point contours as segments.
+
+       Doing so allows us to link them to edges – some fonts like
+       `NotoSansGurmukhi-Regular' have such isolated points sitting exactly
+       on other outlines.
+
+       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Don't
+       ignore one-point contours but handle them specially as one-point
+       segments.
+       (af_latin_hints_compute_edges): Append one-point segments to edges
+       if possible.
+
+2016-07-02  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Remove unused structure members.
+
+       * src/autofit/afhints.h (AF_SegmentRec, AF_EdgeRec): Remove
+       `num_linked'.
+
+       * src/autofit/afcjk.c (af_cjk_hints_link_segments): Updated.
+
+2016-07-02  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Update to Unicode 9.0.0.
+
+       * src/autofit/afranges.c (af_arab_nonbase_uniranges,
+       af_cyrl_uniranges): Add new data.
+
+2016-07-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Variable type revision (part 1).
+
+       This patch restores original `TCoord' definition as `int' so that the
+       rendering pool is used more efficiently on LP64 platforms (unix).
+
+       * src/smooth/ftgrays.c (gray_TWorker, TCell, gray_TBand): Switch some
+       fields to `TCoord'.
+       (gray_find_cell, gray_render_scanline, gray_render_line, gray_hline,
+       gray_sweep, gray_convert_glyph): Updated.
+
+2016-06-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Minor clean-ups.
+
+       * src/smooth/ftgrays.c (gray_TWorker): Remove redundant `ycount'.
+       (gray_sweep, gray_convert_glyph, gray_dump_cells): Updated.
+
+2016-06-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Minor clean-ups.
+
+       * src/smooth/ftgrays.c (gray_convert_glyph): Do not use volatile
+       qualifier.
+       (gray_raster_render): Move span initializations from here.
+       (gray_sweep): ... to here and remove unused `target' argument.
+
+2016-06-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [pcf] Fix handling of very large fonts (#47708).
+
+       * src/pcf/pcfread.c (pcf_get_encodings): Make `encodingOffset' an
+       unsigned short.
+       Only reject `0xFFFF' as an invalid encoding offset.
+
+2016-06-25  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Really fix deallocation in case of error (#47726).
+
+       * src/truetype/ttgload.c (load_truetype_glyph): Thinko; initialize
+       `outline.points' also.
+
+2016-06-23  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Consolidate memory management.
+
+       * src/smooth/ftgrays.c (gray_init_cells): Remove function.
+       (gray_TWorker): Remove fields that become local variables.
+       (gray_raster_render): Move rendering buffer declaration from here.
+       (gray_convert_glyph): ... to here and update accordingly.
+
+2016-06-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Consolidate boundary checks.
+
+       Removing the checks from `gray_hline' shaves 1% off rendering speed.
+
+       * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_MIN' and `FT_MAX'.
+       (gray_TWorker): No need to store `clip_box'.
+       (gray_hline): Remove unnecessary boundary checks.
+       (gray_convert_glyph): Move boundary checks from here.
+       (gray_raster_render): ... to here and consolidate.
+
+2016-06-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Use `FT_Outline_Get_CBox'.
+
+       * src/smooth/ftgrays.c [STANDALONE_]: Duplicate `FT_Outline_Get_CBox'.
+       (gray_compute_cbox): Remove this function.
+       (gray_convert_glyph): Update to use `FT_Outline_Get_CBox'.
+
+2016-06-20  Werner Lemberg  <wl@gnu.org>
+
+       [smooth] Remove compiler warnings.
+
+       * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
+
+2016-06-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Sanitize memory management.
+
+       * src/smooth/ftgrays.c (gray_convert_glyph): Cleaned up.
+
+2016-06-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Remove `band_shoot' that never worked.
+
+       * src/smooth/ftgrays.c (gray_TWorker): Remove `band_shoot'.
+       (gray_convert_glyph): Updated.
+
+2016-06-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [raster, smooth] Handle FT_RENDER_POOL_SIZE better.
+
+       * src/raster/ftraster.c (FT_MAX_BLACK_POOL): New macro.
+       (ft_black_render): Updated.
+       * src/smooth/ftgrays.c (FT_MAX_GRAY_POOL): New macro.
+       (gray_raster_render): Updated.
+
+2016-06-16  Werner Lemberg  <wl@gnu.org>
+
+       * src/base/md5.c: Updated to recent version.
+
+2016-06-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/smooth/ftgrays.c (gray_hline): Optimize if-condition.
+
+2016-06-13  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Cherokee script.
+
+       * src/autofit/afblue.dat: Add blue zone data for Cherokee.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Cherokee standard characters.
+
+       * src/autofit/afranges.c: Add Cherokee data.
+
+       * src/autofit/afstyles.h: Add Cherokee data.
+
+2016-06-09  David Capello  <davidcapello@gmail.com>
+
+       [cmake] Avoid modifying `ftconfig.h' and `ftoption.h' files.
+
+       * CMakeLists.txt: Each time cmake is run those files are
+       modified and the whole FreeType library is recompiled.  With this
+       change we change the files only if there are real modifications, so
+       we can avoid recompilations.
+
+2016-06-09  Werner Lemberg  <wl@gnu.org>
+
+       [bdf] Check number of properties (#48166).
+
+       * src/bdf/bdflib.c (_bdf_parse_start): Implement.
+
+2016-06-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Re-enable new line renderer on 64-bit archs.
+
+       * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new
+       implementation, where it is safe from overflows.
+
+2016-06-08  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Minor clean-ups.
+
+       * src/smooth/ftgrays.c (gray_dump_cells): Move out of the way.
+       (gray_render_span): Remove spurious casts and streamline.
+
+2016-06-07  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Ethiopic script.
+
+       * src/autofit/afblue.dat: Add blue zone data for Ethiopic.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Ethiopic standard characters.
+
+       * src/autofit/afranges.c: Add Ethiopic data.
+
+       * src/autofit/afstyles.h: Add Ethiopic data.
+
+2016-06-07  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Fix compilation with VS2016 (#48126).
+
+       This compiler doesn't recognize the end-of-comment sequence `*/' if
+       it immediately follows non-ASCII characters.
+
+       * src/autofit/afscript.h: Ensure whitespace before `*/'.
+
+2016-06-04  Werner Lemberg  <wl@gnu.org>
+
+       Fix a test for named instances (#48122).
+
+       This was missed while giving negative face indices an extended
+       meaning.
+
+       * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Implement.
+
+2016-05-31  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       [truetype] Let SHPIX move points in the twilight zone in v40.
+
+       * src/truetype/ttinterp.c (Ins_SHPIX): Allow SHPIX to move points in
+       the twilight zone.  Otherwise, treat SHPIX the same as DELTAP.
+       Unbreaks various fonts such as older versions of Rokkitt and DTL
+       Argo T Light that would glitch severely after calling ALIGNRP after a
+       blocked SHPIX.
+
+2016-05-30  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Support `CharStrings' entry format as created by LilyPond.
+
+       * src/type42/t42parse.c (t42_parse_charstrings): Handle entries
+       having the format
+
+         (foo) cvn 12345 def
+
+2016-05-28  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afranges.c: Remove `UL' postfix from hex numbers.
+
+       Suggested by Alexei.  `UL' is only needed for 16bit compilers, but
+       it seems noone is using this anymore (and we no longer test whether
+       FreeType compiles in such an environment).  Otherwise, it is easy to
+       add the postfix to the `AF_UNICODE_RANGE' macro.
+
+2016-05-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Shrink bisection stack.
+
+       The convergence of Bézier flatteners is fast with the deviation
+       from straight line being asymptotically cut 4-fold on each bisection.
+       This justifies smaller bisection stack size.
+
+       * src/smooth/ftgrays.c (gray_TWorker): Remove common `bez_stack'.
+       (gray_render_conic): Create and use conic `bez_stack'. Move back the
+       band analysis from...
+       (gray_conic_to): ... here.
+       (gray_render_cubic): Create and use cubic `bez_stack'. Move back the
+       band analysis from...
+       (gray_cubic_to): ... here.
+       (gray_move_to): Updated.
+
+2016-05-25  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Fixes for Armenian and Gujarati ranges.
+
+       * src/autofit/afranges.c (af_armn_uniranges): Corrected.
+       (af_guru_nonbase_uniranges): Make U+0A3E a base character.
+
+2016-05-24  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Armenian script.
+
+       * src/autofit/afblue.dat: Add blue zone data for Armenian.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Armenian standard characters.
+
+       * src/autofit/afranges.c: Add Armenian data.
+
+       * src/autofit/afstyles.h: Add Armenian data.
+
+2016-05-23  Werner Lemberg  <wl@gnu.org>
+
+       * builds/unix/unix-cc.in (LINK_LIBRARY): Use `-export-symbols'.
+
+       This was commented about 10 years ago – I think the reason then to
+       disable libtool's `-export-symbols' option was to give some badly
+       programmed applications access to internal FreeType functions.
+
+       I believe that we should no longer take care of such programs; the
+       number of symbols exported should be rather restricted as much as
+       possible.
+
+2016-05-22  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add blue-zone support for Gurmukhi script.
+
+       This essentially moves the Gurmukhi script from the `Indic' hinter to
+       the `Latin' hinter.
+
+       * src/autofit/afblue.dat: Add blue zone data for Gurmukhi.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Gurmukhi standard characters and move
+       data out of AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afranges.c: Move Gurmukhi data out of
+       AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afstyles.h: Update Gurmukhi data; in particular, use
+       AF_WRITING_SYSTEM_LATIN.
+
+2016-05-21  Werner Lemberg  <wl@gnu.org>
+
+       Minor clang++ fixes.
+
+       * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c
+       (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add
+       initializer.
+
+       * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit
+       conversion from NULL to boolean.
+
+2016-05-21  Werner Lemberg  <wl@gnu.org>
+
+       Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955).
+
+       * include/freetype/internal/ftmemory.h (cplusplus_typeof): Use
+       braces for `extern "C++"'.
+
+2016-05-17  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       [truetype] Make TT_LOADER_SET_PP support subpixel hinting [3/3].
+
+       * src/truetype/ttgload.c (TT_LOADER_SET_PP): Replace macro with...
+       (tt_loader_set_pp): ... this new function.
+       Update all callers.
+
+2016-05-17  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       [truetype] New implementation of v38 bytecode interpreter [2/3].
+
+       This patch actually modifies the bytecode interpreter.
+
+       See added comments in `ttinterp.h' for more information on this and
+       the following commit in the series.
+
+       * src/truetype/ttinterp.c (SUBPIXEL_HINTING): Replaced by...
+       (NO_SUBPIXEL_HINTING, SUBPIXEL_HINTING_INFINALITY,
+       SUBPIXEL_HINTING_MINIMAL): ...new macros.
+       (Direct_Move, Direct_Move_X, Direct_Move_Y): Handle backward
+       compatibility.
+       Updated.
+       (Ins_RS, Ins_FDEF, Ins_ENDF, Ins_CALL, Ins_LOOPCALL, Ins_MD):
+       Updated.
+       (Ins_INSTCTRL): Handle native ClearType mode flag.
+       Updated.
+       (Ins_FLIPPT, Ins_FLIPRGON, Ins_FLIPRGOFF): Handle backward
+       compatibility.
+       (Move_Zp2_Point): Ditto.
+       (Ins_SHP): Updated.
+       (Ins_SHPIX): Handle backward compatibility.
+       Updated.
+       (Ins_MSIRP, Ins_MDAP, Ins_MIAP, Ins_MDRP, Ins_MIRP): Updated.
+       (Ins_ALIGNRP): Updated.
+       (Ins_IUP, Ins_DELTAP): Handle backward compatibility.
+       Updated.
+       (Ins_GETINFO): Handle v38 flags.
+       Updated.
+       (TT_RunIns): Handle backward compatibility mode.
+       Updated.
+
+2016-05-17  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       [truetype] New implementation of v38 bytecode interpreter [1/3].
+
+       This patch prepares data structures and the like.
+
+       See added comments in `ttinterp.h' for more information on this and
+       the following commits in the series.
+
+       * devel/ftoption.h, include/freetype/config/ftoption.h
+       (TT_CONFIG_OPTION_SUBPIXEL_HINTING): Assign values to differentiate
+       between subpixel versions.
+       (TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY,
+       TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL): New macros.
+
+       * include/freetype/ftttdrv.h (TT_INTERPRETER_VERSION_40): New macro.
+
+       * include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
+
+       * src/truetype/ttinterp.h (TT_ExecContextRec): Define new fields
+       `subpixel_hinting_lean', `vertical_lcd_lean',
+       `backward_compatibility', `iupx_called', iupy_called', and
+       `grayscale_cleartype' for new hinting mode.
+
+       * src/truetype/ttdriver.c (tt_property_set): Handle v38 and v40
+       interpreters conditionally.
+
+       * src/truetype/ttgload.c (TT_Hint_Glyph): Save phantom points unless
+       in v38 backward compatibility mode.
+       Updated.
+       (compute_glyph_metrics): Add v38 backward compatibility mode
+       constraint for adjusting advance widths.
+       Updated.
+       (tt_loader_init): Handle new flags `subpixel_hinting_lean',
+       `grayscale_cleartype', and `vertical_lcd_lean'.
+       Updated.
+       (tt_get_metrics, TT_Process_Simple_Glyph, TT_LOADER_SET_PP):
+       Updated.
+
+       * src/truetype/ttobjs.c (tt_driver_init): Conditionally set
+       default interpreter version number.
+
+       * src/truetype/ttsubpix.c, src/truetype/ttsubpix.h: Updated.
+
+2016-05-17  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Fix matrix scaling (#47848).
+
+       * include/freetype/config/ftstdlib.h (FT_LONG_MIN): New macro.
+
+       * src/cff/cffparse.c (cff_parse_font_matrix): Use largest scaling
+       value of all matrix coefficients to scale matrix.
+
+       * src/cff/cffobjs.c (cff_face_init): Use `matrix->yx' member for
+       matrix normalization if `matrix->yy' is zero.
+
+2016-05-16  Werner Lemberg  <wl@gnu.org>
+
+       [base] Reject invalid sfnt Mac resource (#47891).
+
+       * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Check validity
+       of `CID ' and `TYPE1' table offset and length.
+
+2016-05-16  Werner Lemberg  <wl@gnu.org>
+
+       [cid] Fix scanning for `StartData' and `/sfnts' (#47892).
+
+       * src/cid/cidparse.c (STARTDATA, STARTDATA_LEN, SFNTS, SFNTS_LEN):
+       New macros.
+       (cid_parser_new): Fix and document algorithm.
+
+2016-05-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+       [truetype] Improve the recursive reference detector.
+
+       The previous fix for #46372 misunderstood a composite glyph referring
+       same component twice as a recursive reference.  See the discussion
+
+         http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html
+
+       Thanks to Khaled Hosny for finding this issue.
+
+       * src/truetype/ttgload.c (ft_list_get_node_at): A function to get
+       the i-th node from FT_List.
+       (load_truetype_glyph): In the traversal scan of the reference tree
+       in the composite glyph, we clear the nodes filled by previous
+       sibling chain.
+
+2016-05-07  Werner Lemberg  <wl@gnu.org>
+
+       [cache] Allow value 0 for face ID.
+
+       We never dereference `face_id', and some implementations might use a
+       running number instead of a pointer.  Additionally, disallowing
+       value zero was undocumented.
+
+       * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c
+       (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for
+       `face_id'.
+
+2016-05-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] More efficient accounting of conic splits and draws.
+
+       A single decrement counter of segments to draw, instead of an array,
+       contains all the information necessary to decide when to split and
+       when to draw a conic segment. The number of splits before each draw is
+       equal to the number of trailing zeros in the counter.
+
+       * src/smooth/ftgrays.c (gray_TWorker): Remove `lev_stack'.
+       (gray_render_conic): Updated to use decrement counter of segments.
+
+2016-05-05  Werner Lemberg  <wl@gnu.org>
+
+       [cff, truetype] Fix logic for `FT_Property_Set'.
+
+       Otherwise some properties could be set to arbitrary values, which is
+       harmless, but querying could give wrong positive results.
+
+       * src/cff/cffdrivr.c (cff_property_set) [hinting-engine],
+       * src/truetype/ttdriver.c (tt_property_set) [interpreter-version]:
+       Only allow defined values.
+
+2016-04-25  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add blue-zone support for Gujarati script.
+
+       This essentially moves the Gujarati script from the `Indic' hinter to
+       the `Latin' hinter.
+
+       * src/autofit/afblue.dat: Add blue zone data for Gujarati.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Gujarati standard characters and move
+       data out of AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afranges.c: Move Gujarati data out of
+       AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afstyles.h: Update Gujarati data; in particular, use
+       AF_WRITING_SYSTEM_LATIN.
+
+2016-04-24  Werner Lemberg  <wl@gnu.org>
+
+       Minor.
+
+       * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Protect macro
+       argument with parentheses.
+
+2016-04-24  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix deallocation in case of error (#47726).
+
+       * src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in
+       `outline' that are going to be deallocated in case of error.
+
+2016-04-23  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Improve Georgian blue zone characters.
+
+       Suggested by Akaki Razmadze <razmadzekoko@gmail.com>.
+
+       * src/autofit/afblue.dat (AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM):
+       Updated.
+
+       * src/autofit/afblue.c: Regenerated.
+
+2016-04-16  David Capello  <davidcapello@gmail.com>
+
+       [cmake] Honor SKIP_INSTALL_* settings (as used in zlib).
+
+       As FreeType depends on zlib, if we don't install zlib (e.g., because
+       we defined SKIP_INSTALL_ALL), FreeType cannot be installed, too
+       (cmake triggers an error saying that FreeType cannot be installed
+       because zlib target isn't in the export set).
+
+       * CMakeLists.txt: Honor `SKIP_INSTALL_HEADERS',
+       `SKIP_INSTALL_LIBRARIES', and `SKIP_INSTALL_ALL' settings.
+
+2016-04-16  Behdad Esfahbod  <behdad@behdad.org>
+
+       [truetype] Another fix for non-intermediate GX tuples.
+
+       * src/truetype/ttgxvar.c (ft_var_apply_tuple): Add some missing
+       cases.
+
+2016-04-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       Remove forgotten macro.
+
+       * include/freetype/internal/internal.h
+       [FT_INTERNAL_POSTSCRIPT_GLOBALS_H]: Remove.
+
+2016-04-09  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Georgian scripts.
+
+       Georgian is problematic, since `uppercase' forms of Mkhedruli
+       (called Mtavruli) are not yet defined in Unicode, which means that
+       proper blue zones can't be defined.  However, there is already a
+       proposal submitted to Unicode; see
+
+         http://www.unicode.org/L2/L2016/16034-n4707-georgian.pdf
+
+       Additionally, due to historical reasons, Unicode treats Khutsuri as
+       the same script as Mkhedruli, and so does OpenType.  However, since
+       the two scripts have completely different shapes it can happen that
+       blue zones differ considerably.  The tag `geok' used here (derived
+       from ISO 15924) to differentiate the two scripts is not an OpenType
+       tag in use.  If we now have a font that contains both glyphs for
+       Mkhedruli and Khutsuri, and it uses OpenType features for both also,
+       HarfBuzz unavoidably treats all glyphs as `geor'.  As a consequence,
+       blue zones for `geok' are not used for glyphs involved in the
+       OpenType features.
+
+       An issue not yet resolved is which OpenType feature should be used
+       to access Mtavruli glyph shapes; right now, FreeType doesn't set up
+       support for them, but it is easy to add them later on as soon as
+       more information is available.
+
+       * src/autofit/afblue.dat: Add blue zone data for Georgian.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Georgian standard characters.
+
+       * src/autofit/afranges.c: Add Georgian data.
+
+       * src/autofit/afstyles.h: Add Georgian data.
+
+2016-04-05  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Provide dummy blue zone for pseudo script `none'.
+
+       Even if the dummy hinter is used as the handler for `none' (which
+       doesn't use blue zones), it is more consistent than the old value
+       (which was 0), pointing to Arabic...
+
+       * src/autofit/afblue.dat: Add `AF_BLUE_STRINGSET_NONE'.
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afstyles.h (none_dflt): Use AF_BLUE_STRINGSET_NONE.
+
+2016-03-30  Werner Lemberg  <wl@gnu.org>
+
+       * src/pfr/pfrload.c (pfr_aux_name_load): Thinko (#47567).
+
+2016-03-30  Werner Lemberg  <wl@gnu.org>
+
+       * src/pfr/pfrload.c (pfr_log_font_count): Better font size estimate.
+
+2016-03-30  Werner Lemberg  <wl@gnu.org>
+
+       * src/pfr/pfrload.c (pfr_aux_name_load): Fix memory leak (#47567).
+
+2016-03-29  Werner Lemberg  <wl@gnu.org>
+
+       * src/base/ftadvanc.c (FT_Get_Advances): Fix invalid left shift.
+
+2016-03-29  Werner Lemberg  <wl@gnu.org>
+
+       [pfr] Fix binary search (#47514).
+
+       * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border
+       conditions correctly.
+
+2016-03-29  Werner Lemberg  <wl@gnu.org>
+
+       [pfr] Minor.
+
+       * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Replace `left',
+       `right', and `middle' with `min', `max', and `mid' as used in other
+       FreeType binary search code.
+       (pfr_load_bitmap_metrics): Fix invalid left shift.
+
+2016-03-29  Werner Lemberg  <wl@gnu.org>
+
+       * src/pfr/pfrtypes.h: Replace all enums with macros.
+
+       We need `~FOO' to unset bits, and only with unsigned values (which
+       `enum' isn't normally) this works cleanly.
+
+2016-03-26  Werner Lemberg  <wl@gnu.org>
+
+       [pfr] Robustify bitmap strike handling (#47514).
+
+       We did a binary search for a charcode without ensuring that the
+       searched data is ordered.  Validating the order is now done lazily,
+       this is, the first access to a bitmap glyph triggers the order check
+       in the corresponding bitmap strike.
+
+       * src/pfr/pfrtypes.h (PFR_BitmapFlags): New values
+       `PFR_BITMAP_VALID_CHARCODES' and `PFR_BITMAP_CHARCODES_VALIDATED'.
+
+       * src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Make `flags' argument
+       a pointer.  Handle new PFR_BITMAP_XXX flags.
+       (pfr_slot_load_bitmap): Updated.
+
+2016-03-26  Werner Lemberg  <wl@gnu.org>
+
+       [pfr] Fix handling of compound glyphs.
+
+       Extra items are indicated with different bit positions.
+
+       * src/pfr/pfrtypes.h (PFR_GlyphFlags): Replace
+       `PFR_GLYPH_EXTRA_ITEMS' with `PFR_GLYPH_SIMPLE_EXTRA_ITEMS' and
+       `PFR_GLYPH_COMPOUND_EXTRA_ITEMS'.
+
+       * src/pfr/pfrgload.c (pfr_glyph_load_simple,
+       pfr_glyph_load_compound): Use them.
+
+2016-03-25  Werner Lemberg  <wl@gnu.org>
+
+       [pfr] Minor.
+
+       * src/pfr/pfrsbit.c, src/pfr/pfrobjs.c: Use flag names instead of
+       bare numbers.
+
+2016-03-25  Werner Lemberg  <wl@gnu.org>
+
+       [pfr] Various clang sanitizer fixes.
+
+       * src/pfr/pfrsbit.c (pfr_load_bitmap_metrics): Correctly handle
+       signed nibbles.
+       (pfr_slot_load_bitmap): Correctly exit frame in case of error.
+       Fix invalid left shifts.
+
+2016-03-23  Werner Lemberg  <wl@gnu.org>
+
+       Rename `VERSION.DLL' (#47472).
+
+       * docs/VERSION.DLL: Renamed to...
+       * docs/VERSIONS.TXT: ...this.
+
+2016-03-23  Werner Lemberg  <wl@gnu.org>
+
+       [raster, smooth] Directly test outline size (#47500).
+
+       This improves stand-alone compilation.
+
+       * src/base/ftoutln.c (FT_Outline_Render): Move cbox size test to...
+
+       * src/raster/ftraster.c (ft_black_render), src/smooth/ftgrays.c
+       (gray_raster_render): ...these functions.
+
+2016-03-23  Werner Lemberg  <wl@gnu.org>
+
+       [raster, smooth] Fix some clang sanitizer runtime issues.
+
+       * src/raster/ftraster.c (ft_black_reset, ft_black_set_mode,
+       ft_black_render): Harmonize signatures with `ftimage.h'.
+
+       * src/smooth/ftgrays.c (gray_raster_render, gray_raster_reset):
+       Ditto.
+
+2016-03-22  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Minor.
+
+       This fixes an AddressSanitizer issue:
+
+         ttgload.c:430:7: runtime error: null pointer passed as argument 1,
+                          which is declared to never be null
+
+2016-03-21  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afhints.c (af_glyph_hints_reload): Thinko.
+
+       This fixes the previous commit to this file.
+
+2016-03-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Partly revert recent changes.
+
+       * src/smooth/ftgrays.c (gray_conic_to, gray_cubic_to): Rework
+       conditions to fix rendering issues.
+
+2016-03-20  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Show `near' points in tracing.
+
+       * src/autofit/afhints.h (AF_FLAG_NEAR): New macro.
+
+       * src/autofit/afhints.c (af_glyph_hints_dump_points): Implement it.
+       (af_glyph_hints_reload): Handle AF_FLAG_NEAR.
+
+2016-03-18  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Minor refactoring and microoptimizations.
+
+       * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
+       band clipping from here.
+       (gray_conic_to, gray_cubic_to): ... to here.
+       (gray_render_line, gray_render_scanline): Initialize variables closer
+       to their use.
+
+2016-03-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Minor refactoring.
+
+       * src/smooth/ftgrays.c (gray_render_conic, gray_render_cubic): Move
+       upscaling from here.
+       (gray_conic_to, gray_cubic_to): ... to here.
+
+2016-03-15  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/aflatin.c (af_latin_compute_stem_width): Optimize.
+
+2016-03-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Temporarily revert 6eb6158dd787 (#47114).
+
+       * src/smooth/ftgrays.c (gray_render_line): Old implementation.
+
+2016-03-12  Werner Lemberg  <wl@gnu.org>
+
+       [ftfuzzer] Improve coverage of rasterfuzzer.
+
+       * src/tools/ftfuzzer/rasterfuzzer.cc (LLVMFuzzerTestOneInput): Use
+       input data for `tags' array also.
+       Trim input data to get more positive hits.
+
+2016-03-11  Pavlo Denysov  <paul.kiev+savannah@gmail.com>
+
+       Fix CMake issues for iOS (patch #8941).
+
+       * CMakeLists.txt (CMAKE_TOOLCHAIN_FILE): Fix directory.
+       * builds/cmake/iOS.cmake: No longer enforce gcc.
+
+2016-03-09  Behdad Esfahbod  <behdad@behdad.org>
+
+       [truetype] Fix handling of non-intermediate GX tuples.
+
+       We probably did not notice this as all fonts we tested had only
+       tuple_coords[i] be +1 or -1 for non-intermediate tuples.
+
+       * src/truetype/ttgxvar.c (ft_var_apply_tuple): Implement it.
+
+2016-03-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [base] Refuse to render enormous outlines (#47114).
+
+       The goal is to avoid integer overflows in the rendering algorithms.
+       The limit is chosen arbitrarily at some 2^18 pixels, which should be
+       enough for modern devices including printers.
+
+       * src/base/ftoutln.c (FT_Outline_Render): Check CBox and reject
+       enormous outlines.
+
+2016-03-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Replace left shifts with multiplications (#47114).
+
+       * src/smooth/ftgrays.c (SUBPIXELS, UPSCALE, DOWNSCALE): Do it.
+
+2016-03-05  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Avoid excessive stem length rounding (#25392).
+
+       * src/autofit/aflatin.c (af_latin_compute_stem_width): Add argument
+       to pass difference between hinted and unhinted position of base
+       point; use this to adjust the stem width depending on the PPEM so
+       that it doesn't become too large under certain circumstances.
+       Update all callers using value 0 for this argument except...
+       (af_latin_align_linked_edge): Pass position delta of base point to
+       `af_latin_compute_stem_width'.
+
+2016-03-05  J Raynor  <jxraynor@gmail.com>
+
+       Make FreeType compile on AIX out of the box.
+
+       * builds/unix/configure.raw (XX_ANSIFLAGS): Don't use `-ansi' on
+       AIX.
+
+2016-03-01  Werner Lemberg  <wl@gnu.org>
+           Kostya Serebryany  <kcc@google.com>
+
+       [ftfuzzer] Add unit for testing smooth and black rasterizers.
+
+       * src/tools/ftfuzzer/rasterfuzzer.cc: New file.
+
+2016-03-01  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Fix reallocation error introduced in 2016-02-27 (#47310).
+
+       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Reassign
+       `prev_segment' after reallocation.
+
+2016-03-01  Werner Lemberg  <wl@gnu.org>
+
+       Fix clang warnings.
+
+       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Use
+       FT_UShort for `min_flags' and `max_flags'.
+       Initialize `prev_*' variables.
+
+       * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Fix
+       types of local variables.
+
+       * src/smooth/ftgrays.c (gray_dump_cells) [FT_DEBUG_LEVEL_TRACE]:
+       Update `printf' format string.
+
+       * src/tools/ftfuzzer/ftfuzzer.cc (setIntermediateAxis): Add cast.
+       (LLVMFuzzerTestOneInput): Fix loop type.
+
+2016-02-29  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add blue-zone support for Sinhala script.
+
+       This essentially moves the Sinhala script from the `Indic' hinter to
+       the `Latin' hinter.
+
+       * src/autofit/afblue.dat: Add blue zone data for Sinhala.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Sinhala standard character and move data
+       out of AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afranges.c: Move Sinhala data out of
+       AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afstyles.h: Update Sinhala data; in particular, use
+       AF_WRITING_SYSTEM_LATIN.
+
+2016-02-27  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Properly handle spikes pointing to the x-axis.
+
+       An example that gets better rendered is glyph `uusignTaml' (glyph
+       index 2286) in font `FreeSerif.ttf' (Version 0412.2263) at 22ppem.
+
+       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Properly
+       handle segments where the last point of the first segment is
+       identical to the first point in the second one.  This can happen for
+       malformed fonts or spikes.  We either merge the new segment with the
+       previous one (both segments point into the same direction), or we
+       discard the shorter segment if they point into different directions.
+
+2016-02-27  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Minor code clean-up.
+
+       * src/autofit/aflatin.c (af_latin_hints_compute_segments): Change
+       some local variable names to better differentiate between values
+       along a segment and values orthogonal to it.
+
+2016-02-26  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Improve BOUND action.
+
+       In complex glyph shapes, the original logic was too simple to cater
+       for situations that would actually need something similar to PS Hint
+       masks.  This fix should alleviate the worst cases.
+
+       * src/autofit/aflatin.c (af_latin_hint_edges): Don't allow
+       complete disappearance of stems.
+
+2016-02-25  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add blue-zone support for Tamil script.
+
+       This essentially moves the Tamil script from the `Indic' hinter to
+       the `Latin' hinter.
+
+       * src/autofit/afblue.dat: Add blue zone data for Tamil.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Tamil standard character and move data
+       out of AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afranges.c: Move Tamil data out of
+       AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afstyles.h: Update Tamil data; in particular, use
+       AF_WRITING_SYSTEM_LATIN.
+
+2016-02-18  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add blue-zone support for Malayalam script.
+
+       This essentially moves the Malayalam script from the `Indic' hinter
+       to the `Latin' hinter.
+
+       * src/autofit/afblue.dat: Add blue zone data for Malayalam.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Malayalam standard characters and move
+       data out of AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afranges.c: Move Malayalam data out of
+       AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afstyles.h: Update Malayalam data; in particular, use
+       AF_WRITING_SYSTEM_LATIN.
+
+2016-02-16  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Fix integer overflow (#47114).
+
+       * src/smooth/ftgrays.c (TArea): Make it unconditionally `long'.
+
+2016-02-15  Werner Lemberg  <wl@gnu.org>
+
+       * src/cff/cffparse.c (cff_parse_multiple_master): Improve tracing.
+
+2016-02-15  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Handle T2 operator only with old CFF engine (#47157).
+
+       * src/cff/cffparse.c (cff_parser_run) <opcode 31>: Enclose with
+       #ifdef CFF_CONFIG_OPTION_OLD_ENGINE...#endif.
+
+2016-02-15  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Partially handle `load' and `store' ops in old CFF engine.
+
+       Now all glyphs of MM CFFs like `ITCGaramondMM-It.otf' can be
+       displayed.
+
+       * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_store,
+       cff_op_load>: Partially implement it.
+
+       * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass
+       the number of Multiple Master axes.
+       Update all callers.
+       (cff_parse_multiple_master): Get number of axes.
+       (cff_parser_run) <opcode 31>: Updated.
+       * src/cff/cffparse.h: Updated.
+       (CFF_ParserRec): Add `num_axes' field.
+
+       * src/cff/cffload.c: Updated.
+
+       * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_axes' field.
+
+2016-02-15  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Correctly trace SIDs that contain NULL bytes.
+
+       We need this to properly trace Multiple Master CFFs, which contain
+       two SIDs that are charstrings.
+
+       This commit makes FreeType also show the last SID, omitted
+       previously due to a bug.
+
+       * src/cff/cfftypes.h (CFF_FontRec): Add `string_pool_size' field.
+
+       * src/cff/cffload.c (cff_index_get_pointers): Add argument to return
+       the pool size.
+       Update all callers.
+
+       * src/cff/cffobjs.c (cff_face_init) [FT_DEBUG_LEVEL_TRACE]: Directly
+       access `cff->strings' to display the non-default strings.
+
+2016-02-14  Werner Lemberg  <wl@gnu.org>
+
+       * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H.
+
+2016-02-14  Werner Lemberg  <wl@gnu.org>
+
+       * src/cff/cffparse.c: Include `cffgload.h'.
+
+       Problem reported by Colin Walters <walters@verbum.org>.
+
+2016-02-14  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Make old CFF engine show MM CFFs (without variations).
+
+       The new code only displays the first master in the font.
+
+       * src/cff/cffgload.c (cff_decode_parse_charstrings): Add new
+       parameter to allow function calls from dictionaries also.
+       <cff_op_blend>: Partially implement it.
+       Update all callers.
+       * src/cff/cffgload.h: Updated.
+
+       * src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the
+       number of Multiple Master designs.
+       Update all callers.
+       (cff_parse_multiple_master): New function to rudimentarily parse
+       operator.
+       (cff_parser_run): Handle `T2' operator.
+       * src/cff/cffparse.h: Updated.
+       (CFF_ParserRec): Add `num_designs' field.
+
+       * src/cff/cffload.c: Updated.
+
+       * src/cff/cfftoken.h: Handle `MultipleMaster' operator.
+
+       * src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field.
+
+       * src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for
+       MM CFFs.
+
+2016-02-09  Werner Lemberg  <wl@gnu.org>
+
+       [docmaker] Don't emit trailing newlines.
+
+       * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_code):
+       Use `rstrip'.
+
+2016-02-07  Werner Lemberg  <wl@gnu.org>
+
+       * Version 2.6.3 released.
+       =========================
+
+
+       Tag sources with `VER-2-6-3'.
+
+       * docs/VERSION.DLL: Update documentation and bump version number to
+       2.6.3.
+
+       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2005/index.html,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2008/index.html,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/index.html,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualc/index.html,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj,
+       builds/windows/visualce/index.html,
+       builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2005-ce/index.html,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/index.html: s/2.6.2/2.6.3/, s/262/263/.
+
+       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
+
+       * builds/unix/configure.raw (version_info): Set to 18:3:12.
+       * CMakeLists.txt (VERSION_PATCH): Set to 3.
+
+       * docs/CHANGES: Updated.
+
+2016-02-07  Werner Lemberg  <wl@gnu.org>
+
+       Fix another runtime error found by clang's sanitizer (#47082).
+
+       * src/base/ftstroke.c (ft_stroke_border_export): Properly handle
+       empty input buffer.
+
+2016-02-07  Werner Lemberg  <wl@gnu.org>
+
+       Fix runtime errors found by clang's sanitizer (#47082).
+
+       * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
+       (FT_Outline_Copy), src/cache/ftcsbits.c (ftc_sbit_copy_bitmap):
+       Properly handle empty input buffer.
+
+2016-02-07  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Minor.
+
+       * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_sqrt>:
+       Remove dead code.
+
+2016-02-07  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Implement missing operators in new engine (except `random').
+
+       * src/cff/cf2font.h (CF2_STORAGE_SIZE): New macro.
+
+       * src/cff/cf2intrp.c (cf2_interpT2CharString): Implement the
+       following operators: abs, add, and, div, drop, dup, eq, exch, get,
+       ifelse, index, mul, neg, not, or, put, roll, sqrt, sub.
+
+       * src/cff/cf2stack.h, src/cff/cf2stack.c (cf2_stack_roll): New
+       auxiliary function for `roll' operator.
+
+2016-02-06  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Fix some Type 2 operators in old CFF engine.
+
+       * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq'
+       operator, add `not' and (unsupported) `blend' operators.
+
+2016-02-05  Sebastian Rasmussen  <sebras@gmail.com>
+
+       Make direct call of `make install' work (#47072).
+
+       * builds/unix/unix-def.in (freetype-config): Make sure
+       `freetype-config' is generated for both make targets (`all' and
+       `install').
+
+2016-02-05  Werner Lemberg  <wl@gnu.org>
+
+       [base] Fix advance width loading for MM and GX fonts (#47064).
+
+       * src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Return false for
+       MM and GX fonts.
+       Update callers.
+
+2016-02-03  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Fix handling of face_index == -1 for pure CFF.
+
+       * src/cff/cffobjs.c (cff_face_init): Return correct number of faces.
+
+2016-01-30  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Minor tracing improvement.
+
+       * src/autofit/afhints.c (af_glyph_hints_dump_points): Insert newline
+       at the start of a new contour.
+
+2016-01-28  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       Remove unpatented hinter (3/3).
+
+       * include/freetype/config/ftoption.h
+       (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
+
+       * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
+       `ignore_unpatented_hinter' field.
+       Update users.
+       (FT_DEBUG_HOOK_UNPATENTED_HINTING): Remove.
+       Update users.
+
+       * include/freetype/internal/tttypes.h (TT_FaceRec): Remove
+       `unpatented_hinting' field.
+       Update users.
+
+       * src/base/ftpatent.c (_tt_check_patents_in_range,
+       _tt_check_patents_in_table, _tt_face_check_patents): Remove.
+       (FT_Face_CheckTrueTypePatents, FT_Face_SetUnpatentedHinting):
+       Replace code with dummies.
+
+       * src/truetype/ttobjs.c (tt_face_init): Remove now defunct code.
+       * src/truetype/ttobjs.h (TT_GraphicsState): Remove `both_x_axis'
+       field.
+
+2016-01-28  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       Remove unpatented hinter (2/3).
+
+       * devel/ftoption.h (TT_CONFIG_OPTION_UNPATENTED_HINTING): Remove.
+
+2016-01-28  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       Remove unpatented hinter (1/3).
+
+       * src/truetype/ttinterp.c [TT_CONFIG_OPTION_UNPATENTED_HINTING]:
+       Remove all code related to this macro.
+
+2016-01-28  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add blue-zone support for Kannada script.
+
+       This essentially moves the Kannada script from the `Indic' hinter to
+       the `Latin' hinter.
+
+       * src/autofit/afblue.dat: Add blue zone data for Kannada.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Kannada standard characters and move
+       data out of AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afranges.c: Move Kannada data out of
+       AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afstyles.h: Update Kannada data; in particular, use
+       AF_WRITING_SYSTEM_LATIN.
+
+2016-01-22  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       Better access to 64-bit integers for C99 compilers.
+
+       * include/freetype/config/ftconfig.h [FT_LONG64]: Use
+       __STDC_VERSION__ to define 64-bit integers.
+       * builds/unix/ftconfig.in [FT_LONG64]: Ditto.
+       * builds/vms/ftconfig.h [FT_LONG64]: Ditto.
+
+2016-01-21  Werner Lemberg  <wl@gnu.org>
+
+       [gxvalid] Remove commented out code.
+
+       * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Do it.
+
+2016-01-20  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Complete last autofit commit.
+
+       Problem reported by Kostya Serebryany <kcc@google.com>.
+
+       * src/autofit/afshaper.c (af_shaper_get_coverage)
+       [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Update signature.
+
+2016-01-20  Werner Lemberg  <wl@gnu.org>
+
+       Still handle `__FTERRORS_H__'.
+
+       We need this for backward compatibility.
+
+       Problem reported by John Emmas <johne53@tiscali.co.uk>.
+
+       * include/freetype/fterrors.h: Fix inclusion guard so that
+       undefining either `FTERRORS_H_' or `__FTERRORS_H__' works as
+       expected.
+
+2016-01-19  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Fix handling of default script.
+
+       Patch taken from ttfautohint, commit
+       071ae2c00e0d67f9d19418f4fade1c23d27dc185.
+
+       There were two bugs.
+
+         - We now use non-standard script tags like `khms' for special
+           purposes.  However, HarfBuzz maps such tags to `DFLT', and
+           without this commit the associated lookups were incorrectly
+           assigned to the non-standard tags.
+
+         - Let's assume we have a Bengali font, and the font's `DFLT'
+           script tag handles the necessary lookups for Bengali, too.
+           Without this commit, the `DFLT' lookups were assigned to
+           ttfautohint's default script (usually `latn') before the
+           standard lookups for Bengali were handled.
+
+           We now have the following order while searching for covered
+           glyph indices.
+
+             special features of scripts (e.g. `sups' for Cyrillic)
+             Unicode mappings of scripts
+             remaining features of scripts (especially important for Indic
+               scripts)
+             default features of default script
+
+       * src/autofit/afshaper.c, src/autofit/afshaper.h
+       (af_shaper_get_coverage): Add boolean parameter to indicate default
+       script.
+       Update all callers.
+
+       * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+       Fix search order for coverages.
+
+2016-01-19  Werner Lemberg  <wl@gnu.org>
+
+       Various minor clang fixes.
+
+       * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
+       src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
+       `ch'.
+
+       * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast.
+
+       * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast.
+
+       * src/base/fthash.c (hash_num_lookup): Add cast.
+
+       * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast.
+
+       * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out
+       redundant code.
+
+       * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add
+       cast.
+
+       * src/type1/t1load.c (parse_subrs): Fix type of `count'.
+
+2016-01-19  Derek B. Noonburg  <derekn@glyphandcog.com>
+
+       [truetype] Add another tricky font.
+
+       * src/truetype/ttobjs.c (TRICK_SFNT_IDS_NUM_FACES): Increase.
+       (sfnt_id): Add variant of `DFKaiShu'.
+
+2016-01-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [base] Empower `FT_Library_SetLcdFilterWeights'.
+
+       * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
+       in addition to setting weights.
+       (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
+       FT_FORCE_LEGACY_LCD_FILTER.
+       * include/freetype/ftlcdfil.h: Documentation update.
+
+2016-01-12  Werner Lemberg  <wl@gnu.org>
+
+       Don't use macro names that start with `_[A-Z]' [3/3].
+
+       Such macro names are reserved for both C and C++.
+
+       * src/cache/ftccache.h: s/_FTC_FACE_ID_HASH/FTC_FACE_ID_HASH/.
+       Update all callers.
+       (FTC_CACHE_LOOKUP_CMP): Replace `_XXX' with `XXX_'.
+       * src/cache/ftcmru.c (FTC_MRULIST_LOOKUP_CMP): Ditto.
+
+2016-01-12  Werner Lemberg  <wl@gnu.org>
+
+       Don't use macro names that start with `_[A-Z]' [2/3].
+
+       Such macro names are reserved for both C and C++.
+
+       * include/freetype/ftimage.h, src/raster/ftraster.c,
+       src/smooth/ftgrays.c, src/smooth/ftgrays.h:
+       s/_STANDALONE_/STANDALONE_/.
+
+2016-01-12  Werner Lemberg  <wl@gnu.org>
+
+       Don't use macro names that start with `_[A-Z]' [1/3].
+
+       Such macro names are reserved for both C and C++.
+
+       * src/bdf/bdflib.c: Replace macros of the form `_BDF_XXX' with
+       `BDF_XXX_'.
+
+2016-01-12  Werner Lemberg  <wl@gnu.org>
+
+       Don't use macro names that contain `__' [2/2].
+
+       Such macro names are reserved for both C and C++.
+
+       * src/cache/*: s/__/_/.
+
+2016-01-12  Werner Lemberg  <wl@gnu.org>
+
+       Don't use macro names that contain `__' [1/2].
+
+       Such macro names are reserved for both C and C++.
+
+       * */*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
+
+2016-01-10  Jered Gray  <jegray@google.com>
+
+       [cff] Fix usage of `|' operator.
+
+       * src/cff/cf2intrp.c (cf2_interpT2CharString) [cf2_cmdEXTENDEDNMBR,
+       default]: `|' is not guaranteed to be processed from left to right
+       by the compiler.  However, the code repeatedly calls
+       `cf2_buf_readByte' to get the arguments to `|' ...  Fix this.
+
+2015-12-25  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Make top-to-bottom hinting work in latin auto-hinter.
+
+       This improves rendering of scripts like Bengali or Devanagari.
+
+       * src/autofit/afhints.c (af_axis_hints_new_edge): Add parameter to
+       pass top-to-bottom hinting flag.  This makes the function sort edges
+       in descending vertical position.
+
+       * src/autofit/afhints.c: Updated.
+
+       * src/autofit/aflatin.c (af_latin_hints_compute_edges,
+       af_latin_hint_edges): Use `top_to_bottom_hinting' flag.
+
+       * src/autofit/afcjk.c (af_cjk_hints_compute_edges),
+       src/autofit/aflatin2.c (af_latin2_hints_compute_edges): Updated.
+
+2015-12-24  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add hinting direction to `AF_ScriptClassRec'.
+
+       Still unused.
+
+       * src/autofit/afglobal.c (SCRIPT): Handle hinting direction.
+
+       * src/autofit/aftypes.h (AF_ScriptClassRec): Add
+       `top_to_bottom_hinting' field.
+       (AF_HINTING_BOTTOM_TO_TOP, AF_HINTING_TOP_TO_BOTTOM): New macros.
+       (AF_DEFINE_SCRIPT_CLASS): Updated.
+
+2015-12-23  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Start implementing hinting direction (up/down, down/up).
+
+       Right now, it does nothing.
+
+       * src/autofit/afscript.h: Add another parameter to `SCRIPT',
+       specifying hinting direction.
+
+       * src/autofit/afglobal.c, src/autofit/afglobal.h,
+       src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/afshaper.c,
+       src/autofit/aftypes.h: Extend `SCRIPT' definitions.
+
+2015-12-22  Werner Lemberg  <wl@gnu.org>
+
+       * src/type1/t1load.c (parse_subrs): Fix memory leak (#46744).
+
+2015-12-22  Werner Lemberg  <wl@gnu.org>
+
+       [base] Make hash interface symmetric.
+
+       Use `num' and `str' infixes everywhere.
+
+       * src/base/fthash.c (ft_hash_init): Renamed to...
+       (hash_init): ... This.
+       (ft_hash_str_init, ft_hash_num_init): New functions.
+       (ft_hash_free): Renamed to...
+       (ft_hash_str_free): ... This.
+
+       * include/freetype/internal/fthash.h: Updated.
+
+       * src/bdf/bdflib.c, src/type1/t1load.c, src/type1/t1objs.c: Updated.
+
+2015-12-21  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Avoid shift of negative numbers (#46732).
+
+       * src/type1/t1load.c (parse_subrs): Do it.
+
+2015-12-20  Werner Lemberg  <wl@gnu.org>
+
+       [type1, psaux] Handle large values of num_subrs correctly (#46692).
+
+       We now use a hash to map from subr indices to array elements holding
+       the subroutines, if necessary.
+
+       * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H.
+       (T1_FontRec): Add `subrs_hash' field.
+
+       * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H.
+       (T1_DecoderRec): Add `subrs_hash' field.
+
+       * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field.
+
+       * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H.
+       (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary.
+
+       * src/type1/t1load.c: Include FT_INTERNAL_HASH_H.
+       (parse_subrs): Use hash for subr indices that exceed the allocated
+       number of subr slots.
+       (t1_init_loader): Remove unnecessary code.
+       (t1_done_loader, T1_Open_Face): Updated.
+
+       * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances,
+       T1_Load_Glyph): Updated.
+
+       * src/type1/t1objs.c (T1_Face_Done): Updated.
+
+       * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H.
+       (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if
+       necessary.
+
+       * src/cid/cidgload.c (cid_load_glyph): Updated.
+
+2015-12-20  Werner Lemberg  <wl@gnu.org>
+
+       [base] Thinko: Remove free function pointer.
+
+       We don't copy keys or values while hashing.
+
+       * include/freetype/internal/fthash.h (FT_Hash_FreeFunc): Removed.
+       (FT_HashRec): Remove `free' field.
+
+       * src/base/fthash.c (hash_str_free): Removed.
+       (ft_hash_init, ft_hash_free): Updated.
+
+2015-12-20  Werner Lemberg  <wl@gnu.org>
+
+       [base, bdf] Don't expose `FT_Hashnode' in hash functions.
+
+       * src/base/fthash.c (hash_lookup, ft_hash_str_lookup,
+       ft_hash_num_lookup): Return pointer to `size_t' instead of
+       `FT_Hashnode'.
+
+       * include/freetype/internal/fthash.h: Updated.
+
+       * src/bdf/bdflib.c (bdf_get_property, _bdf_add_property,
+       bdf_get_font_property): Updated.
+
+2015-12-20  Werner Lemberg  <wl@gnu.org>
+
+       [base, bdf] Add number hashing.
+
+       * src/base/fthash.c (hash_num_lookup, hash_num_compare): New
+       functions.
+       (ft_hash_init): Add argument to select between number and string
+       hashing.
+       (ft_hash_num_insert, ft_hash_num_lookup): New functions.
+
+       * include/freetype/internal/fthash.h: Updated.
+
+       * src/bdf/bdflib.c (_bdf_parse_start): Updated.
+
+2015-12-20  Werner Lemberg  <wl@gnu.org>
+
+       [base] Introduce hash lookup, compare, and free function pointers.
+
+       * include/freetype/internal/fthash.c (FT_Hash_LookupFunc,
+       FT_Hash_CompareFunc, FT_Hash_FreeFunc): New typedefs.
+       (FT_HashRec): Add `lookup', `compare', and `free' fields.
+
+       * src/base/fthash.c (hash_str_lookup, hash_str_compare,
+       hash_str_free): New functions.
+       (ft_hash_init): Set function pointers.
+       (hash_bucket, ft_hash_free): Use them.
+
+2015-12-20  Werner Lemberg  <wl@gnu.org>
+
+       [base, bdf] Use a union as a hash key.
+
+       We want to support both an integer and a string key later on.
+
+       * include/freetype/internal/fthash.h (FT_Hashkey): New union.
+       (FT_HashnodeRec): Updated.
+       (ft_hash_insert, ft_hash_lookup): Renamed to ...
+       (ft_hash_str_insert, ft_hash_str_lookup): ... this.
+
+       * src/base/fthash.c (hash_bucket): Updated.
+       (ft_hash_insert, ft_hash_lookup): Renamed to ...
+       (hash_insert, hash_lookup): ... this.
+       (ft_hash_str_insert, ft_hash_str_lookup): New wrapper functions.
+
+       * src/bdf/bdflib.c: Updated.
+
+2015-12-19  Werner Lemberg  <wl@gnu.org>
+
+       [bdf] Use new hash functions.
+
+       * src/bdf/bdf.h: Include FT_INTERNAL_HASH_H.
+       (hashnode, hashtable): Removed.
+       (bdf_font_t): Use `FT_HashRec' type for `proptbl'.
+
+       * src/bdf/bdflib.c: Remove all hash functions.
+       Update code for new hash structure and function names.
+
+2015-12-19  Werner Lemberg  <wl@gnu.org>
+
+       [bdf, base] Lift hash functions from bdf driver to base module.
+
+       * src/base/fthash.c, include/freetype/internal/fthash.h: New files,
+       containing (massaged) code from `bdflib.c' and `bdf.h'.
+
+       * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H): New
+       macro.
+
+       * src/base/ftbase.c: Include `fthash.c'.
+
+       * src/base/Jamfile (_sources): Add `fthash'.
+
+       * src/base/rules.mk (BASE_SRC): Add `fthash.c'.
+
+       * docs/LICENSE.TXT: Updated.
+
+2015-12-15  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add blue-zone support for Bengali script.
+
+       This essentially moves the Bengali script from the `Indic' hinter to
+       the `Latin' hinter.
+
+       * src/autofit/afblue.dat: Add blue zone data for Bengali.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Bengali standard characters and move
+       data out of AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afranges.c: Move Bengali data out of
+       AF_CONFIG_OPTION_INDIC block.
+
+       * src/autofit/afstyles.h: Update Bengali data; in particular, use
+       AF_WRITING_SYSTEM_LATIN.
+
+2015-12-14  Ben Wagner  <bungeman@gmail.com>
+
+       [bdf] Remove dead code (#46625).
+
+       The BDF specification only allows decimal numbers, no octal or
+       hexadecimal decoding is needed.
+
+       * src/bdf/bdflib.c (_bdf_atoul, _bdf_atol, _bdf_atous,
+       _bdf_atos): Remove unused code and parameters.
+       Update all callers.
+       (odigits): Remove.
+
+2015-12-14  Werner Lemberg  <wl@gnu.org>
+
+       [base] Fix calls to `FT_Stream_Seek'.
+
+       * src/base/ftobjs.c (Mac_Read_sfnt_Resource, FT_Open_Face): Set
+       `error'.
+
+2015-12-14  Ben Wagner  <bungeman@gmail.com>
+
+       [base] Check error when seeking to data supplied offset (#46635).
+
+       * src/base/ftobjs.c (open_face_PS_from_sfnt_stream):
+       `ft_lookup_PS_in_sfnt_stream' returns offset and length from
+       user supplied data.  Use of this these values must be checked.
+
+2015-12-13  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Myanmar script.
+
+       * src/autofit/afblue.dat: Add blue zone data for Myanmar.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Myanmar standard characters.
+
+       * src/autofit/afranges.c: Add Myanmar data.
+
+       * src/autofit/afstyles.h: Add Myanmar data.
+
+2015-12-12  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Minor.
+
+2015-12-12  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afscript.h: Avoid potential crash.
+
+2015-12-10  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Restore OpenType feature check.
+
+       This was removed while rewriting the HarfBuzz interface.
+
+       * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add `hb_buf' field to
+       hold internal HarfBuzz buffer, needed for feature comparison.
+
+       * src/autofit/afglobal.c (af_face_globals_new,
+       af_face_globals_free): Initialize and destroy `hb_buf'.
+
+       * src/autofit/afshaper.c (af_shaper_get_cluster): Compare character
+       (cluster) with and without applied feature.
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix tracing
+       message.
+
+2015-12-10  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Remove redundant code.
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_widths): Do it.
+
+2015-12-09  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Thinko.
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
+       empty blue zones (bug introduced 2015-12-06).
+
+2015-12-09  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Introduce subscript top blue zones.
+
+       This feature is mainly for Khmer: The idea is to avoid a clash
+       between the top of subscript glyphs and the bottom of normal
+       baseline glyphs.
+
+       This only works for character clusters mapped to multiple glyphs.
+
+       * src/autofit/afblue.dat: Add subscript top blue zone for Khmer.
+
+       * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_SUB_TOP): New
+       macro.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/aflatin.h (AF_LATIN_IS_SUB_TOP_BLUE,
+       AF_LATIN_BLUE_SUB_TOP): New macros.
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle new
+       blue zone property.
+       Update tracing messages.
+       (af_latin_metrics_scale_dim): Handle new blue zone property.
+       (af_latin_hints_compute_blue_edges): Updated.
+
+2015-12-09  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Fix tracing message.
+
+       * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Display
+       inactive blue zones also.
+
+2015-12-06  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afblue.dat: Add more Khmer clusters.
+
+       Some fonts have incorrect ligatures; we need more samples to get a
+       good mean value.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+2015-12-06  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Typos.
+
+       * src/autofit/afshaper.c (af_shaper_buf_create, af_shaper_get_elem)
+       [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Make it compile.
+
+2015-12-06  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Khmer script.
+
+       We split Khmer into two auto-hinter scripts: `Khmer' (`khmr') and
+       `Khmer symbols' (`khms', U+19E0-U+19FF).
+
+       * src/autofit/afblue.dat: Add blue zone data for Khmer.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Khmer standard characters.
+
+       * src/autofit/afranges.c: Add Khmer data.
+
+       * src/autofit/afstyles.h: Add Khmer data.
+
+2015-12-06  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Rewrite HarfBuzz interface to support character clusters.
+
+       Scripts like Khmer have blue zones that can't be directly
+       represented by Unicode characters.  Instead, it is necessary to let
+       HarfBuzz convert character clusters into proper glyph representation
+       forms, then deriving the blue zone information from the resulting
+       glyphs.
+
+       * src/autofit/hbshim.c, src/autofit/hbshim.h: Replaced by...
+       * src/autofit/afshaper.c, src/autofit/afshaper.h: ... these two new
+       files, providing a new API to access HarfBuzz.
+
+       The new API manages a HarfBuzz buffer with `af_shaper_buf_create'
+       and `af_shaper_buf_destroy'.  The buffer receives a UTF8 encoded
+       string with function `af_shaper_get_cluster', and the resulting
+       glyph data (indices, advance widths, vertical offsets) can be
+       iteratively accessed with function `af_shaper_get_elem'.
+
+       * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
+       af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated.
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_widths,
+       af_latin_metrics_init_blues, af_latin_metrics_check_digits):
+       Updated.
+
+       * include/freetype/internal/fttrace.h: s/afharfbuzz/afshaper/.
+
+       * src/autofit/afglobal.c: s/hbshim.h/afshaper.h/.
+       (af_face_globals_compute_style_coverage): Updated.
+
+       * src/autofit/afglobal.h: s/hbshim.h/afshaper.h/.
+
+       * src/autofit/autofit.c: s/hbshim.c/afshaper.c/.
+
+       * src/autofit/Jamfile, src/autofit/rules.mk (AUTOF_DRV_SRC):
+       Updated.
+
+2015-12-06  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Prepare forthcoming changes.
+
+       This makes it easier to control the commits.
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Add dummy
+       loop.  No functional change.
+
+2015-12-06  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Use string of standard characters.
+
+       This is more flexible; additionally, it would allow character
+       clusters.
+
+       * src/autofit/aftypes.h (SCRIPT, AF_DEFINE_SCRIPT_CLASS): Updated.
+       (AF_ScriptClassRec): Replace `standard_char[123]' with
+       `standard_charstring'.
+
+       * src/autofit/afscript.h: Replace last three character arguments
+       of the `SCRIPT' calls with a string parameter, holding the standard
+       characters (in UTF-8 encoding) separated with spaces.
+
+       * src/autofit/afglobal.c, src/autofit/afglobal.h,
+       src/autofit/afpic.c, src/autofit/afranges.c, src/autofit/hbshim.c
+       (SCRIPT): Updated.
+
+       * src/autofit/afcjk.c (af_cjk_metrics_init_widths),
+       src/autofit/aflatin.c (af_latin_metrics_init_widths): Updated.
+
+2015-12-05  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afblue.dat: Separate blue zone characters with spaces.
+
+       Another preparation for character cluster support.
+
+       * src/autofit/afblue.c, src/autofit.afblue.h: Regenerated.
+
+2015-12-05  Werner Lemberg  <wl@gnu.org>
+
+       * src/tools/afblue.pl (convert_ascii_chars): Don't ignore spaces.
+
+       Instead, reduce multiple spaces to a single one.  We need this later
+       for supporting character clusters in `afblue.dat'.
+
+2015-12-05  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afblue.hin (GET_UTF8_CHAR): Use `do...while(0)'.
+
+       * src/autofit/afblue.h: Regenerated.
+
+2015-12-05  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afwarp.c: s/INT_MIN/FT_INT_MIN/.
+
+2015-12-03  Werner Lemberg  <wl@gnu.org>
+
+       * builds/unix/install.mk (install): Remove stale `ft2build.h'.
+
+2015-12-01  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Avoid dangling pointer (#46572).
+
+       * src/type1/t1afm.c (T1_Read_Metrics): Properly reset
+       `face->afm_data'.
+
+2015-11-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * include/freetype/ftlcdfil.h: Documentation tweak.
+
+2015-11-28  Werner Lemberg  <wl@gnu.org>
+
+       * Version 2.6.2 released.
+       =========================
+
+
+       Tag sources with `VER-2-6-2'.
+
+       * docs/VERSION.DLL: Update documentation and bump version number to
+       2.6.2.
+
+       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2005/index.html,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2008/index.html,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/index.html,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualc/index.html,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj,
+       builds/windows/visualce/index.html,
+       builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2005-ce/index.html,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/index.html: s/2.6.1/2.6.2/, s/261/262/.
+
+       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
+
+       * builds/unix/configure.raw (version_info): Set to 18:2:12.
+       * CMakeLists.txt (VERSION_PATCH): Set to 2.
+
+       * docs/CHANGES: Updated.
+
+2015-11-28  Werner Lemberg  <wl@gnu.org>
+
+       Fix C++ compilation.
+
+       * src/autofit/afloader.c: Include FT_INTERNAL_CALC_H.
+
+       * src/truetype/ttgload.c (load_truetype_glyph): Pacify compiler.
+
+2015-11-28  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       Change default LCD filter to be normalized and color-balanced.
+
+       * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Update
+       `default_filter'.
+
+2015-11-28  Werner Lemberg  <wl@gnu.org>
+
+       [docmaker] Allow references to section names.
+
+       In the reference, we show the section's title enclosed in single
+       quotes.
+
+       * src/tools/docmaker/formatter.py (Formatter::__init__): Collect
+       section names as identifiers.
+
+       * src/tools/docmaker/tohtml.py (section_title_header): Split into...
+       (section_title_header1, section_title_header2): ... these two
+       strings.
+       (HtmlFormatter::make_block_url, make_html_word, html_source_quote):
+       Handle sections.
+       (HtmlFormatter::section_enter): Updated to add `id' HTML attribute.
+
+2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+
+       [cmake] Add script to test the config module.
+
+       * builds/cmake/testbuild.sh: New file.
+
+2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+
+       * CMakeLists.txt: Create `freetype-config.cmake' config module.
+
+2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+
+       * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
+
+2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+
+       [cmake] Add better control of library dependencies.
+
+       * CMakeLists.txt: Add `WITH_*' variables to force/auto/omit
+       ZLIB/BZip2/PNG/HarfBuzz.
+
+2015-11-27  Tamas Kenez  <tamas.kenez@adasworks.com>
+
+       [cmake] Make `FindHarfBuzz' observe the REQUIRED option.
+
+       * builds/cmake/FindHarfBuzz.cmake: Implement it.
+
+2015-11-27  Werner Lemberg  <wl@gnu.org>
+
+       [cmake] Collect files specific to cmake in `builds/cmake'.
+
+       * builds/FindHarfBuzz.cmake: Move to ...
+       * builds/cmake/FindHarfBuzz.cmake: ... this place.
+
+       * CMakeLists.txt (CMAKE_MODULE_PATH): Updated.
+
+2015-11-27  Alexander Bock  <alexander.j.bock@nasa.gov>
+
+       CMakeLists.txt: Honour new command line flag `FREETYPE_NO_DIST'.
+
+2015-11-26  Werner Lemberg  <wl@gnu.org>
+
+       [docmaker] Allow `foo[bar]' as identifier.
+
+       We need this to handle equally named properties in different
+       modules.
+
+       * src/tools/docmaker/content.py (re_identifier),
+       src/tools/docmaker/sources.py (re_crossref): Allow `foo[bar]'.
+
+       * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word,
+       HtmlFormatter::index_exit, HtmlFormatter::section_enter,
+       HtmlFormatter::block_enter): Handle `foo[bar]'.
+
+2015-11-25  Werner Lemberg  <wl@gnu.org>
+
+       * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46480).
+
+       (_bdf_parse_glyphs): Always reset `p->glyph_name' after moving its
+       contents.
+
+2015-11-21  Werner Lemberg  <wl@gnu.org>
+
+       * include/freetype/internal/ftcalc.h: Don't use `register' keyword.
+
+       This fixes compiler warnings.
+
+       Reported by Behdad.
+
+2015-11-20  Werner Lemberg  <wl@gnu.org>
+
+       Add `FT_LCD_FILTER_LEGACY1' enum value.
+
+       This does the same as `FT_LCD_FILTER_LEGACY'.
+
+       See
+
+         https://bugs.freedesktop.org/show_bug.cgi?id=92981
+
+       for the reasoning.
+
+       * include/freetype/ftlcdfil.h (FT_LcdFilter): New value
+       `FT_LCD_FILTER_LEGACY1'.
+
+       * src/base/ftlcdfil.c (FT_Library_SetLcdFilter): Use it.
+
+2015-11-15  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afhints.c (af_get_segment_index): Fix it.
+
+       The old code was too simple, returning invalid values in most cases
+       where a segment crosses the contour start.
+
+2015-11-15  Werner Lemberg  <wl@gnu.org>
+
+       * src/bdf/bdflib.c (bdf_load_font): Fix small memory leak (#46439).
+
+2015-11-11  Werner Lemberg  <wl@gnu.org>
+
+       [cff, autofit] Switch off stem darkening by default.
+
+       * src/autofit/afmodule.c (af_autofitter_init), src/cff/cffobjs.c
+       (cff_driver_init): Do it.
+
+2015-11-10  Jan Alexander Steffens (heftig)  <jan.steffens@gmail.com>
+
+       Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
+
+       Both the native CFF hinter and the auto-hinter now have a very
+       similar rendering style.
+
+       * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
+       longer implies FT_LOAD_FORCE_AUTOHINT.
+
+       * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
+       macro.
+
+       * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
+       macro.
+
+       * src/cff/cffdrivr.c (cff_driver_class): Use it.
+
+       * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
+       logic.
+
+2015-11-09  Werner Lemberg  <wl@gnu.org>
+
+       * src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
+
+2015-11-09  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Remove integer to pointer conversion compiler warning.
+
+       Problem reported by Alexei.
+
+       * src/truetype/ttgload.c (load_truetype_glyph): Use a solution found
+       in the glib library to fix the issue.
+
+2015-11-08  Behdad Esfahbod  <behdad@behdad.org>
+
+       [sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
+
+       * src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
+
+2015-11-08  Philipp Knechtges  <philipp-dev@knechtges.com>
+
+       [autofit] Don't distort (latin) glyphs too much (#46195).
+
+       * src/autofit/aflatin.h (AF_LatinBlueRec): Add `ascender' and
+       `descender' fields.
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Collect
+       ascender and descender data for blue zones.
+       (af_latin_metrics_scale_dim): Reject vertical scaling values that
+       change the result by more than two pixels.
+
+2015-11-05  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Ignore embedded bitmaps with zero size (#46379).
+
+       * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
+       it.
+
+2015-11-04  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Catch infinite recursion in subglyphs (#46372).
+
+       * include/freetype/internal/tttypes.h (TT_LoaderRec): New field
+       `composites'.
+
+       * src/truetype/ttgload.c: Include FT_LIST_H.
+       (load_truetype_glyph): Add composite subglyph index to a list;
+       abort if index is already in list.
+       (tt_loader_init): Updated.
+       (tt_loader_done): New function.
+       (TT_Load_Glyph): Call `tt_loader_done'.
+
+2015-11-04  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Better tracing of composite glyphs.
+
+       * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
+       load_truetype_glyph): Implement it.
+
+2015-11-03  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Protect against zero-size bitmaps (#46345).
+
+       * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
+       `glyph_size'.
+
+2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       * src/autofit/afloader.c (af_loader_load_g): Implement emboldening.
+
+2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       [autofit] Implement darkening computation function.
+
+       This is a crude adaption of the original `cf2_computeDarkening'
+       function.
+
+       * src/autofit/afloader.c (af_intToFixed, af_fixedToInt,
+       af_floatToFixed): New macros, taken from `cf2fixed.h'.
+       (af_loader_compute_darkening): New function.
+       * src/autofit/afloader.h: Updated.
+
+2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       [autofit] Add functions to get standard widths for writing systems.
+
+       We need the computed standard horizontal and vertical widths for the
+       emboldening calculation.  This method provides a convenient way to
+       extract it from writing-system-specific metrics structures, which
+       all script definitions must implement.
+
+       * src/autofit/aftypes.h (AF_WritingSystem_GetStdWidthsFunc): New
+       function type.
+       (AF_WritingSystemClassRec): New member `style_metrics_getstdw'.
+       (AF_DEFINE_WRITING_SYSTEM_CLASS): Updated.
+
+       * src/autofit/afcjk.c (af_cjk_get_standard_width): New function.
+       (af_cjk_writing_system_class): Updated.
+       * src/autofit/afdummy.c (af_dummy_writing_system_class): Updated.
+       * src/autofit/afindic.c (af_cjk_get_standard_width): New function.
+       (af_indic_writing_system_class): Updated.
+       * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
+       (af_indic_writing_system_class): Updated.
+       * src/autofit/aflatin.c (af_latin_get_standard_width): New function.
+       (af_indic_writing_system_class): Updated.
+
+2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       [autofit] Extend `AF_FaceGlobalsRec' to hold emboldening data.
+
+       * src/autofit/afglobal.h (AF_FaceGlobalsRec): Add fields.
+
+       * src/autofit/afglobal.c (af_face_globals_new): Initialize new
+       fields.
+       (af_face_globals_free): Reset new fields.
+
+2015-11-02  Nikolaus Waxweiler  <madigens@gmail.com>
+
+       [autofit] Add stem-darkening properties.
+
+       Actual code follows in a later commit.
+
+       * include/freetype/ftautoh.h: Document `no-stem-darkening' and
+       `darkening-parameters'.
+
+       * src/autofit/afmodule.h: New fields `no_stem_darkening' and
+       `darken_params'.
+
+       * src/autofit/afmodule.c (af_property_set, af_property_get):
+       Handle them.
+       (af_autofitter_init): Initialize them.
+
+2015-11-02  Ben Wagner  <bungeman@gmail.com>
+
+       [ftfuzzer] Add support for multiple files (patch #8779).
+
+       Currently, libFuzzer only supports mutation of a single file.  We
+       circumvent this problem by using an uncompressed tar archive as
+       multiple-file input for the fuzzer.
+
+       This patch enables tests of `FT_Attach_Stream' and AFM/PFM parsing;
+       a constructed tarball should contain a font file as the first
+       element, and files to be attached as further elements.
+
+       * src/tools/ftfuzzer/ftfuzzer.cc: Include libarchive headers.
+       (archive_read_entry_data, parse_data): New functions.
+       (LLVMFuzzerTestOneInput): Updated.
+
+       * src/tools/ftfuzzer/ftmutator.cc: New file, providing a custom
+       mutator for libFuzzer that can mutate tarballs in a sensible way.
+
+2015-10-31  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Fix cmap 14 validation (#46346).
+
+       * src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
+       accessing `numRanges' and `numMappings'.
+       Fix size check for non-default UVS table.
+
+2015-10-31  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Handle infinite recursion in bitmap strikes (#46344).
+
+       * src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
+       tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
+       tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
+       argument for recursion depth.
+       (tt_sbit_decoder_load_compound): Add argument for recursion depth.
+       Increase recursion counter for recursive call.
+       (tt_sbit_decoder_load_image): Add argument for recursion depth.
+       Check recurse depth.
+       (tt_face_load_sbit_image): Updated.
+
+2015-10-29  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor.
+
+2015-10-29  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt: Remove code to set MSVC's /FD compiler switch.
+
+       Problem reported by David Capello <davidcapello@gmail.com>; see
+
+         http://lists.nongnu.org/archive/html/freetype-devel/2015-10/msg00108.html
+
+       for details.
+
+2015-10-27  Werner Lemberg  <wl@gnu.org>
+
+       [pfr] Add some safety guards (#46302).
+
+       * src/pfr/pfrload.h (PFR_CHECK): Rename to...
+       (PFR_CHECK_SIZE): ... this.
+       (PFR_SIZE): [!PFR_CONFIG_NO_CHECKS]: Define to PFR_CHECK_SIZE.
+
+       * src/pfr/pfrload.c (pfr_log_font_count): Check `count'.
+       (pfr_extra_item_load_kerning_pairs): Remove tracing message.
+       (pfr_phy_font_load): Use PFR_CHECK_SIZE where appropriate.
+       Allocate `chars' after doing a size checks.
+
+       * src/pfr/pfrsbit.c (pfr_load_bitmap_bits): Move test for invalid
+       bitmap format to...
+       (pfr_slot_load_bitmap): ... this function.
+       Check bitmap size.
+
+2015-10-26  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix sanitizing logic for `loca' (#46223).
+
+       * src/truetype/ttpload.c (tt_face_load_loca): A thinko caused an
+       incorrect adjustment of the number of glyphs, most often using far
+       too large values.
+
+2015-10-25  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Improve tracing.
+
+       * src/autofit/afhints.c (af_print_idx, af_get_segment_index,
+       af_get_edge_index): New functions.
+
+       (af_glyph_hints_dump_points): Remove unnecessary `|', `[', and `]'.
+       Add segment and edge index for each point.
+       Slightly change printing order of some elements.
+       Don't print `-1' but `--' for missing elements.
+
+       (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Remove
+       unnecessary `|', `[', and `]'.
+       Don't print `-1' but `--' for missing elements.
+
+2015-10-24  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Sanitize bitmap strike glyph height.
+
+       Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
+
+       * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
+       for `metrics->height' by applying some heuristics.
+
+2015-10-22  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt, type42] Fix clang compiler warnings.
+
+       * src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
+
+       * src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
+
+2015-10-22  Dave Arnold  <darnold@adobe.com>
+           Werner Lemberg  <wl@gnu.org>
+
+       [cff] Avoid overflow/module arithmetic.
+
+       This modifies the addition of subroutine number to subroutine bias
+       from unsigned to signed, but does not change any results.
+
+       * src/cff/cf2ft.c (cf2_initGlobalRegionBuffer,
+       cf2_initLocalRegionBuffer): Change variable names from (unsigned)
+       `idx' to (signed) `subrNum', since it is not an index until after
+       the bias is added.
+       * src/cff/cf2ft.h: Updated.
+
+       * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLSUBR>:
+       Updated similarly.
+
+2015-10-22  Werner Lemberg  <wl@gnu.org>
+
+       [cid] Better check of `SubrCount' dictionary entry (#46272).
+
+       * src/cid/cidload.c (cid_face_open): Add more sanity tests for
+       `fd_bytes', `gd_bytes', `sd_bytes', and `num_subrs'.
+
+2015-10-21  Werner Lemberg  <wl@gnu.org>
+
+       [base] Pacify compiler (#46266).
+
+       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Initialize `in' and
+       `anchor'.
+
+2015-10-21  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Fix heap buffer overflow (#46269).
+
+       * src/type42/t42parse.c (t42_parse_sfnts): Fix off-by-one error in
+       bounds checking.
+
+2015-10-21  Dave Arnold  <darnold@adobe.com>
+
+       [cff] Fix limit in assert for max hints.
+
+       * src/cff/cf2interp.c (cf2_hintmask_setAll): Allow mask equal to the
+       limit (96 bits).
+
+2015-10-21  Dave Arnold  <darnold@adobe.com>
+
+       [cff] Remove an assert (#46107).
+
+       * src/cff/cf2hints.c (cf2_hintmap_insertHint): Ignore paired edges
+       in wrong order.
+
+2015-10-21  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
+
+       * src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
+       only after thorough checks.
+       Add tracing messages.
+
+2015-10-21  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Better check invalid `sfnts' array data (#46255).
+
+       * src/type42/t42parse.c (t42_parse_sfnts): Table lengths must be
+       checked individually against available data size.
+
+2015-10-20  Werner Lemberg  <wl@gnu.org>
+
+       [cid] Add a bunch of safety checks.
+
+       * src/cid/cidload.c (parse_fd_array): Check `num_dicts' against
+       stream size.
+       (cid_read_subrs): Check largest offset against stream size.
+       (cid_parse_dict): Move safety check to ...
+       (cid_face_open): ... this function.
+       Also test length of binary data and values of `SDBytes',
+       `SubrMapOffset', `SubrCount', `CIDMapOffset', and `CIDCount'.
+
+2015-10-20  Werner Lemberg  <wl@gnu.org>
+
+       [cid] Avoid segfault with malformed input (#46250).
+
+       * src/cid/cidload.c (cid_read_subrs): Return a proper error code for
+       unsorted offsets.
+
+2015-10-20  StudioEtrange  <nomorgan@gmail.com>
+
+       * CMakeLists.txt: Enable shared library builds on MinGW (#46233).
+
+2015-10-20  Werner Lemberg  <wl@gnu.org>
+
+       * src/type1/t1afm.c (T1_Read_Metrics): Fix memory leak (#46229).
+
+2015-10-19  Ben Wagner  <bungeman@gmail.com>
+
+       [cid] Better handle invalid glyph stream offsets (#46221).
+
+       * src/cid/cidgload.c (cid_load_glyph): Check minimum size of glyph
+       length.
+
+2015-10-18  Werner Lemberg  <wl@gnu.org>
+
+       [psaux] Fix tracing of negative numbers.
+
+       Due to incorrect casting negative numbers were shown as very large
+       (positive) integers on 64bit systems.
+
+       * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_none>:
+       Use division instead of shift.
+
+2015-10-18  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
+
+       * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
+       with #ifndef ... #endif, as suggested in the tracker issue.
+
+2015-10-18  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Better protection against malformed `fpgm' (#46223).
+
+       * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
+       malformed `fpgm' table more than once.
+
+2015-10-17  Werner Lemberg  <wl@gnu.org>
+
+       * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
+
+       Reported by Kostya Serebryany <kcc@google.com>.
+
+2015-10-17  Werner Lemberg  <wl@gnu.org>
+
+       [bdf] Prevent memory leak (#46217).
+
+       * src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
+       _BDF_GLYPH_BITS.
+
+2015-10-17  Werner Lemberg  <wl@gnu.org>
+
+       [bdf] Use stream size to adjust number of glyphs.
+
+       * src/bdf/bdflib.c (ACMSG17): New message macro.
+       (_bdf_parse_t): Add member `size'.
+       (bdf_load_font): Set `size'.
+       (_bdf_parse_glyphs): Adjust `cnt' if necessary.
+
+2015-10-17  Werner Lemberg  <wl@gnu.org>
+
+       * src/cid/cidload.c (cid_parse_dict): Check `[FG]DBytes' size.
+
+2015-10-17  Werner Lemberg  <wl@gnu.org>
+
+       * src/cid/cidgload.c (cid_glyph_load): Check file offsets (#46222).
+
+2015-10-17  Werner Lemberg  <wl@gnu.org>
+
+       [psaux] Fix heap buffer overflow (#46221).
+
+       * src/psaux/t1decode.c (t1_decoder_parse_charstring) <operator 12>:
+       Fix limit check.
+
+2015-10-17  Werner Lemberg  <wl@gnu.org>
+
+       * src/cid/cidload.c (cid_parse_dict): Handle invalid input (#46220).
+
+2015-10-15  Kostya Serebryany  <kcc@google.com>
+
+       [ftfuzzer] Add README.
+
+       * src/tools/ftfuzzer/README: New file.
+
+2015-10-15  Ben Wagner  <bungeman@gmail.com>
+
+       [bdf] Fix memory leak (#46213).
+
+       * src/bdf/bdflib.c (bdf_load_font): Always go to label `Fail' in
+       case of error.
+
+2015-10-15  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Add TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46208).
+
+       * devel/ftoption.h, include/freetype/config/ftoption.h
+       (TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES): New configuration macro.
+
+       * src/truetype/ttinterp.c (MAX_RUNNABLE_OPCODES): Removed.
+       (TT_RunIns): Updated.
+
+2015-10-15  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttinterp.c (TT_RunIns): Fix bytecode stack tracing.
+
+       The used indices were off by 1.
+
+2015-10-15  Ben Wagner  <bungeman@gmail.com>
+           Werner Lemberg  <wl@gnu.org>
+
+       * src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
+
+2015-10-15  Werner Lemberg  <wl@gnu.org>
+
+       [base] Compute MD5 checksums only if explicitly requested.
+
+       This improves profiling accuracy.
+
+       * src/base/ftobjs.c (FT_Render_Glyph_Internal): Implement it.
+
+2015-10-14  Werner Lemberg  <wl@gnu.org>
+
+       [base] Use `FT_' namespace for MD5 functions (#42366).
+
+       * src/base/ftobjs.c (MD5_*): Define as `FT_MD5_*'.
+       Undefine HAVE_OPENSSL.
+
+2015-10-13  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Correctly handle missing MM axis names (#46202).
+
+       * src/type1/t1load.c (T1_Get_MM_Var): Implement it.
+
+2015-10-13  Werner Lemberg  <wl@gnu.org>
+
+       [pcf] Quickly exit if font index < 0.
+
+       Similar to other font formats, this commit makes the parser no
+       longer check the whole PCF file but only the header and the TOC if
+       we just want to get the number of available faces (and a proper
+       recognition of the font format).
+
+       * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
+       Exit quickly if face_index < 0.
+
+       * src/pcfread.c (pcf_load_font): Add `face_index' argument.
+       Exit quickly if face_index < 0.
+
+       * src/pcf/pcf.h: Updated.
+
+2015-10-13  Werner Lemberg  <wl@gnu.org>
+
+       [ftfuzzer] Handle TTCs and MM/GX variations.
+
+       This patch also contains various other improvements.
+
+       * src/tools/ftfuzzer/ftfuzzer.cc: Add preprocessor guard to reject
+       pre-C++11 compilers.
+       (FT_Global): New class.  Use it to provide a global constructor and
+       destructor for the `FT_Library' object.
+       (setIntermediateAxis): New function to select an (arbitrary)
+       instance.
+       (LLVMFuzzerTestOneInput): Loop over all faces and named instances.
+       Also call `FT_Set_Char_Size'.
+
+2015-10-13  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Refine some GX sanity tests.
+
+       Use the `gvar' table size instead of the remaining bytes in the
+       stream.
+
+       * src/truetype/ttgxvar.h (GX_BlendRec): New field `gvar_size'.
+
+       * src/truetype/ttgxvar.c (ft_var_load_gvar): Set `gvar_size'.
+       (ft_var_readpackedpoints, ft_var_readpackeddeltas: New argument
+       `size'.
+       (tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Updated.
+
+2015-10-13  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Another GX sanity test.
+
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Check
+       `tupleCount'.
+       Add tracing message.
+
+2015-10-13  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix memory leak for broken GX fonts (#46188).
+
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix scope of
+       deallocation.
+
+2015-10-13  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix commit from 2015-10-10.
+
+       * src/truetype/ttgxvar.c (ft_var_load_gvar): Add missing error
+       handling body to condition.
+
+2015-10-12  Werner Lemberg  <wl@gnu.org>
+
+       [unix] Make MKDIR_P actually work.
+
+       * builds/unix/configure.raw: Fix underquoting of `INSTALL' and
+       `MKDIR_P'.
+
+       Problem reported by Dan Liddell <lddll@yahoo.com>.
+
+2015-10-11  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Improve extraction of number of named instances.
+
+       * src/sfnt/sfobjs.c (sfnt_init_face)
+       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
+       `fvar' table size.
+
+2015-10-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix overflow
+       (#46149).
+
+2015-10-10  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Fix infinite loops with broken cmaps (#46167).
+
+       * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
+       of border conditions (i.e., if the loops exit naturally).
+
+2015-10-10  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] More sanity tests for GX handling.
+
+       These tests should mainly help avoid unnecessarily large memory
+       allocations in case of malformed fonts.
+
+       * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
+       ft_var_readpackeddeltas): Check number of points against stream
+       size.
+       (ft_var_load_avar): Check `pairCount' against table length.
+       (ft_var_load_gvar): Check `globalCoordCount' and `glyphCount'
+       against table length.
+       (tt_face_vary_cvt): Check `tupleCount' and `offsetToData'.
+       Fix trace.
+       (TT_Vary_Apply_Glyph_Deltas): Fix trace.
+       Free `sharedpoints' to avoid memory leak.
+
+2015-10-10  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Better protection against malformed GX data (#46166).
+
+       * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Correctly
+       handle empty `localpoints' array.
+
+2015-10-10  Werner Lemberg  <wl@gnu.org>
+
+       * src/pcf/pcfread.c (pcf_read_TOC): Check stream size (#46162).
+
+2015-10-09  Werner Lemberg  <wl@gnu.org>
+
+       * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size.
+
+2015-10-08  Werner Lemberg  <wl@gnu.org>
+
+       [pcf] Protect against invalid number of TOC entries (#46159).
+
+       * src/pcf/pcfread.c (pcf_read_TOC): Check number of TOC entries
+       against size of data stream.
+
+2015-10-08  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Protect against invalid number of glyphs (#46159).
+
+       * src/type42/t42parse.c (t42_parse_charstrings): Check number of
+       `CharStrings' dictionary entries against size of data stream.
+
+2015-10-08  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Fix some signed overflows (#46149).
+
+       * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
+       <TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
+
+2015-10-08  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Protect against invalid number of subroutines (#46150).
+
+       * src/type1/t1load.c (parse_subrs): Check number of
+       `Subrs' dictionary entries against size of data stream.
+
+2015-10-07  Kostya Serebryany  <kcc@google.com>
+
+       [ftfuzzer] Add support for LLVM's LibFuzzer.
+
+       * src/tools/ftfuzzer/ftfuzzer.cc, src/tools/runinput.cc: New files.
+
+2015-10-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Faster alternative line renderer.
+
+       This implementation renders the entire line segment at once without
+       subdividing it into scanlines.  The main speed improvement comes from
+       reducing the number of divisions to just two per line segment, which
+       is a bare minimum to calculate cell coverage in a smooth rasterizer.
+       Notably, the progression from cell to cell does not itself require any
+       divisions at all.  The speed improvement is more noticeable at larger
+       sizes.
+
+       * src/smooth/ftgrays.c (gray_render_line): New implementation.
+
+2015-10-06  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Return correct PS names from pure CFF (#46130).
+
+       * src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
+       SFNT.
+
+2015-10-04  Werner Lemberg  <wl@gnu.org>
+
+       [base] Replace left shifts with multiplication (#46118).
+
+       * src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
+
+2015-10-04  Werner Lemberg  <wl@gnu.org>
+
+       * Version 2.6.1 released.
+       =========================
+
+
+       Tag sources with `VER-2-6-1'.
+
+       * docs/VERSION.DLL: Update documentation and bump version number to
+       2.6.1.
+
+       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2005/index.html,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2008/index.html,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/index.html,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualc/index.html,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj,
+       builds/windows/visualce/index.html,
+       builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2005-ce/index.html,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/index.html: s/2.6/2.6.1/, s/26/261/.
+
+       * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
+
+       * builds/unix/configure.raw (version_info): Set to 18:1:12.
+       * CMakeLists.txt (VERSION_PATCH): Set to 1.
+
+       * src/autofit/afmodule.c [AF_DEBUG_AUTOFIT]: Ensure C linking for
+       dumping functions.
+
+2015-10-04  Werner Lemberg  <wl@gnu.org>
+
+       [bzip2, gzip] Avoid access of uninitialized memory (#46109).
+
+       * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_input), src/gzip/ftgzip.c
+       (ft_gzip_file_fill_input): In case of an error, adjust the limit to
+       avoid copying uninitialized memory.
+
+2015-10-03  Werner Lemberg  <wl@gnu.org>
+
+       [bzip2, gzip] Avoid access of uninitialized memory (#46109).
+
+       * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
+       (ft_gzip_file_fill_output): In case of an error, adjust the limit to
+       avoid copying uninitialized memory.
+
+2015-10-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Clean up worker.
+
+       * src/smooth/ftgrays.c (gray_TWorker): Remove never used fields.
+
+2015-10-01  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
+
+       * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
+       border conditions (i.e., if the loop exits naturally).
+
+2015-10-01  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afranges.c (af_deva_nonbase_uniranges): Fix ranges.
+       They should be a subset of `af_deva_uniranges'.
+
+2015-10-01  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
+
+       * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
+       reject too large glyph indices.
+
+2015-09-30  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [smooth] Clean up worker.
+
+       * src/smooth/ftgrays.c (gray_TWorker): Remove lightly used `last_ey'.
+       (gray_start_cell, gray_render_line): Update.
+
+2015-09-30  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Replace `no-base' with `non-base'.
+
+       * src/autofit/*: Do it.
+
+2015-09-30  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
+
+       * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
+       skip invalid segments.
+       If searching the next character, provide a more efficient logic to
+       speed up the code.
+
+2015-09-30  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Adjust number of glyphs for malformed `loca' tables.
+
+       * src/truetype/ttpload.c (tt_face_load_loca): Implement it.
+
+2015-09-29  Werner Lemberg  <wl@gnu.org>
+
+       [pshinter] Avoid harmless overflow (#45984).
+
+       * src/pshinter/pshglob.c (psh_blues_set_zones): Fix it.
+
+2015-09-28  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Lao script.
+
+       Thanks to Danh Hong <danhhong@gmail.com> for guidance with blue zone
+       characters!
+
+       * src/autofit/afblue.dat: Add blue zone data for Lao.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Lao standard characters.
+
+       * src/autofit/afranges.c: Add Lao data.
+
+       * src/autofit/afstyles.h: Add Lao data.
+
+2015-09-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+       [base] Fix a leak by broken sfnt-PS or resource fork (#46028).
+
+       open_face_from_buffer() frees passed buffer if valid font
+       is not found.  But if copying to the buffer is failed,
+       the allocated buffer should be freed within the caller.
+
+       * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free
+       the buffer `sfnt_ps' if an error caused before calling
+       open_face_from_buffer().
+       (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if
+       an error caused before calling open_face_from_buffer();
+
+2015-09-27  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+       [mac] Fix buffer size calculation for LWFN font.
+
+       * src/base/ftmac.c (read_lwfn): Cast post_size to FT_ULong
+       to prevent confused copy by too large chunk size.
+
+2015-09-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/smooth/ftgrays.c (PIXEL_MASK): Remove unused macro.
+
+2015-09-26  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Minor tracing improvement.
+
+       * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Don't emit
+       blue zones header line if there are no blue zones.
+
+2015-09-26  Werner Lemberg  <wl@gnu.org>
+
+       [bzip2, gzip, lzw] Harmonize function signatures with prototype.
+
+       Suggested by Hin-Tak Leung.
+
+       * src/bzip2/ftbzip2.c (ft_bzip2_stream_io), src/gzip/ftgzip.c
+       (ft_gzip_stream_io), src/lzw/ftlzw.c (ft_lzw_stream_io): Do it.
+
+2015-09-26  Hin-Tak Leung  <htl10@users.sourceforge.net>
+
+       Add new FT_LOAD_COMPUTE_METRICS load flag.
+
+       * include/freetype/freetype.h (FT_LOAD_COMPUTE_METRICS): New macro.
+       * src/truetype/ttgload.c (compute_glyph_metrics): Usage.
+
+2015-09-26  Werner Lemberg  <wl@gnu.org>
+
+       * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add cast.
+
+2015-09-25  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Protect against invalid number of glyphs (#46029).
+
+       * src/type1/t1load.c (parse_charstrings): Check number of
+       `CharStrings' dictionary entries against size of data stream.
+
+2015-09-23  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Better checks for invalid cmaps (2/2) (#46019).
+
+       While the current code in `FT_Get_Next_Char' correctly rejects
+       out-of-bounds glyph indices, it can be extremely slow for malformed
+       cmaps that use 32bit values.  This commit tries to improve that.
+
+       * src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
+       tt_cmap12_char_map_binary, tt_cmap13_next,
+       tt_cmap13_char_map_binary): Reject glyph indices larger than or
+       equal to the number of glyphs.
+
+2015-09-23  Werner Lemberg  <wl@gnu.org>
+
+       [base, sfnt] Better checks for invalid cmaps (1/2).
+
+       * src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
+       glyph indices.
+       (FT_Get_First_Char): Updated.
+
+       * src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
+       codes greater than 0xFFFF.
+
+       (tt_cmap8_char_index): Avoid integer overflow in computation of
+       glyph index.
+       (tt_cmap8_char_next): Avoid integer overflows in computation of
+       both next character code and glyph index.
+
+       (tt_cmap10_char_index): Fix unsigned integer logic.
+       (tt_cmap10_char_next): Avoid integer overflow in computation of
+       next character code.
+
+       (tt_cmap12_next): Avoid integer overflows in computation of both
+       next character code and glyph index.
+       (tt_cmap12_char_map_binary): Ditto.
+       (tt_cmap12_char_next): Simplify.
+
+       (tt_cmap13_char_map_binary): Avoid integer overflow in computation
+       of next character code.
+       (tt_cmap13_char_next): Simplify.
+
+2015-09-21  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
+
+       [base] Check too long POST and sfnt resource (#45919).
+
+       * src/base/ftbase.h (FT_MAC_RFORK_MAX_LEN): Maximum length of the
+       resource fork for Mac OS.  Resource forks larger than 16 MB can be
+       written but can't be handled correctly, at least in Carbon routine.
+       See https://support.microsoft.com/en-us/kb/130437.
+
+       * src/base/ftobjs.c (Mac_Read_POST_Resource): No need to use `0x'
+       prefix for `%p' formatter.
+
+       * src/base/ftbase.c (Mac_Read_POST_Resource): Check the fragment and
+       total size of the concatenated POST resource before buffer
+       allocation.
+       (Mac_Read_sfnt_Resource): Check the declared size of sfnt resource
+       before buffer allocation.
+
+       * src/base/ftmac.c (read_lwfn, FT_New_Face_From_SFNT): Check the
+       total resource size before buffer allocation.
+
+2015-09-19  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Improve handling of invalid SFNT table entries (#45987).
+
+       This patch fixes weaknesses in function `tt_face_load_font_dir'.
+
+       - It incorrectly assumed that valid tables are always at the
+         beginning.  As a consequence, some valid tables after invalid
+         entries (which are ignored) were never seen.
+
+       - Duplicate table entries (this is, having the same tag) were not
+         rejected.
+
+       - The number of valid tables was sometimes too large, leading to
+         access of invalid tables.
+
+       * src/sfnt/ttload.c (check_table_dir): Add argument to return number
+       of valid tables.
+       Add another tracing message.
+       (tt_face_load_font_dir): Only allocate table array for valid
+       entries as returned by `check_table_dir'.
+       Reject duplicate tables and adjust number of valid tables
+       accordingly.
+
+2015-09-19  Werner Lemberg  <wl@gnu.org>
+
+       [pcf] Improve `FT_ABS' fix from 2015-09-17 (#45999).
+
+       * src/pcf/pcfread.c (pcf_load_font): Do first the cast to FT_Short,
+       then take the absolute value.
+       Also apply FT_ABS to `height'.
+
+2015-09-17  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Fix memory leak (#45989).
+
+       * src/type42/t42parse.c (t42_parse_charstrings): Allow only a single
+       `CharStrings' array.
+
+2015-09-17  Werner Lemberg  <wl@gnu.org>
+
+       [psaux] Fix memory leak (#45986).
+
+       * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
+       Free `temp' in case of error.
+
+2015-09-17  Werner Lemberg  <wl@gnu.org>
+
+       [psaux] Improve tracing message.
+
+       * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_MM_BBOX>:
+       Handle plural correctly.
+
+2015-09-17  Werner Lemberg  <wl@gnu.org>
+
+       [pcf] Fix integer overflows (#45985).
+
+       * src/pcf/pcfread.c (pcf_load_font): Use FT_MulDiv.
+
+2015-09-17  Werner Lemberg  <wl@gnu.org>
+
+       [pcf] Use FT_ABS for some property values (#45893).
+
+       * src/pcf/pcfread.c (pcf_load_font): Take absolute values for
+       AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and
+       RESOLUTION_Y.  In tracing mode, add warnings.
+
+2015-09-16  Werner Lemberg  <wl@gnu.org>
+
+       Minor fixes for some clang warnings.
+
+       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
+       initialization.
+
+       * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
+
+2015-09-15  Werner Lemberg  <wl@gnu.org>
+
+       [type1, type42] Fix memory leaks (#45966).
+
+       * src/type1/t1load.c (parse_blend_axis_types): Handle multiple axis
+       names.
+       (parse_blend_design_map): Allow only a single design map.
+       (parse_encoding): Handle multiple encoding vectors.
+
+       * src/type42/t42parse.c (t42_parse_encoding): Handle multiple
+       encoding vectors.
+
+2015-09-15  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix integer type (#45965).
+
+       * src/truetype/ttobjs.c (tt_synth_sfnt_checksum): Implement it.
+
+2015-09-15  Werner Lemberg  <wl@gnu.org>
+
+       * src/pcf/pcfread.c (pcf_load_font): Fix integer overflow (#45964).
+
+2015-09-15  Werner Lemberg  <wl@gnu.org>
+
+       [type1, type42] Check encoding array size (#45961).
+
+       * src/type1/t1load.c (parse_encoding), src/type42/t42parse.c
+       (t42_parse_encoding): Do it.
+
+2015-09-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Improve.
+
+2015-09-14  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Fix another potential buffer overflow (#45955).
+
+       * src/type1/t1parse (T1_Get_Private_Dict): Assure that check for
+       `eexec' doesn't exceed `limit'.
+
+2015-09-13  Werner Lemberg  <wl@gnu.org>
+
+       Replace `mkinstalldirs' with AC_PROG_MKDIR_P.
+
+       * builds/unix/mkinstalldirs: Removed, no longer needed.
+
+       * builds/unix/configure.raw: Call `AC_PROG_MKDIR_P'.
+       Update pwd call for `$INSTALL'.
+
+       * builds/unix/unix-def.in (MKINSTALLDIRS): Use `@MKDIR_P@'.
+
+       * autogen.sh: Updated.
+
+2015-09-13  Werner Lemberg  <wl@gnu.org>
+
+       [winfonts] Check alignment shift count for resource data (#45938).
+
+       * src/winfonts/winfnt.c (fnt_face_get_dll_font): Implement it.
+
+2015-09-13  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Fix potential buffer overflow (#45923).
+
+       * src/type1/t1parse.c (T1_Get_Private_Dict): Assure `cur' doesn't
+       point to end of file buffer.
+
+2015-09-13  Werner Lemberg  <wl@gnu.org>
+
+       [gzip] Fix access of small compressed files (#45937).
+
+       * src/gzip/ftgzip.c (ft_gzip_stream_close): Avoid memory leak.
+
+       (ft_gzip_get_uncompressed_file): Correct byte order while reading
+       unsigned long value.  Without this change, the whole optimization of
+       accessing small files in `FT_Stream_OpenGzip' is never executed!  As
+       a consequence, access to PCF files in general (which are normally
+       small files) should be much improved now as originally intended.
+
+2015-09-11  Werner Lemberg  <wl@gnu.org>
+
+       [psaux] Fix potential buffer overflow (#45922).
+
+       * src/psaux/psobjs.c (ps_parser_skip_PS_token): If a token is
+       enclosed in balanced expressions, ensure that the cursor position
+       doesn't get larger than the current limit.
+
+2015-09-11  Werner Lemberg  <wl@gnu.org>
+
+       [base] Avoid crash while tracing `load_mac_face'.
+
+       Reported in Savannah bug #45919.
+
+       * src/base/ftobjs.c (load_mac_face): Honour FT_OPEN_MEMORY while
+       tracing.
+
+2015-09-11  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Fix endless loop (#45920).
+
+       * src/type42/t42parse.c (t42_parse_encoding): Synchronize with
+       type1's `parse_encoding'.
+
+2015-09-10  Werner Lemberg  <wl@gnu.org>
+
+       [docmaker] Allow `-' in bold and italic markup.
+
+       * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
+       accordingly.
+
+2015-09-09  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/base/ftcalc.c (FT_RoundFix): Improve.
+
+2015-09-09  Wojciech Mamrak  <wmamrak@gmail.com>
+
+       * src/base/ftcalc.c (FT_CeilFix, FT_FloorFix): Normalize.
+
+       This commit makes the functions behave as expected, this is,
+       rounding towards plus or minus infinity.
+
+2015-09-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
+
+2015-09-04  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [raster,smooth] Microoptimizations.
+
+       * src/raster/ftraster.c (Insert_Y_Turn, Finalize_Profile_Table,
+       Bezier_Up): Use do-while loops.
+
+       * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
+       gray_convert_glyph): Ditto.
+
+2015-09-04  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Redesign code ranges (2/2).
+
+       This commit adds two fallback scripts (`latb', `latp') and
+       implements support for the no-base character ranges introduced in
+       the previous commit.
+
+       * src/autofit/aftypes.h (AF_ScriptClassRec): Add
+       `script_uni_nobase_ranges' field.
+       (AF_DEFINE_SCRIPT_CLASS): Updated.
+
+       * src/autofit/afscript.h, src/autofit/afstyles.h: Add `latb' and
+       `latp' fallback scripts.
+
+       * src/autofit/afblue.dat: Add blue zones for Latin subscript and
+       superscript fallback scripts.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afglobal.h (AF_NOBASE): New style flag for no-base
+       characters.
+       (AF_STYLE_MASK): Updated.
+
+       * src/autofit/afglobal.c (SCRIPT): Updated.
+       (af_face_globals_compute_style_coverage): Handle new style flag.
+
+       * src/autofit/aflatin.c (af_latin_hints_apply): Handle new style
+       flag.
+
+       * src/autofit/afranges.h (SCRIPT): Use it to export no-base ranges.
+
+2015-09-04  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Redesign code ranges (1/2).
+
+       This patch introduces auxiliary code ranges that identify no-base
+       characters; they refer to glyphs of a script that should be hinted
+       without alignments to blue zones (mostly diacritics).
+
+       It also splits off ranges for fallback scripts that handle subscript
+       and superscript characters not covered by OpenType features.  For
+       example, this greatly helps improve the hinting of various phonetic
+       alphabets, which contain a large amount characters that look like
+       superscript glyphs.
+
+       Finally, code ranges are updated to Unicode 8.0, and enclosed
+       characters are removed in general since they normally look better if
+       they stay unhinted.
+
+       * src/autofit/afranges.c (af_latn_uniranges): Updated to Unicode
+       8.0.
+       Split off superscript-like and subscript-like glyphs into...
+
+       (af_latb_uniranges, af_latp_uniranges): ... these two new arrays.
+
+       (af_xxxx_nobase_uniranges): New arrays that hold no-base characters
+       of the corresponding character ranges.
+
+2015-09-03  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Pass glyph index to hinting function.
+
+       No functionality change yet.
+
+       * src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
+       glyph index.
+
+       * src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
+       src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
+       (af_indic_hints_apply), src/autofit/aflatin.c
+       (af_latin_hints_apply), src/autofit/aflatin2.c
+       (af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
+       Updated.
+
+2015-08-30  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Code clean-up.
+
+       * src/autofit/afglobal.h (AF_STYLE_MASK): New macro.
+       (AF_STYLE_UNASSIGNED): Use AF_STYLE_MASK for definition.
+
+       * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+       Updated.
+
+2015-08-30  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Make glyph style array use 16bit values.
+
+       * include/freetype/ftautoh.h (FT_Prop_GlyphToScriptMap): Use
+       `FT_UShort' for `map' field.
+
+       * src/autofit/afglobal.c (af_face_globals_compute_style_coverage,
+       af_face_globals_new), src/autofit/hbshim.c, src/autofit/hbshim.h
+       (af_get_coverage): Use FT_UShort for `glyph_styles' array.
+
+       * src/autofit/afglobal.h (AF_STYLE_UNASSIGNED, AF_DIGIT): Extend to
+       16 bits.
+       (AF_FaceGlobalsRec): Use `FT_UShort' for `glyph_styles' field.
+
+2015-08-26  Werner Lemberg  <wl@gnu.org>
+
+       * builds/unix/configure.raw: Need harfbuzz >= 0.9.21 (#45828).
+
+2015-08-25  Werner Lemberg  <wl@gnu.org>
+
+       [base] Improve kerning tracing and documentation.
+
+       * src/base/ftobjs.c (FT_Get_Kerning): Emit tracing message if
+       scaled-down kerning values differ.
+
+2015-08-18  Werner Lemberg  <wl@gnu.org>
+
+       [raster] Remove last remnants of `raster5' driver.
+
+       * src/raster/ftrend1.h (ft_raster5_renderer_class): Removed.
+
+       * src/raster/rastpic.c, src/raster/rastpic.h
+       (ft_raster5_renderer_class_pic_init,
+       ft_raster5_renderer_class_pic_free): Removed.
+
+2015-08-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [base] Improve emboldener (#45596).
+
+       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Correct displacement
+       of zero-length segments.
+
+2015-08-16  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [base] Reoptimize arithmetic.
+
+       * src/base/ftcalc.c (FT_MulDiv, FT_MulFix) [!FT_LONG64]: Remove
+       special cases that slow down the general use.
+
+2015-08-15  pazer  <ibemad@gmail.com>
+
+       Fix C++ compilation (#45762).
+
+       * src/base/ftstroke.c (ft_outline_glyph_class): Use
+       FT_CALLBACK_TABLE.
+
+2015-08-14  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [truetype] Clean up.
+
+       * src/truetype/ttgload.c (TT_Process_Composite_Component): Use
+       `FT_Outline_Transform' and `FT_Outline_Translate'.
+       (translate_array): Dropped.
+
+2015-08-14  Andreas Enge  <andreas.enge@inria.fr>
+
+       * builds/unix/detect.mk (CONFIG_SHELL): Don't handle it (#44261).
+
+2015-08-13  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Introduce named instance access to GX fonts.
+
+       For functions querying a face, bits 16-30 of the face index can hold
+       the named instance index if we have a GX font.  The indices start
+       with value 1; value 0 indicates font access without GX variation
+       data.
+
+       * include/freetype/freetype.h (FT_FaceRec): Update documentation.
+       * include/freetype/internal/sfnt.h: Ditto.
+
+       * src/sfnt/sfobjs.c (sfnt_init_face)
+       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
+       do argument checks.
+       (sfnt_load_face): Updated.
+
+       * src/truetype/ttobjs.c (tt_face_init)
+       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
+       the style name.
+
+       * src/base/ftobjs.c (open_face_from_buffer,
+       open_face_PS_from_sfnt_stream): Updated.
+       * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
+       * src/cff/cffload.c (cff_font_load): Updated.
+
+       * src/cff/cffobjs.c (cff_face_init): Make function exit early for
+       pure CFF fonts if `font_index < 0'.
+       Updated.
+
+       * src/cid/cidobjs.c (cid_face_init): Updated.
+       * src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
+       * src/pfr/pfrobjs.c (pfr_face_init): Updated.
+       * src/type1/t1objs.c (T1_Face_Init): Updated.
+       * src/type42/t42objs.c (T42_Face_Init): Updated.
+       * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
+       Updated.
+
+       * docs/CHANGES: Updated.
+
+2015-08-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [type1,cff,cid] Streamline font matrix application.
+
+       * src/type1/t1gload.c (T1_Load_Glyph): Directly modify advances only
+       if font matrix is not trivial.
+       * src/cff/cffgload.c (cff_slot_load): Ditto.
+       * src/cid/cidgload.c (cid_slot_load_glyph): Ditto for advances and the
+       entire outline.
+
+2015-08-11  Werner Lemberg  <wl@gnu.org>
+
+       [builds/unix] Minor.
+
+       * builds/unix/configure.raw:
+       s/lib{priv,staticconf}/libs{priv,staticconf}/ for orthogonality with
+       similarly named uppercase variables.
+
+2015-08-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [type1,cid,type42] Minor improvements.
+
+       * src/type1/t1load.c (t1_parse_font_matrix): Scale units per EM only
+       when necessary. Refresh comments.
+       * src/cid/cidload.c (cid_parse_font_matrix): Ditto.
+       * src/type42/t42parse.c (t42_parse_font_matrix): Refresh comments.
+
+2015-08-08  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Fix glyph access.
+
+       This is a severe bug: We've missed one level of indirection, as
+       described in the Type 42 specification.  As a result, ftview
+       sometimes showed incorrect glyphs for given glyph names, and even
+       displayed `error 0x0006' (invalid argument!) in case the number of
+       glyph indices differed between the Type 42 font and the embedded
+       TTF.
+
+       Apparently, noone ever noticed it; this shows how much Type 42 fonts
+       are in use...
+
+       * src/type42/t42objs.c (T42_GlyphSlot_Load): Map Type 42 glyph index
+       to embedded TTF's glyph index.
+
+2015-08-08  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Minor clean-up.
+
+       * src/type42/t42parse.c (t42_parse_font_matrix): Remove unused
+       variable.
+
+2015-08-06  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [type42] Parse FontMatrix according to specifications.
+
+       * src/type42/t42parse.c (t42_parse_font_matrix): Type 42 FontMatrix
+       does not need scaling by 1000. Units_per_EM are taken from the
+       embedded TrueType.
+
+2015-08-06  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Improve Arabic hinting.
+
+       Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
+       ttfautohint).
+
+       * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
+       character.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+2015-08-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [truetype] Clean up types.
+
+       * src/truetype/ttobjs.c (TT_Size): Move declaration from here.
+       * include/freetype/internal/tttypes.h (TT_Size): ... to here.
+       (TT_LoaderRec): Switch to appropriate types for `face' and `size'.
+       * src/truetype/ttgload.c: Remove corresponding type casts.
+       * src/truetype/ttsubpix.c: Ditto.
+
+2015-08-05  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Improve recognition of flat vs. rounded segments.
+
+       Lower the flatness threshold from upem/8 to upem/14, making the
+       auto-hinter accept shorter elements.
+
+       Synchronize flat/round stem selection algorithm with blue zone code.
+
+       * src/autofit/aflatin.c (FLAT_THRESHOLD): New macro.
+       (af_latin_metrics_init_blues): Use it.
+       (af_latin_hints_compute_segments): Collect information on maximum
+       and minimum coordinates of `on' points; use this to add a constraint
+       for the flat/round decision similar to
+       `af_latin_metrics_init_blues'.
+
+2015-08-04  Werner Lemberg  <wl@gnu.org>
+
+       Another left-shift bug (#45681).
+
+       * src/base/ftobjs.c (IsMacBinary): Only accept positive values for
+       `dlen'.
+
+2015-08-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [base] Fix `ft_corner_orientation'.
+
+       Remove casting from `FT_Long' to `FT_Int' that might change the sign
+       of the return value and make it faster too.
+
+       * src/base/ftcalc.c (ft_corner_orientation): On 32-bit systems, stay
+       with 32-bit arithmetic when safe. Use plain math on 64-bit systems.
+       * src/pshinter/pshalgo.c: Remove old unused code.
+
+2015-08-03  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttgload.c (load_truetype_glyph)
+       [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix crash for composite glyphs
+       having a depth greater than 1.
+
+2015-08-03  Werner Lemberg  <wl@gnu.org>
+
+       Fix typo in clang bug from 2015-07-31 (#45678).
+
+       * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Fix inequality.
+
+2015-08-02  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt: Improve shared library support.
+
+       Based on a patch from John Cary <cary@txcorp.com>.
+
+2015-08-02  Werner Lemberg  <wl@gnu.org>
+
+       * builds/unix/freetype-config.in (enable_shared): Remove.  Unused.
+
+2015-08-02  Werner Lemberg  <wl@gnu.org>
+
+       Fix more invalid left-shifts.
+
+       * src/pfr/pfrgload.c (pfr_glyph_load_compound): Use multiplication,
+       not left-shift.
+
+       * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
+       tt_face_vary_cvt, TT_Vary_Apply_Glyph_Deltas): Use multiplication,
+       not left-shift.
+
+2015-07-31  Werner Lemberg  <wl@gnu.org>
+
+       Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
+
+       * src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
+       positive values from header.
+       Check overflow.
+
+       * src/base/ftoutln.c (SCALED): Correctly handle left-shift of
+       negative values.
+
+       * src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
+       _bdf_clear_glyph_modified): Use unsigned long constant.
+
+       * src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
+       left-shift values that can be negative.
+
+       * src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
+       left-shift values that can be negative.
+
+       * src/raster/ftraster.c (SCALED): Correctly handle left-shift of
+       negative values.
+
+       * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
+       values that can be negative.
+
+       * src/truetype/ttgload.c (TT_Load_Composite_Glyph,
+       compute_glyph_metrics, load_sbit_image): Don't left-shift values
+       that can be negative.
+
+2015-07-31  Werner Lemberg  <wl@gnu.org>
+
+       Define FT_LONG_MAX.
+
+       * include/freetype/config/ftstdlib.h (FT_LONG_MAX): New macro.
+       * src/cff/cf2arrst.c (cf2_arrstack_setNumElements): Use it.
+
+2015-07-28  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/base/ftcalc.c (FT_Vector_NormLen): Clarify.
+
+2015-07-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/base/ftcalc.c (FT_Vector_NormLen): Explicate type conversions.
+
+2015-07-26  Matthias Clasen  <matthias.clasen@gmail.com>
+
+       [cff] Don't use `hmtx' table for LSB (#45520).
+
+       * src/cff/cffgload.c (cff_slot_load): Use `htmx' table for advance
+       width only.  Bug introduced 2015-04-10.
+
+2015-07-09  Werner Lemberg  <wl@gnu.org>
+
+       Better support of user-supplied C++ namespaces.
+
+       See
+
+         http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
+
+       for a rationale.
+
+       * src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
+       src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
+       src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
+       (FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
+       header files that contain FT_{BEGIN,END}_HEADER macros by
+       themselves.
+
+       * src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
+       FT_CONFIG_STANDARD_LIBRARY_H earlier.
+
+       * src/truetype/ttpic.h: Include FT_INTERNAL_PIC_H.
+
+2015-07-07  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Make `tt_face_get_name' member of the SFNT interface.
+
+       * include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
+       prototype.
+       (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
+
+       * src/sfnt/sfdriver.c (sfnt_interface): Updated.
+
+       * src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
+       * src/sfnt/sfobjs.h: Add prototype for it.
+
+2015-06-30  Werner Lemberg  <wl@gnu.org>
+
+       Fix some clang compiler warnings.
+
+       * src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
+       (cf2_interpT2CharString), src/truetype/ttgload.c
+       (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
+       src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
+
+2015-06-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [truetype] Speed up bytecode interpreter.
+
+       * src/truetype/ttinterp.c (Normalize): Use `FT_Vector_NormLen'.
+
+2015-06-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [base] Speed up emboldening.
+
+       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
+       `FT_Vector_NormLen'.
+
+2015-06-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [base] Implement fast vector normalization.
+
+       The function uses Newton's iterations instead of dividing vector
+       components by its length, which needs a square root. This is,
+       literally, a bit less accurate but a lot faster.
+
+       * src/base/ftcalc.c (FT_Vector_NormLen): New function.
+
+2015-06-28  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt: Always create `ftconfig.h'.
+
+       For non-UNIX builds, the file stays unmodified.  However, it's
+       better to have the main configuration files at the same place
+       regardless of the OS.
+
+2015-06-28  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt: Improve MSVC support (#43737).
+
+2015-06-28  Werner Lemberg  <wl@gnu.org>
+
+       [cmake] Check for libraries and create `ftoption.h'.
+
+       * builds/FindHarfBuzz.cmake: New file, taken from
+
+         https://trac.webkit.org/browser/trunk/Source/cmake/FindHarfBuzz.cmake
+
+       * CMakeLists.Txt: Add path to local cmake modules.
+       Find dependencies for zlib, bzip2, libpng, and harfbuzz.
+       Create `ftoption.h' file.
+       Set up include and linker stuff for libraries.
+
+2015-06-28  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt: Fix creation of `ftconfig.h'.
+       Check for UNIX header files using `check_include_file'.
+       Set up correct header include directories.
+
+2015-06-28  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt: Disallow in-source builds.
+
+2015-06-27  Werner Lemberg  <wl@gnu.org>
+
+       * src/tools/docmaker/utils.py (check_output): Add missing `\n'.
+
+2015-06-26  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt: Select platform-dependent `ftdebug.c'.
+
+2015-06-25  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt: Use cmake functions for generating `ftconfig.h'.
+       Additionally, do this for UNIX only.
+
+2015-06-25  Werner Lemberg  <wl@gnu.org>
+
+       * CMakeLists.txt (BASE_SRCS): Use `ftbase.c' and `psnames.c'.
+
+2015-06-25  Werner Lemberg  <wl@gnu.org>
+
+       Another adjustment to header locations.
+
+       This change is a result of a discussion thread on freetype-devel
+
+         http://lists.nongnu.org/archive/html/freetype-devel/2015-06/msg00041.html
+
+       Re-introduce the `freetype2' subdirectory for all FreeType header
+       files after installation, and rename the `freetype2' subdirectory in
+       the git repository to `freetype'.
+
+       * include/freetype2: Renamed to...
+       * include/freetype: This.
+
+       * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
+       PRIVATE_HEADERS): Updated.
+       Update creation of `ftconfig.h'.
+       Install generated `ftconfig.h'.
+
+       * Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
+
+       * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
+       (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
+       builds/unix/freetype2.in: Updated.
+
+       * builds/unix/freetype-config.in: Updated.
+       * builds/unix/configure.raw: Don't check for `rmdir'.
+       * builds/unix/unix-def.in (DELDIR): Use `rm -rf', which is portable
+       according to the autoconf info manual.
+       * builds/unix/install.mk (install, uninstall,
+       distclean_project_unix): Update and simplify.
+
+       * builds/wince/*, builds/windows/*: Updated.
+
+       * devel/ft2build.h, include/ft2build.h: Updated.
+
+       * include/freetype2/config/ftheader.h,
+       include/freetype2/internal/ftserv.h,
+       include/freetype2/internal/internal.h: Update all header file
+       macros.
+
+       * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
+
+       * docs/*: Updated.
+
+2015-06-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/bdf/bdflib.c (_bdf_parse_start): Disallow 0 bpp.
+
+2015-06-24  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/bdf/bdflib.c (_bdf_parse_start): Simplify bpp parsing.
+
+2015-06-23  Werner Lemberg  <wl@gnu.org>
+
+       s/TYPEOF/FT_TYPEOF/ (#45376).
+
+       * builds/unix/ftconfig.in, builds/vms/ftconfig.in,
+       include/freetype2/config/ftconfig.h,
+       include/freetype2/internal/ftobjs.h, src/autofit/afwarp.h: Do it.
+
+2015-06-22  Werner Lemberg  <wl@gnu.org>
+
+       Fix Savannah bug #45097.
+
+       We no longer `pollute' the namespace of possible header file names;
+       instead we move `ft2build.h' up by one level so that it gets
+       installed in the default include directory (e.g.,
+       /usr/local/include).  After this commit, only `ft2build.h' stays in
+       the compiler's include path.
+
+       No visible changes for the user who follows the standard FreeType
+       header inclusion rules.
+
+       * include/*: Move to ...
+       * include/freetype2/*: This directory, except `ft2build.h'.
+
+       * CMakeLists.txt (PUBLIC_HEADERS, PUBLIC_CONFIG_HEADERS,
+       PRIVATE_HEADERS), Jamfile (HDRMACRO, RefDoc), autogen.sh: Updated.
+
+       * builds/amiga/include/config/ftconfig.h, builds/freetype.mk
+       (PUBLIC_DIR), builds/symbian/bld.inf, builds/toplevel.mk (work),
+       builds/unix/install.mk (install, uninstall),
+       builds/unix/freetype2.in: Updated.
+
+       * builds/unix/freetype-config.in: Updated.
+       Emit -I directory only if it is not `/usr/include'.
+
+       * builds/wince/*, builds/windows/*: Updated.
+
+       * devel/ft2build.h, include/ft2build.h: Updated.
+
+       * include/freetype2/config/ftheader.h,
+       include/freetype2/internal/ftserv.h,
+       include/freetype2/internal/internal.h: Update all header file
+       macros.
+
+       * src/tools/chktrcmp.py (TRACE_DEF_FILES): Updated.
+
+2015-06-21  Werner Lemberg  <wl@gnu.org>
+
+       Make Jam support work again.
+
+       This is just very basic stuff and just a little bit tested on
+       GNU/Linux only.  I won't delve into this since I'm not a Jam user.
+
+       * Jamfile: Call `HDRMACRO' for `ftserv.h' also.
+       (DEFINES): Replace with...
+       (CCFLAGS): ... this.
+
+       * src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
+       already handled in the top-level Jamfile.
+
+       * src/autofit/Jamfile (DEFINES): Replace with...
+       (CCFLAGS): ... this.
+       (_sources): Add missing files.
+
+       * src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
+       longer contains macro header definitions.
+
+       * src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
+       src/truetype/Jamfile (_sources): Add missing files.
+
+2015-06-16  Werner Lemberg  <wl@gnu.org>
+
+       Fix Savannah bug #45326.
+
+       * src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
+       definitions.
+
+2015-06-07  Werner Lemberg  <wl@gnu.org>
+
+       * Version 2.6 released.
+       =======================
+
+
+       Tag sources with `VER-2-6'.
+
+       * docs/VERSION.DLL: Update documentation and bump version number to
+       2.6.
+
+       * README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2005/index.html,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2008/index.html,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/index.html,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualc/index.html,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj,
+       builds/windows/visualce/index.html,
+       builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2005-ce/index.html,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/index.html: s/2.5.5/2.6/, s/255/26/.
+
+       * include/freetype/freetype.h (FREETYPE_MINOR): Set to 6.
+       (FREETYPE_PATCH): Set to 0.
+
+       * builds/unix/configure.raw (version_info): Set to 18:0:12.
+       * CMakeLists.txt (VERSION_MINOR): Set to 6.
+       (VERSION_PATCH): Set to 0.
+
+       * src/autofit/afmodule.c [!FT_MAKE_OPTION_SINGLE_OBJECT]: Add
+       declarations for dumping functions.
+
+       * src/truetype/ttinterp.c (TT_New_Context): Pacify compiler.
+
+       * builds/toplevel.mk: Use `freetype.mk's code to compute the version
+       string.
+       Don't include a zero patch level in version string.
+       * builds/freetype.mk: Remove code for computing the version string.
+
+2015-06-06  Ashish Azad  <ashish.azad@samsung.com>
+
+       Fix Savannah bug #45260.
+
+       * src/pfr/pfrdrivr.c (pfr_get_kerning): Fix typo.
+
+2015-06-03  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix memory leak.
+
+       Problem reported by Grissiom <chaos.proton@gmail.com>; in
+
+         http://lists.nongnu.org/archive/html/freetype/2015-05/msg00013.html
+
+       there is an example code to trigger the bug.
+
+       * src/truetype/ttobjs.c (tt_size_init_bytecode): Free old `size'
+       data before allocating again.  Bug most probably introduced four
+       years ago in version 2.4.3.
+
+2015-06-02  Werner Lemberg  <wl@gnu.org>
+
+       [raster] Add more tracing.
+
+       * src/raster/ftraster.c (FT_TRACE7) [_STANDALONE_]: Define.
+       (Vertical_Sweep_Span, Vertical_Sweep_Drop, Horizontal_Sweep_Span,
+       Horizontal_Sweep_Drop, Render_Glyph): Add tracing calls.
+
+2015-06-01  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] While tracing opcodes, show code position and stack.
+
+       * src/truetype/ttinterp.c: Change all existing TRACE7 calls to
+       TRACE6.
+       (opcode_name): Add string lengths.
+       (TT_RunIns): Implement display of code position and stack.
+
+2015-05-31  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] In GX, make private point numbers work correctly.
+
+       This is completely missing in Apple's documentation: If a `gvar'
+       tuple uses private point numbers (this is, deltas are specified for
+       some points only), the uncovered points must be interpolated for
+       this tuple similar to the IUP bytecode instruction.  Examples that
+       need this functionality are glyphs `Oslash' and `Q' in Skia.ttf.
+
+       * src/truetype/ttgxvar.c (tt_delta_shift, tt_delta_interpolate,
+       tt_handle_deltas): New functions.
+       (TT_Vary_Get_Glyph_Deltas): Renamed to...
+       (TT_Vary_Apply_Glyph_Deltas): ... this; it directly processes the
+       points and does no longer return an array of deltas.
+       Add tracing information.
+       Call `tt_handle_deltas' to interpolate missing deltas.
+       Also fix a minor memory leak in case of error.
+
+       * src/truetype/ttgxvar.h: Updated.
+
+       * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+       load_truetype_glyph): Updated.
+
+2015-05-31  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] In GX, make intermediate tuplets work at extrema.
+
+       * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix range condition.
+
+2015-05-31  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Add tracing information to GX code.
+
+       * src/truetype/ttgxvar.c (ft_var_load_avar, ft_var_load_gvar,
+       ft_var_apply_tuple, TT_Get_MM_Var, TT_Set_MM_Blend,
+       TT_Set_Var_Design, tt_face_vary_cvt): Do it.
+
+2015-05-28  Werner Lemberg  <wl@gnu.org>
+
+       * src/tools/apinames.c (names_dump): Fix invalid reference.
+
+       Problem reported by Guzman Mosqueda, Jose R
+       <jose.r.guzman.mosqueda@intel.com>.
+
+2015-05-24  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix commit from 2015-05-22.
+
+       * src/truetype/ttgload.c, src/truetype/ttinterp.c: Guard new code
+       with `TT_CONFIG_OPTION_SUBPIXEL_HINTING'.
+
+       Problem reported by Nikolaus Waxweiler <madigens@gmail.com>.
+
+2015-05-23  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix return values of GETINFO bytecode instruction.
+
+       * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
+       `vertical_lcd' and `gray_cleartype'.
+
+       * src/truetype/ttgload.c (tt_loader_init): Initialize new fields.
+       Change `symmetrical smoothing' to TRUE, since FreeType produces
+       exactly this.
+
+       * src/truetype/ttinterp.c (Ins_GETINFO): Fix selector/return bit
+       values for symmetrical smoothing, namely 11/18.
+       Handle bits for vertical LCD subpixels (8/15) and Gray ClearType
+       (12/19).
+
+2015-05-23  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Minor.
+
+       * src/truetype/ttinterp.h (TT_ExecContext):
+        s/subpixel/subpixel_hinting.
+
+       * src/truetype/ttgload.c, src/truetype/ttgload.h: Updated.
+
+2015-05-22  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Support selector index 3 of the INSTCTRL instruction.
+
+       This flag activates `native ClearType hinting', disabling backward
+       compatibility mode as described in Greg Hitchcocks whitepaper.  In
+       other words, it enables unrestricted functionality of all TrueType
+       instructions in ClearType.
+
+       * src/truetype/ttgload.c (tt_get_metrics): Call `sph_set_tweaks'
+       unconditionally.
+       (tt_loader_init): Unset `ignore_x_mode' flag if bit 2 of
+       `GS.instruct_control' is active.
+
+       * src/truetype/ttinterp.c (Ins_INSTCTRL): Handle selector index 3.
+       (Ins_GETINFO): Updated.
+
+       * docs/CHANGES: Document it.
+
+2015-05-20  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Minor.
+
+       * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
+       argument.
+
+2015-05-17  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Fix loading of composite glyphs.
+
+       * src/truetype/ttgload.c (TT_Load_Composite_Glyph): If the
+       ARGS_ARE_XY_VALUES flag is not set, handle argument values as
+       unsigned.  I trust `ttx' (which has exactly such code) that it does
+       the right thing here...
+
+       The reason that noone has ever noticed this bug is probably the fact
+       that point-aligned subglyphs are rare, as are subglyphs with a
+       number of points in the range [128;255], which is quite large (or
+       even in the range [32768;65535], which is extremely unlikely).
+
+2015-05-12  Chris Liddell  <chris.liddell@artifex.com>
+
+       [cff] Make the `*curveto' operators more tolerant.
+
+       * src/cff/cf2intrp.c (cf2_interpT2CharString): The opcodes
+       `vvcurveto', `hhcurveto', `vhcurveto', and `hvcurveto' all iterate,
+       pulling values off the stack until the stack is exhausted.
+       Implicitly the stack must be a multiple (or for subtly different
+       behaviour) a multiple plus a specific number of extra values deep.
+       If that's not the case, enforce it (as the old code did).
+
+2015-05-12  Chris Liddell  <chris.liddell@artifex.com>
+
+       [cff] fix incremental interface with new cff code.
+
+       * src/cff/cf2ft.c (cf2_getSeacComponent): When using the incremental
+       interface to retrieve glyph data for a SEAC, it be left to the
+       incremental interface callback to apply the encoding to raw
+       character index (as it was in the previous code).
+
+2015-04-29  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [autofit] Speed up IUP.
+
+       * src/autofit/afhints.c (af_iup_interp): Separate trivial snapping to
+       the same position from true interpolation, use `scale' to reduce
+       divisions.
+
+2015-04-28  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Use `name' table for PS name if we have a SFNT-CFF.
+
+       This follows the OpenType 1.7 specification.  See
+
+         http://tug.org/pipermail/tex-live/2015-April/036634.html
+
+       for a discussion.
+
+       * src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
+       have an SFNT.
+
+2015-04-27  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [truetype] Speed up IUP.
+
+       * src/truetype/ttinterp.c (_iup_worker_interpolate): Separate trivial
+       snapping to the same position from true interpolation.
+
+2015-04-21  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] By default, enable warping code but switch off warping.
+
+       Suggested by Behdad.
+
+       * include/config/ftoption.h: Define AF_CONFIG_OPTION_USE_WARPER.
+
+       * src/autofit/afmodule.c (af_autofitter_init): Initialize `warping'
+       with `false'.
+
+2015-04-21  Werner Lemberg  <wl@gnu.org>
+
+       * docs/CHANGES: Updated.
+
+2015-04-21  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Introduce `warping' property.
+
+       This code replaces the debugging hook from the previous commit with
+       a better, more generic solution.
+
+       * include/ftautoh.h: Document it.
+
+       * src/autofit/afmodule.h (AF_ModuleRec)
+       [AF_CONFIG_OPTION_USE_WARPER]: Add `warping' field.
+
+       * src/autofit/afmodule.c (_af_debug_disable_warper): Remove.
+       (af_property_set, af_property_get, af_autofitter_init)
+       [AF_CONFIG_OPTION_USE_WARPER]: Handle `warping' option.
+
+       * src/autofit/afhints.h (AF_HINTS_DO_WARP): Remove use of the no
+       longer existing `_af_debug_disable_warper'.
+
+       * src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
+       (af_latin_hints_init), src/autofit/aflatin2.c (af_latin2_hints_init)
+       [AF_CONFIG_OPTION_USE_WARPER]: Add `AF_SCALER_FLAG_NO_WARPER' to the
+       scaler flags if warping is off.
+
+       * src/autofit/aftypes.h: Updated.
+
+2015-04-16  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add debugging hook to disable warper.
+
+       * src/autofit/afmodule.c (_af_debug_disable_warper)
+       [FT_DEBUG_AUTOFIT]: New global variable.
+
+       * src/autofit/aftypes.h: Updated.
+       (AF_SCALER_FLAG_NO_WARPER): New macro (not actively used yet).
+
+       * src/autofit/afhints.h (AF_HINTS_DO_WARP): New macro.
+
+       * src/autofit/aflatin.c (af_latin_hints_apply)
+       [AF_CONFIG_OPTION_USE_WARPER]: Use `AF_HINTS_DO_WARP' to control use
+       of warper.
+
+       * src/autofit/afcjk.c (af_cjk_hints_init, af_cjk_hints_apply)
+       [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
+
+       * src/autofit/aflatin2.c (af_latin2_hints_apply)
+       [AF_CONFIG_OPTION_USE_WARPER]: Synchronize with `aflatin.c'.
+
+2015-04-10  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Update advance width handling to OpenType 1.7.
+
+       Problem reported by Behdad.
+
+       * src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
+       separately.
+
+       * src/cff/cffgload.c (cff_slot_load): Use advance width and side
+       bearing values from `hmtx' table if present.
+
+2015-04-03  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/autofit/afhints.c (af_glyph_hints_reload): Use do-while loop.
+
+2015-04-02  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/autofit/aflatin.c (af_latin_hint_edges): Reduce logic.
+
+2015-04-01  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [autofit] Finish the thought.
+
+       * src/autofit/afhints.c (af_direction_compute): make sure the long arm
+       is never negative so that its `FT_ABS' is not necessary.
+
+2015-04-01  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Call dumper functions for tracing.
+
+       * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
+       * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
+       improvement.
+       * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
+
+2015-04-01  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Make debugging stuff work again.
+
+       The interface to ftgrid was broken in the series of commits starting
+       with
+
+         [autofit] Allocate AF_Loader on the stack instead of AF_Module.
+
+       from 2015-01-14.
+
+       * src/autofit/afmodule.c (_af_debug_hints_rec) [FT_DEBUG_AUTOFIT]:
+       Use a global AF_GlyphHintsRec object for debugging.
+       (af_autofitter_done, af_autofitter_load_glyph): Updated.
+
+       * src/autofit/afloader.c (af_loader_init, af_loader_done): Updated.
+
+2015-04-01  Werner Lemberg  <wl@gnu.org>
+
+       * src/autofit/afhints.c (af_glyph_hints_done): Fix minor thinko.
+
+2015-03-29  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Fix Savannah bug #44629.
+
+       * src/cff/cf2font.h (CF2_MAX_SUBR), src/cff/cffgload.h
+       (CFF_MAX_SUBRS_CALLS): Set to 16.
+
+2015-03-29  Werner Lemberg  <wl@gnu.org>
+
+       [type1, truetype] Make the MM API more flexible w.r.t. `num_coords'.
+
+       This commit allows `num_coords' to be larger or smaller than the
+       number of available axes while selecting a design instance, either
+       ignoring excess data or using defaults if data is missing.
+
+       * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design):
+       Implement it.
+
+       * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design,
+       T1_Set_Var_Design): Ditto.
+
+2015-03-29  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Minor.
+
+       * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_Design): Use
+       FT_THROW.
+       (T1_Set_Var_Design): Use T1_MAX_MM_AXIS and FT_THROW.
+
+2015-03-27  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Trace charstring nesting levels.
+
+       * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdCALLGSUBR,
+       cf2_cmdCALLSUBR, cf2_cmdRETURN>: Implement it.
+
+       * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+       <cff_op_callsubr, cff_op_callgsubr, cff_op_return>: Ditto.
+
+2015-03-21  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       [base] Optimize `FT_Angle_Diff'.
+
+       Under normal circumstances we are usually close to the desired range
+       of angle values, so that the remainder is not really necessary.
+
+       * src/base/fttrigon.c (FT_Angle_Diff): Use loops instead of remainder.
+
+       * src/autofit/aftypes.h (AF_ANGLE_DIFF): Ditto in the unused macro.
+
+2015-03-21  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Improve `gvar' handling.
+
+       * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
+       single-element runs.  Cf. glyph `Q' in Skia.ttf with weights larger
+       than the default.
+
+2015-03-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
+
+2015-03-17  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       Fix Savannah bug #44412 (part 2).
+
+       * src/base/fttrigon.c (FT_Sin, FT_Cos, FT_Tan): Call `FT_Vector_Unit'.
+
+2015-03-11  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Arabic script.
+
+       Thanks to Titus Nemeth <tn@tntypography.eu> for guidance!
+
+       * src/autofit/afblue.dat: Add blue zone data for Arabic.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Arabic standard characters.
+
+       * src/autofit/afranges.c: Add Arabic data.
+
+       * src/autofit/afstyles.h: Add Arabic data.
+
+       * docs/CHANGES: Document it.
+
+2015-03-11  Werner Lemberg  <wl@gnu.org>
+
+       Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
+
+       * include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
+       to...
+       (FT_SERVICE_FONT_FORMAT_H): This.
+
+       * include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
+       to ...
+       (FT_FONT_FORMAT_*): This.
+
+       src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
+       src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
+       src/truetype/ttdriver.c, src/type1/t1driver.c,
+       src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
+
+2015-03-11  Werner Lemberg  <wl@gnu.org>
+
+       [base] Rename `FT_XFREE86_H' to `FT_FONT_FORMATS_H'.
+
+       * include/config/ftheader.h: Implement it.
+       * src/base/ftfntfmt.c, docs/CHANGES: Updated.
+
+2015-03-11  Werner Lemberg  <wl@gnu.org>
+
+       [base] Rename `FT_Get_X11_Font_Format' to `FT_Get_Font_Format'.
+
+       * include/ftfntfmt.h, src/base/ftfntfmt.c: Implement it.
+
+       * docs/CHANGES: Updated.
+
+2015-03-11  Werner Lemberg  <wl@gnu.org>
+
+       Fix automatic copyright updating.
+
+       * src/tools/update-copyright: Make scanning of `no-copyright'
+       actually work.
+
+       * src/tools/no-copyright: Don't include README in general.
+
+2015-03-11  Werner Lemberg  <wl@gnu.org>
+
+       Rename `ftxf86.[ch]' to `ftfntfmt.[ch]'.
+
+       CMakeLists.txt, builds/amiga/makefile, builds/amiga/makefile.os4,
+       builds/amiga/smakefile, builds/mac/FreeType.m68k_cfm.make.txt,
+       builds/mac/FreeType.m68k_far.make.txt,
+       builds/mac/FreeType.ppc_carbon.make.txt,
+       builds/mac/FreeType.ppc_classic.make.txt, builds/symbian/bld.inf,
+       builds/symbian/freetype.mmp, builds/wince/vc2005-ce/freetype.vcproj,
+       builds/wince/vc2008-ce/freetype.vcproj,
+       builds/windows/vc2005/freetype.vcproj,
+       builds/windows/vc2008/freetype.vcproj,
+       builds/windows/vc2010/freetype.vcxproj,
+       builds/windows/vc2010/freetype.vcxproj.filters,
+       builds/windows/visualc/freetype.dsp,
+       builds/windows/visualc/freetype.vcproj,
+       builds/windows/visualce/freetype.dsp,
+       builds/windows/visualce/freetype.vcproj, docs/INSTALL.ANY,
+       include/config/ftheader.h, include/ftfntfmt.h, modules.cfg,
+       src/base/ftfntfmt.c, vms_make.com: Updated.
+
+2015-03-10  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       Fix Savannah bug #44412 (part 1).
+
+       * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
+
+2015-03-10  Werner Lemberg  <wl@gnu.org>
+
+       [base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
+
+       * include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
+       Update all callers.
+
+       * docs/CHANGES: Updated.
+
+2015-03-06  Werner Lemberg  <wl@gnu.org>
+
+       * src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
+
+       Found by Alexei.
+
+2015-03-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+       * src/base/ftstroke.c: Simplify.
+
+2015-03-04  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Some fixes and code refactoring in `ttgxvar.c'.
+
+       * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix return value
+       of `point_cnt' if two bytes are read.
+       Use a more vertical coding style.
+       (ft_var_readpackeddeltas): Use FT_UInt for `delta_cnt' parameter.
+       Use a more vertical coding style.
+
+2015-03-03  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Fix Savannah bug #44241.
+
+       * src/autofit/aflatin.c (af_latin_metrics_init_blues): Reject glyphs
+       with less than 3 points.
+
+2015-03-02  Werner Lemberg  <wl@gnu.org>
+
+       Simplify `TYPEOF' macro.
+
+       No need for two arguments.
+
+       * include/config/ftconfig.h, builds/unix/ftconfig.in,
+       builds/vms/ftconfig.h (TYPEOF): Updated.
+
+       * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
+       src/autofit/afwarp.h (AF_WARPER_FLOOR): Updated.
+
+2015-03-01  Werner Lemberg  <wl@gnu.org>
+
+       Various compiler warning fixes for `make multi'.
+
+       * src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
+       src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
+       af_latin_hint_edges), src/autofit/aflatin2.c
+       (af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
+       as `static'.
+
+       * src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
+       Removed.  Unused.
+       * src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
+       * src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed.  Unused.
+
+       * src/cff/cf2intrp.c: Include `cf2intrp.h'.
+       * src/cff/cffdrivr.c (PAIR_TAG): Removed.  Unused.
+
+       * src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed.  Unused.
+
+       * src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
+
+       * src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
+       Removed.  Unused.
+
+       * src/raster/ftraster.c (Render_Glyph): Declare as `static'.
+
+       * src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
+
+       * src/truetype/ttdriver.c (PAIR_TAG): Removed.  Unused.
+       * src/truetype/ttsubpix.c (is_member_of_family_class,
+       is_member_of_style_class): Declare as `static'.
+
+       * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
+       as `static'.
+       * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
+       `static'.
+       (T1_FIELD_COUNT): Removed.  Unused.
+       * src/type1/t1parse.h (T1_Done_Table): Removed.  Unused.
+
+       * src/type42/t42parse.c (T1_Done_Table): Removed.  Unused.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
+       [psaux] Signedness fixes.
+
+       * include/internal/psaux.h, src/psaux/afmparse.c,
+       src/psaux/afmparse.h, src/psaux/psconv.c, src/psaux/psobjs.c,
+       src/psaux/t1cmap.c, src/psaux/t1decode.c: Apply.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
+       [otvalid] Signedness fixes.
+
+       * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
+       src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
+       Apply.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
+       * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
+       [lzw] Signedness fixes.
+
+       * src/lzw/ftzopen.c, src/lzw/ftzopen.h: Apply.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
+       [gxvalid] Signedness fixes.
+
+       * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
+       src/gxvalid/gxvcommn.h, src/gxvalid/gxvjust.c,
+       src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
+       src/gxvalid/gxvmort1.c, src/gxvalid/gxvmort2.c,
+       src/gxvalid/gxvmorx.c, src/gxvalid/gxvmorx1.c,
+       src/gxvalid/gxvmorx2.c, src/gxvalid/gxvopbd.c,
+       src/gxvalid/gxvprop.c, src/gxvalid/gxvtrak.c: Apply.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
+       [cache] Signedness fixes.
+
+       * src/cache/ftcbasic.c, src/cache/ftccmap.c, src/cache/ftcimage.c,
+       src/cache/ftcmanag.c, src/cache/ftcsbits.c: Apply.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
+       Change dimension fields in `FTC_ImageTypeRec' to unsigned type.
+
+       This doesn't break ABI.
+
+       * include/ftcache.h (FTC_ImageTypeRec): Use unsigned types for
+       `width' and `height'.
+
+       * docs/CHANGES: Document it.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
+       [cache] Don't use `labs'.
+
+       This is the only place in FreeType where this function was used.
+
+       * include/config/ftstdlib.h (ft_labs): Remove.
+
+       * src/cache/ftcimage.c (ftc_inode_weight): Replace `ft_labs' with
+       `FT_ABS'.
+
+2015-02-23  Werner Lemberg  <wl@gnu.org>
+
+       [cache] Replace `FT_PtrDist' with `FT_Offset'.
+
+       * src/cache/ftccache.h (FTC_NodeRec): `FT_Offset' (a.k.a. `size_t')
+       is a better choice for `hash' to hold a pointer than `FT_PtrDist'
+       (a.k.a. `ptrdiff_t'), especially since the latter is signed,
+       causing zillions of signedness warnings.  [Note that `hash' was of
+       type `FT_UInt32' before the change to `FT_PtrDist'.]
+       Update all users.
+
+       * src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c,
+       src/cache/ftcglyph.c, src/cache/ftcglyph.h: Updated.
+
+2015-02-23  Werner Lemberg  <wl@gnu.org>
+
+       [smooth, raster] Re-enable standalone compilation.
+
+       * src/raster/ftraster.c (FT_RENDER_POOL_SIZE, FT_MAX)
+       [_STANDALONE_]: Define macros.
+
+       * src/smooth/ftgrays.c (FT_RENDER_POOL_SIZE, FT_MAX, FT_ABS,
+       FT_HYPOT) [_STANDALONE_]: Define macros.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       [smooth] Signedness fixes.
+
+       * src/smooth/ftgrays.c, src/smooth/ftsmooth.c: Apply.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       * src/raster/ftraster.c: Use the file's typedefs everywhere.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       * src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
+
+       Bug introduced 6 commits earlier.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       [pshinter] Fix thinko.
+
+       * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Correctly
+       check `count'.
+       Bug introduced two commits earlier.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       [raster] Signedness fixes.
+
+       * src/raster/ftraster.c, src/raster/ftrend1.c: Apply.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       [pshinter] Signedness fixes.
+
+       * src/pshinter/pshalgo.c, src/pshinter/pshglob.c,
+       src/pshinter/pshrec.c: Apply.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       [pshinter] Use macros for (unsigned) flags, not enumerations.
+
+       * src/pshinter/pshalgo.h (PSH_Hint_Flags): Replace with macros.
+       Updated.
+       * src/pshinter/pshrec.h (PS_Hint_Flags): Replace with macros.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       * src/pshinter/pshrec.c: Simplify.
+       (ps_hints_open, ps_hints_stem): Remove switch statement.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Signedness fixes.
+
+       * src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
+       src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
+       src/sfnt/ttsbit.c: Apply.
+       * src/sfnt/sfdriver.c: Apply.
+       (sfnt_get_ps_name): Simplify.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       [bdf] Signedness fixes.
+
+       * src/bdf/bdf.h, src/bdf/bdfdrivr.c, src/bdf/bdfdrivr.h,
+       src/bdf/bdflib.c: Apply.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       * src/bdf/bdflib.c (_bdf_atous): New function.
+       (_bdf_parse_glyphs, _bdf_parse_start): Use it.
+
+2015-02-22  Werner Lemberg  <wl@gnu.org>
+
+       [pcf] Signedness fixes.
+
+       * src/pcf/pcf.h, src/pcf/pcfdrivr.c: Apply.
+       * src/pcf/pcfread.c: Apply.
+       (pcf_get_encodings): Ignore invalid negative encoding offsets.
+
+2015-02-21  Werner Lemberg  <wl@gnu.org>
+
+       * src/winfonts/winfnt.c: Signedness fixes.
+
+2015-02-21  Werner Lemberg  <wl@gnu.org>
+
+       [type42] Signedness fixes.
+
+       * src/type42/t42parse.c, src/type42/t42parse.h,
+       src/type42/t42types.h: Apply.
+
+2015-02-21  Werner Lemberg  <wl@gnu.org>
+
+       [pfr] Signedness fixes.
+
+       * src/pfr/pfrdrivr.c, src/pfr/pfrgload.c, src/pfr/pfrload.c,
+       src/pfr/pfrload.h, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c,
+       src/pfr/pfrtypes.h: Apply.
+
+2015-02-21  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Minor signedness fixes related to last commit.
+
+       * src/cff/cf2ft.c, src/cff/cf2intrp.c, src/cff/cffgload.c: Apply.
+
+2015-02-20  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Thinkos in bias handling.
+
+       Only the final result is always positive.
+
+       Bug introduced three commits earlier.
+
+       * src/cff/cffgload.c, src/cff/cffgload.h: Apply.
+
+2015-02-20  Werner Lemberg  <wl@gnu.org>
+
+       [cid] Fix signedness issues and emit some better error codes.
+
+       * src/cid/cidgload.c, src/cid/cidload.h, src/cid/cidobjs.c,
+       src/cid/cidparse.h: Apply.
+       * src/cid/cidload.c: Apply.
+       (parse_fd_array): Reject negative values for number of dictionaries.
+       * src/cid/cidparse.c: Apply.
+       (cid_parser_new): Reject negative values for hex data length.
+
+2015-02-20  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Signedness fixes for new engine.
+
+       * src/cff/cf2arrst.c, src/cff/cf2fixed.h, src/cff/cf2ft.c,
+       src/cff/cf2ft.h, src/cff/cf2hints.c, src/cff/cf2intrp.c: Apply.
+
+2015-02-20  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Signedness fixes for basic infrastructure and old engine.
+
+       * include/internal/pshints.h, src/cff/cffdrivr.c,
+       src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
+       src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
+
+2015-02-19  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
+
+       This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
+       version exists), but some fonts set it incorrectly.
+
+       Problem reported by Adam Twardoch <adam@fontlab.com>.
+
+2015-02-19  Werner Lemberg  <wl@gnu.org>
+
+       [cff] Emit better error code for invalid private dict size.
+
+       * src/cff/cffparse.c (cff_parse_private_dict): Reject negative
+       values for size and offset.
+
+2015-02-19  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Fix signedness issues.
+
+       * src/autofit/afangles.c, src/autofit/afcjk.c,
+       src/autofit/afglobal.c, src/autofit/afhints.c,
+       src/autofit/aflatin.c, src/autofit/aflatin2.c, src/autofit/afwarp.c,
+       src/autofit/hbshim.c: Apply.
+
+2015-02-19  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Use macros for (unsigned) flags, not enumerations.
+
+       This harmonizes with other code in FreeType (and reduces the number
+       of necessary casts to avoid compiler warnings).
+
+       * src/autofit/afblue.hin: Make flag macros unsigned.
+       * src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afcjk.h: Replace flag enumeration with macros.
+       * src/autofit/afcjk.c: Updated.
+
+       * src/autofit/afhints.h (AF_Flags, AF_Edge_Flags): Replace with
+       macros.
+       * src/autofit/afhints.c: Updated.
+
+       * src/autofit/aflatin.h: Replace flag enumerations with macros.
+       * src/autofit/aflatin.c, src/autofit/aflatin2.c: Updated.
+
+       * src/autofit/aftypes.h (AF_ScalerFlags): Replace with macros.
+
+2015-02-18  Werner Lemberg  <wl@gnu.org>
+
+       [type1] Fix signedness issues.
+
+       * include/internal/psaux.h, include/internal/t1types.h,
+       src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
+       src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
+
+2015-02-18  Werner Lemberg  <wl@gnu.org>
+
+       [psaux, type1] Fix minor AFM issues.
+
+       * include/internal/t1types.h (AFM_KernPairRec): Make indices
+       unsigned.
+       Update users.
+       (AFM_FontInfoRec): Make element counters unsigned.
+       Update users.
+       * src/psaux/afmparse.h (AFM_ValueRec): Add union member for unsigned
+       int.
+
+       * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
+       Reject negative values for number of kerning elements.
+
+       * src/type1/t1afm.c, src/tools/test_afm.c: Updated.
+
+2015-02-18  Werner Lemberg  <wl@gnu.org>
+
+       Don't use `FT_PtrDist' for lengths.
+
+       Use FT_UInt instead.
+
+       * include/internal/psaux.h (PS_Table_FuncsRec, PS_TableRec,
+       T1_DecoderRec): Do it.
+
+       * include/internal/t1types.h (T1_FontRec): Ditto.
+
+       * src/cid/cidload.c (cid_parse_dict): Updated.
+       * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Ditto.
+       * src/psaux/psobjs.c (ps_table_add), src/psaux/psobjs.h: Ditto.
+       * src/type1/t1load.c (parse_blend_axis_types, parse_encoding,
+       parse_charstrings, parse_dict): Ditto.
+       * src/type42/t42parse.c (t42_parse_encoding, t42_parse_charstrings,
+       t42_parse_dict): Ditto.
+
+2015-02-18  Werner Lemberg  <wl@gnu.org>
+
+       * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.
+       This handles negative values better, avoiding many casts.
+
+2015-02-17  Werner Lemberg  <wl@gnu.org>
+
+       [base] Fix Savannah bug #44284.
+
+       * src/base/ftcalc.c (FT_MulFix): Typos.
+
+2015-02-17  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Finish compiler warning fixes for signedness issues.
+
+       * src/truetype/ttgxvar.c, src/truetype/ttsubpix.c,
+       src/truetype/ttsubpix.h: Apply.
+
+2015-02-17  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttsubpix.c: Adding missing `static' keywords.
+
+2015-02-17  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] More signedness fixes.
+
+       * include/internal/tttypes.h, src/truetype/ttinterp.h,
+       src/truetype/ttobjs.h, src/truetype/ttinterp.c,
+       src/truetype/ttobjs.c: Apply.
+
+2015-02-17  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Various signedness fixes.
+
+       * include/internal/ftgloadr.h, src/truetype/ttpload.c: Apply.
+
+       * src/truetype/ttgload.c: Apply.
+       (TT_Get_VMetrics): Protect against invalid ascenders and descenders
+       while constructing advance height.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       [base] Finish compiler warning fixes for signedness issues.
+
+       * src/base/ftglyph.c, src/base/ftlcdfil.c, src/base/ftstroke.c:
+       Apply.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       * include/tttables.h (TT_OS2): `fsType' must be FT_UShort.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       More minor signedness warning fixes.
+
+       * src/base/ftbbox.c, src/base/ftbitmap.c, src/base/fttrigon.c,
+       src/base/ftutil.c: Apply.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       Next round of minor compiler warning fixes.
+
+       * include/internal/ftrfork.h (FT_RFork_Ref): Change `offset' member
+       type to `FT_Long'.
+       (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Add `static' keyword.
+
+       * include/internal/ftstream.h (FT_Stream_Pos): Return `FT_ULong'.
+
+       * src/base/ftoutln.c, src/base/ftrfork.c, src/base/ftstream.c:
+       Signedness fixes.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       Various minor signedness fixes.
+
+       * include/ftadvanc.h, include/internal/ftobjs.h,
+       src/base/ftgloadr.c, src/base/ftobjs.c: Apply.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       New `TYPEOF' macro.
+
+       This helps suppress signedness warnings, avoiding issues with
+       implicit conversion changes.
+
+       * include/config/ftconfig.h, builds/unix/ftconfig.in,
+       builds/vms/ftconfig.h (TYPEOF): Define.
+
+       * include/internal/ftobjs.h (FT_PAD_FLOOR, FT_PIX_FLOOR),
+       src/autofit/afwarp.h (AF_WARPER_FLOOR): Use it.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       * src/base/ftsystem.c: Use casts in standard C function wrappers.
+       (ft_alloc, ft_realloc, ft_ansi_stream_io, FT_Stream_Open): Do it.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       Fix Savannah bug #44261.
+
+       * builds/unix/detect.mk (setup) [unix]: Set `CONFIG_SHELL' in the
+       environment also while calling the configure script.
+
+2015-02-16  Werner Lemberg  <wl@gnu.org>
+
+       * include/internal/ftmemory.h: Add some `FT_Offset' casts.
+       (FT_MEM_SET, FT_MEM_COPY, FT_MEM_MOVE, FT_ARRAY_ZERO, FT_ARRAY_COPY,
+       FT_MEM_MOVE): Do it.
+
+2015-02-15  Werner Lemberg  <wl@gnu.org>
+
+       [base] Clean up signedness issues in `ftdbgmem.c'.
+
+       Also fix other minor issues.
+
+       * src/base/ftdbgmem.c (FT_MemTableRec): Replace all FT_ULong types
+       with FT_Long for consistency.
+       (ft_mem_primes): Change type to `FT_Int'.
+       (ft_mem_closest_prime, ft_mem_table_set): Updated.
+
+       (ft_mem_debug_panic, ft_mem_debug_alloc, ft_mem_debug_free,
+       ft_mem_debug_realloc): Use `static' keyword and fix signedness
+       warnings where necessary.
+
+       (ft_mem_table_resize, ft_mem_table_new, ft_mem_table_destroy,
+       ft_mem_table_get_nodep, ft_mem_debug_init, FT_DumpMemory): Fix types
+       and add or remove casts to avoid signedness warnings.
+
+2015-02-15  Werner Lemberg  <wl@gnu.org>
+
+       [base] Clean up signedness in arithmetic functions.
+
+       This makes the code more readable and reduces compiler warnings.
+
+       * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_MulFix,
+       FT_DivFix): Convert input parameters to unsigned, do the
+       computation, then convert the result back to signed.
+       (ft_corner_orientation): Fix casts.
+
+2015-02-07  Werner Lemberg  <wl@gnu.org>
+
+       [sfnt] Fix Savannah bug #44184.
+
+       * src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
+       longer reject `htmx' and `vmtx' tables with invalid length but
+       sanitize them.
+
+2015-02-06  Jon Anderson  <jon@websupergoo.com>
+
+       [truetype] Fix regression in the incremental glyph loader.
+
+       * src/truetype/ttgload.c (load_truetype_glyph): For incremental
+       fonts, the glyph index may be greater than the number of glyphs
+       indicated, so guard the check with a preprocessor conditional.
+
+2015-02-06  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Fix potential memory leak.
+
+       While this doesn't show up with FreeType, exactly the same code
+       leaks with ttfautohint's modified auto-hinter code (which gets used
+       in a slightly different way).
+
+       It certainly doesn't harm since it is similar to already existing
+       checks in the code for embedded arrays.
+
+       * src/autofit/afhints.c (af_glyph_hints_reload): Set `max_contours'
+       and `max_points' for all cases.
+
+2015-01-31  Werner Lemberg  <wl@gnu.org>
+
+       [autofit] Add support for Thai script.
+
+       Thanks to Ben Mitchell <ben@rosettatype.com> for guidance with blue
+       zone characters!
+
+       * src/autofit/afblue.dat: Add blue zone data for Thai.
+
+       * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+       * src/autofit/afscript.h: Add Thai standard characters.
+
+       * src/autofit/afranges.c: Add Thai data.
+
+       * src/autofit/afstyles.h: Add Thai data.
+
+2015-01-23  Behdad Esfahbod  <behdad@behdad.org>
+
+       [raster] Handle `FT_RASTER_FLAG_AA' correctly.
+
+       This fixes a breakage caused by the commit `[raster] Remove
+       5-level gray AA mode from monochrome rasterizer.'.
+
+       Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>.
+
+       * src/raster/ftraster.c (ft_black_render): Handle
+       `FT_RASTER_FLAG_AA'.
+
+       * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode
+       remnants.
+
+2015-01-18  Werner Lemberg  <wl@gnu.org>
+
+       * src/base/ftobjs.c (FT_New_Library): Fix compiler warning.
+
+2015-01-18  Chris Liddell  <chris.liddell@artifex.com>
+
+       [raster] Fix Savannah bug #44022.
+
+       Add fallback for glyphs with degenerate bounding boxes.
+
+       If a glyph has only one very narrow feature, the bbox can end up
+       with either the width or height of the bbox being 0, in which case
+       no raster memory is allocated and no attempt is made to render the
+       glyph.  This is less than ideal when the drop-out compensation in
+       the rendering code would actually result in the glyph being
+       rendered.
+
+       This problem can be observed with the `I' glyph (gid 47) in the
+       Autodesk RomanS TrueType font.
+
+       * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either
+       dimension is zero to explicitly round up/down (instead of simply
+       round).
+
+2015-01-17  Werner Lemberg  <wl@gnu.org>
+
+       Add some tools to handle yearly copyright notice updates.
+
+       We are now following the GNU guidelines: A new release automatically
+       means that the copyright year of all affected files gets updated; it
+       is no longer used to track years of modification changes.
+
+       * src/tools/update-copyright-year: New Perl script.
+       * src/tools/update-copyright: New shell script that calls
+       `update-copyright-year' on all files.
+       * src/tools/no-copyright: Exceptions that should not be handled by
+       `update-copyright'
+
+2015-01-14  Werner Lemberg  <wl@gnu.org>
+
+       * docs/CHANGES: Updated, using a description from Behdad.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [autofit] Add embedded array of segments and edges.
+
+       Avoids multiple mallocs per typical glyphs.
+
+       With this and recent changes to avoid mallocs, the thread-safe
+       stack-based loader is now as fast as the previous model that had one
+       cached singleton.
+
+       * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED):
+       New macros.
+       (AF_AxisHintsRec): Add two arrays for segments and edges.
+
+       * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate
+       data if number of segments exceeds given threshold value.
+       (af_axis_hints_new_edge):  Only allocate data if number of edges
+       exceeds given threshold value.
+       (af_glyph_hints_done): Updated.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [autofit] Add embedded arrays for points and contours.
+
+       This avoids at least two malloc calls for typical glyphs.
+
+       * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED):
+       New macros.
+       (AF_GlyphHintsRec): Add two arrays for contours and points.
+
+       * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done):
+       Updated.
+       (af_glyph_hints_reload): Only allocate data if number of contours or
+       points exceeds given threshold values.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [autofit] Allocate hints object on the stack.
+
+       This avoids one malloc per load.
+
+       * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to
+       `AF_GlyphHints'.
+       Update prototype.
+
+       * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints'
+       parameter instead of `FT_Memory'.
+       (af_loader_done): Directly reset `load_hints'.
+       (af_loader_load_g): Updated.
+
+       * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local
+       `hints' object.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [autofit] Reuse slot glyph loader.
+
+       No need to create a new glyph loader; we can reuse the one from
+       `slot->internal->loader'.  It's hard to tell why it was written that
+       way originally, but new code looks sound and correct to me, and
+       avoids lots of allocations.
+
+       * src/autofit/afloader.c (af_loader_init): Change return type to
+       `void'.
+       Don't call `FT_GlyphLoader_New'.
+       (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'.
+       (af_loader_load_g): Update code to use `internal->loader', which
+       doesn't need copying of data.
+
+       * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member.
+       Update prototype.
+
+       * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [autofit] Remove (unused) support for composite glyphs.
+
+       We never have to deal with composite glyphs in the autohinter, as
+       those will be loaded into FORMAT_OUTLINE by the recursed
+       `FT_Load_Glyph' function.
+
+       In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply
+       FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies
+       FT_LOAD_NO_HINTING:
+
+         /* resolve load flags dependencies */
+
+         if ( load_flags & FT_LOAD_NO_RECURSE )
+           load_flags |= FT_LOAD_NO_SCALE         |
+                         FT_LOAD_IGNORE_TRANSFORM;
+
+         if ( load_flags & FT_LOAD_NO_SCALE )
+         {
+           load_flags |= FT_LOAD_NO_HINTING |
+                         FT_LOAD_NO_BITMAP;
+
+           load_flags &= ~FT_LOAD_RENDER;
+         }
+
+       and as such the auto-hinter is never called.  Thus, the recursion in
+       `af_loader_load_g' never actually happens.  So remove the depth
+       counter as well.
+
+       * src/autofit/afloader.c (af_loader_load_g): Remove `depth'
+       parameter.
+       <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code.
+       (af_loader_load_glyph): Updated.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [raster] Fix uninitialized memory access.
+
+       Apparently `ras.cProfile' might be uninitialized.  This will be the
+       case if `ras.top == ras.cProfile->offset', as can be seen in
+       `End_Profile'.  The overshoot code introduced in a change `Fix B/W
+       rasterization of subglyphs with different drop-out modes.' (from
+       2009-06-18) violated this, accessing `ras.cProfile->flags'
+       unconditionally just before calling `End_Profile' (which then
+       detected that `cProfile' is uninitialized and didn't touch it).
+
+       This was harmless, and was not detected by valgrind before because
+       the objects were allocated on the `raster_pool', which was always
+       initialized.  With recent change to allocate raster buffers on the
+       stack, valgrind now reported this invalid access.
+
+       * src/raster/ftraster.c (Convert_Glyph): Don't access an
+       uninitialized `cProfile'.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [smooth] Fix uninitialized memory access.
+
+       Looks like `ras.span_y' could always be used without initialization.
+       This was never detected by valgrind before because the library-wide
+       `raster_pool' was used for the worker object and `raster_pool' was
+       originally zero'ed.  But subsequent reuses of it were using `span_y'
+       uninitialized.  With the recent change to not use `render_pool' and
+       allocate worker and buffer on the stack, valgrind now detects this
+       uninitialized access.
+
+       * src/smooth/ftgrays.c (gray_raster_render): Initialize
+       `ras.span_y'.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [base] Don't initialize unused `driver->glyph_loader'.
+
+       * src/base/ftobjs.c (Destroy_Driver): Don't call
+       `FT_GlyphLoader_Done'.
+       (FT_Add_Module): Don't call `FT_GlyphLoader_New'.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [base] Don't allocate `library->raster_pool' anymore.
+
+       It's unused after the following commits:
+
+         [raster] Allocate render pool for mono rasterizer on the stack.
+         [raster] Remove 5-level gray AA mode from monochrome rasterizer.
+
+       The value of FT_RENDER_POOL_SIZE still serves the purpose it used to
+       serve, which is, to adjust the pool size.  But the pool is now
+       allocated on the stack on demand.
+
+       * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [base] Do not reorder library->renderers upon use.
+
+       Instead of keeping `library->renderers' in a MRU order, just leave
+       it as-is.  The MRU machinery wasn't thread-safe.
+
+       With this patch, rasterizing glyphs from different faces from
+       different threads doesn't fail choosing rasterizer
+       (FT_Err_Cannot_Render_Glyph).
+
+       Easiest to see that crash was to add a `printf' (or otherwise let
+       thread yield in FT_Throw with debugging enabled).
+
+       * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c
+       (FT_Outline_Render): Don't call `FT_Set_Renderer'.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [raster] Allocate render pool for mono rasterizer on the stack.
+
+       Instead of using the `render_pool' member of `FT_Library' that is
+       provided down to the rasterizer, completely ignore that and allocate
+       needed objects on the stack instead.
+
+       With this patch, rasterizing glyphs from different faces from
+       different threads doesn't crash in the monochrome rasterizer.
+
+       * src/raster/ftraster.c (black_TRaster): Remove `buffer',
+       `buffer_size', and `worker' members.
+
+       (ft_black_render): Create `buffer' locally.
+       (ft_black_reset): Updated.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [raster] Remove 5-level gray AA mode from monochrome rasterizer.
+
+       It was off by default and couldn't be turned on at runtime.  And the
+       smooth rasterizer superseded it over ten years ago.  No point in
+       keeping.  Comments suggested that it was there for compatibility
+       with FreeType 1.
+
+       550 lines down.
+
+       * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING,
+       RASTER_GRAY_LINES): Remove macros and all associated code.
+
+       (black_TWorker): Remove `gray_min_x' and `gray_max_x'.
+       (black_TRaster): Remove `grays' and `gray_width'.
+
+       (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop,
+       ft_black_render): Updated.
+
+       * src/raster/ftrend1.c (ft_raster1_render): Simplify code.
+       (ft_raster5_renderer_class): Removed.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [smooth] Allocate render pool for smooth rasterizer on the stack.
+
+       Instead of using the `render_pool' member of `FT_Library' that is
+       provided down to the rasterizer, completely ignore that and allocate
+       needed objects on the stack instead.
+
+       With this patch, rasterizing glyphs from different faces from
+       different threads doesn't crash in the smooth rasterizer.
+
+       Bugs:
+
+         https://bugzilla.redhat.com/show_bug.cgi?id=678397
+         https://bugzilla.redhat.com/show_bug.cgi?id=1004315
+         https://bugzilla.redhat.com/show_bug.cgi?id=1165471
+         https://bugs.freedesktop.org/show_bug.cgi?id=69034
+
+       * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer',
+       `buffer_size', `band_size', and `worker' members.
+
+       (gray_raster_render): Create `buffer', `buffer_size', and
+       `band_size' locally.
+       (gray_raster_reset): Updated.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver.
+
+       Previously the code had stipulation for using a per-TT_Size exec
+       context if `size->debug' was true.  But there was no way that
+       `size->debug' could *ever* be true.  As such, the code was always
+       using the singleton `TT_ExecContext' that was stored in `TT_Driver'.
+       This was, clearly, not threadsafe.
+
+       With this patch, loading glyphs from different faces from different
+       threads doesn't crash in the bytecode loader code.
+
+       * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member.
+       (TT_DriverRec): Remove `context' member.
+
+       * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove
+       `TT_ExecContext' code related to a global `TT_Driver' object.
+
+       (tt_driver_done): Don't remove `TT_ExecContext' object here but ...
+       (tt_size_done_bytecode): ... here.
+
+       (tt_driver_init): Don't create `TT_ExecContext' object here but ...
+       (tt_size_init_bytecode): ... here, only on demand.
+
+       * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug
+       code.
+       (TT_New_Context): Remove `TT_ExecContext' code related to a global
+       `TT_Driver' object.
+
+       * src/truetype/ttinterp.h: Updated.
+
+       * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       [autofit] Allocate AF_Loader on the stack instead of AF_Module.
+
+       Stop sharing a global `AF_Loader'.  Allocate one on the stack during
+       glyph load.
+
+       Right now this results in about 25% slowdown, to be fixed in a
+       following commit.
+
+       With this patch loading glyphs from different faces from different
+       threads doesn't immediately crash in the autohinting loader code.
+
+       Bugs:
+
+         https://bugzilla.redhat.com/show_bug.cgi?id=1164941
+
+       * src/autofit/afloader.c (af_loader_init): Pass
+       `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments.
+       (af_loader_reset, af_loader_load_glyph): Also pass `loader' as
+       argument.
+       (af_loader_done): Use `AF_Loader' instead of `AF_Module' as
+       argument.
+
+       * src/autofit/afmodule.c (af_autofitter_init): Don't call
+       `af_loader_init'.
+       (af_autofitter_done): Don't call `af_loader_done'.
+       (af_autofitter_load_glyph): Use a local `AF_Loader' object.
+
+       * src/autofit/afloader.h: Include `afmodule.h'.
+       Update prototypes.
+       Move typedef for `AF_Module' to...
+
+       * src/autofit/afmodule.h: ... this place.
+       No longer include `afloader.h'.
+
+2015-01-14  Behdad Esfahbod  <behdad@behdad.org>
+
+       * src/type42/t42objs.h (T42_DriverRec): Remove unused member.
+
+2015-01-12  Werner Lemberg  <wl@gnu.org>
+
+       Fix Savannah bug #43976.
+
+       Assure that FreeType's internal include directories are found before
+       `CPPFLAGS' (which might be set by the user in the environment), and
+       `CPPFLAGS' before `CFLAGS'.
+
+       * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
+       (FT_COMPILE): Make this a special variable for compiling only the
+       files handled in `freetype.mk'.
+       (.c.$O): Removed, unused.
+
+       * src/*/rules.mk (*_COMPILE): Fix order of include directories.
+
+2015-01-11  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Prettifying.
+
+       * src/truetype/ttinterp.c (project, dualproj, fast_project,
+       fast_dualproj): Rename to...
+       (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this.
+
+2015-01-11  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify.
+
+       Based on a patch from Behdad.
+
+2015-01-11  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call.
+
+2015-01-11  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttinterp.c (Normalize): Remove unused argument.
+
+2015-01-11  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] More macro expansions.
+
+       * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by
+       expansion.
+
+2015-01-11  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] More macro expansions.
+
+       * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion,
+       adjusting function calls where necessary.
+       (FT_UNUSED_ARG): Removed, no longer needed.
+
+2015-01-10  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] More macro expansions.
+
+       Based on a patch from Behdad.
+
+       * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding
+       `Ins_*' functions.
+       (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls.
+       (ARRAY_BOUND_ERROR): Remove second definition, which is no longer
+       needed.
+       (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with...
+       (Ins_SxyTCA): New function.
+
+2015-01-10  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH.
+
+       Behdad suggested this code simplification, and nobody objected...
+
+       * include/config/ftoption.h, devel/ftoption.h
+       (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove.
+
+       * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]:
+       Remove related code.
+       (ARRAY_BOUND_ERROR): Use do-while loop.
+
+2015-01-10  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] More macro expansions.
+
+       * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_,
+       EXEC_ARG): Remove by replacing with expansion.
+
+2015-01-10  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] More macro expansions.
+
+       Based on a patch from Behdad.
+
+       * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize,
+       SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move,
+       CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem,
+       CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt,
+       CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round,
+       COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing
+       with expansion.
+
+       (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project,
+       CUR_fast_dualproj): Replace with macros `project', `dualproj',
+       `fast_project', `fast_dualproj'.
+
+2015-01-10  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] More macro expansions.
+
+       * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing
+       with expansion.
+
+2015-01-10  Werner Lemberg  <wl@gnu.org>
+
+       [truetype] Remove code for static TrueType interpreter.
+
+       This is a follow-up patch.
+
+       * src/truetype/ttinterp.c, src/truetype/ttinterp.h
+       [TT_CONFIG_OPTION_STATIC_INTERPRETER,
+       TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code.
+
+2015-01-10  Werner Lemberg  <wl@gnu.org>
+
+       * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion.
+
+       This starts a series of patches that simplifies the code of the
+       bytecode interpreter.
+
+
+----------------------------------------------------------------------------
+
+Copyright 2015-2017 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used, modified,
+and distributed under the terms of the FreeType project license,
+LICENSE.TXT.  By continuing to use, modify, or distribute this file you
+indicate that you have read the license and understand and accept it
+fully.
+
+
+Local Variables:
+version-control: never
+coding: utf-8
+End:
diff --git a/Jamfile b/Jamfile
index 9d837ba..5df9b8f 100644 (file)
--- a/Jamfile
+++ b/Jamfile
@@ -1,6 +1,6 @@
 # FreeType 2 top Jamfile.
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -210,7 +210,7 @@ actions RefDoc
 {
   python $(FT2_SRC)/tools/docmaker/docmaker.py
          --prefix=ft2
-         --title=FreeType-2.6.5
+         --title=FreeType-2.8
          --output=$(DOC_DIR)
          $(FT2_INCLUDE)/freetype/*.h
          $(FT2_INCLUDE)/freetype/config/*.h
index 1e2d9b7..0047e53 100644 (file)
--- a/Jamrules
+++ b/Jamrules
@@ -1,6 +1,6 @@
 # FreeType 2 JamRules.
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index e370cae..1c41458 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
diff --git a/README b/README
index 23c10ab..926e9dc 100644 (file)
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
-  FreeType 2.6.5
-  ==============
+  FreeType 2.8
+  ============
 
   Homepage: http://www.freetype.org
 
@@ -24,9 +24,9 @@
 
   and download one of the following files.
 
-    freetype-doc-2.6.5.tar.bz2
-    freetype-doc-2.6.5.tar.gz
-    ftdoc265.zip
+    freetype-doc-2.8.tar.bz2
+    freetype-doc-2.8.tar.gz
+    ftdoc28.zip
 
   To view the documentation online, go to
 
@@ -71,7 +71,7 @@
 
 ----------------------------------------------------------------------
 
-Copyright 2006-2016 by
+Copyright 2006-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index 34ee82d..06f778b 100644 (file)
@@ -37,7 +37,7 @@ repository.
 
 ----------------------------------------------------------------------
 
-Copyright 2005-2016 by
+Copyright 2005-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index 78053cc..31c1534 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright 2005-2016 by
+# Copyright 2005-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index eae9e33..fb44116 100644 (file)
@@ -1,7 +1,7 @@
 
 README for the builds/amiga subdirectory.
 
-Copyright 2005-2016 by
+Copyright 2005-2017 by
 Werner Lemberg and Detlef Würkner.
 
 This file is part of the FreeType project, and may only be used, modified,
index 0cb65b6..9434841 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Amiga-specific configuration file (specification only).              */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  Werner Lemberg and Detlef Würkner.                                     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index bbff9c5..38ea4c9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Amiga-specific FreeType module selection.                            */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  Werner Lemberg and Detlef Würkner.                                     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 34ba77d..e467f9a 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 
-# Copyright 2005-2016 by
+# Copyright 2005-2017 by
 # Werner Lemberg and Detlef Würkner.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index a25dd3e..82ee864 100644 (file)
@@ -4,7 +4,7 @@
 #
 
 
-# Copyright 2005-2016 by
+# Copyright 2005-2017 by
 # Werner Lemberg and Detlef Würkner.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 723a890..08e0a38 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2005-2016 by
+# Copyright 2005-2017 by
 # Werner Lemberg and Detlef Würkner.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 4ac6eef..1a897cf 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Debugging and logging component for amiga (body).                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner.       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 080eaef..c3960d9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Amiga-specific FreeType low-level system interface (body).           */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner.       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 933232d..d3c0f28 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 19a3e1f..b33e8ce 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index edd356e..fa6f236 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 4b9e097..181efe4 100644 (file)
@@ -2,7 +2,7 @@
 # FreeType 2 configuration rules for a BeOS system
 #
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index e85bc41..30f6d10 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 378dbd8..5717e6a 100644 (file)
@@ -1,6 +1,6 @@
 # iOS.cmake
 #
-# Copyright 2014-2016 by
+# Copyright 2014-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # Written by David Wimsey <david@wimsey.us>
index e05dd29..34aded7 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh -e
 
-# Copyright 2015-2016 by
+# Copyright 2015-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 688b0c7..d619641 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index a53fcef..9b43fd1 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 398b853..82e3829 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 2ce52be..a25e4bc 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2003-2016 by
+# Copyright 2003-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index f87f94d..8994fa2 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index e102c6d..3465038 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index b2e7047..287db44 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 20011f8..560c61b 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 14e6229..2aa4fbe 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 62dc9d2..e86ecc5 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index da3d19d..62a4811 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index bd0d4be..91b429e 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index cea55a5..4ed478e 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index b610e46..85c48df 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 9aa0ee6..a6c2f22 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 3933aba..85de037 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2003-2016 by
+# Copyright 2003-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index e191a81..e38acfb 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index a0fe4c9..ddb4876 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2003-2016 by
+# Copyright 2003-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index d5a5085..10b79d3 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2005-2016 by
+# Copyright 2005-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 43766be..f8cfd41 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index f04cc70..3854e70 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index a5d192e..4cc2dc9 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 4691ded..60cf73e 100644 (file)
@@ -5,7 +5,7 @@
 /*    Mac FOND support.  Written by just@letterror.com.                    */
 /*  Heavily Fixed by mpsuzuki, George Williams and Sean McBride            */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -940,7 +940,7 @@ typedef short ResourceIndex;
     {
       err = lookup_lwfn_by_fond( pathname, lwfn_file_name,
                                  buff, sizeof ( buff )  );
-      if ( FT_Err_Ok == err )
+      if ( !err )
         have_lwfn = 1;
     }
 
@@ -1217,7 +1217,7 @@ typedef short ResourceIndex;
     }
 
     CloseResFile( res_ref );
-    if ( FT_Err_Ok == error && NULL != aface )
+    if ( !error && aface )
       (*aface)->num_faces = num_faces_in_res;
     return error;
   }
@@ -1279,7 +1279,7 @@ typedef short ResourceIndex;
 
         error = lookup_lwfn_by_fond( path_fond, lwfn_file_name,
                                      path_lwfn, sizeof ( path_lwfn ) );
-        if ( FT_Err_Ok == error )
+        if ( !error )
           have_lwfn = 1;
       }
 
@@ -1315,7 +1315,7 @@ typedef short ResourceIndex;
 
         error = lookup_lwfn_by_fond( path_fond, lwfn_file_name,
                                      path_lwfn, sizeof ( path_lwfn ) );
-        if ( FT_Err_Ok == error )
+        if ( !error )
           have_lwfn = 1;
       }
 
@@ -1332,7 +1332,7 @@ typedef short ResourceIndex;
       error = FT_ERR( Unknown_File_Format );
 
   found_no_lwfn_file:
-    if ( have_sfnt && FT_Err_Ok != error )
+    if ( have_sfnt && error )
       error = FT_New_Face_From_SFNT( library,
                                      sfnt_id,
                                      face_index,
@@ -1363,7 +1363,7 @@ typedef short ResourceIndex;
     /* if it works, fine.                                           */
 
     error = FT_New_Face_From_Suitcase( library, pathname, face_index, aface );
-    if ( error == 0 )
+    if ( !error )
       return error;
 
     /* let it fall through to normal loader (.ttf, .otf, etc.); */
@@ -1403,7 +1403,7 @@ typedef short ResourceIndex;
     /* try resourcefork based font: LWFN, FFIL */
     error = FT_New_Face_From_Resource( library, (UInt8 *)pathname,
                                        face_index, aface );
-    if ( error != 0 || *aface != NULL )
+    if ( error || *aface )
       return error;
 
     /* let it fall through to normal loader (.ttf, .otf, etc.) */
@@ -1458,7 +1458,7 @@ typedef short ResourceIndex;
       error = FT_ERR( Cannot_Open_Resource );
 
     error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
-    if ( error != 0 || *aface != NULL )
+    if ( error || *aface )
       return error;
 
     /* fallback to datafork font */
@@ -1515,7 +1515,7 @@ typedef short ResourceIndex;
       error = FT_ERR( Cannot_Open_Resource );
 
     error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
-    if ( error != 0 || *aface != NULL )
+    if ( error || *aface )
       return error;
 
     /* fallback to datafork font */
index 787f864..a89d579 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index df05792..3ea68fb 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index b8d4d7b..2fe6263 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 629d766..842a289 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index b3e590b..4cdffba 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index cbbdc3a..8087202 100644 (file)
@@ -2,7 +2,7 @@
 // FreeType 2 project for the symbian platform
 //
 
-// Copyright 2008-2016 by
+// Copyright 2008-2017 by
 // David Turner, Robert Wilhelm, and Werner Lemberg.
 //
 // This file is part of the FreeType project, and may only be used, modified,
index 1944054..6fe7333 100644 (file)
@@ -2,7 +2,7 @@
 // FreeType 2 makefile for the symbian platform
 //
 
-// Copyright 2008-2016 by
+// Copyright 2008-2017 by
 // David Turner, Robert Wilhelm, and Werner Lemberg.
 //
 // This file is part of the FreeType project, and may only be used, modified,
index 7cea85d..7b1d03b 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 0a8c94d..eb7517a 100644 (file)
@@ -8360,6 +8360,120 @@ _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
          [0], [convert $build files to toolchain format])dnl
 ])# _LT_PATH_CONVERSION_FUNCTIONS
 
+# longlong.m4 serial 17
+dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+     [ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+          dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+          dnl If cross compiling, assume the bug is not important, since
+          dnl nobody cross compiles for this platform as far as we know.
+          AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[@%:@include <limits.h>
+                 @%:@ifndef LLONG_MAX
+                 @%:@ define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 @%:@ define LLONG_MAX (HALF - 1 + HALF)
+                 @%:@endif]],
+               [[long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;]])],
+            [],
+            [ac_cv_type_long_long_int=no],
+            [:])
+        fi
+      fi])
+  if test $ac_cv_type_long_long_int = yes; then
+    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+      [Define to 1 if the system has the type 'long long int'.])
+  fi
+])
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.61, and can be faster
+# than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+  AC_CACHE_CHECK([for unsigned long long int],
+    [ac_cv_type_unsigned_long_long_int],
+    [ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       AC_LINK_IFELSE(
+         [_AC_TYPE_LONG_LONG_SNIPPET],
+         [],
+         [ac_cv_type_unsigned_long_long_int=no])
+     fi])
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+      [Define to 1 if the system has the type 'unsigned long long int'.])
+  fi
+])
+
+# Expands to a C program that can be used to test for simultaneous support
+# of 'long long' and 'unsigned long long'. We don't want to say that
+# 'long long' is available if 'unsigned long long' is not, or vice versa,
+# because too many programs rely on the symmetry between signed and unsigned
+# integer types (excluding 'bool').
+AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
+[
+  AC_LANG_PROGRAM(
+    [[/* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;]],
+    [[/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));]])
+])
+
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
 #   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
index c4bd827..69ed3e5 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2016-05-15'
+timestamp='2017-03-05'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -837,10 +837,11 @@ EOF
        UNAME_PROCESSOR=`/usr/bin/uname -p`
        case ${UNAME_PROCESSOR} in
            amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+               UNAME_PROCESSOR=x86_64 ;;
+           i386)
+               UNAME_PROCESSOR=i586 ;;
        esac
+       echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
        exit ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
@@ -1000,6 +1001,9 @@ EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
+    mips64el:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     openrisc*:Linux:*:*)
        echo or1k-unknown-linux-${LIBC}
        exit ;;
@@ -1032,6 +1036,9 @@ EOF
     ppcle:Linux:*:*)
        echo powerpcle-unknown-linux-${LIBC}
        exit ;;
+    riscv32:Linux:*:* | riscv64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
        exit ;;
@@ -1337,6 +1344,9 @@ EOF
     NSR-?:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit ;;
+    NSX-?:NONSTOP_KERNEL:*:*)
+       echo nsx-tandem-nsk${UNAME_RELEASE}
+       exit ;;
     *:NonStop-UX:*:*)
        echo mips-compaq-nonstopux
        exit ;;
index 9feb73b..40ea5df 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2016-06-20'
+timestamp='2017-04-02'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +117,7 @@ case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-  kopensolaris*-gnu* | \
+  kopensolaris*-gnu* | cloudabi*-eabi* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -263,7 +263,7 @@ case $basic_machine in
        | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
-       | i370 | i860 | i960 | ia64 \
+       | i370 | i860 | i960 | ia16 | ia64 \
        | ip2k | iq2000 \
        | k1om \
        | le32 | le64 \
@@ -301,6 +301,7 @@ case $basic_machine in
        | open8 | or1k | or1knd | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
+       | pru \
        | pyramid \
        | riscv32 | riscv64 \
        | rl78 | rx \
@@ -314,6 +315,7 @@ case $basic_machine in
        | ubicom32 \
        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
        | visium \
+       | wasm32 \
        | we32k \
        | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
@@ -387,7 +389,7 @@ case $basic_machine in
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | hexagon-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
+       | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
        | ip2k-* | iq2000-* \
        | k1om-* \
        | le32-* | le64-* \
@@ -428,6 +430,7 @@ case $basic_machine in
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+       | pru-* \
        | pyramid-* \
        | riscv32-* | riscv64-* \
        | rl78-* | romp-* | rs6000-* | rx-* \
@@ -444,6 +447,7 @@ case $basic_machine in
        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
        | vax-* \
        | visium-* \
+       | wasm32-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
@@ -946,6 +950,9 @@ case $basic_machine in
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
+       nsx-tandem)
+               basic_machine=nsx-tandem
+               ;;
        op50n-* | op60c-*)
                basic_machine=hppa1.1-oki
                os=-proelf
@@ -1030,7 +1037,7 @@ case $basic_machine in
        ppc-* | ppcbe-*)
                basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
+       ppcle | powerpclittle)
                basic_machine=powerpcle-unknown
                ;;
        ppcle-* | powerpclittle-*)
@@ -1040,7 +1047,7 @@ case $basic_machine in
                ;;
        ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+       ppc64le | powerpc64little)
                basic_machine=powerpc64le-unknown
                ;;
        ppc64le-* | powerpc64little-*)
@@ -1241,6 +1248,9 @@ case $basic_machine in
                basic_machine=a29k-wrs
                os=-vxworks
                ;;
+       wasm32)
+               basic_machine=wasm32-unknown
+               ;;
        w65*)
                basic_machine=w65-wdc
                os=-none
@@ -1395,7 +1405,7 @@ case $os in
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
@@ -1407,7 +1417,7 @@ case $os in
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
              | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-             | -onefs* | -tirtos* | -phoenix*)
+             | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1636,6 +1646,9 @@ case $basic_machine in
        sparc-* | *-sun)
                os=-sunos4.1.1
                ;;
+       pru-*)
+               os=-elf
+               ;;
        *-be)
                os=-beos
                ;;
index e515312..a4c66eb 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for FreeType 2.6.5.
+# Generated by GNU Autoconf 2.69 for FreeType 2.8.
 #
 # Report bugs to <freetype@nongnu.org>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='FreeType'
 PACKAGE_TARNAME='freetype'
-PACKAGE_VERSION='2.6.5'
-PACKAGE_STRING='FreeType 2.6.5'
+PACKAGE_VERSION='2.8'
+PACKAGE_STRING='FreeType 2.8'
 PACKAGE_BUGREPORT='freetype@nongnu.org'
 PACKAGE_URL=''
 
@@ -755,6 +755,7 @@ with_gnu_ld
 with_sysroot
 enable_libtool_lock
 enable_biarch_config
+enable_largefile
 enable_mmap
 with_zlib
 with_bzip2
@@ -1328,7 +1329,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures FreeType 2.6.5 to adapt to many kinds of systems.
+\`configure' configures FreeType 2.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1393,7 +1394,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of FreeType 2.6.5:";;
+     short | recursive ) echo "Configuration of FreeType 2.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1408,6 +1409,7 @@ Optional Features:
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-biarch-config  install biarch ftconfig.h to support multiple
                           architectures by single file
+  --disable-largefile     omit support for large files
   --disable-mmap          do not check mmap() and do not use
 
 Optional Packages:
@@ -1539,7 +1541,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-FreeType configure 2.6.5
+FreeType configure 2.8
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2137,7 +2139,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by FreeType $as_me 2.6.5, which was
+It was created by FreeType $as_me 2.8, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2493,7 +2495,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 # Don't forget to update `docs/VERSIONS.TXT'!
 
-version_info='18:5:12'
+version_info='20:0:14'
 
 ft_version=`echo $version_info | tr : .`
 
@@ -12441,6 +12443,123 @@ _ACEOF
 
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  /* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+  ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if ${ac_cv_type_long_long_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
+int
+main ()
+{
+long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        fi
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+  fi
+
+
 
 # check whether cpp computation of size of int and long in ftconfig.in works
 
@@ -12523,6 +12642,207 @@ CPPFLAGS="${orig_CPPFLAGS}"
 
 # checks for library functions
 
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+  enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if ${ac_cv_sys_largefile_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       while :; do
+        # IRIX 6.2 and later do not support large files by default,
+        # so use the C compiler's -n32 option if that helps.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+        if ac_fn_c_try_compile "$LINENO"; then :
+  break
+fi
+rm -f core conftest.err conftest.$ac_objext
+        CC="$CC -n32"
+        if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+        break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if ${ac_cv_sys_file_offset_bits+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_sys_file_offset_bits=unknown
+  break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+  if test $ac_cv_sys_file_offset_bits = unknown; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if ${ac_cv_sys_large_files+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_sys_large_files=unknown
+  break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+  fi
+
+
+fi
+
+
 # Here we check whether we can use our mmap file component.
 
 # Check whether --enable-mmap was given.
@@ -14697,7 +15017,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by FreeType $as_me 2.6.5, which was
+This file was extended by FreeType $as_me 2.8, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14763,7 +15083,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-FreeType config.status 2.6.5
+FreeType config.status 2.8
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 7613732..7cdafcc 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Process this file with autoconf to produce a configure script.
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
 # indicate that you have read the license and understand and accept it
 # fully.
 
-AC_INIT([FreeType], [2.6.5], [freetype@nongnu.org], [freetype])
+AC_INIT([FreeType], [2.8], [freetype@nongnu.org], [freetype])
 AC_CONFIG_SRCDIR([ftconfig.in])
 
 
 # Don't forget to update `docs/VERSIONS.TXT'!
 
-version_info='18:5:12'
+version_info='20:0:14'
 AC_SUBST([version_info])
 ft_version=`echo $version_info | tr : .`
 AC_SUBST([ft_version])
@@ -105,6 +105,7 @@ AC_CHECK_HEADERS([fcntl.h unistd.h])
 AC_C_CONST
 AC_CHECK_SIZEOF([int])
 AC_CHECK_SIZEOF([long])
+AC_TYPE_LONG_LONG_INT
 
 
 # check whether cpp computation of size of int and long in ftconfig.in works
@@ -180,6 +181,8 @@ CPPFLAGS="${orig_CPPFLAGS}"
 
 # checks for library functions
 
+AC_SYS_LARGEFILE
+
 # Here we check whether we can use our mmap file component.
 
 AC_ARG_ENABLE([mmap],
index dc38ba4..ef6debe 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Process this file with autoconf to produce a configure script.
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in])
 
 # Don't forget to update `docs/VERSIONS.TXT'!
 
-version_info='18:5:12'
+version_info='20:0:14'
 AC_SUBST([version_info])
 ft_version=`echo $version_info | tr : .`
 AC_SUBST([ft_version])
@@ -105,6 +105,7 @@ AC_CHECK_HEADERS([fcntl.h unistd.h])
 AC_C_CONST
 AC_CHECK_SIZEOF([int])
 AC_CHECK_SIZEOF([long])
+AC_TYPE_LONG_LONG_INT
 
 
 # check whether cpp computation of size of int and long in ftconfig.in works
@@ -180,6 +181,8 @@ CPPFLAGS="${orig_CPPFLAGS}"
 
 # checks for library functions
 
+AC_SYS_LARGEFILE
+
 # Here we check whether we can use our mmap file component.
 
 AC_ARG_ENABLE([mmap],
index 557dc92..a2cf0a7 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index f74707d..97de134 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright 2000-2016 by
+# Copyright 2000-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
 LC_ALL=C
 export LC_ALL
 
-prefix="%prefix%"
-exec_prefix="%exec_prefix%"
-exec_prefix_set="no"
-includedir="%includedir%"
-libdir="%libdir%"
+
+# if `pkg-config' is available, use values from `freetype2.pc'
+pkg-config --version >/dev/null 2>&1
+if test $? -eq 0 ; then
+  # note that option `--variable' is not affected by the
+  # PKG_CONFIG_SYSROOT_DIR environment variable
+  if test "x$SYSROOT" != "x" ; then
+    PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
+    export PKG_CONFIG_SYSROOT_DIR
+  fi
+
+  prefix=`pkg-config --variable prefix freetype2`
+  exec_prefix=`pkg-config --variable exec_prefix freetype2`
+
+  includedir=`pkg-config --variable includedir freetype2`
+  libdir=`pkg-config --variable libdir freetype2`
+
+  version=`pkg-config --modversion freetype2`
+
+  cflags=`pkg-config --cflags freetype2`
+  dynamic_libs=`pkg-config --libs freetype2`
+  static_libs=`pkg-config --static --libs freetype2`
+else
+  prefix="%prefix%"
+  exec_prefix="%exec_prefix%"
+
+  includedir="%includedir%"
+  libdir="%libdir%"
+
+  version=%ft_version%
+
+  cflags="-I${SYSROOT}$includedir/freetype2"
+  dynamic_libs="-lfreetype"
+  static_libs="%LIBSSTATIC_CONFIG%"
+  if test "${SYSROOT}$libdir" != "/usr/lib"   &&
+     test "${SYSROOT}$libdir" != "/usr/lib64" ; then
+    libs_L="-L${SYSROOT}$libdir"
+  fi
+fi
+
+orig_prefix=$prefix
+orig_exec_prefix=$exec_prefix
+
+orig_includedir=$includedir
+orig_libdir=$libdir
+
+include_suffix=`echo $includedir | sed "s|$prefix||"`
+lib_suffix=`echo $libdir | sed "s|$exec_prefix||"`
+
 
 usage()
 {
@@ -39,14 +83,17 @@ Options:
                          library
   --static               make command line options display flags
                          for static linking
+  --help                 display this help and exit
 EOF
   exit $1
 }
 
+
 if test $# -eq 0 ; then
   usage 1 1>&2
 fi
 
+
 while test $# -gt 0 ; do
   case "$1" in
   -*=*)
@@ -74,8 +121,8 @@ while test $# -gt 0 ; do
     echo_exec_prefix=yes
     ;;
   --version)
-    echo %ft_version%
-    exit 0
+    echo_version=yes
+    break
     ;;
   --ftversion)
     echo_ft_version=yes
@@ -92,6 +139,9 @@ while test $# -gt 0 ; do
   --static)
     show_static=yes
     ;;
+  --help)
+    usage 0
+    ;;
   *)
     usage 1 1>&2
     ;;
@@ -99,12 +149,27 @@ while test $# -gt 0 ; do
   shift
 done
 
+
 if test "$local_prefix" = "yes" ; then
   if test "$exec_prefix_set" != "yes" ; then
     exec_prefix=$prefix
   fi
 fi
 
+if test "$local_prefix" = "yes" ; then
+  includedir=${prefix}${include_suffix}
+  if test "$exec_prefix_set" = "yes" ; then
+    libdir=${exec_prefix}${lib_suffix}
+  else
+    libdir=${prefix}${lib_suffix}
+  fi
+fi
+
+
+if test "$echo_version" = "yes" ; then
+  echo $version
+fi
+
 if test "$echo_prefix" = "yes" ; then
   echo ${SYSROOT}$prefix
 fi
@@ -113,15 +178,6 @@ if test "$echo_exec_prefix" = "yes" ; then
   echo ${SYSROOT}$exec_prefix
 fi
 
-if test "$exec_prefix_set" = "yes" ; then
-  libdir=$exec_prefix/lib
-else
-  if test "$local_prefix" = "yes" ; then
-    includedir=$prefix/include
-    libdir=$prefix/lib
-  fi
-fi
-
 if test "$echo_ft_version" = "yes" ; then
   major=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
          | grep FREETYPE_MAJOR \
@@ -136,26 +192,20 @@ if test "$echo_ft_version" = "yes" ; then
 fi
 
 if test "$echo_cflags" = "yes" ; then
-  echo -I${SYSROOT}$includedir/freetype2
+  echo $cflags | sed "s|$orig_includedir/freetype2|$includedir/freetype2|"
 fi
 
 if test "$echo_libs" = "yes" ; then
-  libs="-lfreetype"
-  staticlibs="%LIBSSTATIC_CONFIG%"
   if test "$show_static" = "yes" ; then
-    libs="$staticlibs"
-  fi
-  if test "${SYSROOT}$libdir" != "/usr/lib"  &&
-     test "${SYSROOT}$libdir" != "/usr/lib64"; then
-    echo -L${SYSROOT}$libdir $libs
+    libs="$libs_L $static_libs"
   else
-    echo $libs
+    libs="$libs_L $dynamic_libs"
   fi
+  echo $libs | sed "s|$orig_libdir|$libdir|"
 fi
 
 if test "$echo_libtool" = "yes" ; then
-  convlib="libfreetype.la"
-  echo ${SYSROOT}$libdir/$convlib
+  echo ${SYSROOT}$libdir/libfreetype.la
 fi
 
 # EOF
index 1462fc7..172212f 100644 (file)
@@ -1,7 +1,7 @@
 # Configure paths for FreeType2
 # Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index db798d8..27dd7d5 100644 (file)
@@ -1,6 +1,6 @@
 ## FreeType specific autoconf tests
 #
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index fbb1c14..abd101d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    UNIX-specific configuration file (specification only).               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -287,8 +287,8 @@ FT_BEGIN_HEADER
 #endif
 
 
-  /* determine whether we have a 64-bit int type for platforms without */
-  /* Autoconf                                                          */
+  /* determine whether we have a 64-bit int type  */
+  /* (mostly for environments without `autoconf') */
 #if FT_SIZEOF_LONG == 8
 
   /* FT_LONG64 must be defined if a 64-bit type is available */
@@ -296,6 +296,16 @@ FT_BEGIN_HEADER
 #define FT_INT64   long
 #define FT_UINT64  unsigned long
 
+  /* we handle the LLP64 scheme separately for GCC and clang, */
+  /* suppressing the `long long' warning                      */
+#elif ( FT_SIZEOF_LONG == 4 )       && \
+      defined( HAVE_LONG_LONG_INT ) && \
+      defined( __GNUC__ )
+#pragma GCC diagnostic ignored "-Wlong-long"
+#define FT_LONG64
+#define FT_INT64   long long int
+#define FT_UINT64  unsigned long long int
+
   /*************************************************************************/
   /*                                                                       */
   /* A 64-bit data type may create compilation problems if you compile     */
@@ -355,6 +365,15 @@ FT_BEGIN_HEADER
 #endif
 
 
+#ifdef _WIN64
+  /* only 64bit Windows uses the LLP64 data model, i.e., */
+  /* 32bit integers, 64bit pointers                      */
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
+#else
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
+#endif
+
+
   /*************************************************************************/
   /*                                                                       */
   /* miscellaneous                                                         */
@@ -368,10 +387,11 @@ FT_BEGIN_HEADER
 
 
   /* typeof condition taken from gnulib's `intprops.h' header file */
-#if ( __GNUC__ >= 2                         || \
-      defined( __IBM__TYPEOF__ )            || \
-      ( __SUNPRO_C >= 0x5110 && !__STDC__ ) )
-#define FT_TYPEOF( type )  (__typeof__ (type))
+#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 )                       || \
+      ( defined( __IBMC__ ) && __IBMC__ >= 1210 &&                      \
+        defined( __IBM__TYPEOF__ ) )                                 || \
+      ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
+#define FT_TYPEOF( type )  ( __typeof__ ( type ) )
 #else
 #define FT_TYPEOF( type )  /* empty */
 #endif
index a5e4459..48a235b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Unix-specific FreeType low-level system interface (body).            */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f944c5c..fae486c 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index f26f84c..260e1fb 100644 (file)
@@ -53,7 +53,7 @@ fi[]dnl
 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
 #
 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
+# only at the first occurrence in configure.ac, so if the first place
 # it's called might be skipped (such as if it is within an "if", you
 # have to call PKG_CHECK_EXISTS manually
 # --------------------------------------------------------------
index df09e7e..a967cee 100644 (file)
@@ -2,7 +2,7 @@
 # FreeType 2 template for Unix-specific compiler definitions
 #
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -99,7 +99,7 @@ LDFLAGS := @LDFLAGS@
 # export symbols
 #
 CCraw_build  := @CC_BUILD@     # native CC of building system
-E_BUILD      := @EXEEXT_BUILD@ # extension for exexutable on building system
+E_BUILD      := @EXEEXT_BUILD@ # extension for executable on building system
 EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
 CCexe        := $(CCraw_build) # used to compile `apinames' only
 
index f7b557f..feae99b 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -111,7 +111,7 @@ $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in
            $<                                                 \
            > $@.tmp
        chmod +x $@.tmp
-       chmod a-w $@.tmp
+       chmod go-w $@.tmp
        mv $@.tmp $@
 
 # To support directory names with spaces (as might easily happen on Windows
index 3c72e57..92c0600 100644 (file)
@@ -6,7 +6,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 1c254d1..5122fde 100644 (file)
@@ -6,7 +6,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index fba1e1d..14d5c0c 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index adba517..30f2307 100644 (file)
@@ -4,7 +4,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index fb75e40..f8ac2ec 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    VMS-specific configuration file (specification only).                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -116,6 +116,14 @@ FT_BEGIN_HEADER
 #endif
 
 
+  /* Fix compiler warning with sgi compiler */
+#if defined( __sgi ) && !defined( __GNUC__ )
+#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
+#pragma set woff 3505
+#endif
+#endif
+
+
   /*************************************************************************/
   /*                                                                       */
   /* <Section>                                                             */
@@ -298,6 +306,15 @@ FT_BEGIN_HEADER
 #endif
 
 
+#ifdef _WIN64
+  /* only 64bit Windows uses the LLP64 data model, i.e., */
+  /* 32bit integers, 64bit pointers                      */
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
+#else
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
+#endif
+
+
   /*************************************************************************/
   /*                                                                       */
   /* miscellaneous                                                         */
@@ -311,10 +328,11 @@ FT_BEGIN_HEADER
 
 
   /* typeof condition taken from gnulib's `intprops.h' header file */
-#if ( __GNUC__ >= 2                         || \
-      defined( __IBM__TYPEOF__ )            || \
-      ( __SUNPRO_C >= 0x5110 && !__STDC__ ) )
-#define FT_TYPEOF( type )  (__typeof__ (type))
+#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 )                       || \
+      ( defined( __IBMC__ ) && __IBMC__ >= 1210 &&                      \
+        defined( __IBM__TYPEOF__ ) )                                 || \
+      ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
+#define FT_TYPEOF( type )  ( __typeof__ ( type ) )
 #else
 #define FT_TYPEOF( type )  /* empty */
 #endif
index a13cb22..d83e8ec 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    VMS-specific FreeType low-level system interface (body).             */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 6e35e17..7a20e2f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Debugging and logging component for WinCE (body).                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c7aa514..a1c0e37 100644 (file)
@@ -21,7 +21,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
@@ -41,7 +41,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
@@ -61,7 +61,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
@@ -81,7 +81,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST.lib" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST.lib" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST.lib" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST.lib" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST.lib" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST.lib" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST.lib" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST.lib" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST.lib" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST.lib" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST.lib" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST.lib" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265ST_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28ST_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype265MT_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\wince\vc2005-ce\freetype28MT_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
index 4afa23d..fcb52bc 100644 (file)
@@ -21,14 +21,14 @@ the following targets:
   <li>PPC/SP WM6 (Windows Mobile 6)</li>
 </ul>
 
-It compiles the following libraries from the FreeType 2.6.5 sources:</p>
+It compiles the following libraries from the FreeType 2.8 sources:</p>
 
 <ul>
   <pre>
-    freetype265.lib     - release build; single threaded
-    freetype265_D.lib   - debug build;   single threaded
-    freetype265MT.lib   - release build; multi-threaded
-    freetype265MT_D.lib - debug build;   multi-threaded</pre>
+    freetype28.lib     - release build; single threaded
+    freetype28_D.lib   - debug build;   single threaded
+    freetype28MT.lib   - release build; multi-threaded
+    freetype28MT_D.lib - debug build;   multi-threaded</pre>
 </ul>
 
 <p>Be sure to extract the files with the Windows (CR+LF) line endings.  ZIP
index c62fda2..273aa53 100644 (file)
@@ -88,7 +88,7 @@
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\wince\vc2008-ce\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
index 8c436cb..7366843 100644 (file)
@@ -21,14 +21,14 @@ the following targets:
   <li>PPC/SP WM6 (Windows Mobile 6)</li>
 </ul>
 
-It compiles the following libraries from the FreeType 2.6.5 sources:</p>
+It compiles the following libraries from the FreeType 2.8 sources:</p>
 
 <ul>
   <pre>
-    freetype265.lib     - release build; single threaded
-    freetype265_D.lib   - debug build;   single threaded
-    freetype265MT.lib   - release build; multi-threaded
-    freetype265MT_D.lib - debug build;   multi-threaded</pre>
+    freetype28.lib     - release build; single threaded
+    freetype28_D.lib   - debug build;   single threaded
+    freetype28MT.lib   - release build; multi-threaded
+    freetype28MT_D.lib - debug build;   multi-threaded</pre>
 </ul>
 
 <p>Be sure to extract the files with the Windows (CR+LF) line endings.  ZIP
index 0872303..350d156 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index f29cca0..cadfcea 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Debugging and logging component for Win32 (body).                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f938b53..e5e67d5 100644 (file)
@@ -16,7 +16,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype265.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype28.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
@@ -33,7 +33,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype265MT.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype28MT.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
@@ -50,7 +50,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="NDEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype265ST.lib" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype28ST.lib" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
@@ -67,7 +67,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype265_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype28_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
@@ -84,7 +84,7 @@
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype265ST_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype28ST_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
       <Tool Name="VCManagedResourceCompilerTool" />\r
       <Tool Name="VCResourceCompilerTool" PreprocessorDefinitions="_DEBUG" Culture="1033" />\r
       <Tool Name="VCPreLinkEventTool" />\r
-      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype265MT_D.lib" SuppressStartupBanner="true" />\r
+      <Tool Name="VCLibrarianTool" OutputFile="..\..\..\objs\win32\vc2005\freetype28MT_D.lib" SuppressStartupBanner="true" />\r
       <Tool Name="VCALinkTool" />\r
       <Tool Name="VCXDCMakeTool" />\r
       <Tool Name="VCBscMakeTool" />\r
index f6eb4fd..4bd9b75 100644 (file)
 
 <p>This directory contains project files for Visual C++, named
 <tt>freetype.vcproj</tt>, and Visual Studio, called <tt>freetype.sln</tt>.  It
-compiles the following libraries from the FreeType 2.6.5 sources:</p>
+compiles the following libraries from the FreeType 2.8 sources:</p>
 
 <ul>
   <pre>
-    freetype265.lib     - release build; single threaded
-    freetype265_D.lib   - debug build;   single threaded
-    freetype265MT.lib   - release build; multi-threaded
-    freetype265MT_D.lib - debug build;   multi-threaded</pre>
+    freetype28.lib     - release build; single threaded
+    freetype28_D.lib   - debug build;   single threaded
+    freetype28MT.lib   - release build; multi-threaded
+    freetype28MT_D.lib - debug build;   multi-threaded</pre>
 </ul>
 
 <p>Be sure to extract the files with the Windows (CR+LF) line endings.  ZIP
index b83b5b1..a8bc672 100644 (file)
@@ -70,7 +70,7 @@
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\win32\vc2008\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\win32\vc2008\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\win32\vc2008\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\win32\vc2008\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\win32\vc2008\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\win32\vc2008\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\win32\vc2008\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\win32\vc2008\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\win32\vc2008\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\win32\vc2008\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\win32\vc2008\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\win32\vc2008\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
index bf522e9..fa5909d 100644 (file)
 
 <p>This directory contains project files for Visual C++, named
 <tt>freetype.vcproj</tt>, and Visual Studio, called <tt>freetype.sln</tt>.  It
-compiles the following libraries from the FreeType 2.6.5 sources:</p>
+compiles the following libraries from the FreeType 2.8 sources:</p>
 
 <ul>
   <pre>
-    freetype265.lib     - release build; single threaded
-    freetype265_D.lib   - debug build;   single threaded
-    freetype265MT.lib   - release build; multi-threaded
-    freetype265MT_D.lib - debug build;   multi-threaded</pre>
+    freetype28.lib     - release build; single threaded
+    freetype28_D.lib   - debug build;   single threaded
+    freetype28MT.lib   - release build; multi-threaded
+    freetype28MT_D.lib - debug build;   multi-threaded</pre>
 </ul>
 
 <p>Be sure to extract the files with the Windows (CR+LF) line endings.  ZIP
index f164b31..e4f11fc 100644 (file)
     <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'" />\r
     <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'" />\r
     <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'" />\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">freetype265d</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">freetype265d</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">freetype265MTd</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">freetype265MTd</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">freetype265STd</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">freetype265STd</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">freetype265</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">freetype265</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">freetype265MT</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">freetype265MT</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">freetype265ST</TargetName>\r
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">freetype265ST</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">freetype28d</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">freetype28d</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|Win32'">freetype28MTd</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Multithreaded|x64'">freetype28MTd</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|Win32'">freetype28STd</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Singlethreaded|x64'">freetype28STd</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">freetype28</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">freetype28</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|Win32'">freetype28MT</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Multithreaded|x64'">freetype28MT</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|Win32'">freetype28ST</TargetName>\r
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Singlethreaded|x64'">freetype28ST</TargetName>\r
   </PropertyGroup>\r
   <Import Project="$(SolutionDir)\freetype.user.props" Condition="exists('$(SolutionDir)\freetype.user.props')" Label="UserProperties" />\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
index 2e27e85..c2b5800 100644 (file)
 <p>This directory contains a project file for Visual C++ (VS.NET&nbsp;2010
 or newer), named <tt>freetype.vcxproj</tt>, and Visual Studio, called
 <tt>freetype.sln</tt>.  It compiles the following libraries from the
-FreeType 2.6.5 sources:</p>
+FreeType 2.8 sources:</p>
 
 <ul>
   <pre>
-    freetype265.lib    - release build
-    freetype265d.lib   - debug build
-    freetype265ST.lib  - release build; single threaded
-    freetype265STd.lib - debug build;   single threaded
-    freetype265MT.lib  - release build; multi-threaded
-    freetype265MTd.lib - debug build;   multi-threaded</pre>
+    freetype28.lib    - release build
+    freetype28d.lib   - debug build
+    freetype28ST.lib  - release build; single threaded
+    freetype28STd.lib - debug build;   single threaded
+    freetype28MT.lib  - release build; multi-threaded
+    freetype28MTd.lib - debug build;   multi-threaded</pre>
 </ul>
 
 <p>Both Win32 and x64 builds are supported.</p>
@@ -39,7 +39,7 @@ around, which specifically deal with this particular problem.
 directory.</p>
 
 <p>Customization of the FreeType library is done by editing the
-<tt>ftoptions.h</tt> header file in the top-level <tt>devel</tt> path.
+<tt>ftoption.h</tt> header file in the top-level <tt>devel</tt> path.
 Alternatively, you may copy the file to another directory and change the
 include directory in <tt>freetype.users.props</tt>.</p>
 
index 1028ad1..fc14b48 100644 (file)
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
 # ADD BASE LIB32 /nologo\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28.lib"\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Debug"\r
 \r
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
 # ADD BASE LIB32 /nologo\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265_D.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib"\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Debug Multithreaded"\r
 \r
@@ -102,8 +102,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"lib\freetype265_D.lib"\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265MT_D.lib"\r
+# ADD BASE LIB32 /nologo /out:"lib\freetype28_D.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT_D.lib"\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Release Multithreaded"\r
 \r
@@ -126,8 +126,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"lib\freetype265.lib"\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265MT.lib"\r
+# ADD BASE LIB32 /nologo /out:"lib\freetype28.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT.lib"\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Release Singlethreaded"\r
 \r
@@ -151,8 +151,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype265.lib"\r
-# ADD LIB32 /out:"..\..\..\objs\freetype265ST.lib"\r
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28.lib"\r
+# ADD LIB32 /out:"..\..\..\objs\freetype28ST.lib"\r
 # SUBTRACT LIB32 /nologo\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Debug Singlethreaded"\r
@@ -177,8 +177,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype265_D.lib"\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265ST_D.lib"\r
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28ST_D.lib"\r
 \r
 !ENDIF\r
 \r
index b8d68bf..968f2ee 100644 (file)
@@ -69,7 +69,7 @@
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
index 003d2f3..e2f868c 100644 (file)
 
 <p>This directory contains project files for Visual C++, named
 <tt>freetype.dsp</tt>, and Visual Studio, called <tt>freetype.sln</tt>.  It
-compiles the following libraries from the FreeType 2.6.5 sources:</p>
+compiles the following libraries from the FreeType 2.8 sources:</p>
 
 <ul>
   <pre>
-    freetype265.lib     - release build; single threaded
-    freetype265_D.lib   - debug build;   single threaded
-    freetype265MT.lib   - release build; multi-threaded
-    freetype265MT_D.lib - debug build;   multi-threaded</pre>
+    freetype28.lib     - release build; single threaded
+    freetype28_D.lib   - debug build;   single threaded
+    freetype28MT.lib   - release build; multi-threaded
+    freetype28MT_D.lib - debug build;   multi-threaded</pre>
 </ul>
 
 <p>Be sure to extract the files with the Windows (CR+LF) line endings.  ZIP
index 1028ad1..fc14b48 100644 (file)
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
 # ADD BASE LIB32 /nologo\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28.lib"\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Debug"\r
 \r
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
 # ADD BASE LIB32 /nologo\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265_D.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib"\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Debug Multithreaded"\r
 \r
@@ -102,8 +102,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"lib\freetype265_D.lib"\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265MT_D.lib"\r
+# ADD BASE LIB32 /nologo /out:"lib\freetype28_D.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT_D.lib"\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Release Multithreaded"\r
 \r
@@ -126,8 +126,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"lib\freetype265.lib"\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265MT.lib"\r
+# ADD BASE LIB32 /nologo /out:"lib\freetype28.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28MT.lib"\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Release Singlethreaded"\r
 \r
@@ -151,8 +151,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype265.lib"\r
-# ADD LIB32 /out:"..\..\..\objs\freetype265ST.lib"\r
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28.lib"\r
+# ADD LIB32 /out:"..\..\..\objs\freetype28ST.lib"\r
 # SUBTRACT LIB32 /nologo\r
 \r
 !ELSEIF  "$(CFG)" == "freetype - Win32 Debug Singlethreaded"\r
@@ -177,8 +177,8 @@ BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo\r
 # ADD BSC32 /nologo\r
 LIB32=link.exe -lib\r
-# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype265_D.lib"\r
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype265ST_D.lib"\r
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype28_D.lib"\r
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype28ST_D.lib"\r
 \r
 !ENDIF\r
 \r
index ff680da..f28b3c1 100644 (file)
@@ -87,7 +87,7 @@
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265.lib"\r
+                               OutputFile="..\..\..\objs\freetype28.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST.lib"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265ST_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28ST_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                        />\r
                        <Tool\r
                                Name="VCLibrarianTool"\r
-                               OutputFile="..\..\..\objs\freetype265MT_D.lib"\r
+                               OutputFile="..\..\..\objs\freetype28MT_D.lib"\r
                                SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
index e207bc1..06107ae 100644 (file)
@@ -21,14 +21,14 @@ the following targets:
   <li>PPC/SP WM6 (Windows Mobile 6)</li>
 </ul>
 
-It compiles the following libraries from the FreeType 2.6.5 sources:</p>
+It compiles the following libraries from the FreeType 2.8 sources:</p>
 
 <ul>
   <pre>
-    freetype265.lib     - release build; single threaded
-    freetype265_D.lib   - debug build;   single threaded
-    freetype265MT.lib   - release build; multi-threaded
-    freetype265MT_D.lib - debug build;   multi-threaded</pre>
+    freetype28.lib     - release build; single threaded
+    freetype28_D.lib   - debug build;   single threaded
+    freetype28MT.lib   - release build; multi-threaded
+    freetype28MT_D.lib - debug build;   multi-threaded</pre>
 </ul>
 
 <p>Be sure to extract the files with the Windows (CR+LF) line endings.  ZIP
index 2692622..d8d33b1 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 2e52672..ea634e5 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 8ddbfb0..c9b96e9 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 04097d2..27a0a8f 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 66a4dcb..c4f3dbf 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 14ee7ed..4442bd3 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 687c87f..0508fbb 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 03963b3..ae40823 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 68370e6..922fc60 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 01d6a9b..4d6138e 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 6fd972f..c9bebdb 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 9a09a42..68dbd99 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,7 @@
 
 rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk
 
-# respect GNUMAKE environment variable for backwards compatibility
+# respect GNUMAKE environment variable for backward compatibility
 if test "x$GNUMAKE" = x; then
   if test "x$MAKE" = x; then
     if test "x`make -v 2>/dev/null | egrep 'GNU|makepp'`" = x; then
index d055f51..c805cf9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType 2 build and setup macros (development version).             */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d20df81..db661e7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    User-selectable configuration macros (specification only).           */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -77,6 +77,36 @@ FT_BEGIN_HEADER
 
   /*************************************************************************/
   /*                                                                       */
+  /* If you enable this configuration option, FreeType recognizes an       */
+  /* environment variable called `FREETYPE_PROPERTIES', which can be used  */
+  /* to control the various font drivers and modules.  The controllable    */
+  /* properties are listed in the section `Controlling FreeType Modules'   */
+  /* in the reference's table of contents; currently there are properties  */
+  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'),      */
+  /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h').             */
+  /*                                                                       */
+  /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
+  /* multiple lines for better readability).                               */
+  /*                                                                       */
+  /*   <optional whitespace>                                               */
+  /*   <module-name1> ':'                                                  */
+  /*   <property-name1> '=' <property-value1>                              */
+  /*   <whitespace>                                                        */
+  /*   <module-name2> ':'                                                  */
+  /*   <property-name2> '=' <property-value2>                              */
+  /*   ...                                                                 */
+  /*                                                                       */
+  /* Example:                                                              */
+  /*                                                                       */
+  /*   FREETYPE_PROPERTIES=truetype:interpreter-version=35 \               */
+  /*                       cff:no-stem-darkening=1 \                       */
+  /*                       autofitter:warping=1                            */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+
+
+  /*************************************************************************/
+  /*                                                                       */
   /* Uncomment the line below if you want to activate sub-pixel rendering  */
   /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */
   /*                                                                       */
@@ -492,7 +522,21 @@ FT_BEGIN_HEADER
   /*   code will be used.                                                  */
   /*                                                                       */
   /*   Setting this macro is needed for systems that prohibit address      */
-  /*   fixups, such as BREW.                                               */
+  /*   fixups, such as BREW.  [Note that standard compilers like gcc or    */
+  /*   clang handle PIC generation automatically; you don't have to set    */
+  /*   FT_CONFIG_OPTION_PIC, which is only necessary for very special      */
+  /*   compilers.]                                                         */
+  /*                                                                       */
+  /*   Note that FT_CONFIG_OPTION_PIC support is not available for all     */
+  /*   modules (see `modules.cfg' for a complete list).  For building with */
+  /*   FT_CONFIG_OPTION_PIC support, do the following.                     */
+  /*                                                                       */
+  /*     0. Clone the repository.                                          */
+  /*     1. Define FT_CONFIG_OPTION_PIC.                                   */
+  /*     2. Remove all subdirectories in `src' that don't have             */
+  /*        FT_CONFIG_OPTION_PIC support.                                  */
+  /*     3. Comment out the corresponding modules in `modules.cfg'.        */
+  /*     4. Compile.                                                       */
   /*                                                                       */
 /* #define FT_CONFIG_OPTION_PIC */
 
@@ -791,6 +835,33 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
   /****                                                                 ****/
+  /****         P C F   D R I V E R    C O N F I G U R A T I O N        ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* There are many PCF fonts just called `Fixed' which look completely    */
+  /* different, and which have nothing to do with each other.  When        */
+  /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
+  /* random, the style changes often if one changes the size and one       */
+  /* cannot select some fonts at all.  This option makes the PCF module    */
+  /* prepend the foundry name (plus a space) to the family name.           */
+  /*                                                                       */
+  /* We also check whether we have `wide' characters; all put together, we */
+  /* get family names like `Sony Fixed' or `Misc Fixed Wide'.              */
+  /*                                                                       */
+  /* If this option is activated, it can be controlled with the            */
+  /* `no-long-family-names' property of the pcf driver module.             */
+  /*                                                                       */
+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
   /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/
   /****                                                                 ****/
   /*************************************************************************/
@@ -842,6 +913,7 @@ FT_BEGIN_HEADER
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 #define  TT_USE_BYTECODE_INTERPRETER
 
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
 #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
 #define  TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
 #endif
@@ -850,6 +922,7 @@ FT_BEGIN_HEADER
 #define  TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
 #endif
 #endif
+#endif
 
 
   /*
index c1db81b..3ee9510 100644 (file)
@@ -1,4 +1,252 @@
 
+CHANGES BETWEEN 2.7.1 and 2.8
+
+  I. IMPORTANT CHANGES
+
+    - Support for OpenType Variation Fonts is now complete.   The last
+      missing part was handling the `VVAR' and `MVAR' tables, which is
+      available with this release.
+
+    - A new  function `FT_Face_Properties' allows the  control of some
+      module  and   library  properties  per  font.    Currently,  the
+      following properties can be  handled: stem darkening, LCD filter
+      weights, and the random seed for the `random' CFF operator.
+
+    - The PCF change to show more `colourful' family names (introduced
+      in version 2.7.1) was too radical; it can now be configured with
+      PCF_CONFIG_OPTION_LONG_FAMILY_NAMES   at   compile   time.    If
+      activated, it can  be switched off at run time  with the new pcf
+      property  `no-long-family-names'.  If  the `FREETYPE_PROPERTIES'
+      environment variable is available, you can say
+
+        FREETYPE_PROPERTIES=pcf:no-long-family-names=1
+
+    - Support  for  the  following  scripts  has  been  added  to  the
+      auto-hinter.
+
+        Adlam, Avestan, Bamum, Buhid, Carian, Chakma, Coptic, Cypriot,
+        Deseret, Glagolitic, Gothic, Kayah, Lisu, N'Ko, Ol Chiki, Old
+        Turkic, Osage, Osmanya, Saurashtra, Shavian, Sundanese, Tai
+        Viet, Tifinagh, Unified Canadian Syllabics, Vai
+
+
+  II. IMPORTANT BUG FIXES
+
+    - `Light' auto-hinting  mode no  longer uses TrueType  metrics for
+      TrueType  fonts.   This bug  was  introduced  in version  2.4.6,
+      causing   horizontal  scaling   also.    Almost  all   GNU/Linux
+      distributions (with Fedora as  a notable exception) disabled the
+      corresponding patch for good reasons; chances are thus high that
+      you won't notice a difference.
+
+      If  optical backward  compatibility for  legacy applications  is
+      necessary, you might enable the AF_CONFIG_OPTION_TT_SIZE_METRICS
+      configuration option.   However, it  is strongly  recommended to
+      avoid that, adjusting font sizes instead.
+
+    - If a TrueType font gets loaded with FT_LOAD_NO_HINTING, FreeType
+      now scales  the font linearly  again (bug introduced  in version
+      2.4.6).
+
+    - CVE-2017-8105,  CVE-2017-8287:  Older   FreeType  versions  have
+      out-of-bounds  writes  caused  by  heap-based  buffer  overflows
+      related to Type 1 fonts.
+
+        https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8105
+        https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8287
+
+
+  III. MISCELLANEOUS
+
+    - A  new function  `FT_Set_Default_Properties' has  been added  to
+      parse    the    `FREETYPE_PROPERTIES'    environment    variable
+      (previously, it  was internal only).   `FT_Init_FreeType' always
+      call this  function, but  `FT_New_Library' does not  (similar to
+      `FT_Add_Default_Modules').
+
+    - To be in sync with OpenType version 1.7 and newer, macros
+
+        FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
+        FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY,
+        TT_NAME_ID_PREFERRED_FAMILY
+        TT_NAME_ID_PREFERRED_SUBFAMILY
+
+      are renamed to
+
+        FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY,
+        FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY,
+        TT_NAME_ID_TYPOGRAPHIC_FAMILY
+        TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
+
+      The old macro names are deprecated (but still available).
+
+    - Support for SFNT `name' tables has been improved.
+
+      . Format  1 `name' tables  are now supported.  Use  new function
+        `FT_Get_Sfnt_LangTag' to access associated language tags.
+
+      . Language, encoding, and name IDs have been updated to OpenType
+        version 1.8.1.
+
+    - The new CFF  engine now handles the `random'  operator.  All CFF
+      opcodes are now supported.
+
+    - The CFF module  has a new property `random-seed'  to control the
+      pseudo-random number generation for the `random' operator.
+
+    - The `freetype-config' script is now a wrapper of `pkg-config' if
+      this program is available in the path.
+
+    - FT_LOAD_TARGET_LCD  is now  a  variant of  FT_LOAD_TARGET_LIGHT;
+      this should provide better rendering results.
+
+    - A mode to display  light auto-hinting with sub-pixel positioning
+      has been added to `ftdiff'.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.7 and 2.7.1
+
+  I. IMPORTANT CHANGES
+
+    - Support for the new CFF2 font format as introduced with OpenType
+      1.8 has been contributed by Dave Arnolds from Adobe.
+
+    - Preliminary support for variation fonts as specified in OpenType
+      1.8 (in addition to the  already existing support for Adobe's MM
+      and Apple's  GX formats).  Dave Arnolds  contributed handling of
+      advance  width change  variation;  more will  come  in the  next
+      version.
+
+
+  II. IMPORTANT BUG FIXES
+
+    - Handling of  raw CID fonts was partially  broken (bug introduced
+      in 2.6.4).
+
+    - CVE-2016-10328:  Older  FreeType versions had  an  out-of-bounds
+      write caused by a heap-based  buffer overflow related to the CFF
+      fonts.
+
+        http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10328
+
+
+  III. MISCELLANEOUS
+
+    - Some limits for TrueType  bytecode execution have been tightened
+      to  speed   up  FreeType's  handling  of   malformed  fonts,  in
+      particular to quickly abort endless loops.
+
+      - The  number of  twilight points  can no  longer be  set to  an
+        arbitrarily large value.
+
+      - The total number of jump  opcode instructions (like JMPR) with
+        negative arguments  is dynamically restricted; the  same holds
+        for the total number of iterations in LOOPCALL opcodes.
+
+      The dynamic limits are based on  the number of points in a glyph
+      and the number of CVT entries.  Please report if you encounter a
+      font where the selected values are not adequate.
+
+    - PCF family names are made more `colourful'; they now include the
+      foundry  and information  whether they contain  wide characters.
+      For example,  you no longer get `Fixed' but  rather `Sony Fixed'
+      or `Misc Fixed Wide'.
+
+    - A new  function `FT_Get_Var_Blend_Coordinates'  (with its  alias
+      name  `FT_Get_MM_Blend_Coordinates') to retrieve the  normalized
+      blend  coordinates of the currently  selected variation instance
+      has been added to the Multiple Masters interface.
+
+    - A new  function `FT_Get_Var_Design_Coordinates' to  retrieve the
+      design coordinates of the  currently selected variation instance
+      has been added to the Multiple Masters interface.
+
+    - A new load flag `FT_LOAD_BITMAP_METRICS_ONLY' to retrieve bitmap
+      information without loading the (embedded) bitmap itself.
+
+    - Retrieving   advance   widths   from   bitmap   strikes   (using
+      `FT_Get_Advance' and `FT_Get_Advances') have been sped up.
+
+    - The  usual round  of  fuzzer fixes  to  better reject  malformed
+      fonts.
+
+    - The `ftmulti' demo program can now switch engines with key `H'.
+
+    - The  `ftstring'  demo  program   can  now  show  some  built-in,
+      non-latin sample strings (to be selected with the TAB key).
+
+    - The  `ftview'  demo program  can  now  switch between  a  font's
+      charmaps using the TAB key.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.6.5 and 2.7
+
+  I. IMPORTANT CHANGES
+
+    - As announced earlier, the 2.7.x series now uses the new subpixel
+      hinting  mode as  the  default, emulating  a  modern version  of
+      ClearType.
+
+      This change inevitably leads to different rendering results, and
+      you   might   change   the   `TT_CONFIG_OPTION_SUBPIXEL_HINTING'
+      configuration option to  adapt it to your taste (or  use the new
+      `FREETYPE_PROPERTIES'    environment    variable).    See    the
+      corresponding entry  below for  version 2.6.4, which  gives more
+      information.
+
+    - A new option  `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES' has been
+      introduced.   If  set (which  is  the  default), an  environment
+      variable  `FREETYPE_PROPERTIES' can  be used  to control  driver
+      properties.  Example:
+
+        FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
+                            cff:no-stem-darkening=1 \
+                            autofitter:warping=1
+
+      This allows to select, say, the subpixel hinting mode at runtime
+      for a given application.  See file `ftoption.h' for more.
+
+
+  II. IMPORTANT BUG FIXES
+
+    - After  loading a  named instance  of  a GX  variation font,  the
+      `face_index'  value  in  the returned  `FT_Face'  structure  now
+      correctly holds the named instance  index in the upper 16bits as
+      documented.
+
+
+  III. MISCELLANEOUS
+
+    - A new macro `FT_IS_NAMED_INSTANCE' to  test whether a given face
+      is a named instance.
+
+    - More fixes to GX font handling.
+
+    - Apple's   `GETVARIATION'  bytecode   operator  (needed   for  GX
+      variation font support) has been implemented.
+
+    - Another round  of fuzzer fixes,  mainly to reject  invalid fonts
+      faster.
+
+    - Handling of raw CID fonts  was broken (bug introduced in version
+      2.6.4).
+
+    - The smooth rasterizer has been streamlined  to make it faster by
+      approx. 20%.
+
+    - The `ftgrid'  demo program now  understands command  line option
+      `-d' to give start-up design coordinates.
+
+    - The `ftdump' demo program has  a new command line option `-p' to
+      dump TrueType bytecode instructions.
+
+
+======================================================================
+
 CHANGES BETWEEN 2.6.4 and 2.6.5
 
   I. IMPORTANT BUG FIXES
@@ -7,7 +255,7 @@ CHANGES BETWEEN 2.6.4 and 2.6.5
       2.6.4).
 
 
-  I. IMPORTANT CHANGES
+  II. IMPORTANT CHANGES
 
     - The new  subpixel hinting  mode is now  disabled by  default; it
       will  be enabled  by default  in the  forthcoming 2.7.x  series.
@@ -60,7 +308,7 @@ CHANGES BETWEEN 2.6.3 and 2.6.4
 
     - Type 42 fonts as created by LilyPond are now supported.
 
-    - Minor rendering improvments in the auto-hinter.
+    - Minor rendering improvements in the auto-hinter.
 
     - For experimental  reasons, the old  CFF engine now  supports all
       CFF operators except `random', including the deprecated Multiple
@@ -105,7 +353,7 @@ CHANGES BETWEEN 2.6.2 and 2.6.3
       to the user.   The exception to this  is `__FTERRORS_H__', which
       must be  sometimes undefined by  the user to get  FreeType error
       strings:  Both this  form and  the new  `FTERRORS_H_' macro  are
-      accepted for backwards compatibility.
+      accepted for backward compatibility.
 
     - Minor improvements mainly to the Type 1 driver.
 
@@ -346,17 +594,17 @@ CHANGES BETWEEN 2.5.5 and 2.6
       compiler warnings.
 
     - Function `FT_Bitmap_New'  has been renamed  to `FT_Bitmap_Init',
-      since  this name  better reflects  its function.   For backwards
+      since  this name  better reflects  its  function.   For backward
       compatibility, the old function name is still available.
 
     - Function   `FT_Get_X11_Font_Format'   has    been   renamed   to
       `FT_Get_Font_Format',  since  this   name  better  reflects  its
-      function.  For backwards compatibility, the old function name is
+      function.  For backward compatibility,  the old function name is
       still available.
 
       Additionally, the header  file macro for this  function has been
       renamed to  `FT_FONT_FORMATS_H' (the old name  `FT_XFREE86_H' is
-      retained for backwards compatibility).
+      retained for backward compatibility).
 
     - Various improvements to the `ftgrid' demo program.
 
@@ -790,7 +1038,7 @@ index ebcf189..3f2ce6b 100644
   II. MISCELLANEOUS
 
     - The  (top-level)  `configure'  script   now  respects  the  MAKE
-      environment variable to specify a `make' binary.   For backwards
+      environment variable  to specify a `make' binary.   For backward
       compatibility, GNUMAKE still overrides MAKE, though.
 
     - The `ftview'  and `ftdiff'  demo programs have  been redesigned,
@@ -2009,7 +2257,7 @@ CHANGES BETWEEN 2.1.10 and 2.1.9
       probably using a different pitch, and to further manipulate it.
 
     - A new  API `FT_Outline_Embolden'  (in FT_OUTLINE_H) gives  finer
-      control how  outlines are embolded.
+      control how outlines are emboldened.
 
     - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H)  now handles bitmaps
       also (code contributed  by Chia I Wu).  Note that this  function
@@ -2128,7 +2376,7 @@ CHANGES BETWEEN 2.1.8 and 2.1.7
       correctly  treated as a  CID, similar  to FreeType's  CID driver
       module.  Note that CID CMap support is still missing.
 
-    - The FT_FACE_FLAGS_GLYPH_NAMES flag is now  set correctly for all
+    - The FT_FACE_FLAG_GLYPH_NAMES flag  is now  set correctly for all
       font formats.
 
     - Some subsetted Type 1  fonts weren't parsed correctly.  This bug
@@ -2419,7 +2667,7 @@ CHANGES BETWEEN 2.1.5 and 2.1.4
 
     - FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB}      are     now
       deprecated               in               favour              of
-      FT_ENCODING_{SJIS,GB2312,GIB5,WANSONG,JOHAB}  -- those encodings
+      FT_ENCODING_{SJIS,GB2312,BIG5,WANSUNG,JOHAB}  -- those encodings
       are not specific to Microsoft.
 
 
@@ -4541,7 +4789,7 @@ Extensions support:
 
 ------------------------------------------------------------------------
 
-Copyright 2000-2016 by
+Copyright 2000-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
index e8817b7..6d1587e 100644 (file)
@@ -139,7 +139,7 @@ IV. Overriding default configuration and module headers
 
 ----------------------------------------------------------------------
 
-Copyright 2003-2016 by
+Copyright 2003-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index 29e1072..e5e9390 100644 (file)
@@ -6,7 +6,7 @@ I. Configuration macros
 
 There are  several ways to enable  debugging features in a  FreeType 2
 builds.  This is  controlled through the definition  of special macros
-located in the file `ftoptions.h'.  The macros are:
+located in the file `ftoption.h'.  The macros are:
 
 
   FT_DEBUG_LEVEL_ERROR
@@ -191,7 +191,7 @@ behaviour of FreeType at runtime.
 
 ------------------------------------------------------------------------
 
-Copyright 2002-2016 by
+Copyright 2002-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part  of the  FreeType  project, and  may  only be  used,
index 5155a4b..d6ec0d8 100644 (file)
@@ -16,6 +16,8 @@ I. Normal installation and upgrades
 
     GNU Make VERSION 3.80 OR NEWER IS NEEDED!
 
+    [For `cmake' see below.]
+
 
   2. On VMS with the `mms' build tool
 
@@ -75,7 +77,7 @@ II. Custom builds of the library
 
 ----------------------------------------------------------------------
 
-Copyright 2000-2016 by
+Copyright 2000-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index aae2773..30b9578 100644 (file)
@@ -143,7 +143,7 @@ II. Support for flat-directory compilation
 
 ----------------------------------------------------------------------
 
-Copyright 2003-2016 by
+Copyright 2003-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index 4285804..1a837ae 100644 (file)
@@ -163,7 +163,7 @@ procedure.
 
 ----------------------------------------------------------------------
 
-Copyright 2006-2016 by
+Copyright 2006-2017 by
 suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg.
 
 
index f1eb081..79b53d8 100644 (file)
@@ -148,7 +148,7 @@ instructions in the file `INSTALL.UNIX' instead.
 
 ----------------------------------------------------------------------
 
-Copyright 2003-2016 by
+Copyright 2003-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index 42bb0d8..2587e24 100644 (file)
@@ -1,32 +1,32 @@
-Please follow the instructions  in INSTALL.UNIX to install FreeType on
+Please follow the instructions in  INSTALL.UNIX to install FreeType on
 Mac OS X.
 
-Currently FreeType2 functions based on some deprecated Carbon APIs
-return FT_Err_Unimplemented_Feature always, even if FreeType2 is
-configured and built on the system that deprecated Carbon APIs are
-available. To enable deprecated FreeType2 functions as far as possible,
-replace src/base/ftmac.c by builds/mac/ftmac.c.
+Currently  FreeType2 functions  based on  some deprecated  Carbon APIs
+return  `FT_Err_Unimplemented_Feature' always,  even  if FreeType2  is
+configured and  built on  the system that  deprecated Carbon  APIs are
+available.   To  enable  deprecated  FreeType2  functions  as  far  as
+possible, replace `src/base/ftmac.c' by `builds/mac/ftmac.c'.
 
-Starting with Mac OS X 10.5, gcc defaults the deployment target
-to 10.5. In previous versions of Mac OS X, this defaulted to 10.1.
-If you want your built binaries to run only on 10.5, this change
-does not concern you.  If you want them to also run on older versions
-of Mac OS X, then you must either set the MACOSX_DEPLOYMENT_TARGET
-environment variable or pass -mmacosx-version-min to gcc. You should
-specify the oldest version of Mac OS you want the code to run on.
-For example, if you use Bourne shell:
+Starting with  Mac OS X  10.5, gcc  defaults the deployment  target to
+10.5.  In previous  versions of Mac OS X, this  defaulted to 10.1.  If
+you want your built binaries to run only on 10.5, this change does not
+concern you.  If  you want them to  also run on older  versions of Mac
+OS  X,   then  you   must  either  set   the  MACOSX_DEPLOYMENT_TARGET
+environment  variable  or  pass `-mmacosx-version-min'  to  gcc.   You
+should specify the oldest  version of Mac OS you want  the code to run
+on.  For example, if you use Bourne shell:
 
-       export MACOSX_DEPLOYMENT_TARGET=10.2
+  export MACOSX_DEPLOYMENT_TARGET=10.2
 
 or, if you use C shell:
 
-       setenv MACOSX_DEPLOYMENT_TARGET 10.2
+  setenv MACOSX_DEPLOYMENT_TARGET 10.2
 
-Alternatively, you could pass "-mmacosx-version-min=10.2" to gcc.
+Alternatively, you could pass `-mmacosx-version-min=10.2' to gcc.
 
-Here the number 10.2 is the lowest version that the built binaries
-can run on. In the cases in above, the built binaries will run on
-Mac OS X 10.2 and later, but _not_ earlier. If you want to run on
-earlier, you have to set lower version, e.g. 10.0.
+Here the number 10.2 is the lowest version that the built binaries can
+run on.  In the  above cases, the built binaries will run  on Mac OS X
+10.2 and later, but _not_ earlier.  If you want to run on earlier, you
+have to set lower version, e.g., 10.0.
 
 For classic Mac OS (Mac OS 7, 8, 9) please refer to builds/mac/README.
index b043883..8b620da 100644 (file)
@@ -28,6 +28,9 @@ or MSys on Win32:
     As  a  special exception,  'makepp'  can  also  be used  to  build
     FreeType 2.  See the file docs/MAKEPP for details.
 
+    For builds  with `cmake' please check file `CMakeLists.txt';  this
+    is a contributed file not directly supported by the FreeType team.
+
 
   2. Regenerate the configure script if needed
   --------------------------------------------
@@ -102,7 +105,7 @@ or MSys on Win32:
 
 ----------------------------------------------------------------------
 
-Copyright 2003-2016 by
+Copyright 2003-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index ef371d7..7a5174d 100644 (file)
@@ -49,7 +49,7 @@ V7.2-1.
 
 ------------------------------------------------------------------------
 
-Copyright 2000-2016 by
+Copyright 2000-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
index 4aa3f09..c4304b3 100644 (file)
--- a/docs/TODO
+++ b/docs/TODO
@@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType.
 
 ------------------------------------------------------------------------
 
-Copyright 2001-2016 by
+Copyright 2001-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
index c5a57e7..e116d34 100644 (file)
@@ -52,6 +52,9 @@ on _most_ systems, but not all of them:
 
     release     libtool     so
   -------------------------------
+     2.8.0      20.0.14   6.14.0
+     2.7.1      19.0.13   6.13.0
+     2.7.0      18.6.12   6.12.6
      2.6.5      18.5.12   6.12.5
      2.6.4      18.4.12   6.12.4
      2.6.3      18.3.12   6.12.3
@@ -108,7 +111,7 @@ other release numbers.
 
 ------------------------------------------------------------------------
 
-Copyright 2002-2016 by
+Copyright 2002-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part  of the  FreeType  project, and  may  only be  used,
index 4966bd7..1c494f0 100644 (file)
-This  file  contains a  list  of various  font  formats.   It gives  the
+This  file contains  a list  of various  font formats.   It gives  the
 reference document and whether it is supported in FreeType 2.
 
-
-  file type:
-    The only special  case is `MAC'; on older Mac  OS versions, a `file'
-    is  stored as  a  data and  a  resource fork,  this  is, within  two
-    separate data chunks.   In all other cases, the  font data is stored
-    in a single file.
-
-  wrapper format:
-    The format used  to represent the font data.  In  the table below it
-    is used only if the font format differs.  Possible values are `SFNT'
-    (binary), `PS' (a text header, followed by binary or text data),
-    `LZW' (compressed with either `gzip' or `compress'), and
-    `BZ2' (compressed with `bzip2`).
-
-  font format:
-    How the font  is to be accessed, possibly  after converting the file
-    type and  wrapper format  into a generic  form.  Bitmap  formats are
-    `BDF',  `PCF', and  one  form  of `WINFNT';  all  others are  vector
-    formats.
-
-  font type:
-    Sub-formats  of the font  format.  `SBIT'  and `MACSBIT'  are bitmap
-    formats, `MM' and `VAR' support optical axes.
-
-  glyph access:
-    If not specified, the glyph access is `standard' to the font format.
-    Values are  `CID' for CID-keyed  fonts, `SYNTHETIC' for  fonts which
-    are modified  versions of other  fonts by means of  a transformation
-    matrix, `COLLECTION' for collecting  multiple fonts (sharing most of
-    the data) into a single file, and `TYPE_0' for PS fonts which are to
-    be accessed in a tree-like structure.
-
-  FreeType driver:
-    The module in  the FreeType library which handles  the specific font
-    format.   A missing entry  means that  FreeType doesn't  support the
+Table fields
+------------
+
+  wrapper format
+    The format used to represent the font data.  In the table below it
+    is  used only  if the  font format  differs.  Possible  values are
+
+      SFNT  binary
+      PFB   binary
+      PS    a text header, followed by  binary or text data
+      LZW   compressed with  either `gzip' or `compress'
+      BZ2   compressed with `bzip2'.
+
+  font format
+    How the font is to be accessed, possibly after converting the file
+    type and wrapper  format into a generic form.   Bitmap formats are
+    `BDF',  `PCF', and  one form  of `WINFNT';  all others  are vector
+    formats.   `PS' indicates  third-order,  `TT' second-order  Bézier
+    curves.
+
+  font type
+    Sub-formats of the  font format.  `SBIT' and  `MACSBIT' are bitmap
+    formats,  `MM' and  `VAR' support  optical axes.   `CFF2' supports
+    optical axes also.
+
+  glyph access
+    If  not specified,  the glyph  access  is `standard'  to the  font
+    format.   Values are  `CID' for  CID-keyed fonts,  `SYNTHETIC' for
+    fonts that  are modified  versions of  other fonts  by means  of a
+    transformation matrix, and  `TYPE_0' for PS fonts which  are to be
+    accessed in a tree-like structure.
+
+  FreeType driver
+    The module in the FreeType library which handles the specific font
+    format.  A missing  entry means that FreeType  doesn't support the
     font format (yet).
 
 
-Please  send  additions  and/or  corrections  to wl@gnu.org  or  to  the
-FreeType developer's list  at freetype-devel@nongnu.org (for subscribers
-only).   If you  can provide  a font  example for  a format  which isn't
-supported yet please send a mail too.
-
-
-file wrapper font   font    glyph      FreeType reference
-type format  format type    access     driver   documents
-----------------------------------------------------------------------------
-
----  ---     BDF    ---     ---        bdf      5005.BDF_Spec.pdf, X11
-
-
----  SFNT    PS     TYPE_1  ---        type1    Type 1 GX Font Format
-                                                (for the Mac) [3]
-MAC  SFNT    PS     TYPE_1  ---        type1    Type 1 GX Font Format
-                                                (for the Mac) [3]
----  SFNT    PS     TYPE_1  CID        cid      5180.sfnt.pdf (for the Mac)
-                                                [3]
-MAC  SFNT    PS     TYPE_1  CID        cid      5180.sfnt.pdf (for the Mac)
-                                                [3]
----  SFNT    PS     CFF     ---        cff      OT spec, 5176.CFF.pdf
-                                                (`OTTO' format)
-MAC  SFNT    PS     CFF     ---        cff      OT spec, 5176.CFF.pdf
-                                                (`OTTO' format)
----  SFNT    PS     CFF     CID        cff      OT spec, 5176.CFF.pdf
-MAC  SFNT    PS     CFF     CID        cff      OT spec, 5176.CFF.pdf
----  SFNT    PS     CFF     SYNTHETIC  ---      OT spec, 5176.CFF.pdf
-MAC  SFNT    PS     CFF     SYNTHETIC  ---      OT spec, 5176.CFF.pdf
----  SFNT    TT     SBIT    ---        sfnt     XFree86 (bitmaps only;
-                                                with `head' table)
----  SFNT    TT     MACSBIT ---        sfnt     OT spec (for the Mac;
-                                                bitmaps only; `bhed' table)
-MAC  SFNT    TT     MACSBIT ---        sfnt     OT spec (for the Mac;
-                                                bitmaps only; `bhed' table)
----  SFNT    TT     ---     ---        truetype OT spec (`normal' TT font)
-MAC  SFNT    TT     ---     ---        truetype OT spec (`normal' TT font)
-MAC  SFNT    TT     VAR     ---        truetype GX spec (`?var' tables)
----  SFNT    TT     ---     COLLECTION truetype OT spec (this can't be CFF)
-MAC  SFNT    TT     ---     COLLECTION truetype OT spec (this can't be CFF)
-
-
----  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
-                                                (`normal' Type 1 font)
-MAC  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
-                                                (`normal' Type 1 font)
----  ---     PS     TYPE_1  CID        cid      PLRM.pdf (CID Font Type 0;
-                                                Type 9 font)
----  ---     PS     MM      ---        type1    5015.Type1_Supp.pdf
-                                                (Multiple Masters)
----  ---     PS     CFF     ---        cff      5176.CFF.pdf (`pure' CFF)
----  ---     PS     CFF     CID        cff      5176.CFF.pdf (`pure' CFF)
----  ---     PS     CFF     SYNTHETIC  ---      5176.CFF.pdf (`pure' CFF)
----  PS      PS     CFF     ---        ---      PLRM.pdf (Type 2) [1]
----  PS      PS     CFF     CID        ---      PLRM.pdf (Type 2) [1]
----  PS      PS     CFF     SYNTHETIC  ---      PLRM.pdf (Type 2) [1]
----  ---     PS     ---     TYPE_0     ---      PLRM.pdf
----  ---     PS     TYPE_3  ---        ---      PLRM.pdf (never supported)
----  ---     PS     TYPE_3  CID        ---      PLRM.pdf (CID Font Type 1;
-                                                Type 10 font; never supported)
----  PS      PS     TYPE_14 ---        ---      PLRM.pdf (Chameleon font;
-                                                Type 14 font; never supported?)
----  ---     PS     TYPE_32 CID        ---      PLRM.pdf (CID Font Type 4;
-                                                Type 32 font; never supported?)
----  PS      TT     ---     ---        type42   5012.Type42_Spec.pdf
-                                                (Type 42 font)
----  PS      TT     ---     CID        ---      PLRM.pdf (CID Font Type 2;
-                                                Type 11 font)
-
-
----  ?       ?      CEF     ?          cff      ?
-
-
----  ---     PCF    ---     ---        pcf      X11 [4]
----  LZW     PCF    ---     ---        pcf      X11 [4]
----  BZ2     PCF    ---     ---        pcf      X11 [4]
-
-
----  ---     PFR    PFR0    ---        pfr      [2]
----  ---     PFR    PFR1    ---        ---      (undocumented, proprietary;
-                                                probably never supported)
-
-
----  ---     WINFNT ---     ---        winfonts Windows developer's notes [5]
----  ---     WINFNT VECTOR  ---        ---      Windows developer's notes [5]
-
-
-[1] Support should be rather simple since this is identical to `CFF' but
-    in a PS wrapper.
+Notes
+-----
+
+  The  SFNT  container  format also  provides  `collections'  (usually
+  having the file extension `.ttc'  or `.otc').  A collection contains
+  multiple font faces that share some tables to avoid redundancy, thus
+  reducing the file  size.  In FreeType, elements of  a collection can
+  be accessed with a proper face index.
+
+  Both  the GX  and the  OpenType 1.8  variation fonts  provide `named
+  instances'.  FreeType  maps them to  face indices (they can  also be
+  accessed with the standard MM interface).
+
+  Other  font  formats  (not  using the  SFNT  wrapper)  also  provide
+  multiple faces  within one  file; they are  marked with  an asterisk
+  (`*') in the table below.
+
+  FreeType can  be configured to  support Mac  files (on older  Mac OS
+  versions, a `file' is stored as a data and a resource fork, this is,
+  within two  separate data chunks).  If  a file can't be  opened as a
+  font, FreeType then checks whether it  is a resource fork, trying to
+  extract  the contained  font data  from  either a  `POST' or  `sfnt'
+  resource.
+
+
+Please  send additions  and/or  corrections to  wl@gnu.org  or to  the
+FreeType   developer's   list    at   freetype-devel@nongnu.org   (for
+subscribers only).   If you can  provide a  font example for  a format
+which isn't supported yet please send a mail too.
+
+
+  wrapper font    font    glyph      FreeType reference
+  format  format  type    access     driver   documents
+ -----------------------------------------------------------------------------
+
+  ---     BDF     ---     ---        bdf      5005.BDF_Spec.pdf, X11
+
+
+  SFNT    PS      TYPE_1  ---        type1    Type 1 GX Font Format
+                                              (for the Mac) [3]
+  SFNT    PS      TYPE_1  CID        cid      5180.sfnt.pdf (for the Mac)
+                                              [3]
+  SFNT    PS      CFF     ---        cff      OT spec, 5176.CFF.pdf
+                                              (`OTTO' format)
+  SFNT    PS      CFF     CID        cff      OT spec, 5176.CFF.pdf
+  SFNT    PS      CFF     SYNTHETIC  ---      OT spec, 5176.CFF.pdf
+  SFNT    PS      CFF2    ---        cff      OT spec 1.8
+
+  SFNT    TT      SBIT    ---        sfnt     XFree86 (bitmaps only;
+                                              with `head' table)
+  SFNT    TT      MACSBIT ---        sfnt     OT spec (for the Mac;
+                                              bitmaps only; `bhed' table)
+  SFNT    TT      ---     ---        truetype OT spec (`normal' TT font)
+  SFNT    TT      VAR     ---        truetype GX spec (`?var' tables)
+  SFNT    TT      VAR     ---        truetype OT spec 1.8
+                                              (`?var' + `?VAR' tables)
+
+
+  ---     PS      TYPE_1  ---        type1    T1_SPEC.pdf
+                                              (PFA, Type 1 font resource)
+  PFB     PS      TYPE_1  ---        type1    T1_SPEC.pdf,
+                                              5040.Download_Fonts.pdf
+                                              (`normal' Type 1 font)
+  ---     PS      TYPE_1  CID        cid      PLRM.pdf (CID Font Type 0;
+                                              Type 9 font)
+  ---     PS      MM      ---        type1    5015.Type1_Supp.pdf
+                                              (Multiple Masters)
+  ---     PS      CFF     ---        cff      5176.CFF.pdf (`pure' CFF)
+  ---     PS*     CFF     CID        cff      5176.CFF.pdf (`pure' CFF)
+  ---     PS      CFF     SYNTHETIC  ---      5176.CFF.pdf (`pure' CFF)
+  ---     PS      CFF/MM  ---        cff      old 5167.CFF.pdf (`pure' CFF)
+                                              [3]
+  ---     PS*     CFF/MM  CID        cff      old 5167.CFF.pdf (`pure' CFF)
+                                              [3]
+  ---     PS      CFF/MM  SYNTHETIC  ---      old 5167.CFF.pdf (`pure' CFF)
+                                              [3]
+  PS      PS      CFF     ---        ---      PLRM.pdf (Type 2) [1]
+  PS      PS*     CFF     CID        ---      PLRM.pdf (Type 2) [1]
+  PS      PS      CFF     SYNTHETIC  ---      PLRM.pdf (Type 2) [1]
+  PS      PS      CFF/MM  ---        ---      PLRM.pdf (Type 2) [1]
+  PS      PS*     CFF/MM  CID        ---      PLRM.pdf (Type 2) [1]
+  PS      PS      CFF/MM  SYNTHETIC  ---      PLRM.pdf (Type 2) [1]
+  ---     PS      ---     TYPE_0     ---      PLRM.pdf
+  ---     PS      TYPE_3  ---        ---      PLRM.pdf (never supported)
+  ---     PS      TYPE_3  CID        ---      PLRM.pdf (CID Font Type 1;
+                                              Type 10 font; never supported)
+  PS      PS      TYPE_14 ---        ---      PLRM.pdf (Chameleon font;
+                                              Type 14 font; never supported?)
+  ---     PS      TYPE_32 CID        ---      PLRM.pdf (CID Font Type 4;
+                                              Type 32 font; never supported?)
+  PS      TT      ---     ---        type42   5012.Type42_Spec.pdf
+                                              (Type 42 font)
+  PS      TT      ---     CID        ---      PLRM.pdf (CID Font Type 2;
+                                              Type 11 font)
+
+
+  ?       ?       CEF     ?          cff      ?
+
+
+  ---     PCF     ---     ---        pcf      X11 [4]
+  LZW     PCF     ---     ---        pcf      X11 [4]
+  BZ2     PCF     ---     ---        pcf      X11 [4]
+
+
+  ---     PFR*    PFR0    ---        pfr      [2]
+  ---     PFR     PFR1    ---        ---      (undocumented, proprietary;
+                                              probably never supported)
+
+
+  ---     WINFNT* ---     ---        winfonts Windows developer's notes [5]
+  ---     WINFNT  VECTOR  ---        ---      Windows developer's notes [5]
+
+
+[1] Support should  be rather simple since this is  identical to `CFF'
+    but in a PS wrapper.
 
 [2] Official PFR specification:
 
       http://www.bitstream.com/categories/developer/truedoc/pfrspec.html
       http://www.bitstream.com/categories/developer/truedoc/pfrspec1.2.pdf
 
-    The  syntax of  the  auxiliary data  is  not defined  there, but  is
-    partially defined in  MHP 1.0.3 (also called ETSI  TS 101812 V1.3.1)
+    The syntax  of the  auxiliary data  is not  defined there,  but is
+    partially defined in MHP 1.0.3 (also called ETSI TS 101812 V1.3.1)
     section 7.4.
 
       http://www.etsi.org/
@@ -143,7 +169,8 @@ MAC  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
 
     (free registration required).
 
-[3] Support is rudimentary currently; some tables are not loaded yet.
+[3] Support  is rudimentary  currently; some  tables or  data are  not
+    loaded yet.
 
 [4] See
 
@@ -151,13 +178,13 @@ MAC  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
       Elias Israel, Erik Fortune, Digital Press, 1992
       ISBN 1-55558-096-3
 
-    for a specification  given in Appendix D on pgs. 436-450.   However,
-    this information  might be out of  date; unfortunately,  there is no
-    PCF  specification available  online, and this book is out of print.
-    George  Williams deduced  the font  format from the X11  sources and
+    for a specification given in Appendix D on pgs. 436-450.  However,
+    this information might be out  of date; unfortunately, there is no
+    PCF specification available online, and this book is out of print.
+    George Williams deduced  the font format from the  X11 sources and
     documented it for his FontForge font editor:
 
-      http://fontforge.sourceforge.net/pcf-format.html
+      http://fontforge.github.io/pcf-format.html
 
 [5] This is from MS Windows 3; see Microsoft's Knowledge Base article at
 
@@ -165,7 +192,7 @@ MAC  ---     PS     TYPE_1  ---        type1    T1_SPEC.pdf
 
 ------------------------------------------------------------------------
 
-Copyright 2004-2016 by
+Copyright 2004-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part  of the  FreeType  project, and  may  only be  used,
@@ -176,3 +203,7 @@ accept it fully.
 
 
 --- end of formats.txt ---
+
+Local Variables:
+coding: utf-8
+End:
index 63e5aed..eaaa1b9 100644 (file)
@@ -1,4 +1,4 @@
-.TH FREETYPE-CONFIG 1 "July 2016" "FreeType 2.6.5"
+.TH FREETYPE-CONFIG 1 "May 2017" "FreeType 2.8"
 .
 .
 .SH NAME
@@ -23,6 +23,14 @@ FreeType library version installed on the system, such as the
 installation (directory path) prefix or the FreeType version number.
 .
 .PP
+If
+.BR pkg-config (1)
+is found in the path,
+.B freetype-config
+acts as a wrapper for
+.BR pkg-config .
+.
+.PP
 This program is part of the FreeType package.
 .
 .
@@ -50,7 +58,8 @@ Return the executable prefix value of the installed FreeType library
 .
 .TP
 .B \-\-ftversion
-Return the FreeType version number.
+Return the FreeType version number, directly derived from file
+`freetype.h'.
 .
 .TP
 .B \-\-version
@@ -72,32 +81,61 @@ Return compiler flags for compiling against the installed FreeType library.
 .B \-\-static
 Make command line options display flags for static linking.
 .
+.TP
+.B \-\-help
+Show help and exit.
+.
 .
 .SS Path override options
 .
 These affect any selected output option, except the libtool version
-returned by `--version'.
+returned by
+.BR \-\-version .
 .
 .TP
 .BI \-\-prefix= PREFIX
-Override `--prefix' value with
+Override
+.B \-\-prefix
+value with
 .IR PREFIX .
 .
+This also sets
+.BI \-\-exec-prefix= PREFIX
+if option
+.B \-\-exec-prefix
+is not explicitly given.
+.
 .TP
 .BI \-\-exec-prefix= EPREFIX
-Override `--exec-prefix' value with
+Override
+.B \-\-exec-prefix
+value with
 .IR EPREFIX .
 .
 .
 .SH BUGS
 In case the libraries FreeType links to are located in non-standard
-directories, the output from option
+directories, and
+.BR pkg-config (1)
+is not available, the output from option
 .B \-\-libs
 might be incomplete.
+.
 It is thus recommended to use the
 .BR pkg-config (1)
 interface instead, which is able to correctly resolve all dependencies.
 .
+.PP
+Setting
+.B \-\-exec-prefix
+(either explicitly or implicitly) might return incorrect results if
+combined with option
+.BR \-\-static .
+.
+The same problem can occur if you set the
+.B SYSROOT
+environment variable.
+.
 .
 .SH AUTHOR
 .
index 5e8df51..bd3fd00 100644 (file)
@@ -618,7 +618,7 @@ II. Rendering Technology
 
 ------------------------------------------------------------------------
 
-Copyright 2003-2016 by
+Copyright 2003-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file  is  part  of the  FreeType  project, and may  only be  used,
index 3a78ad9..f1770f8 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="auto_hinter">The auto-hinter</h1>
 <h2>Synopsis</h2>
 <table class="synopsis">
-<tr><td><a href="#glyph-to-script-map">glyph-to-script-map</a></td><td><a href="#increase-x-height">increase-x-height</a></td></tr>
-<tr><td><a href="#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td></tr>
-<tr><td><a href="#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="#warping">warping</a></td></tr>
-<tr><td><a href="#fallback-script">fallback-script</a></td><td><a href="#no-stem-darkening(autofit)">no-stem-darkening</a></td></tr>
+<tr><td><a href="#glyph-to-script-map">glyph-to-script-map</a></td><td><a href="#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td></tr>
+<tr><td><a href="#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="#warping">warping</a></td></tr>
+<tr><td><a href="#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="#no-stem-darkening(autofit)">no-stem-darkening</a></td></tr>
+<tr><td><a href="#fallback-script">fallback-script</a></td><td><a href="#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a></td></tr>
 <tr><td><a href="#default-script">default-script</a></td><td><a href="#darkening-parameters(autofit)">darkening-parameters</a></td></tr>
+<tr><td><a href="#increase-x-height">increase-x-height</a></td><td></td></tr>
 </table>
 
 
 
 <h4>note</h4>
 <p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
 <p>The warping code can also change advance widths. Have a look at the &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; fields in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure for details on improving inter-glyph distances while rendering.</p>
 <p>Since warping is a global property of the auto-hinter it is best to change its value before rendering any face. Otherwise, you should reload all faces that get auto-hinted in &lsquo;light&rsquo; hinting mode.</p>
 
 <div class="section">
 <h3 id="no-stem-darkening(autofit)">no-stem-darkening</h3>
 
-<p><b>Experimental</b> *only,* <b>requires</b> <b>linear</b> <b>alpha</b> <b>blending</b> <b>and</b> <b>gamma</b> <b>correction</b></p>
+<p><b>Experimental</b> <b>only</b>, <b>requires</b> <b>linear</b> <b>alpha</b> <b>blending</b> <b>and</b> <b>gamma</b> <b>correction</b></p>
 <p>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 <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!</p>
 <p>Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (=&nbsp;higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs &lsquo;thin out&rsquo;. Mac OS&nbsp;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 &lsquo;blacker&rsquo;. This counteracts the &lsquo;thinning out&rsquo; 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.</p>
 <p>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.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable similar to the CFF driver. It can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-auto_hinter.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</h3>
+<p>Defined in FT_AUTOHINTER_H (freetype/ftautoh.h).</p>
+<pre>
+#define <b>FT_PARAM_TAG_STEM_DARKENING</b> \
+          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'd', 'a', 'r', 'k' )
+</pre>
+
+<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding Boolean argument specifies whether to apply stem darkening, overriding the global default values or the values set up with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> (see <a href="ft2-auto_hinter.html#no-stem-darkening(autofit)">no-stem-darkening</a> and <a href="ft2-cff_driver.html#no-stem-darkening(cff)">no-stem-darkening</a>).</p>
+<p>This is a passive setting that only takes effect if the font driver or autohinter honors it, which the CFF driver always does, but the autohinter only in &lsquo;light&rsquo; hinting mode (as of version 2.7.0).</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <p><b>Experimental</b> <b>only</b></p>
 <p>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 <a href="ft2-auto_hinter.html#no-stem-darkening(autofit)">no-stem-darkening</a>.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable similar to the CFF driver.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
index 81a482e..8d0e135 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="base_interface">Base Interface</h1>
 <h2>Synopsis</h2>
 <table class="synopsis">
-<tr><td><a href="#FT_Library">FT_Library</a></td><td><a href="#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a></td></tr>
-<tr><td><a href="#FT_Face">FT_Face</a></td><td><a href="#FT_SubGlyph">FT_SubGlyph</a></td><td><a href="#FT_LOAD_COLOR">FT_LOAD_COLOR</a></td></tr>
-<tr><td><a href="#FT_Size">FT_Size</a></td><td>&nbsp;</td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="#FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</a></td></tr>
-<tr><td><a href="#FT_CharMap">FT_CharMap</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</a></td></tr>
-<tr><td><a href="#FT_Encoding">FT_Encoding</a></td><td><a href="#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="#FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</a></td></tr>
-<tr><td><a href="#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="#FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</a></td></tr>
-<tr><td>&nbsp;</td><td>&nbsp;</td><td><a href="#FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</a></td></tr>
-<tr><td><a href="#FT_FaceRec">FT_FaceRec</a></td><td><a href="#FT_New_Face">FT_New_Face</a></td><td>&nbsp;</td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_Done_Face">FT_Done_Face</a></td><td><a href="#FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a></td><td><a href="#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="#FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="#FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="#FT_Open_Face">FT_Open_Face</a></td><td><a href="#FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="#FT_Open_Args">FT_Open_Args</a></td><td><a href="#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a></td><td><a href="#FT_Parameter">FT_Parameter</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a></td><td><a href="#FT_Attach_File">FT_Attach_File</a></td><td><a href="#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a></td><td><a href="#FT_Attach_Stream">FT_Attach_Stream</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a></td><td>&nbsp;</td><td><a href="#FT_Render_Glyph">FT_Render_Glyph</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a></td><td><a href="#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="#FT_Render_Mode">FT_Render_Mode</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a></td><td><a href="#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="#FT_Get_Kerning">FT_Get_Kerning</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="#FT_Request_Size">FT_Request_Size</a></td><td><a href="#FT_Kerning_Mode">FT_Kerning_Mode</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="#FT_Select_Size">FT_Select_Size</a></td><td><a href="#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td></tr>
-<tr><td><a href="#FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</a></td><td><a href="#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_Size_Request">FT_Size_Request</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="#FT_CharMapRec">FT_CharMapRec</a></td></tr>
-<tr><td><a href="#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="#FT_Select_Charmap">FT_Select_Charmap</a></td></tr>
-<tr><td><a href="#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="#FT_Set_Charmap">FT_Set_Charmap</a></td></tr>
-<tr><td><a href="#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td></tr>
-<tr><td><a href="#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td></tr>
-<tr><td><a href="#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="#FT_Load_Char">FT_Load_Char</a></td><td><a href="#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td></tr>
-<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a></td><td><a href="#FT_Face_Internal">FT_Face_Internal</a></td></tr>
-<tr><td><a href="#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="#FT_OPEN_STREAM">FT_OPEN_STREAM</a></td><td><a href="#FT_Size_Internal">FT_Size_Internal</a></td></tr>
-<tr><td><a href="#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a></td><td><a href="#FT_Slot_Internal">FT_Slot_Internal</a></td></tr>
-<tr><td><a href="#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a></td><td><a href="#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td></tr>
-<tr><td>&nbsp;</td><td>&nbsp;</td><td><a href="#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td></tr>
-<tr><td><a href="#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a></td><td><a href="#FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</a></td><td><a href="#FT_OPEN_XXX">FT_OPEN_XXX</a></td></tr>
-<tr><td><a href="#FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</a></td><td><a href="#FT_LOAD_RENDER">FT_LOAD_RENDER</a></td><td><a href="#FT_LOAD_XXX">FT_LOAD_XXX</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a></td><td><a href="#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td></tr>
-<tr><td><a href="#FT_SizeRec">FT_SizeRec</a></td><td><a href="#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
-<tr><td><a href="#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="#FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</a></td><td><a href="#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="#FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</a></td><td><a href="#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td></tr>
+<tr><td><a href="#FT_Library">FT_Library</a></td><td><a href="#FT_SubGlyph">FT_SubGlyph</a></td><td><a href="#FT_LOAD_COLOR">FT_LOAD_COLOR</a></td></tr>
+<tr><td><a href="#FT_Face">FT_Face</a></td><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Size">FT_Size</a></td><td><a href="#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="#FT_LOAD_VERTICAL_LAYOUT">FT_LOAD_VERTICAL_LAYOUT</a></td></tr>
+<tr><td><a href="#FT_GlyphSlot">FT_GlyphSlot</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</a></td></tr>
+<tr><td><a href="#FT_CharMap">FT_CharMap</a></td><td><a href="#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="#FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</a></td></tr>
+<tr><td><a href="#FT_Encoding">FT_Encoding</a></td><td><a href="#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="#FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</a></td></tr>
+<tr><td><a href="#FT_ENC_TAG">FT_ENC_TAG</a></td><td>&nbsp;</td><td><a href="#FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_New_Face">FT_New_Face</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FaceRec">FT_FaceRec</a></td><td><a href="#FT_Done_Face">FT_Done_Face</a></td><td><a href="#FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="#FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a></td><td><a href="#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="#FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="#FT_Face_Properties">FT_Face_Properties</a></td><td><a href="#FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="#FT_Open_Face">FT_Open_Face</a></td><td><a href="#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="#FT_Open_Args">FT_Open_Args</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</a></td><td><a href="#FT_Parameter">FT_Parameter</a></td><td><a href="#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</a></td><td><a href="#FT_Attach_File">FT_Attach_File</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</a></td><td><a href="#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="#FT_Render_Glyph">FT_Render_Glyph</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</a></td><td>&nbsp;</td><td><a href="#FT_Render_Mode">FT_Render_Mode</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</a></td><td><a href="#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="#FT_Get_Kerning">FT_Get_Kerning</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</a></td><td><a href="#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="#FT_Kerning_Mode">FT_Kerning_Mode</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="#FT_Request_Size">FT_Request_Size</a></td><td><a href="#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="#FT_Select_Size">FT_Select_Size</a></td><td><a href="#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td></tr>
+<tr><td><a href="#FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</a></td><td><a href="#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Size_Request">FT_Size_Request</a></td><td><a href="#FT_CharMapRec">FT_CharMapRec</a></td></tr>
+<tr><td><a href="#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="#FT_Select_Charmap">FT_Select_Charmap</a></td></tr>
+<tr><td><a href="#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="#FT_Set_Charmap">FT_Set_Charmap</a></td></tr>
+<tr><td><a href="#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td></tr>
+<tr><td><a href="#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="#FT_Get_First_Char">FT_Get_First_Char</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td></tr>
+<tr><td><a href="#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td></tr>
+<tr><td><a href="#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="#FT_Load_Char">FT_Load_Char</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td>&nbsp;</td><td><a href="#FT_Face_Internal">FT_Face_Internal</a></td></tr>
+<tr><td><a href="#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="#FT_OPEN_MEMORY">FT_OPEN_MEMORY</a></td><td><a href="#FT_Size_Internal">FT_Size_Internal</a></td></tr>
+<tr><td><a href="#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="#FT_OPEN_STREAM">FT_OPEN_STREAM</a></td><td><a href="#FT_Slot_Internal">FT_Slot_Internal</a></td></tr>
+<tr><td><a href="#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="#FT_OPEN_PATHNAME">FT_OPEN_PATHNAME</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="#FT_OPEN_DRIVER">FT_OPEN_DRIVER</a></td><td><a href="#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td></tr>
+<tr><td><a href="#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="#FT_OPEN_PARAMS">FT_OPEN_PARAMS</a></td><td><a href="#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td>&nbsp;</td><td><a href="#FT_OPEN_XXX">FT_OPEN_XXX</a></td></tr>
+<tr><td><a href="#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a></td><td><a href="#FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</a></td><td><a href="#FT_LOAD_XXX">FT_LOAD_XXX</a></td></tr>
+<tr><td><a href="#FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</a></td><td><a href="#FT_LOAD_RENDER">FT_LOAD_RENDER</a></td><td><a href="#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a></td><td><a href="#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
+<tr><td><a href="#FT_SizeRec">FT_SizeRec</a></td><td><a href="#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td></tr>
+<tr><td><a href="#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="#FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_LOAD_NO_HINTING">FT_LOAD_NO_HINTING</a></td><td><a href="#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td></tr>
+<tr><td><a href="#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="#FT_LOAD_NO_BITMAP">FT_LOAD_NO_BITMAP</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a></td><td><a href="#FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</a></td></tr>
 </table>
 
 
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_FaceRec_*  <b>FT_Face</b>;
 </pre>
 
-<p>A handle to a given typographic face object. A face object models a given typeface, in a given style.</p>
+<p>A handle to a typographic face object. A face object models a given typeface, in a given style.</p>
 
 <h4>note</h4>
-<p>Each face object also owns a single <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object, as well as one or more <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
-<p>Use <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to create a new face object from a given filepathname or a custom input stream.</p>
+<p>A face object also owns a single <a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a> object, as well as one or more <a href="ft2-base_interface.html#FT_Size">FT_Size</a> objects.</p>
+<p>Use <a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a> or <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to create a new face object from a given filepath or a custom input stream.</p>
 <p>Use <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> to destroy it (along with its slot and sizes).</p>
 <p>An &lsquo;FT_Face&rsquo; object can only be safely used from one thread at a time. Similarly, creation and destruction of &lsquo;FT_Face&rsquo; with the same <a href="ft2-base_interface.html#FT_Library">FT_Library</a> object can only be done from one thread at a time. On the other hand, functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and its siblings are thread-safe and do not need the lock to be held as long as the same &lsquo;FT_Face&rsquo; object is not used from multiple threads at the same time.</p>
 
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_SizeRec_*  <b>FT_Size</b>;
 </pre>
 
-<p>A handle to an object used to model a face scaled to a given character size.</p>
+<p>A handle to an object that models a face scaled to a given character size.</p>
 
 <h4>note</h4>
-<p>Each <a href="ft2-base_interface.html#FT_Face">FT_Face</a> has an <i>active</i> <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that is used by functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to determine the scaling transformation that in turn is used to load and hint glyphs and metrics.</p>
+<p>An <a href="ft2-base_interface.html#FT_Face">FT_Face</a> has one <i>active</i> <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object that is used by functions like <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to determine the scaling transformation that in turn is used to load and hint glyphs and metrics.</p>
 <p>You can use <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, <a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a>, <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> or even <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> to change the content (i.e., the scaling values) of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a>.</p>
 <p>You can use <a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a> to create additional size objects for a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a>, but they won't be used by other functions until you activate it through <a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a>. Only one size can be activated at any given time per face.</p>
 
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphSlotRec_*  <b>FT_GlyphSlot</b>;
 </pre>
 
-<p>A handle to a given &lsquo;glyph slot&rsquo;. A slot is a container where it is possible to load any of the glyphs contained in its parent face.</p>
+<p>A handle to a given &lsquo;glyph slot&rsquo;. A slot is a container that can hold any of the glyphs contained in its parent face.</p>
 <p>In other words, each time you call <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>, the slot's content is erased by the new glyph data, i.e., the glyph's metrics, its image (bitmap or outline), and other control information.</p>
 
 <h4>also</h4>
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_CharMapRec_*  <b>FT_CharMap</b>;
 </pre>
 
-<p>A handle to a given character map. A charmap is used to translate character codes in a given encoding into glyph indexes for its parent's face. Some font formats may provide several charmaps per font.</p>
-<p>Each face object owns zero or more charmaps, but only one of them can be &lsquo;active&rsquo; and used by <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>.</p>
+<p>A handle to a character map (usually abbreviated to &lsquo;charmap&rsquo;). A charmap is used to translate character codes in a given encoding into glyph indexes for its parent's face. Some font formats may provide several charmaps per font.</p>
+<p>Each face object owns zero or more charmaps, but only one of them can be &lsquo;active&rsquo;, providing the data used by <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> or <a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a>.</p>
 <p>The list of available charmaps in a face is available through the &lsquo;face-&gt;num_charmaps&rsquo; and &lsquo;face-&gt;charmaps&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
 <p>The currently active charmap is available as &lsquo;face-&gt;charmap&rsquo;. You should call <a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a> to change it.</p>
 
     <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</a>,   'u', 'n', 'i', 'c' ),
 
     <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>,    's', 'j', 'i', 's' ),
-    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>,  'g', 'b', ' ', ' ' ),
+    <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>,     'g', 'b', ' ', ' ' ),
     <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>,    'b', 'i', 'g', '5' ),
     <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>, 'w', 'a', 'n', 's' ),
     <a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a>( <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>,   'j', 'o', 'h', 'a' ),
 
-    /* for backwards compatibility */
+    /* for backward compatibility */
+    FT_ENCODING_GB2312     = <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>,
     <a href="ft2-base_interface.html#FT_ENCODING_MS_SJIS">FT_ENCODING_MS_SJIS</a>    = <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>,
-    <a href="ft2-base_interface.html#FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</a>  = <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>,
+    <a href="ft2-base_interface.html#FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</a>  = <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>,
     <a href="ft2-base_interface.html#FT_ENCODING_MS_BIG5">FT_ENCODING_MS_BIG5</a>    = <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>,
     <a href="ft2-base_interface.html#FT_ENCODING_MS_WANSUNG">FT_ENCODING_MS_WANSUNG</a> = <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>,
     <a href="ft2-base_interface.html#FT_ENCODING_MS_JOHAB">FT_ENCODING_MS_JOHAB</a>   = <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>,
 #define ft_encoding_latin_1         <a href="ft2-base_interface.html#FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</a>
 #define ft_encoding_latin_2         <a href="ft2-base_interface.html#FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</a>
 #define ft_encoding_sjis            <a href="ft2-base_interface.html#FT_ENCODING_SJIS">FT_ENCODING_SJIS</a>
-#define ft_encoding_gb2312          <a href="ft2-base_interface.html#FT_ENCODING_GB2312">FT_ENCODING_GB2312</a>
+#define ft_encoding_gb2312          <a href="ft2-base_interface.html#FT_ENCODING_PRC">FT_ENCODING_PRC</a>
 #define ft_encoding_big5            <a href="ft2-base_interface.html#FT_ENCODING_BIG5">FT_ENCODING_BIG5</a>
 #define ft_encoding_wansung         <a href="ft2-base_interface.html#FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</a>
 #define ft_encoding_johab           <a href="ft2-base_interface.html#FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</a>
 #define ft_encoding_apple_roman     <a href="ft2-base_interface.html#FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</a>
 </pre>
 
-<p>An enumeration used to specify character sets supported by charmaps. Used in the <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a> API function.</p>
+<p>An enumeration to specify character sets supported by charmaps. Used in the <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a> API function.</p>
 
 <h4>note</h4>
 <p>Despite the name, this enumeration lists specific character repertories (i.e., charsets), and not text encoding methods (e.g., UTF-8, UTF-16, etc.).</p>
 <p>The encoding value&nbsp;0 is reserved.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_UNICODE">FT_ENCODING_UNICODE</td><td class="desc">
-<p>Corresponds to the Unicode character set. This value covers all versions of the Unicode repertoire, including ASCII and Latin-1. Most fonts include a Unicode charmap, but not all of them.</p>
+<p>The Unicode character set. This value covers all versions of the Unicode repertoire, including ASCII and Latin-1. Most fonts include a Unicode charmap, but not all of them.</p>
 <p>For example, if you want to access Unicode value U+1F028 (and the font contains it), use value 0x1F028 as the input value for <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a>.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_MS_SYMBOL">FT_ENCODING_MS_SYMBOL</td><td class="desc">
-<p>Corresponds to the Microsoft Symbol encoding, used to encode mathematical symbols and wingdings. For more information, see &lsquo;<a href="http://www.microsoft.com/typography/otspec/recom.htm">http://www.microsoft.com/typography/otspec/recom.htm</a>&rsquo;, &lsquo;<a href="http://www.kostis.net/charsets/symbol.htm">http://www.kostis.net/charsets/symbol.htm</a>&rsquo;, and &lsquo;<a href="http://www.kostis.net/charsets/wingding.htm">http://www.kostis.net/charsets/wingding.htm</a>&rsquo;.</p>
+<p>Microsoft Symbol encoding, used to encode mathematical symbols and wingdings. For more information, see &lsquo;<a href="http://www.microsoft.com/typography/otspec/recom.htm">http://www.microsoft.com/typography/otspec/recom.htm</a>&rsquo;, &lsquo;<a href="http://www.kostis.net/charsets/symbol.htm">http://www.kostis.net/charsets/symbol.htm</a>&rsquo;, and &lsquo;<a href="http://www.kostis.net/charsets/wingding.htm">http://www.kostis.net/charsets/wingding.htm</a>&rsquo;.</p>
 <p>This encoding uses character codes from the PUA (Private Unicode Area) in the range U+F020-U+F0FF.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_SJIS">FT_ENCODING_SJIS</td><td class="desc">
-<p>Corresponds to Japanese SJIS encoding. More info at &lsquo;<a href="http://en.wikipedia.org/wiki/Shift_JIS">http://en.wikipedia.org/wiki/Shift_JIS</a>&rsquo;. See note on multi-byte encodings below.</p>
+<p>Shift JIS encoding for Japanese. More info at &lsquo;<a href="http://en.wikipedia.org/wiki/Shift_JIS">http://en.wikipedia.org/wiki/Shift_JIS</a>&rsquo;. See note on multi-byte encodings below.</p>
 </td></tr>
-<tr><td class="val" id="FT_ENCODING_GB2312">FT_ENCODING_GB2312</td><td class="desc">
-<p>Corresponds to an encoding system for Simplified Chinese as used in mainland China.</p>
+<tr><td class="val" id="FT_ENCODING_PRC">FT_ENCODING_PRC</td><td class="desc">
+<p>Corresponds to encoding systems mainly for Simplified Chinese as used in People's Republic of China (PRC). The encoding layout is based on GB&nbsp;2312 and its supersets GBK and GB&nbsp;18030.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_BIG5">FT_ENCODING_BIG5</td><td class="desc">
 <p>Corresponds to an encoding system for Traditional Chinese as used in Taiwan and Hong Kong.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_WANSUNG">FT_ENCODING_WANSUNG</td><td class="desc">
-<p>Corresponds to the Korean encoding system known as Wansung. For more information see &lsquo;<a href="https://msdn.microsoft.com/en-US/goglobal/cc305154">https://msdn.microsoft.com/en-US/goglobal/cc305154</a>&rsquo;.</p>
+<p>Corresponds to the Korean encoding system known as Extended Wansung (MS Windows code page 949). For more information see &lsquo;<a href="http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt">http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt</a>&rsquo;.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_JOHAB">FT_ENCODING_JOHAB</td><td class="desc">
-<p>The Korean standard character set (KS&nbsp;C 5601-1992), which corresponds to MS Windows code page 1361. This character set includes all possible Hangeul character combinations.</p>
+<p>The Korean standard character set (KS&nbsp;C 5601-1992), which corresponds to MS Windows code page 1361. This character set includes all possible Hangul character combinations.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_ADOBE_LATIN_1">FT_ENCODING_ADOBE_LATIN_1</td><td class="desc">
 <p>Corresponds to a Latin-1 encoding as defined in a Type&nbsp;1 PostScript font. It is limited to 256 character codes.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_ADOBE_STANDARD">FT_ENCODING_ADOBE_STANDARD</td><td class="desc">
-<p>Corresponds to the Adobe Standard encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
+<p>Adobe Standard encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_ADOBE_EXPERT">FT_ENCODING_ADOBE_EXPERT</td><td class="desc">
-<p>Corresponds to the Adobe Expert encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
+<p>Adobe Expert encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_ADOBE_CUSTOM">FT_ENCODING_ADOBE_CUSTOM</td><td class="desc">
 <p>Corresponds to a custom encoding, as found in Type&nbsp;1, CFF, and OpenType/CFF fonts. It is limited to 256 character codes.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_APPLE_ROMAN">FT_ENCODING_APPLE_ROMAN</td><td class="desc">
-<p>Corresponds to the 8-bit Apple roman encoding. Many TrueType and OpenType fonts contain a charmap for this encoding, since older versions of Mac OS are able to use it.</p>
+<p>Apple roman encoding. Many TrueType and OpenType fonts contain a charmap for this 8-bit encoding, since older versions of Mac OS are able to use it.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_OLD_LATIN_2">FT_ENCODING_OLD_LATIN_2</td><td class="desc">
-<p>This value is deprecated and was never used nor reported by FreeType. Don't use or test for it.</p>
+<p>This value is deprecated and was neither used nor reported by FreeType. Don't use or test for it.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_MS_SJIS">FT_ENCODING_MS_SJIS</td><td class="desc">
 <p>Same as FT_ENCODING_SJIS. Deprecated.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_MS_GB2312">FT_ENCODING_MS_GB2312</td><td class="desc">
-<p>Same as FT_ENCODING_GB2312. Deprecated.</p>
+<p>Same as FT_ENCODING_PRC. Deprecated.</p>
 </td></tr>
 <tr><td class="val" id="FT_ENCODING_MS_BIG5">FT_ENCODING_MS_BIG5</td><td class="desc">
 <p>Same as FT_ENCODING_BIG5. Deprecated.</p>
 </table>
 
 <h4>note</h4>
-<p>By default, FreeType automatically synthesizes a Unicode charmap for PostScript fonts, using their glyph names dictionaries. However, it also reports the encodings defined explicitly in the font file, for the cases when they are needed, with the Adobe values as well.</p>
+<p>By default, FreeType automatically synthesizes a Unicode charmap for PostScript fonts, using their glyph name dictionaries. However, it also reports the encodings defined explicitly in the font file, for the cases when they are needed, with the Adobe values as well.</p>
 <p>FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap is neither Unicode nor ISO-8859-1 (otherwise it is set to FT_ENCODING_UNICODE). Use <a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a> to find out which encoding is really present. If, for example, the &lsquo;cs_registry&rsquo; field is &lsquo;KOI8&rsquo; and the &lsquo;cs_encoding&rsquo; field is &lsquo;R&rsquo;, the font is encoded in KOI8-R.</p>
 <p>FT_ENCODING_NONE is always set (with a single exception) by the winfonts driver. Use <a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a> and examine the &lsquo;charset&rsquo; field of the <a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a> structure to find out which encoding is really present. For example, <a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a> (204) means Windows code page 1251 (for Russian).</p>
-<p>FT_ENCODING_NONE is set if &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> and &lsquo;encoding_id&rsquo; is not <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a> (otherwise it is set to FT_ENCODING_APPLE_ROMAN).</p>
+<p>FT_ENCODING_NONE is set if &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> and &lsquo;encoding_id&rsquo; is not &lsquo;TT_MAC_ID_ROMAN&rsquo; (otherwise it is set to FT_ENCODING_APPLE_ROMAN).</p>
 <p>If &lsquo;platform_id&rsquo; is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a>, use the function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a> to query the Mac language ID that may be needed to be able to distinguish Apple encoding variants. See</p>
 <p><a href="http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt">http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt</a></p>
-<p>to get an idea how to do that. Basically, if the language ID is&nbsp;0, don't use it, otherwise subtract 1 from the language ID. Then examine &lsquo;encoding_id&rsquo;. If, for example, &lsquo;encoding_id&rsquo; is <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a> and the language ID (minus&nbsp;1) is &lsquo;TT_MAC_LANGID_GREEK&rsquo;, it is the Greek encoding, not Roman. <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARABIC</a> with &lsquo;TT_MAC_LANGID_FARSI&rsquo; means the Farsi variant the Arabic encoding.</p>
+<p>to get an idea how to do that. Basically, if the language ID is&nbsp;0, don't use it, otherwise subtract 1 from the language ID. Then examine &lsquo;encoding_id&rsquo;. If, for example, &lsquo;encoding_id&rsquo; is &lsquo;TT_MAC_ID_ROMAN&rsquo; and the language ID (minus&nbsp;1) is &lsquo;TT_MAC_LANGID_GREEK&rsquo;, it is the Greek encoding, not Roman. &lsquo;TT_MAC_ID_ARABIC&rsquo; with &lsquo;TT_MAC_LANGID_FARSI&rsquo; means the Farsi variant the Arabic encoding.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <h4>fields</h4>
 <table class="fields">
 <tr><td class="val" id="num_faces">num_faces</td><td class="desc">
-<p>The number of faces in the font file. Some font formats can have multiple faces in a font file.</p>
+<p>The number of faces in the font file. Some font formats can have multiple faces in a single font file.</p>
 </td></tr>
 <tr><td class="val" id="face_index">face_index</td><td class="desc">
 <p>This field holds two different values. Bits 0-15 are the index of the face in the font file (starting with value&nbsp;0). They are set to&nbsp;0 if there is only one face in the font file.</p>
-<p>Bits 16-30 are relevant to GX variation fonts only, holding the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;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&nbsp;4, say, &lsquo;face_index&rsquo; is set to 0x00030004.</p>
+<p>Bits 16-30 are relevant to GX and OpenType variation fonts only, holding the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;0 indicates font access without a named instance). For non-variation fonts, bits 16-30 are ignored. If we have the third named instance of face&nbsp;4, say, &lsquo;face_index&rsquo; is set to 0x00030004.</p>
 <p>Bit 31 is always zero (this is, &lsquo;face_index&rsquo; is always a positive value).</p>
 </td></tr>
 <tr><td class="val" id="face_flags">face_flags</td><td class="desc">
 <p>A set of bit flags that give important information about the face; see <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a> for the details.</p>
 </td></tr>
 <tr><td class="val" id="style_flags">style_flags</td><td class="desc">
-<p>The lower 16&nbsp;bits contain a set of bit flags indicating the style of the face; see <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a> 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, &lsquo;style_flags&rsquo; is always a positive value).</p>
+<p>The lower 16&nbsp;bits contain a set of bit flags indicating the style of the face; see <a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a> for the details. Bits 16-30 hold the number of named instances available for the current face if we have a GX or OpenType variation (sub)font. Bit 31 is always zero (this is, &lsquo;style_flags&rsquo; is always a positive value). Note that a variation font has always at least one named instance, namely the default instance.</p>
 </td></tr>
 <tr><td class="val" id="num_glyphs">num_glyphs</td><td class="desc">
 <p>The number of glyphs in the face. If the face is scalable and has sbits (see &lsquo;num_fixed_sizes&rsquo;), it is set to the number of outline glyphs.</p>
-<p>For CID-keyed fonts, this value gives the highest CID used in the font.</p>
+<p>For CID-keyed fonts (not in an SFNT wrapper) this value gives the highest CID used in the font.</p>
 </td></tr>
 <tr><td class="val" id="family_name">family_name</td><td class="desc">
 <p>The face's family name. This is an ASCII string, usually in English, that describes the typeface's family (like &lsquo;Times New Roman&rsquo;, &lsquo;Bodoni&rsquo;, &lsquo;Garamond&rsquo;, etc). This is a least common denominator used to list fonts. Some formats (TrueType &amp; OpenType) provide localized and Unicode versions of this string. Applications should use the format specific interface to access them. Can be NULL (e.g., in fonts embedded in a PDF file).</p>
 </td></tr>
 <tr><td class="val" id="available_sizes">available_sizes</td><td class="desc">
 <p>An array of <a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a> for all bitmap strikes in the face. It is set to NULL if there is no bitmap strike.</p>
+<p>Note that FreeType tries to sanitize the strike data since they are sometimes sloppy or incorrect, but this can easily fail.</p>
 </td></tr>
 <tr><td class="val" id="num_charmaps">num_charmaps</td><td class="desc">
 <p>The number of charmaps in the face.</p>
 <p>The typographic ascender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMax&rsquo;. Only relevant for scalable formats.</p>
 </td></tr>
 <tr><td class="val" id="descender">descender</td><td class="desc">
-<p>The typographic descender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMin&rsquo;. Note that this field is usually negative. Only relevant for scalable formats.</p>
+<p>The typographic descender of the face, expressed in font units. For font formats not having this information, it is set to &lsquo;bbox.yMin&rsquo;. Note that this field is negative for values below the baseline. Only relevant for scalable formats.</p>
 </td></tr>
 <tr><td class="val" id="height">height</td><td class="desc">
 <p>This value is the vertical distance between two consecutive baselines, expressed in font units. It is always positive. Only relevant for scalable formats.</p>
 
 <h4>note</h4>
 <p>Fields may be changed after a call to <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;ascender&rsquo;, &lsquo;descender&rsquo;, &lsquo;height&rsquo;, &lsquo;underline_position&rsquo;, and &lsquo;underline_thickness&rsquo;.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
           ( (face)-&gt;face_flags &amp; <a href="ft2-base_interface.html#FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</a> )
 </pre>
 
-<p>A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type&nbsp;1, Type&nbsp;42, CID, OpenType/CFF, and PFR font formats.</p>
+<p>A macro that returns true whenever a face object contains a scalable font face (true for TrueType, Type&nbsp;1, Type&nbsp;42, CID, OpenType/CFF, and PFR font formats).</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <p>The height of the scaled EM square in pixels, hence the term &lsquo;ppem&rsquo; (pixels per EM). It is also referred to as &lsquo;nominal height&rsquo;.</p>
 </td></tr>
 <tr><td class="val" id="x_scale">x_scale</td><td class="desc">
-<p>A 16.16 fractional scaling value used to convert horizontal metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
+<p>A 16.16 fractional scaling value to convert horizontal metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
 </td></tr>
 <tr><td class="val" id="y_scale">y_scale</td><td class="desc">
-<p>A 16.16 fractional scaling value used to convert vertical metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
+<p>A 16.16 fractional scaling value to convert vertical metrics from font units to 26.6 fractional pixels. Only relevant for scalable font formats.</p>
 </td></tr>
 <tr><td class="val" id="ascender">ascender</td><td class="desc">
-<p>The ascender in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<p>The ascender in 26.6 fractional pixels, rounded up to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
 </td></tr>
 <tr><td class="val" id="descender">descender</td><td class="desc">
-<p>The descender in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<p>The descender in 26.6 fractional pixels, rounded down to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
 </td></tr>
 <tr><td class="val" id="height">height</td><td class="desc">
-<p>The height in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<p>The height in 26.6 fractional pixels, rounded to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
 </td></tr>
 <tr><td class="val" id="max_advance">max_advance</td><td class="desc">
-<p>The maximum advance width in 26.6 fractional pixels. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
+<p>The maximum advance width in 26.6 fractional pixels, rounded to an integer value. See <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> for the details.</p>
 </td></tr>
 </table>
 
 <h4>note</h4>
-<p>The scaling values, if relevant, are determined first during a size changing operation. The remaining fields are then set by the driver. For scalable formats, they are usually set to scaled values of the corresponding fields in <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
-<p>Note that due to glyph hinting, these values might not be exact for certain fonts. Thus they must be treated as unreliable with an error margin of at least one pixel!</p>
+<p>The scaling values, if relevant, are determined first during a size changing operation. The remaining fields are then set by the driver. For scalable formats, they are usually set to scaled values of the corresponding fields in <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>. Some values like ascender or descender are rounded for historical reasons; more precise values (for outline fonts) can be derived by scaling the corresponding <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> values manually.</p>
+<p>Note that due to glyph hinting and the selected rendering mode these values are usually not exact; consequently, they must be treated as unreliable with an error margin of at least one pixel!</p>
 <p>Indeed, the only way to get the exact metrics is to render <i>all</i> glyphs. As this would be a definite performance hit, it is up to client applications to perform such computations.</p>
-<p>The FT_Size_Metrics structure is valid for bitmap fonts also.</p>
+<p>The &lsquo;FT_Size_Metrics&rsquo; structure is valid for bitmap fonts also.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <p>This shorthand is, depending on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>, the transformed (hinted) advance width for the glyph, in 26.6 fractional pixel format. As specified with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a>, it uses either the &lsquo;horiAdvance&rsquo; or the &lsquo;vertAdvance&rsquo; value of &lsquo;metrics&rsquo; field.</p>
 </td></tr>
 <tr><td class="val" id="format">format</td><td class="desc">
-<p>This field indicates the format of the image contained in the glyph slot. Typically <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>, or <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>, but others are possible.</p>
+<p>This field indicates the format of the image contained in the glyph slot. Typically <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>, or <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>, but other values are possible.</p>
 </td></tr>
 <tr><td class="val" id="bitmap">bitmap</td><td class="desc">
 <p>This field is used as a bitmap descriptor when the slot format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>. Note that the address and content of the bitmap buffer can change between calls of <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and a few other functions.</p>
 <p>The bitmap's left bearing expressed in integer pixels. Only valid if the format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>, this is, if the glyph slot contains a bitmap.</p>
 </td></tr>
 <tr><td class="val" id="bitmap_top">bitmap_top</td><td class="desc">
-<p>The bitmap's top bearing expressed in integer pixels. Remember that this is the distance from the baseline to the top-most glyph scanline, upwards y&nbsp;coordinates being <b>positive</b>.</p>
+<p>The bitmap's top bearing expressed in integer pixels. This is the distance from the baseline to the top-most glyph scanline, upwards y&nbsp;coordinates being <b>positive</b>.</p>
 </td></tr>
 <tr><td class="val" id="outline">outline</td><td class="desc">
-<p>The outline descriptor for the current glyph image if its format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>. Once a glyph is loaded, &lsquo;outline&rsquo; can be transformed, distorted, embolded, etc. However, it must not be freed.</p>
+<p>The outline descriptor for the current glyph image if its format is <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a>. Once a glyph is loaded, &lsquo;outline&rsquo; can be transformed, distorted, emboldened, etc. However, it must not be freed.</p>
 </td></tr>
 <tr><td class="val" id="num_subglyphs">num_subglyphs</td><td class="desc">
 <p>The number of subglyphs in a composite glyph. This field is only valid for the composite glyph format that should normally only be loaded with the <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a> flag.</p>
 <p>An array of subglyph descriptors for composite glyphs. There are &lsquo;num_subglyphs&rsquo; elements in there. Currently internal to FreeType.</p>
 </td></tr>
 <tr><td class="val" id="control_data">control_data</td><td class="desc">
-<p>Certain font drivers can also return the control data for a given glyph image (e.g. TrueType bytecode, Type&nbsp;1 charstrings, etc.). This field is a pointer to such data.</p>
+<p>Certain font drivers can also return the control data for a given glyph image (e.g. TrueType bytecode, Type&nbsp;1 charstrings, etc.). This field is a pointer to such data; it is currently internal to FreeType.</p>
 </td></tr>
 <tr><td class="val" id="control_len">control_len</td><td class="desc">
-<p>This is the length in bytes of the control data.</p>
+<p>This is the length in bytes of the control data. Currently internal to FreeType.</p>
 </td></tr>
 <tr><td class="val" id="other">other</td><td class="desc">
-<p>Really wicked formats can use this pointer to present their own glyph image to client applications. Note that the application needs to know about the image format.</p>
+<p>Reserved.</p>
 </td></tr>
 <tr><td class="val" id="lsb_delta">lsb_delta</td><td class="desc">
 <p>The difference between hinted and unhinted left side bearing while auto-hinting is active. Zero otherwise.</p>
 
 <h4>note</h4>
 <p>If <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> is called with default flags (see <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a>) the glyph image is loaded in the glyph slot in its native format (e.g., an outline glyph for TrueType and Type&nbsp;1 formats).</p>
-<p>This image can later be converted into a bitmap by calling <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. This function finds the current renderer for the native image's format, then invokes it.</p>
+<p>This image can later be converted into a bitmap by calling <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>. This function searches the current renderer for the native image's format, then invokes it.</p>
 <p>The renderer is in charge of transforming the native image through the slot's face transformation fields, then converting it into a bitmap that is returned in &lsquo;slot-&gt;bitmap&rsquo;.</p>
 <p>Note that &lsquo;slot-&gt;bitmap_left&rsquo; and &lsquo;slot-&gt;bitmap_top&rsquo; are also used to specify the position of the bitmap relative to the current pen position (e.g., coordinates (0,0) on the baseline). Of course, &lsquo;slot-&gt;format&rsquo; is also changed to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a>.</p>
+<p>Here is a small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; to do fractional positioning of glyphs:</p>
+<pre class="colored">
+  FT_GlyphSlot  slot     = face-&gt;glyph;
+  FT_Pos        origin_x = 0;
 
-<h4>note</h4>
-<p>Here is a small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo;:</p>
+
+  for all glyphs do
+    &lt;load glyph with `FT_Load_Glyph'&gt;
+
+    FT_Outline_Translate( slot-&gt;outline, origin_x &amp; 63, 0 );
+
+    &lt;save glyph image, or render glyph, or ...&gt;
+
+    &lt;compute kern between current and next glyph
+     and add it to `origin_x'&gt;
+
+    origin_x += slot-&gt;advance.x;
+    origin_x += slot-&gt;rsb_delta - slot-&gt;lsb_relta;
+  endfor
+</pre>
+<p>Here is another small pseudo code fragment that shows how to use &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; to improve integer positioning of glyphs:</p>
 <pre class="colored">
-  FT_Pos  origin_x       = 0;
-  FT_Pos  prev_rsb_delta = 0;
+  FT_GlyphSlot  slot           = face-&gt;glyph;
+  FT_Pos        origin_x       = 0;
+  FT_Pos        prev_rsb_delta = 0;
 
 
   for all glyphs do
-    &lt;compute kern between current and previous glyph and add it to
-     `origin_x'&gt;
+    &lt;compute kern between current and previous glyph
+     and add it to `origin_x'&gt;
 
     &lt;load glyph with `FT_Load_Glyph'&gt;
 
-    if ( prev_rsb_delta - face-&gt;glyph-&gt;lsb_delta &gt;= 32 )
+    if ( prev_rsb_delta - slot-&gt;lsb_delta &gt;= 32 )
       origin_x -= 64;
-    else if ( prev_rsb_delta - face-&gt;glyph-&gt;lsb_delta &lt; -32 )
+    else if ( prev_rsb_delta - slot-&gt;lsb_delta &lt; -32 )
       origin_x += 64;
 
-    prev_rsb_delta = face-&gt;glyph-&gt;rsb_delta;
+    prev_rsb_delta = slot-&gt;rsb_delta;
 
     &lt;save glyph image, or render glyph, or ...&gt;
 
-    origin_x += face-&gt;glyph-&gt;advance.x;
+    origin_x += slot-&gt;advance.x;
   endfor
 </pre>
+<p>If you use strong auto-hinting, you <b>must</b> apply these delta values! Otherwise you will experience far too large inter-glyph spacing at small rendering sizes in most cases. Note that it doesn't harm to use the above code for other hinting modes also, since the delta values are zero then.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   } <b>FT_Glyph_Metrics</b>;
 </pre>
 
-<p>A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> has been used while loading the glyph, values are expressed in font units instead.</p>
+<p>A structure to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> has been used while loading the glyph, values are expressed in font units instead.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <h4>note</h4>
 <p>If not disabled with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>, the values represent dimensions of the hinted glyph (in case hinting is applicable).</p>
 <p>Stroking a glyph with an outside border does not increase &lsquo;horiAdvance&rsquo; or &lsquo;vertAdvance&rsquo;; you have to manually adjust these values to account for the added width and height.</p>
+<p>FreeType doesn't use the &lsquo;VORG&rsquo; table data for CFF fonts because it doesn't have an interface to quickly retrieve the glyph height. The y&nbsp;coordinate of the vertical origin can be simply computed as &lsquo;vertBearingY + height&rsquo; after loading a glyph.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 </table>
 
 <h4>note</h4>
-<p>Windows FNT: The nominal size given in a FNT font is not reliable. Thus when the driver finds it incorrect, it sets &lsquo;size&rsquo; to some calculated values and sets &lsquo;x_ppem&rsquo; and &lsquo;y_ppem&rsquo; to the pixel width and height given in the font, respectively.</p>
+<p>Windows FNT: The nominal size given in a FNT font is not reliable. If the driver finds it incorrect, it sets &lsquo;size&rsquo; to some calculated values, and &lsquo;x_ppem&rsquo; and &lsquo;y_ppem&rsquo; to the pixel width and height given in the font, respectively.</p>
 <p>TrueType embedded bitmaps: &lsquo;size&rsquo;, &lsquo;width&rsquo;, and &lsquo;height&rsquo; values are not contained in the bitmap strike itself. They are computed from the global font parameters.</p>
 
 <hr>
 <p>FreeType error code. 0&nbsp;means success.</p>
 
 <h4>note</h4>
-<p>In case you want to provide your own memory allocating routines, use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> instead, followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> (or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>).</p>
+<p>In case you want to provide your own memory allocating routines, use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> instead, followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> (or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>) and <a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a>.</p>
 <p>See the documentation of <a href="ft2-base_interface.html#FT_Library">FT_Library</a> and <a href="ft2-base_interface.html#FT_Face">FT_Face</a> for multi-threading issues.</p>
 <p>If you need reference-counting (cf. <a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a>), use <a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a> and <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a>.</p>
+<p>If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is set, this function reads the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable to control driver properties. See sections &lsquo;<a href="ft2-auto_hinter.html#auto_hinter">The auto-hinter</a>&rsquo;, &lsquo;<a href="ft2-cff_driver.html#cff_driver">The CFF driver</a>&rsquo;, &lsquo;<a href="ft2-pcf_driver.html#pcf_driver">The PCF driver</a>&rsquo;, and &lsquo;<a href="ft2-tt_driver.html#tt_driver">The TrueType driver</a>&rsquo; for more.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
                <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     *aface );
 </pre>
 
-<p>This function calls <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font by its pathname.</p>
+<p>Call <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font by its pathname.</p>
 
 <h4>inout</h4>
 <table class="fields">
                       <a href="ft2-base_interface.html#FT_Face">FT_Face</a>        *aface );
 </pre>
 
-<p>This function calls <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font that has been loaded into memory.</p>
+<p>Call <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> to open a font that has been loaded into memory.</p>
 
 <h4>inout</h4>
 <table class="fields">
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <div class="section">
+<h3 id="FT_Face_Properties">FT_Face_Properties</h3>
+<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
+<pre>
+  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+  <b>FT_Face_Properties</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>        face,
+                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>        num_properties,
+                      <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a>*  properties );
+</pre>
+
+<p>Set or override certain (library or module-wide) properties on a face-by-face basis. Useful for finer-grained control and avoiding locks on shared structures (threads can modify their own faces as they see fit).</p>
+<p>Contrary to <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a>, this function uses <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> so that you can pass multiple properties to the target face in one call. Note that only a subset of the available properties can be controlled.</p>
+<p>* Stem darkening (@FT_PARAM_TAG_STEM_DARKENING, corresponding to the property &lsquo;no-stem-darkening&rsquo; provided by the &lsquo;autofit&rsquo; and &lsquo;cff&rsquo; modules; see <a href="ft2-auto_hinter.html#no-stem-darkening(autofit)">no-stem-darkening</a> and <a href="ft2-cff_driver.html#no-stem-darkening(cff)">no-stem-darkening</a>).</p>
+<p>* LCD filter weights (@FT_PARAM_TAG_LCD_FILTER_WEIGHTS, corresponding to function <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a>).</p>
+<p>* Seed value for the CFF &lsquo;random&rsquo; operator (@FT_PARAM_TAG_RANDOM_SEED, corresponding to the &lsquo;random-seed&rsquo; property provided by the &lsquo;cff&rsquo; module; see <a href="ft2-cff_driver.html#random-seed">random-seed</a>).</p>
+<p>Pass NULL as &lsquo;data&rsquo; in <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> for a given tag to reset the option and use the library or module default again.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face object.</p>
+</td></tr>
+<tr><td class="val" id="num_properties">num_properties</td><td class="desc">
+<p>The number of properties that follow.</p>
+</td></tr>
+<tr><td class="val" id="properties">properties</td><td class="desc">
+<p>A handle to an <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> array with &lsquo;num_properties&rsquo; elements.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>Here an example that sets three properties. You must define FT_CONFIG_OPTION_SUBPIXEL_RENDERING to make the LCD filter examples work.</p>
+<pre class="colored">
+  FT_Parameter         property1;
+  FT_Bool              darken_stems = 1;
+
+  FT_Parameter         property2;
+  FT_LcdFiveTapFilter  custom_weight =
+                         { 0x11, 0x44, 0x56, 0x44, 0x11 };
+
+  FT_Parameter         property3;
+  FT_Int32             random_seed = 314159265;
+
+  FT_Parameter         properties[3] = { property1,
+                                         property2,
+                                         property3 };
+
+
+  property1.tag  = FT_PARAM_TAG_STEM_DARKENING;
+  property1.data = &amp;darken_stems;
+
+  property2.tag  = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
+  property2.data = custom_weight;
+
+  property3.tag  = FT_PARAM_TAG_RANDOM_SEED;
+  property3.data = &amp;random_seed;
+
+  FT_Face_Properties( face, 3, properties );
+</pre>
+<p>The next example resets a single property to its default value.</p>
+<pre class="colored">
+  FT_Parameter  property;
+
+
+  property.tag  = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
+  property.data = NULL;
+
+  FT_Face_Properties( face, 1, &amp;property );
+</pre>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
 <h3 id="FT_Open_Face">FT_Open_Face</h3>
 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
 <pre>
 </td></tr>
 <tr><td class="val" id="face_index">face_index</td><td class="desc">
 <p>This field holds two different values. Bits 0-15 are the index of the face in the font file (starting with value&nbsp;0). Set it to&nbsp;0 if there is only one face in the font file.</p>
-<p>Bits 16-30 are relevant to GX variation fonts only, specifying the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;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&nbsp;4, &lsquo;face_index&rsquo; should be set to 0x00030004. If you want to access face&nbsp;4 without GX variation handling, simply set &lsquo;face_index&rsquo; to value&nbsp;4.</p>
-<p>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 &lsquo;face_index&rsquo; argument is negative, the function's return value is&nbsp;0 if the font format is recognized, or non-zero otherwise. The function allocates a more or less empty face handle in &lsquo;*aface&rsquo; (if &lsquo;aface&rsquo; isn't NULL); the only two useful fields in this special case are &lsquo;face-&gt;num_faces&rsquo; and &lsquo;face-&gt;style_flags&rsquo;. For any negative value of &lsquo;face_index&rsquo;, &lsquo;face-&gt;num_faces&rsquo; gives the number of faces within the font file. For the negative value &lsquo;-(N+1)&rsquo; (with &lsquo;N&rsquo; a 16-bit value), bits 16-30 in &lsquo;face-&gt;style_flags&rsquo; give the number of named instances in face &lsquo;N&rsquo; if we have a GX variation font (or zero otherwise). After examination, the returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure should be deallocated with a call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
+<p>Bits 16-30 are relevant to GX and OpenType variation fonts only, specifying the named instance index for the current face index (starting with value&nbsp;1; value&nbsp;0 makes FreeType ignore named instances). For non-variation fonts, bits 16-30 are ignored. Assuming that you want to access the third named instance in face&nbsp;4, &lsquo;face_index&rsquo; should be set to 0x00030004. If you want to access face&nbsp;4 without variation handling, simply set &lsquo;face_index&rsquo; to value&nbsp;4.</p>
+<p>&lsquo;FT_Open_Face&rsquo; 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 &lsquo;face_index&rsquo; argument is negative, the function's return value is&nbsp;0 if the font format is recognized, or non-zero otherwise. The function allocates a more or less empty face handle in &lsquo;*aface&rsquo; (if &lsquo;aface&rsquo; isn't NULL); the only two useful fields in this special case are &lsquo;face-&gt;num_faces&rsquo; and &lsquo;face-&gt;style_flags&rsquo;. For any negative value of &lsquo;face_index&rsquo;, &lsquo;face-&gt;num_faces&rsquo; gives the number of faces within the font file. For the negative value &lsquo;-(N+1)&rsquo; (with &lsquo;N&rsquo; a non-negative 16-bit value), bits 16-30 in &lsquo;face-&gt;style_flags&rsquo; give the number of named instances in face &lsquo;N&rsquo; if we have a variation font (or zero otherwise). After examination, the returned <a href="ft2-base_interface.html#FT_Face">FT_Face</a> structure should be deallocated with a call to <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
 </td></tr>
 </table>
 
   } <b>FT_Open_Args</b>;
 </pre>
 
-<p>A structure used to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
+<p>A structure to indicate how to open a new font file or stream. A pointer to such a structure can be used as a parameter for the functions <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <p>A handle to a source stream object.</p>
 </td></tr>
 <tr><td class="val" id="driver">driver</td><td class="desc">
-<p>This field is exclusively used by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>; it simply specifies the font driver to use to open the face. If set to&nbsp;0, FreeType tries to load the face with each one of the drivers in its list.</p>
+<p>This field is exclusively used by <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>; it simply specifies the font driver to use for opening the face. If set to NULL, FreeType tries to load the face with each one of the drivers in its list.</p>
 </td></tr>
 <tr><td class="val" id="num_params">num_params</td><td class="desc">
 <p>The number of extra parameters.</p>
 <p>Otherwise, if the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a> bit is set, assume that this is a normal file and use &lsquo;pathname&rsquo; to open it.</p>
 <p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a> bit is set, <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> only tries to open the file with the driver whose handler is in &lsquo;driver&rsquo;.</p>
 <p>If the <a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a> bit is set, the parameters given by &lsquo;num_params&rsquo; and &lsquo;params&rsquo; is used. They are ignored otherwise.</p>
-<p>Ideally, both the &lsquo;pathname&rsquo; and &lsquo;params&rsquo; fields should be tagged as &lsquo;const&rsquo;; this is missing for API backwards compatibility. In other words, applications should treat them as read-only.</p>
+<p>Ideally, both the &lsquo;pathname&rsquo; and &lsquo;params&rsquo; fields should be tagged as &lsquo;const&rsquo;; this is missing for API backward compatibility. In other words, applications should treat them as read-only.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   } <b>FT_Parameter</b>;
 </pre>
 
-<p>A simple structure used to pass more or less generic parameters to <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a>.</p>
+<p>A simple structure to pass more or less generic parameters to <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> and <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>.</p>
 
 <h4>fields</h4>
 <table class="fields">
                   <span class="keyword">const</span> <span class="keyword">char</span>*  filepathname );
 </pre>
 
-<p>This function calls <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a> to attach a file.</p>
+<p>Call <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a> to attach a file.</p>
 
 <h4>inout</h4>
 <table class="fields">
 
 <h4>note</h4>
 <p>The meaning of the &lsquo;attach&rsquo; (i.e., what really happens when the new file is read) is not fixed by FreeType itself. It really depends on the font format (and thus the font driver).</p>
-<p>Client applications are expected to know what they are doing when invoking this function. Most drivers simply do not implement file attachments.</p>
+<p>Client applications are expected to know what they are doing when invoking this function. Most drivers simply do not implement file or stream attachments.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
                     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     vert_resolution );
 </pre>
 
-<p>This function calls <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in points).</p>
+<p>Call <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in points).</p>
 
 <h4>inout</h4>
 <table class="fields">
 <p>FreeType error code. 0&nbsp;means success.</p>
 
 <h4>note</h4>
+<p>While this function allows fractional points as input values, the resulting ppem value for the given resolution is always rounded to the nearest integer.</p>
 <p>If either the character width or height is zero, it is set equal to the other value.</p>
 <p>If either the horizontal or vertical resolution is zero, it is set equal to the other value.</p>
 <p>A character width or height smaller than 1pt is set to 1pt; if both resolution values are zero, they are set to 72dpi.</p>
                       <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  pixel_height );
 </pre>
 
-<p>This function calls <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in pixels).</p>
+<p>Call <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to request the nominal size (in pixels).</p>
 
 <h4>inout</h4>
 <table class="fields">
 <p>FreeType error code. 0&nbsp;means success.</p>
 
 <h4>note</h4>
-<p>You should not rely on the resulting glyphs matching, or being constrained, to this pixel size. Refer to <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to understand how requested sizes relate to actual sizes.</p>
+<p>You should not rely on the resulting glyphs matching or being constrained to this pixel size. Refer to <a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a> to understand how requested sizes relate to actual sizes.</p>
 <p>Don't use this function if you are using the FreeType cache API.</p>
 
 <hr>
 
 <h4>note</h4>
 <p>Although drivers may select the bitmap strike matching the request, you should not rely on this if you intend to select a particular bitmap strike. Use <a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a> instead in that case.</p>
-<p>The relation between the requested size and the resulting glyph size is dependent entirely on how the size is defined in the source face. The font designer chooses the final size of each glyph relative to this size. For more information refer to &lsquo;<a href="http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html">http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html</a>&rsquo;</p>
+<p>The relation between the requested size and the resulting glyph size is dependent entirely on how the size is defined in the source face. The font designer chooses the final size of each glyph relative to this size. For more information refer to &lsquo;<a href="https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html">https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html</a>&rsquo;.</p>
+<p>Contrary to <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>, this function doesn't have special code to normalize zero-valued widths, heights, or resolutions (which lead to errors in most cases).</p>
 <p>Don't use this function if you are using the FreeType cache API.</p>
 
 <hr>
                   <a href="ft2-basic_types.html#FT_Int">FT_Int</a>   strike_index );
 </pre>
 
-<p>Select a bitmap strike.</p>
+<p>Select a bitmap strike. To be more precise, this function sets the scaling factors of the active <a href="ft2-base_interface.html#FT_Size">FT_Size</a> object in a face so that bitmaps from this particular strike are taken by <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> and friends.</p>
 
 <h4>inout</h4>
 <table class="fields">
 <h4>return</h4>
 <p>FreeType error code. 0&nbsp;means success.</p>
 
+<h4>note</h4>
+<p>For bitmaps embedded in outline fonts it is common that only a subset of the available glyphs at a given ppem value is available. FreeType silently uses outlines if there is no bitmap for a given glyph index.</p>
+<p>For GX and OpenType variation fonts, a bitmap strike makes sense only if the default instance is active (this is, no glyph variation takes place); otherwise, FreeType simply ignores bitmap strikes. The same is true for all named instances that are different from the default instance.</p>
+<p>Don't use this function if you are using the FreeType cache API.</p>
+
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
   } <b>FT_Size_Request_Type</b>;
 </pre>
 
-<p>An enumeration type that lists the supported size request types.</p>
+<p>An enumeration type that lists the supported size request types, i.e., what input size (in font units) maps to the requested output size (in pixels, as computed from the arguments of <a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a>).</p>
 
 <h4>values</h4>
 <table class="fields">
 <tr><td class="val" id="FT_SIZE_REQUEST_TYPE_NOMINAL">FT_SIZE_REQUEST_TYPE_NOMINAL</td><td class="desc">
 <p>The nominal size. The &lsquo;units_per_EM&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> is used to determine both scaling values.</p>
+<p>This is the standard scaling found in most applications. In particular, use this size request type for TrueType fonts if they provide optical scaling or something similar. Note, however, that &lsquo;units_per_EM&rsquo; is a rather abstract value which bears no relation to the actual size of the glyphs in a font.</p>
 </td></tr>
 <tr><td class="val" id="FT_SIZE_REQUEST_TYPE_REAL_DIM">FT_SIZE_REQUEST_TYPE_REAL_DIM</td><td class="desc">
-<p>The real dimension. The sum of the &lsquo;ascender&rsquo; and (minus of) the &lsquo;descender&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> are used to determine both scaling values.</p>
+<p>The real dimension. The sum of the &lsquo;ascender&rsquo; and (minus of) the &lsquo;descender&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> is used to determine both scaling values.</p>
 </td></tr>
 <tr><td class="val" id="FT_SIZE_REQUEST_TYPE_BBOX">FT_SIZE_REQUEST_TYPE_BBOX</td><td class="desc">
 <p>The font bounding box. The width and height of the &lsquo;bbox&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a> are used to determine the horizontal and vertical scaling value, respectively.</p>
   } <b>FT_Size_RequestRec</b>;
 </pre>
 
-<p>A structure used to model a size request.</p>
+<p>A structure to model a size request.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <p>See <a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a>.</p>
 </td></tr>
 <tr><td class="val" id="width">width</td><td class="desc">
-<p>The desired width.</p>
+<p>The desired width, given as a 26.6 fractional point value (with 72pt = 1in).</p>
 </td></tr>
 <tr><td class="val" id="height">height</td><td class="desc">
-<p>The desired height.</p>
+<p>The desired height, given as a 26.6 fractional point value (with 72pt = 1in).</p>
 </td></tr>
 <tr><td class="val" id="horiResolution">horiResolution</td><td class="desc">
-<p>The horizontal resolution. If set to zero, &lsquo;width&rsquo; is treated as a 26.6 fractional pixel value.</p>
+<p>The horizontal resolution (dpi, i.e., pixels per inch). If set to zero, &lsquo;width&rsquo; is treated as a 26.6 fractional <b>pixel</b> value, which gets internally rounded to an integer.</p>
 </td></tr>
 <tr><td class="val" id="vertResolution">vertResolution</td><td class="desc">
-<p>The vertical resolution. If set to zero, &lsquo;height&rsquo; is treated as a 26.6 fractional pixel value.</p>
+<p>The vertical resolution (dpi, i.e., pixels per inch). If set to zero, &lsquo;height&rsquo; is treated as a 26.6 fractional <b>pixel</b> value, which gets internally rounded to an integer.</p>
 </td></tr>
 </table>
 
 <h4>note</h4>
-<p>If &lsquo;width&rsquo; is zero, then the horizontal scaling value is set equal to the vertical scaling value, and vice versa.</p>
+<p>If &lsquo;width&rsquo; is zero, the horizontal scaling value is set equal to the vertical scaling value, and vice versa.</p>
+<p>If &lsquo;type&rsquo; is FT_SIZE_REQUEST_TYPE_SCALES, &lsquo;width&rsquo; and &lsquo;height&rsquo; are interpreted directly as 16.16 fractional scaling values, without any further modification, and both &lsquo;horiResolution&rsquo; and &lsquo;vertResolution&rsquo; are ignored.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
                     <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  delta );
 </pre>
 
-<p>A function used to set the transformation that is applied to glyph images when they are loaded into a glyph slot through <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+<p>Set the transformation that is applied to glyph images when they are loaded into a glyph slot through <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
 
 <h4>inout</h4>
 <table class="fields">
 <h4>input</h4>
 <table class="fields">
 <tr><td class="val" id="matrix">matrix</td><td class="desc">
-<p>A pointer to the transformation's 2x2 matrix. Use&nbsp;0 for the identity matrix.</p>
+<p>A pointer to the transformation's 2x2 matrix. Use NULL for the identity matrix.</p>
 </td></tr>
 <tr><td class="val" id="delta">delta</td><td class="desc">
-<p>A pointer to the translation vector. Use&nbsp;0 for the null vector.</p>
+<p>A pointer to the translation vector. Use NULL for the null vector.</p>
 </td></tr>
 </table>
 
                  <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>  load_flags );
 </pre>
 
-<p>A function used to load a single glyph into the glyph slot of a face object.</p>
+<p>Load a glyph into the glyph slot of a face object.</p>
 
 <h4>inout</h4>
 <table class="fields">
                      <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode );
 </pre>
 
-<p>Return the glyph index of a given character code. This function uses a charmap object to do the mapping.</p>
+<p>Return the glyph index of a given character code. This function uses the currently selected charmap to do the mapping.</p>
 
 <h4>input</h4>
 <table class="fields">
                      <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  *agindex );
 </pre>
 
-<p>This function is used to return the first character code in the current charmap of a given face. It also returns the corresponding glyph index.</p>
+<p>Return the first character code in the current charmap of a given face, together with its corresponding glyph index.</p>
 
 <h4>input</h4>
 <table class="fields">
 <p>The charmap's first character code.</p>
 
 <h4>note</h4>
-<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a> to be able to parse all character codes available in a given charmap. The code should look like this:</p>
+<p>You should use this function together with <a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a> to parse all character codes available in a given charmap. The code should look like this:</p>
 <pre class="colored">
   FT_ULong  charcode;
   FT_UInt   gindex;
                     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   *agindex );
 </pre>
 
-<p>This function is used to return the next character code in the current charmap of a given face following the value &lsquo;char_code&rsquo;, as well as the corresponding glyph index.</p>
+<p>Return the next character code in the current charmap of a given face following the value &lsquo;char_code&rsquo;, as well as the corresponding glyph index.</p>
 
 <h4>input</h4>
 <table class="fields">
 <p>The charmap's next character code.</p>
 
 <h4>note</h4>
-<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a> to walk over all character codes available in a given charmap. See the note for this function for a simple code example.</p>
+<p>You should use this function with <a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a> to walk over all character codes available in a given charmap. See the note for that function for a simple code example.</p>
 <p>Note that &lsquo;*agindex&rsquo; is set to&nbsp;0 when there are no more codes in the charmap.</p>
 
 <hr>
                      <a href="ft2-basic_types.html#FT_String">FT_String</a>*  glyph_name );
 </pre>
 
-<p>Return the glyph index of a given glyph name. This function uses driver specific objects to do the translation.</p>
+<p>Return the glyph index of a given glyph name.</p>
 
 <h4>input</h4>
 <table class="fields">
                 <a href="ft2-basic_types.html#FT_Int32">FT_Int32</a>  load_flags );
 </pre>
 
-<p>A function used to load a single glyph into the glyph slot of a face object, according to its character code.</p>
+<p>Load a glyph into the glyph slot of a face object, accessed by its character code.</p>
 
 <h4>inout</h4>
 <table class="fields">
 
 <h4>note</h4>
 <p>This function simply calls <a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a> and <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+<p>Many fonts contain glyphs that can't be loaded by this function since its glyph indices are not listed in any of the font's charmaps.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <h4>input</h4>
 <table class="fields">
 <tr><td class="val" id="render_mode">render_mode</td><td class="desc">
-<p>This is the render mode used to render the glyph image into a bitmap. See <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> for a list of possible values.</p>
+<p>The render mode used to render the glyph image into a bitmap. See <a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a> for a list of possible values.</p>
 </td></tr>
 </table>
 
 <p>FreeType error code. 0&nbsp;means success.</p>
 
 <h4>note</h4>
-<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling FT_Render_Glyph.</p>
+<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling &lsquo;FT_Render_Glyph&rsquo;.</p>
 <p>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).</p>
 <p>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.</p>
-<p>This is relevant because all our screens have a second problem: they are not linear. 1&nbsp;+&nbsp;1 is not&nbsp;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&nbsp;bits per channel (0-255). However, this does not translate to 50% brightness for that pixel on our sRGB and gamma&nbsp;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 &lsquo;dirt&rsquo; around it. The situation is especially ugly for diagonal stems like in &lsquo;w&rsquo; 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.</p>
+<p>This is relevant because all our screens have a second problem: they are not linear. 1&nbsp;+&nbsp;1 is not&nbsp;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&nbsp;bits per channel (0-255). However, this does not translate to 50% brightness for that pixel on our sRGB and gamma&nbsp;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 &lsquo;dirt&rsquo; around it. The situation is especially ugly for diagonal stems like in &lsquo;w&rsquo; 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.</p>
 <p>The blending function for placing text over a background is</p>
 <pre class="colored">
   dst = alpha * src + (1 - alpha) * dst    ,
 #define ft_render_mode_mono    <a href="ft2-base_interface.html#FT_RENDER_MODE_MONO">FT_RENDER_MODE_MONO</a>
 </pre>
 
-<p>An enumeration type that lists the render modes supported by FreeType&nbsp;2. Each mode corresponds to a specific type of scanline conversion performed on the outline.</p>
+<p>Render modes supported by FreeType&nbsp;2. Each mode corresponds to a specific type of scanline conversion performed on the outline.</p>
 <p>For bitmap fonts and embedded bitmaps the &lsquo;bitmap-&gt;pixel_mode&rsquo; field in the <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> structure gives the format of the returned bitmap.</p>
 <p>All modes except <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a> 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 <a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a>.</p>
 
 <h4>values</h4>
 <table class="fields">
 <tr><td class="val" id="FT_RENDER_MODE_NORMAL">FT_RENDER_MODE_NORMAL</td><td class="desc">
-<p>This is the default render mode; it corresponds to 8-bit anti-aliased bitmaps.</p>
+<p>Default render mode; it corresponds to 8-bit anti-aliased bitmaps.</p>
 </td></tr>
 <tr><td class="val" id="FT_RENDER_MODE_LIGHT">FT_RENDER_MODE_LIGHT</td><td class="desc">
 <p>This is equivalent to <a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a>. It is only defined as a separate value because render modes are also used indirectly to define hinting algorithm selectors. See <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a> for details.</p>
 </table>
 
 <h4>note</h4>
-<p>The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be filtered to reduce color-fringes by using <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> (not active in the default builds). It is up to the caller to either call <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> (if available) or do the filtering itself.</p>
+<p>The LCD-optimized glyph bitmaps produced by &lsquo;FT_Render_Glyph&rsquo; can be filtered to reduce color-fringes by using <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a> (not active in the default builds). It is up to the caller to either call &lsquo;FT_Library_SetLcdFilter&rsquo; (if available) or do the filtering itself.</p>
 <p>The selected render mode only affects vector glyphs of a font. Embedded bitmaps often have a different pixel mode like <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a>. You can use <a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a> to transform them into 8-bit pixmaps.</p>
 
 <hr>
                   <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>  *akerning );
 </pre>
 
-<p>Return the kerning vector between two glyphs of a same face.</p>
+<p>Return the kerning vector between two glyphs of the same face.</p>
 
 <h4>input</h4>
 <table class="fields">
 
 <h4>note</h4>
 <p>Only horizontal layouts (left-to-right &amp; right-to-left) are supported by this method. Other layouts, or more sophisticated kernings, are out of the scope of this API function -- they can be implemented through format-specific interfaces.</p>
+<p>Kerning for OpenType fonts implemented in a &lsquo;GPOS&rsquo; table is not supported; use <a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a> to find out whether a font has data that can be extracted with &lsquo;FT_Get_Kerning&rsquo;.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <pre>
   <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Kerning_Mode_
   {
-    <a href="ft2-base_interface.html#FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</a>  = 0,
+    <a href="ft2-base_interface.html#FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</a> = 0,
     <a href="ft2-base_interface.html#FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</a>,
     <a href="ft2-base_interface.html#FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</a>
 
 #define ft_kerning_unscaled  <a href="ft2-base_interface.html#FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</a>
 </pre>
 
-<p>An enumeration used to specify which kerning values to return in <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
+<p>An enumeration to specify the format of kerning values returned by <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>.</p>
 
 <h4>values</h4>
 <table class="fields">
 <tr><td class="val" id="FT_KERNING_DEFAULT">FT_KERNING_DEFAULT</td><td class="desc">
-<p>Return grid-fitted kerning distances in pixels (value is&nbsp;0). Whether they are scaled depends on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
+<p>Return grid-fitted kerning distances in 26.6 fractional pixels.</p>
 </td></tr>
 <tr><td class="val" id="FT_KERNING_UNFITTED">FT_KERNING_UNFITTED</td><td class="desc">
-<p>Return un-grid-fitted kerning distances in 26.6 fractional pixels. Whether they are scaled depends on <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>.</p>
+<p>Return un-grid-fitted kerning distances in 26.6 fractional pixels.</p>
 </td></tr>
 <tr><td class="val" id="FT_KERNING_UNSCALED">FT_KERNING_UNSCALED</td><td class="desc">
 <p>Return the kerning vector in original font units.</p>
 
 <h4>note</h4>
 <p>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.</p>
+<p>Both FT_KERNING_DEFAULT and FT_KERNING_UNFITTED use the current horizontal scaling factor (as set e.g. with <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a>) to convert font units to pixels.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <h4>note</h4>
 <p>Currently, only the Type&nbsp;1 font driver supports track kerning, using data from AFM files (if attached with <a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a> or <a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a>).</p>
-<p>Only very few AFM files come with track kerning data; please refer to the Adobe's AFM specification for more details.</p>
+<p>Only very few AFM files come with track kerning data; please refer to Adobe's AFM specification for more details.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   <b>FT_Get_Postscript_Name</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
 </pre>
 
-<p>Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript and TrueType fonts.</p>
+<p>Retrieve the ASCII PostScript name of a given face, if available. This only works with PostScript, TrueType, and OpenType fonts.</p>
 
 <h4>input</h4>
 <table class="fields">
 
 <h4>note</h4>
 <p>The returned pointer is owned by the face and is destroyed with it.</p>
+<p>For variation fonts, this string changes if you select a different instance, and you have to call &lsquo;FT_Get_PostScript_Name&rsquo; again to retrieve it. FreeType follows Adobe TechNote #5902, &lsquo;Generating PostScript Names for Fonts Using OpenType Font Variations&rsquo;.</p>
+<p><a href="http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5902.AdobePSNameGeneration.html">http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5902.AdobePSNameGeneration.html</a></p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <p>An <a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a> tag identifying the charmap. Use this with <a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a>.</p>
 </td></tr>
 <tr><td class="val" id="platform_id">platform_id</td><td class="desc">
-<p>An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and should be emulated for other formats.</p>
+<p>An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and gets emulated for other formats.</p>
 </td></tr>
 <tr><td class="val" id="encoding_id">encoding_id</td><td class="desc">
-<p>A platform specific encoding number. This also comes from the TrueType specification and should be emulated similarly.</p>
+<p>A platform specific encoding number. This also comes from the TrueType specification and gets emulated similarly.</p>
 </td></tr>
 </table>
 
 
 <h4>note</h4>
 <p>This function returns an error if the charmap is not part of the face (i.e., if it is not listed in the &lsquo;face-&gt;charmaps&rsquo; table).</p>
-<p>It also fails if a type&nbsp;14 charmap is selected.</p>
+<p>It also fails if an OpenType type&nbsp;14 charmap is selected (which doesn't map character codes to glyph indices at all).</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   <b>FT_Get_FSType_Flags</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
 </pre>
 
-<p>Return the fsType flags for a font.</p>
+<p>Return the &lsquo;fsType&rsquo; flags for a font.</p>
 
 <h4>input</h4>
 <table class="fields">
 </table>
 
 <h4>return</h4>
-<p>The fsType flags, <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a>.</p>
+<p>The &lsquo;fsType&rsquo; flags, see <a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a>.</p>
 
 <h4>note</h4>
 <p>Use this function rather than directly reading the &lsquo;fs_type&rsquo; field in the <a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a> structure, which is only guaranteed to return the correct results for Type&nbsp;1 fonts.</p>
 <p>FreeType error code. 0&nbsp;means success.</p>
 
 <h4>note</h4>
-<p>The values of &lsquo;*p_arg1&rsquo;, &lsquo;*p_arg2&rsquo;, and &lsquo;*p_transform&rsquo; must be interpreted depending on the flags returned in &lsquo;*p_flags&rsquo;. See the TrueType specification for details.</p>
+<p>The values of &lsquo;*p_arg1&rsquo;, &lsquo;*p_arg2&rsquo;, and &lsquo;*p_transform&rsquo; must be interpreted depending on the flags returned in &lsquo;*p_flags&rsquo;. See the OpenType specification for details.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Face_InternalRec_*  <b>FT_Face_Internal</b>;
 </pre>
 
-<p>An opaque handle to an &lsquo;FT_Face_InternalRec&rsquo; structure, used to model private data of a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object.</p>
+<p>An opaque handle to an &lsquo;FT_Face_InternalRec&rsquo; structure that models the private data of a given <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object.</p>
 <p>This structure might change between releases of FreeType&nbsp;2 and is not generally available to client applications.</p>
 
 <hr>
 <h4>values</h4>
 <table class="fields">
 <tr><td class="val" id="FT_FACE_FLAG_SCALABLE">FT_FACE_FLAG_SCALABLE</td><td class="desc">
-<p>Indicates that the face contains outline glyphs. This doesn't prevent bitmap strikes, i.e., a face can have both this and <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> set.</p>
+<p>The face contains outline glyphs. Note that a face can contain bitmap strikes also, i.e., a face can have both this flag and <a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a> set.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_FIXED_SIZES">FT_FACE_FLAG_FIXED_SIZES</td><td class="desc">
-<p>Indicates that the face contains bitmap strikes. See also the &lsquo;num_fixed_sizes&rsquo; and &lsquo;available_sizes&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
+<p>The face contains bitmap strikes. See also the &lsquo;num_fixed_sizes&rsquo; and &lsquo;available_sizes&rsquo; fields of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_FIXED_WIDTH">FT_FACE_FLAG_FIXED_WIDTH</td><td class="desc">
-<p>Indicates that the face contains fixed-width characters (like Courier, Lucido, MonoType, etc.).</p>
+<p>The face contains fixed-width characters (like Courier, Lucida, MonoType, etc.).</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_SFNT">FT_FACE_FLAG_SFNT</td><td class="desc">
-<p>Indicates that the face uses the &lsquo;sfnt&rsquo; storage scheme. For now, this means TrueType and OpenType.</p>
+<p>The face uses the SFNT storage scheme. For now, this means TrueType and OpenType.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_HORIZONTAL">FT_FACE_FLAG_HORIZONTAL</td><td class="desc">
-<p>Indicates that the face contains horizontal glyph metrics. This should be set for all common formats.</p>
+<p>The face contains horizontal glyph metrics. This should be set for all common formats.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_VERTICAL">FT_FACE_FLAG_VERTICAL</td><td class="desc">
-<p>Indicates that the face contains vertical glyph metrics. This is only available in some formats, not all of them.</p>
+<p>The face contains vertical glyph metrics. This is only available in some formats, not all of them.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_KERNING">FT_FACE_FLAG_KERNING</td><td class="desc">
-<p>Indicates that the face contains kerning information. If set, the kerning distance can be retrieved through the function <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the &lsquo;GPOS&rsquo; table (as present in some OpenType fonts).</p>
+<p>The face contains kerning information. If set, the kerning distance can be retrieved using the function <a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a>. Otherwise the function always return the vector (0,0). Note that FreeType doesn't handle kerning data from the SFNT &lsquo;GPOS&rsquo; table (as present in many OpenType fonts).</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_FAST_GLYPHS">FT_FACE_FLAG_FAST_GLYPHS</td><td class="desc">
 <p>THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_MULTIPLE_MASTERS">FT_FACE_FLAG_MULTIPLE_MASTERS</td><td class="desc">
-<p>Indicates that the font contains multiple masters and is capable of interpolating between them. See the multiple-masters specific API for details.</p>
+<p>The face contains multiple masters and is capable of interpolating between them. Supported formats are Adobe MM, TrueType GX, and OpenType variation fonts.</p>
+<p>See the multiple-masters specific API for details.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_GLYPH_NAMES">FT_FACE_FLAG_GLYPH_NAMES</td><td class="desc">
-<p>Indicates that the font contains glyph names that can be retrieved through <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>. Note that some TrueType fonts contain broken glyph name tables. Use the function <a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a> when needed.</p>
+<p>The face contains glyph names, which can be retrieved using <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a>. Note that some TrueType fonts contain broken glyph name tables. Use the function <a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a> when needed.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_EXTERNAL_STREAM">FT_FACE_FLAG_EXTERNAL_STREAM</td><td class="desc">
 <p>Used internally by FreeType to indicate that a face's stream was provided by the client application and should not be destroyed when <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a> is called. Don't read or test this flag.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_HINTER">FT_FACE_FLAG_HINTER</td><td class="desc">
-<p>Set if the font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT &lsquo;gasp&rsquo; table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.</p>
+<p>The font driver has a hinting machine of its own. For example, with TrueType fonts, it makes sense to use data from the SFNT &lsquo;gasp&rsquo; table only if the native TrueType hinting engine (with the bytecode interpreter) is available and active.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_CID_KEYED">FT_FACE_FLAG_CID_KEYED</td><td class="desc">
-<p>Set if the font is CID-keyed. In that case, the font is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to FT_Load_Glyph. Only the CID values for which corresponding glyphs in the subsetted font exist make FT_Load_Glyph return successfully; in all other cases you get an &lsquo;FT_Err_Invalid_Argument&rsquo; error.</p>
-<p>Note that CID-keyed fonts that are in an SFNT wrapper don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the &lsquo;CID-ness&rsquo; isn't visible to the application.</p>
+<p>The face is CID-keyed. In that case, the face is not accessed by glyph indices but by CID values. For subsetted CID-keyed fonts this has the consequence that not all index values are a valid argument to <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>. Only the CID values for which corresponding glyphs in the subsetted font exist make &lsquo;FT_Load_Glyph&rsquo; return successfully; in all other cases you get an &lsquo;FT_Err_Invalid_Argument&rsquo; error.</p>
+<p>Note that CID-keyed fonts that are in an SFNT wrapper (this is, all OpenType/CFF fonts) don't have this flag set since the glyphs are accessed in the normal way (using contiguous indices); the &lsquo;CID-ness&rsquo; isn't visible to the application.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_TRICKY">FT_FACE_FLAG_TRICKY</td><td class="desc">
-<p>Set if the font is &lsquo;tricky&rsquo;, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the Chinese font &lsquo;mingli.ttf&rsquo; that uses TrueType bytecode instructions to move and scale all of its subglyphs.</p>
+<p>The face is &lsquo;tricky&rsquo;, this is, it always needs the font format's native hinting engine to get a reasonable result. A typical example is the old Chinese font &lsquo;mingli.ttf&rsquo; (but not &lsquo;mingliu.ttc&rsquo;) that uses TrueType bytecode instructions to move and scale all of its subglyphs.</p>
 <p>It is not possible to auto-hint such fonts using <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a>; it will also ignore <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a>. You have to set both <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a> to really disable hinting; however, you probably never want this except for demonstration purposes.</p>
 <p>Currently, there are about a dozen TrueType fonts in the list of tricky fonts; they are hard-coded in file &lsquo;ttobjs.c&rsquo;.</p>
 </td></tr>
 <tr><td class="val" id="FT_FACE_FLAG_COLOR">FT_FACE_FLAG_COLOR</td><td class="desc">
-<p>Set if the font has color glyph tables. To access color glyphs use <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
+<p>The face has color glyph tables. To access color glyphs use <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a>.</p>
 </td></tr>
 </table>
 
 #define <a href="ft2-base_interface.html#FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</a>    ( 1 &lt;&lt; 1 )
 </pre>
 
-<p>A list of bit flags used to indicate the style of a given face. These are used in the &lsquo;style_flags&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
+<p>A list of bit flags to indicate the style of a given face. These are used in the &lsquo;style_flags&rsquo; field of <a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a>.</p>
 
 <h4>values</h4>
 <table class="fields">
 <tr><td class="val" id="FT_STYLE_FLAG_ITALIC">FT_STYLE_FLAG_ITALIC</td><td class="desc">
-<p>Indicates that a given face style is italic or oblique.</p>
+<p>The face style is italic or oblique.</p>
 </td></tr>
 <tr><td class="val" id="FT_STYLE_FLAG_BOLD">FT_STYLE_FLAG_BOLD</td><td class="desc">
-<p>Indicates that a given face is bold.</p>
+<p>The face is bold.</p>
 </td></tr>
 </table>
 
 #define <a href="ft2-base_interface.html#FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</a>                   ( 1L &lt;&lt; 12 )
 #define <a href="ft2-base_interface.html#FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</a>                ( 1L &lt;&lt; 13 )
 #define <a href="ft2-base_interface.html#FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</a>                  ( 1L &lt;&lt; 15 )
-  /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
+  /* Bits 16-19 are used by `FT_LOAD_TARGET_' */
 #define <a href="ft2-base_interface.html#FT_LOAD_COLOR">FT_LOAD_COLOR</a>                        ( 1L &lt;&lt; 20 )
 #define <a href="ft2-base_interface.html#FT_LOAD_COMPUTE_METRICS">FT_LOAD_COMPUTE_METRICS</a>              ( 1L &lt;&lt; 21 )
+#define <a href="ft2-base_interface.html#FT_LOAD_BITMAP_METRICS_ONLY">FT_LOAD_BITMAP_METRICS_ONLY</a>          ( 1L &lt;&lt; 22 )
 </pre>
 
-<p>A list of bit field constants used with <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to indicate what kind of operations to perform during glyph loading.</p>
+<p>A list of bit field constants for <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a> to indicate what kind of operations to perform during glyph loading.</p>
 
 <h4>values</h4>
 <table class="fields">
 <tr><td class="val" id="FT_LOAD_DEFAULT">FT_LOAD_DEFAULT</td><td class="desc">
 <p>Corresponding to&nbsp;0, this value is used as the default glyph load operation. In this case, the following happens:</p>
 <p>1. FreeType looks for a bitmap for the glyph corresponding to the face's current size. If one is found, the function returns. The bitmap data can be accessed from the glyph slot (see note below).</p>
-<p>2. If no embedded bitmap is searched or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then &lsquo;hinted&rsquo; to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).</p>
-<p>Note that by default, the glyph loader doesn't render outlines into bitmaps. The following flags are used to modify this default behaviour to more specific and useful cases.</p>
+<p>2. If no embedded bitmap is searched for or found, FreeType looks for a scalable outline. If one is found, it is loaded from the font file, scaled to device pixels, then &lsquo;hinted&rsquo; to the pixel grid in order to optimize it. The outline data can be accessed from the glyph slot (see note below).</p>
+<p>Note that by default the glyph loader doesn't render outlines into bitmaps. The following flags are used to modify this default behaviour to more specific and useful cases.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_NO_SCALE">FT_LOAD_NO_SCALE</td><td class="desc">
 <p>Don't scale the loaded outline glyph but keep it in font units.</p>
 <p>In case <a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a> doesn't return true, you shouldn't use this flag currently. Reason is that in this case vertical metrics get synthesized, and those values are not always consistent across various font formats.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_FORCE_AUTOHINT">FT_LOAD_FORCE_AUTOHINT</td><td class="desc">
-<p>Indicates that the auto-hinter is preferred over the font's native hinter. See also the note below.</p>
+<p>Prefer the auto-hinter over the font's native hinter. See also the note below.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_PEDANTIC">FT_LOAD_PEDANTIC</td><td class="desc">
-<p>Indicates that the font driver should perform pedantic verifications during glyph loading. This is mostly used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also.</p>
+<p>Make the font driver perform pedantic verifications during glyph loading. This is mostly used to detect broken glyphs in fonts. By default, FreeType tries to handle broken fonts also.</p>
 <p>In particular, errors from the TrueType bytecode engine are not passed to the application if this flag is not set; this might result in partially hinted or distorted glyphs in case a glyph's bytecode is buggy.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_NO_RECURSE">FT_LOAD_NO_RECURSE</td><td class="desc">
-<p>Indicate that the font driver should not load composite glyphs recursively. Instead, it should set the &lsquo;num_subglyph&rsquo; and &lsquo;subglyphs&rsquo; values of the glyph slot accordingly, and set &lsquo;glyph-&gt;format&rsquo; to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>. The description of subglyphs can then be accessed with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>
+<p>Don't load composite glyphs recursively. Instead, the font driver should set the &lsquo;num_subglyph&rsquo; and &lsquo;subglyphs&rsquo; values of the glyph slot accordingly, and set &lsquo;glyph-&gt;format&rsquo; to <a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a>. The description of subglyphs can then be accessed with <a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a>.</p>
 <p>This flag implies <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a> and <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a>.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_IGNORE_TRANSFORM">FT_LOAD_IGNORE_TRANSFORM</td><td class="desc">
-<p>Indicates that the transform matrix set by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a> should be ignored.</p>
+<p>Ignore the transform matrix set by <a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a>.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_MONOCHROME">FT_LOAD_MONOCHROME</td><td class="desc">
 <p>This flag is used with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a> to indicate that you want to render an outline glyph to a 1-bit monochrome bitmap glyph, with 8&nbsp;pixels packed into each byte of the bitmap data.</p>
 <p>Note that this has no effect on the hinting algorithm used. You should rather use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> so that the monochrome-optimized hinting algorithm is used.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_LINEAR_DESIGN">FT_LOAD_LINEAR_DESIGN</td><td class="desc">
-<p>Indicates that the &lsquo;linearHoriAdvance&rsquo; and &lsquo;linearVertAdvance&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> should be kept in font units. See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for details.</p>
+<p>Keep &lsquo;linearHoriAdvance&rsquo; and &lsquo;linearVertAdvance&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> in font units. See <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a> for details.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_NO_AUTOHINT">FT_LOAD_NO_AUTOHINT</td><td class="desc">
-<p>Disable auto-hinter. See also the note below.</p>
+<p>Disable the auto-hinter. See also the note below.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_COLOR">FT_LOAD_COLOR</td><td class="desc">
-<p>This flag is used to request loading of color embedded-bitmap images. The resulting color bitmaps, if available, will have the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a> format. When the flag is not used and color bitmaps are found, they will be converted to 256-level gray bitmaps transparently. Those bitmaps will be in the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a> format.</p>
+<p>Load embedded color bitmap images. The resulting color bitmaps, if available, will have the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a> format. If the flag is not set and color bitmaps are found, they are converted to 256-level gray bitmaps transparently, using the <a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a> format.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_COMPUTE_METRICS">FT_LOAD_COMPUTE_METRICS</td><td class="desc">
-<p>This flag sets computing glyph metrics without the use of bundled metrics tables (for example, the &lsquo;hdmx&rsquo; 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.</p>
+<p>Compute glyph metrics from the glyph data, without the use of bundled metrics tables (for example, the &lsquo;hdmx&rsquo; table in TrueType fonts). This flag is mainly used by font validating or font editing applications, which need to ignore, verify, or edit those tables.</p>
 <p>Currently, this flag is only implemented for TrueType fonts.</p>
 </td></tr>
+<tr><td class="val" id="FT_LOAD_BITMAP_METRICS_ONLY">FT_LOAD_BITMAP_METRICS_ONLY</td><td class="desc">
+<p>Request loading of the metrics and bitmap image information of a (possibly embedded) bitmap glyph without allocating or copying the bitmap image data itself. No effect if the target glyph is not a bitmap image.</p>
+<p>This flag unsets <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a>.</p>
+</td></tr>
 <tr><td class="val" id="FT_LOAD_CROP_BITMAP">FT_LOAD_CROP_BITMAP</td><td class="desc">
 <p>Ignored. Deprecated.</p>
 </td></tr>
 #define <a href="ft2-base_interface.html#FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</a>   FT_LOAD_TARGET_( <a href="ft2-base_interface.html#FT_RENDER_MODE_LCD_V">FT_RENDER_MODE_LCD_V</a>  )
 </pre>
 
-<p>A list of values that are used to select a specific hinting algorithm to use by the hinter. You should OR one of these values to your &lsquo;load_flags&rsquo; when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
-<p>Note that font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a> to ensure that the auto-hinter is used.</p>
+<p>A list of values to select a specific hinting algorithm for the hinter. You should OR one of these values to your &lsquo;load_flags&rsquo; when calling <a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a>.</p>
+<p>Note that font's native hinters may ignore the hinting algorithm you have specified (e.g., the TrueType bytecode interpreter). You can set <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a> to ensure that the auto-hinter is used.</p>
 
 <h4>values</h4>
 <table class="fields">
 <tr><td class="val" id="FT_LOAD_TARGET_NORMAL">FT_LOAD_TARGET_NORMAL</td><td class="desc">
-<p>This corresponds to the default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> instead.</p>
+<p>The default hinting algorithm, optimized for standard gray-level rendering. For monochrome output, use <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> instead.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_TARGET_LIGHT">FT_LOAD_TARGET_LIGHT</td><td class="desc">
-<p>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.</p>
+<p>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 FreeType's new CFF engine or Microsoft's ClearType 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.</p>
+<p>Advance widths are rounded to integer values; however, using the &lsquo;lsb_delta&rsquo; and &lsquo;rsb_delta&rsquo; fields of <a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a>, it is possible to get fractional advance widths for sub-pixel positioning (which is recommended to use).</p>
+<p>If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active, TrueType-like metrics are used to make this mode behave similarly as in unpatched FreeType versions between 2.4.6 and 2.7.1 (inclusive).</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_TARGET_MONO">FT_LOAD_TARGET_MONO</td><td class="desc">
 <p>Strong hinting algorithm that should only be used for monochrome output. The result is probably unpleasant if the glyph is rendered in non-monochrome modes.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_TARGET_LCD">FT_LOAD_TARGET_LCD</td><td class="desc">
-<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for horizontally decimated LCD displays.</p>
+<p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a> optimized for horizontally decimated LCD displays.</p>
 </td></tr>
 <tr><td class="val" id="FT_LOAD_TARGET_LCD_V">FT_LOAD_TARGET_LCD_V</td><td class="desc">
 <p>A variant of <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> optimized for vertically decimated LCD displays.</p>
 
   FT_Render_Glyph( face-&gt;glyph, FT_RENDER_MODE_LCD );
 </pre>
+<p>In general, you should stick with one rendering mode. For example, switching between <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a> and <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a> enforces a lot of recomputation for TrueType fonts, which is slow. Another reason is caching: Selecting a different mode usually causes changes in both the outlines and the rasterized bitmaps; it is thus necessary to empty the cache after a mode switch to avoid false hits.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 #define <a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_USE_MY_METRICS">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a>      0x200
 </pre>
 
-<p>A list of constants used to describe subglyphs. Please refer to the TrueType specification for the meaning of the various flags.</p>
+<p>A list of constants describing subglyphs. Please refer to the &lsquo;glyf&rsquo; table description in the OpenType specification for the meaning of the various flags (which get synthesized for non-OpenType subglyphs).</p>
 
 <h4>values</h4>
 <table class="fields">
 <p>Fonts that have only this bit set must not be modified, embedded or exchanged in any manner without first obtaining permission of the font software copyright owner.</p>
 </td></tr>
 <tr><td class="val" id="FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</td><td class="desc">
-<p>If this bit is set, the font may be embedded and temporarily loaded on the remote system. Documents containing Preview &amp; Print fonts must be opened &lsquo;read-only&rsquo;; no edits can be applied to the document.</p>
+<p>The font may be embedded and temporarily loaded on the remote system. Documents containing Preview &amp; Print fonts must be opened &lsquo;read-only&rsquo;; no edits can be applied to the document.</p>
 </td></tr>
 <tr><td class="val" id="FT_FSTYPE_EDITABLE_EMBEDDING">FT_FSTYPE_EDITABLE_EMBEDDING</td><td class="desc">
-<p>If this bit is set, the font may be embedded but must only be installed temporarily on other systems. In contrast to Preview &amp; Print fonts, documents containing editable fonts may be opened for reading, editing is permitted, and changes may be saved.</p>
+<p>The font may be embedded but must only be installed temporarily on other systems. In contrast to Preview &amp; Print fonts, documents containing editable fonts may be opened for reading, editing is permitted, and changes may be saved.</p>
 </td></tr>
 <tr><td class="val" id="FT_FSTYPE_NO_SUBSETTING">FT_FSTYPE_NO_SUBSETTING</td><td class="desc">
-<p>If this bit is set, the font may not be subsetted prior to embedding.</p>
+<p>The font may not be subsetted prior to embedding.</p>
 </td></tr>
 <tr><td class="val" id="FT_FSTYPE_BITMAP_EMBEDDING_ONLY">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</td><td class="desc">
-<p>If this bit is set, only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.</p>
+<p>Only bitmaps contained in the font may be embedded; no outline data may be embedded. If there are no bitmaps available in the font, then the font is unembeddable.</p>
 </td></tr>
 </table>
 
 <h4>note</h4>
 <p>The flags are ORed together, thus more than a single value can be returned.</p>
-<p>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.</p>
+<p>While the &lsquo;fsType&rsquo; 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.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
+<div class="section">
+<h3 id="FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</h3>
+<p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
+<pre>
+#define <b>FT_IS_NAMED_INSTANCE</b>( face ) \
+          ( (face)-&gt;face_index &amp; 0x7FFF0000L )
+</pre>
+
+<p>A macro that returns true whenever a face object is a named instance of a GX or OpenType variation font.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
 </body>
 </html>
index 4b9c88a..7abf969 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="basic_types">Basic Data Types</h1>
 <h2>Synopsis</h2>
index aa372e6..be1a4a9 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="bdf_fonts">BDF and PCF Files</h1>
 <h2>Synopsis</h2>
index 9ec6942..f8556fe 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="bitmap_handling">Bitmap Handling</h1>
 <h2>Synopsis</h2>
index 243c428..4e8e9b2 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="bzip2">BZIP2 Streams</h1>
 <h2>Synopsis</h2>
index a8de9ac..385453a 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="cache_subsystem">Cache Sub-System</h1>
 <h2>Synopsis</h2>
index 5899bad..3b91ab1 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="cff_driver">The CFF driver</h1>
 <h2>Synopsis</h2>
 <table class="synopsis">
 <tr><td><a href="#hinting-engine(cff)">hinting-engine</a></td><td>&nbsp;</td></tr>
 <tr><td><a href="#no-stem-darkening(cff)">no-stem-darkening</a></td><td><a href="#FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></td></tr>
-<tr><td><a href="#darkening-parameters(cff)">darkening-parameters</a></td><td></td></tr>
+<tr><td><a href="#darkening-parameters(cff)">darkening-parameters</a></td><td><a href="#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a></td></tr>
+<tr><td><a href="#random-seed">random-seed</a></td><td></td></tr>
 </table>
 
 
 
 <h4>note</h4>
 <p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values &lsquo;adobe&rsquo; or &lsquo;freetype&rsquo;).</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <h4>note</h4>
 <p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively). It can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-auto_hinter.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a>.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <h4>note</h4>
 <p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable, using eight comma-separated integers without spaces. Here the above example, using &lsquo;\&rsquo; to break the line for readability.</p>
+<pre class="colored">
+  FREETYPE_PROPERTIES=\
+  cff:darkening-parameters=500,300,1000,200,1500,100,2000,0
+</pre>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="random-seed">random-seed</h3>
+
+<p>By default, the seed value for the CFF &lsquo;random&rsquo; operator is set to a random value. However, mainly for debugging purposes, it is often necessary to use a known value as a seed so that the pseudo-random number sequences generated by &lsquo;random&rsquo; are repeatable.</p>
+<p>The &lsquo;random-seed&rsquo; property does that. Its argument is a signed 32bit integer; if the value is zero or negative, the seed given by the &lsquo;intitialRandomSeed&rsquo; private DICT operator in a CFF file gets used (or a default value if there is no such operator). If the value is positive, use it instead of &lsquo;initialRandomSeed&rsquo;, which is consequently ignored.</p>
+
+<h4>note</h4>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable. It can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-cff_driver.html#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a>.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
+<div class="section">
+<h3 id="FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</h3>
+<p>Defined in FT_CFF_DRIVER_H (freetype/ftcffdrv.h).</p>
+<pre>
+#define <b>FT_PARAM_TAG_RANDOM_SEED</b> \
+          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 's', 'e', 'e', 'd' )
+</pre>
+
+<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding 32bit signed integer argument overrides the CFF module's random seed value with a face-specific one; see <a href="ft2-cff_driver.html#random-seed">random-seed</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
 </body>
 </html>
index 6b7807d..e8d8188 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="cid_fonts">CID Fonts</h1>
 <h2>Synopsis</h2>
index 813d820..cd998fe 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="computations">Computations</h1>
 <h2>Synopsis</h2>
              <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  c );
 </pre>
 
-<p>A very simple function used to perform the computation &lsquo;(a*b)/c&rsquo; with maximum accuracy (it uses a 64-bit intermediate integer whenever necessary).</p>
+<p>Compute &lsquo;(a*b)/c&rsquo; with maximum accuracy, using a 64-bit intermediate integer whenever necessary.</p>
 <p>This function isn't necessarily as fast as some processor specific operations, but is at least completely portable.</p>
 
 <h4>input</h4>
              <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  b );
 </pre>
 
-<p>A very simple function used to perform the computation &lsquo;(a*b)/0x10000&rsquo; with maximum accuracy. Most of the time this is used to multiply a given value by a 16.16 fixed-point factor.</p>
+<p>Compute &lsquo;(a*b)/0x10000&rsquo; with maximum accuracy. Its main use is to multiply a given value by a 16.16 fixed-point factor.</p>
 
 <h4>input</h4>
 <table class="fields">
              <a href="ft2-basic_types.html#FT_Long">FT_Long</a>  b );
 </pre>
 
-<p>A very simple function used to perform the computation &lsquo;(a*0x10000)/b&rsquo; with maximum accuracy. Most of the time, this is used to divide a given value by a 16.16 fixed-point factor.</p>
+<p>Compute &lsquo;(a*0x10000)/b&rsquo; with maximum accuracy. Its main use is to divide a given value by a 16.16 fixed-point factor.</p>
 
 <h4>input</h4>
 <table class="fields">
   <b>FT_RoundFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  a );
 </pre>
 
-<p>A very simple function used to round a 16.16 fixed number.</p>
+<p>Round a 16.16 fixed number.</p>
 
 <h4>input</h4>
 <table class="fields">
 </table>
 
 <h4>return</h4>
-<p>&lsquo;a&rsquo; rounded to nearest 16.16 fixed integer, halfway cases away from zero.</p>
+<p>&lsquo;a&rsquo; rounded to the nearest 16.16 fixed integer, halfway cases away from zero.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   <b>FT_CeilFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  a );
 </pre>
 
-<p>A very simple function used to compute the ceiling function of a 16.16 fixed number.</p>
+<p>Compute the smallest following integer of a 16.16 fixed number.</p>
 
 <h4>input</h4>
 <table class="fields">
   <b>FT_FloorFix</b>( <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>  a );
 </pre>
 
-<p>A very simple function used to compute the floor function of a 16.16 fixed number.</p>
+<p>Compute the largest previous integer of a 16.16 fixed number.</p>
 
 <h4>input</h4>
 <table class="fields">
index 1b00cae..2c5af61 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="error_code_values">Error Code Values</h1>
 <h2>Synopsis</h2>
                 "invalid PostScript (post) table format" )
   FT_ERRORDEF_( Invalid_Post_Table,                          0x9B,
                 "invalid PostScript (post) table" )
+  FT_ERRORDEF_( DEF_In_Glyf_Bytecode,                        0x9C,
+                "found FDEF or IDEF opcode in glyf bytecode" )
 
   /* CFF, CID, and Type 1 errors */
 
index c56280e..b0f68e0 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="error_enumerations">Error Enumerations</h1>
 
index ef7dce8..d23d79d 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="font_formats">Font Formats</h1>
 <h2>Synopsis</h2>
index 8c7e85f..7a998fb 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="gasp_table">Gasp Table</h1>
 <h2>Synopsis</h2>
 #define <a href="ft2-gasp_table.html#FT_GASP_NO_TABLE">FT_GASP_NO_TABLE</a>               -1
 #define <a href="ft2-gasp_table.html#FT_GASP_DO_GRIDFIT">FT_GASP_DO_GRIDFIT</a>           0x01
 #define <a href="ft2-gasp_table.html#FT_GASP_DO_GRAY">FT_GASP_DO_GRAY</a>              0x02
+#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</a>    0x04
 #define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_SMOOTHING">FT_GASP_SYMMETRIC_SMOOTHING</a>  0x08
-#define <a href="ft2-gasp_table.html#FT_GASP_SYMMETRIC_GRIDFIT">FT_GASP_SYMMETRIC_GRIDFIT</a>    0x10
 </pre>
 
 <p>A list of values and/or bit-flags returned by the <a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a> function.</p>
                <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>  ppem );
 </pre>
 
-<p>Read the &lsquo;gasp&rsquo; table from a TrueType or OpenType font file and return the entry corresponding to a given character pixel size.</p>
+<p>For a TrueType or OpenType font file, return the rasterizer behaviour flags from the font's &lsquo;gasp&rsquo; table corresponding to a given character pixel size.</p>
 
 <h4>input</h4>
 <table class="fields">
 <h4>return</h4>
 <p>Bit flags (see <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a>), or <a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a> if there is no &lsquo;gasp&rsquo; table in the face.</p>
 
+<h4>note</h4>
+<p>If you want to use the MM functionality of OpenType variation fonts (i.e., using <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> and friends), call this function <b>after</b> setting an instance since the return values can change.</p>
+
 <h4>since</h4>
 <p>2.3.0</p>
 
index 8cba284..c934a95 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="glyph_management">Glyph Management</h1>
 <h2>Synopsis</h2>
 
 
   // load glyph
-  error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );
+  error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );
 
   // extract glyph image
   error = FT_Get_Glyph( face-&gt;glyph, &amp;glyph );
index 98cd8a5..f9c2312 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="glyph_stroker">Glyph Stroker</h1>
 <h2>Synopsis</h2>
 <p></p>
 </td></tr>
 <tr><td class="val" id="FT_STROKER_LINEJOIN_MITER">FT_STROKER_LINEJOIN_MITER</td><td class="desc">
-<p>Used to render mitered line joins, with variable bevels if the miter limit is exceeded. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius. This prevents long spikes being created. FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for backwards compatibility.</p>
+<p>Used to render mitered line joins, with variable bevels if the miter limit is exceeded. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius. This prevents long spikes being created. FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for backward compatibility.</p>
 </td></tr>
 </table>
 
index 954b786..d6b6210 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
-<h1 id="glyph_variants">Glyph Variants</h1>
+<h1 id="glyph_variants">Unicode Variation Sequences</h1>
 <h2>Synopsis</h2>
 <table class="synopsis">
 <tr><td><a href="#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td></tr>
 </table>
 
 
-<p>Many CJK characters have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Ideographic Variation Sequences (IVS), consisting of a Unicode base character and one of 240 variant selectors (U+E0100-U+E01EF), instead of further extending the already huge code range for CJK characters.</p>
-<p>An IVS is registered and unique; for further details please refer to Unicode Technical Standard #37, the Ideographic Variation Database:</p>
-<p><a href="http://www.unicode.org/reports/tr37/">http://www.unicode.org/reports/tr37/</a></p>
-<p>To date (November 2014), the character with the most variants is U+9089, having 32 such IVS.</p>
-<p>Adobe and MS decided to support IVS with a new cmap subtable (format&nbsp;14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variants supported by the font.</p>
-<p>A variant may be either &lsquo;default&rsquo; or &lsquo;non-default&rsquo;. A default variant is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variant is a different glyph.</p>
+<p>Many characters, especially for CJK scripts, have variant forms. They are a sort of grey area somewhere between being totally irrelevant and semantically distinct; for this reason, the Unicode consortium decided to introduce Variation Sequences (VS), consisting of a Unicode base character and a variation selector instead of further extending the already huge number of characters.</p>
+<p>Unicode maintains two different sets, namely &lsquo;Standardized Variation Sequences&rsquo; and registered &lsquo;Ideographic Variation Sequences&rsquo; (IVS), collected in the &lsquo;Ideographic Variation Database&rsquo; (IVD).</p>
+<p><a href="http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt">http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt</a> <a href="http://unicode.org/reports/tr37/">http://unicode.org/reports/tr37/</a> <a href="http://unicode.org/ivd/">http://unicode.org/ivd/</a></p>
+<p>To date (January 2017), the character with the most ideographic variations is U+9089, having 32 such IVS.</p>
+<p>Three Mongolian Variation Selectors have the values U+180B-U+180D; 256 generic Variation Selectors are encoded in the ranges U+FE00-U+FE0F and U+E0100-U+E01EF. IVS currently use Variation Selectors from the range U+E0100-U+E01EF only.</p>
+<p>A VS consists of the base character value followed by a single Variation Selector. For example, to get the first variation of U+9089, you have to write the character sequence &lsquo;U+9089 U+E0100&rsquo;.</p>
+<p>Adobe and MS decided to support both standardized and ideographic VS with a new cmap subtable (format&nbsp;14). It is an odd subtable because it is not a mapping of input code points to glyphs, but contains lists of all variations supported by the font.</p>
+<p>A variation may be either &lsquo;default&rsquo; or &lsquo;non-default&rsquo; for a given font. A default variation is the one you will get for that code point if you look it up in the standard Unicode cmap. A non-default variation is a different glyph.</p>
 
 <div class="section">
 <h3 id="FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</h3>
                                    <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  variantSelector );
 </pre>
 
-<p>Check whether this variant of this Unicode character is the one to be found in the &lsquo;cmap&rsquo;.</p>
+<p>Check whether this variation of this Unicode character is the one to be found in the &lsquo;cmap&rsquo;.</p>
 
 <h4>input</h4>
 <table class="fields">
 </table>
 
 <h4>return</h4>
-<p>1&nbsp;if found in the standard (Unicode) cmap, 0&nbsp;if found in the variation selector cmap, or -1 if it is not a variant.</p>
+<p>1&nbsp;if found in the standard (Unicode) cmap, 0&nbsp;if found in the variation selector cmap, or -1 if it is not a variation.</p>
 
 <h4>note</h4>
 <p>This function is only meaningful if the font has a variation selector cmap subtable.</p>
   <b>FT_Face_GetVariantSelectors</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>  face );
 </pre>
 
-<p>Return a zero-terminated list of Unicode variant selectors found in the font.</p>
+<p>Return a zero-terminated list of Unicode variation selectors found in the font.</p>
 
 <h4>input</h4>
 <table class="fields">
 </table>
 
 <h4>return</h4>
-<p>A pointer to an array of selector code points, or NULL if there is no valid variant selector cmap subtable.</p>
+<p>A pointer to an array of selector code points, or NULL if there is no valid variation selector cmap subtable.</p>
 
 <h4>note</h4>
 <p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
                              <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  charcode );
 </pre>
 
-<p>Return a zero-terminated list of Unicode variant selectors found for the specified character code.</p>
+<p>Return a zero-terminated list of Unicode variation selectors found for the specified character code.</p>
 
 <h4>input</h4>
 <table class="fields">
 </table>
 
 <h4>return</h4>
-<p>A pointer to an array of variant selector code points that are active for the given character, or NULL if the corresponding list is empty.</p>
+<p>A pointer to an array of variation selector code points that are active for the given character, or NULL if the corresponding list is empty.</p>
 
 <h4>note</h4>
 <p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
                              <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  variantSelector );
 </pre>
 
-<p>Return a zero-terminated list of Unicode character codes found for the specified variant selector.</p>
+<p>Return a zero-terminated list of Unicode character codes found for the specified variation selector.</p>
 
 <h4>input</h4>
 <table class="fields">
 <p>A handle to the source face object.</p>
 </td></tr>
 <tr><td class="val" id="variantSelector">variantSelector</td><td class="desc">
-<p>The variant selector code point in Unicode.</p>
+<p>The variation selector code point in Unicode.</p>
 </td></tr>
 </table>
 
 <h4>return</h4>
-<p>A list of all the code points that are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variant selector is invalid.</p>
+<p>A list of all the code points that are specified by this selector (both default and non-default codes are returned) or NULL if there is no valid cmap or the variation selector is invalid.</p>
 
 <h4>note</h4>
 <p>The last item in the array is&nbsp;0; the array is owned by the <a href="ft2-base_interface.html#FT_Face">FT_Face</a> object but can be overwritten or released on the next call to a FreeType function.</p>
index a1af51e..cb99e1d 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="gx_validation">TrueTypeGX/AAT Validation</h1>
 <h2>Synopsis</h2>
index 1029d0f..dd763ee 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="gzip">GZIP Streams</h1>
 <h2>Synopsis</h2>
index 40beb73..6ad35c3 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="header_file_macros">Header File Macros</h1>
 <h2>Synopsis</h2>
 <tr><td><a href="#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="#FT_PFR_H">FT_PFR_H</a></td></tr>
 <tr><td><a href="#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="#FT_STROKER_H">FT_STROKER_H</a></td></tr>
 <tr><td><a href="#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td><td><a href="#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
-<tr><td><a href="#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td><td><a href="#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td></tr>
-<tr><td><a href="#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td><td><a href="#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
-<tr><td><a href="#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td><td><a href="#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td></tr>
-<tr><td><a href="#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td><td><a href="#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
-<tr><td><a href="#FT_BDF_H">FT_BDF_H</a></td><td><a href="#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td></tr>
-<tr><td><a href="#FT_CID_H">FT_CID_H</a></td><td><a href="#FT_GASP_H">FT_GASP_H</a></td></tr>
-<tr><td><a href="#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="#FT_ADVANCES_H">FT_ADVANCES_H</a></td></tr>
+<tr><td><a href="#FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</a></td><td><a href="#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td></tr>
+<tr><td><a href="#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td><td><a href="#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td><td><a href="#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td><td><a href="#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
+<tr><td><a href="#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td><td><a href="#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td></tr>
+<tr><td><a href="#FT_BDF_H">FT_BDF_H</a></td><td><a href="#FT_GASP_H">FT_GASP_H</a></td></tr>
+<tr><td><a href="#FT_CID_H">FT_CID_H</a></td><td><a href="#FT_ADVANCES_H">FT_ADVANCES_H</a></td></tr>
+<tr><td><a href="#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="#':'">':'</a></td></tr>
 </table>
 
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <div class="section">
+<h3 id="FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</h3>
+<pre>
+#define <b>FT_PCF_DRIVER_H</b>  &lt;freetype/ftpcfdrv.h&gt;
+</pre>
+
+<p>A macro used in #include statements to name the file containing structures and macros related to the PCF driver module.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
 <h3 id="FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</h3>
 <pre>
 #define <b>FT_TYPE1_TABLES_H</b>  &lt;freetype/t1tables.h&gt;
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
+<div class="section">
+<h3 id="':'">':'</h3>
+<p>Defined in FT_CONFIG_OPTIONS_H (freetype/config/ftoption.h).</p>
+<pre>
+#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+</pre>
+<h4>property-name1</h4>
+<p>'=' &lt;property-value1&gt;</p>
+
+<h4>module-name2</h4>
+<p>':'</p>
+
+<h4>property-name2</h4>
+<p>'=' &lt;property-value2&gt; ...</p>
+<p>Example:</p>
+<p>FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ cff:no-stem-darkening=1 \ autofitter:warping=1</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
 </body>
 </html>
index 13b4d3c..54abb7d 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="header_inclusion">FreeType's header inclusion scheme</h1>
 
index deade34..0ca7b51 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="incremental">Incremental Loading</h1>
 <h2>Synopsis</h2>
index e451825..edf6904 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <table class="index">
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a></td><td><a href="ft2-base_interface.html#FT_Library">FT_Library</a></td><td><a href="ft2-header_file_macros.html#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td><a href="ft2-header_file_macros.html#FT_SYSTEM_H">FT_SYSTEM_H</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td><td><a href="ft2-basic_types.html#FT_Tag">FT_Tag</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a></td><td><a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a></td><td><a href="ft2-computations.html#FT_Tan">FT_Tan</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_Property">BDF_Property</a></td><td><a href="ft2-list_processing.html#FT_List">FT_List</a></td><td><a href="ft2-header_file_macros.html#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_NONE</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceDict">CID_FaceDict</a></td><td><a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="ft2-list_processing.html#FT_List_Find">FT_List_Find</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_FontDict">CID_FontDict</a></td><td><a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#CID_Info">CID_Info</a></td><td><a href="ft2-list_processing.html#FT_List_Remove">FT_List_Remove</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#darkening-parameters(autofit)">darkening-parameters (autofit)</a></td><td><a href="ft2-list_processing.html#FT_List_Up">FT_List_Up</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td></tr>
-<tr><td><a href="ft2-cff_driver.html#darkening-parameters(cff)">darkening-parameters (cff)</a></td><td><a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#default-script">default-script</a></td><td><a href="ft2-list_processing.html#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="ft2-header_file_macros.html#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a></td><td><a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a></td><td><a href="ft2-header_file_macros.html#FT_TYPES_H">FT_TYPES_H</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a></td><td><a href="ft2-basic_types.html#FT_UFWord">FT_UFWord</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COMPUTE_METRICS</a></td><td><a href="ft2-basic_types.html#FT_UInt">FT_UInt</a></td></tr>
-<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_XXX</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_CROP_BITMAP</a></td><td><a href="ft2-basic_types.html#FT_UInt16">FT_UInt16</a></td></tr>
-<tr><td><a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a></td><td><a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a></td><td><a href="ft2-basic_types.html#FT_UInt64">FT_UInt64</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_ADVANCES_H">FT_ADVANCES_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a></td><td><a href="ft2-basic_types.html#FT_ULong">FT_ULong</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a></td><td><a href="ft2-header_file_macros.html#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="ft2-basic_types.html#FT_UnitVector">FT_UnitVector</a></td></tr>
-<tr><td><a href="ft2-system_interface.html#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a></td><td><a href="ft2-basic_types.html#FT_UShort">FT_UShort</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERN</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Angle">FT_Angle</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Angle_Diff">FT_Angle_Diff</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_PEDANTIC</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Atan2">FT_Atan2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD_V</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GX</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_INDIC</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_NONE</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a></td></tr>
-<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BBOX_H">FT_BBOX_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_BBox">FT_BBox</a></td><td><a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BDF_H">FT_BDF_H</a></td><td><a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BITMAP_H">FT_BITMAP_H</a></td><td><a href="ft2-truetype_tables.html#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a></td><td><a href="ft2-basic_types.html#FT_Long">FT_Long</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="ft2-header_file_macros.html#FT_LZW_H">FT_LZW_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OT</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="ft2-header_file_macros.html#FT_MAC_H">FT_MAC_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a></td><td><a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Init">FT_Bitmap_Init</a></td><td><a href="ft2-computations.html#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="ft2-computations.html#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Axis">FT_Var_Axis</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="ft2-system_interface.html#FT_Memory">FT_Memory</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="ft2-basic_types.html#FT_Vector">FT_Vector</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bool">FT_Bool</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="ft2-computations.html#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Byte">FT_Byte</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a></td><td><a href="ft2-computations.html#FT_Vector_Length">FT_Vector_Length</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="ft2-computations.html#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_BZIP2_H">FT_BZIP2_H</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="ft2-computations.html#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></td><td><a href="ft2-module_management.html#FT_Module">FT_Module</a></td><td><a href="ft2-computations.html#FT_Vector_Transform">FT_Vector_Transform</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a></td><td><a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a></td><td><a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></td><td><a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="ft2-header_file_macros.html#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></td><td><a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_Header">FT_WinFNT_Header</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_CeilFix">FT_CeilFix</a></td><td><a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1250</a></td></tr>
-<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_ADOBE</a></td><td><a href="ft2-computations.html#FT_MulDiv">FT_MulDiv</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a></td></tr>
-<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_FREETYPE</a></td><td><a href="ft2-computations.html#FT_MulFix">FT_MulFix</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1252</a></td></tr>
-<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></td><td><a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1253</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Char">FT_Char</a></td><td><a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1254</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1255</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1256</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1257</a></td></tr>
-<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1258</a></td></tr>
-<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="ft2-base_interface.html#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1361</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP874</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="ft2-basic_types.html#FT_Offset">FT_Offset</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP932</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP936</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP949</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_Cos">FT_Cos</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP950</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Data">FT_Data</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_DEFAULT</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_DivFix">FT_DivFix</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_MAC</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_XXX</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_OEM</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="ft2-header_file_macros.html#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_SYMBOL</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a></td><td><a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a></td><td><a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a></td></tr>
-<tr><td><a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Driver">FT_Driver</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a></td><td><a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a></td><td><a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_EVEN_ODD_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a></td><td><a href="ft2-header_file_macros.html#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_HIGH_PRECISION</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_BIG5</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Done">FTC_Manager_Done</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_GB2312</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_JOHAB</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_OWNER</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SINGLE_PASS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
-<tr><td><a href="ft2-error_code_values.html#FT_Err_XXX">FT_Err_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Decompose">FT_Outline_Decompose</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Error">FT_Error</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a></td><td><a href="ft2-outline_processing.html#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="ft2-auto_hinter.html#fallback-script">fallback-script</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a></td><td><a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_COLOR</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="ft2-cff_driver.html#hinting-engine(cff)">hinting-engine (cff)</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td><td><a href="ft2-auto_hinter.html#increase-x-height">increase-x-height</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td><a href="ft2-tt_driver.html#interpreter-version">interpreter-version</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td><td><a href="ft2-auto_hinter.html#no-stem-darkening(autofit)">no-stem-darkening (autofit)</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="ft2-cff_driver.html#no-stem-darkening(cff)">no-stem-darkening (cff)</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_FUZZ</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a></td><td><a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SCALE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SHIFT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a></td><td><a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_VALUE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING_KEY</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_ENTRY</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_TYPE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_BLUE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_NAME</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Face">FT_Face</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_OTHER_BLUE</a></td></tr>
-<tr><td><a href="ft2-version.html#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_BBOX</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td><td><a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_MATRIX</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="ft2-truetype_tables.html#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_NAME</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_TYPE</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td><a href="ft2-header_file_macros.html#FT_PFR_H">FT_PFR_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FORCE_BOLD</a></td></tr>
-<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FS_TYPE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Face_Internal">FT_Face_Internal</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FULL_NAME</a></td></tr>
-<tr><td><a href="ft2-version.html#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_IS_FIXED_PITCH</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ITALIC_ANGLE</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LANGUAGE_GROUP</a></td></tr>
-<tr><td><a href="ft2-computations.html#FT_FloorFix">FT_FloorFix</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LEN_IV</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_MIN_FEATURE</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NOTICE</a></td></tr>
-<tr><td><a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_BLUE_VALUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a></td><td><a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_CHAR_STRINGS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_EDITABLE_EMBEDDING</a></td><td><a href="ft2-basic_types.html#FT_Pos">FT_Pos</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_BLUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_INSTALLABLE_EMBEDDING</a></td><td><a href="ft2-auto_hinter.html#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_OTHER_BLUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_NO_SUBSETTING</a></td><td><a href="ft2-auto_hinter.html#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_OTHER_BLUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a></td><td><a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_H</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a></td><td><a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_V</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td><td><a href="ft2-basic_types.html#FT_PtrDist">FT_PtrDist</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_SUBRS</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_FWord">FT_FWord</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_OTHER_BLUE</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PAINT_TYPE</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PASSWORD</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GASP_H">FT_GASP_H</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_RND_STEM_UP</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_HW</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT</a></td><td><a href="ft2-raster.html#FT_Raster">FT_Raster</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_VW</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING</a></td><td><a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_H</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_V</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Generic">FT_Generic</a></td><td><a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_SUBR</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td><td><a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_POSITION</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a></td><td><a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_THICKNESS</a></td></tr>
-<tr><td><a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNIQUE_ID</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td><a href="ft2-raster.html#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_VERSION</a></td></tr>
-<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td><td><a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_WEIGHT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td><td><a href="ft2-header_file_macros.html#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Private">PS_Private</a></td></tr>
-<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a></td><td><a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SCALE</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SHIFT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_VALUES</a></td></tr>
-<tr><td><a href="ft2-font_formats.html#FT_Get_Font_Format">FT_Get_Font_Format</a></td><td><a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_BLUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td><td><a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_OTHER_BLUES</a></td></tr>
-<tr><td><a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a></td><td><a href="ft2-module_management.html#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FORCE_BOLD</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_ITALIC_ANGLE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_OTHER_BLUES</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a></td><td><a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_HEIGHT</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="ft2-module_management.html#FT_Renderer_Class">FT_Renderer_Class</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_WIDTH</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a></td><td><a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_HEIGHTS</a></td></tr>
-<tr><td><a href="ft2-multiple_masters.html#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="ft2-computations.html#FT_RoundFix">FT_RoundFix</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_WIDTHS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_POSITION</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_THICKNESS</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td><td><a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_Blend_Flags</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ARRAY</a></td></tr>
-<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="ft2-module_management.html#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_EXPERT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ISOLATIN1</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_NONE</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_STANDARD</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="ft2-module_management.html#FT_Set_Renderer">FT_Set_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a></td></tr>
-<tr><td><a href="ft2-module_management.html#FT_Get_Renderer">FT_Get_Renderer</a></td><td><a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="ft2-type1_tables.html#T1_FontInfo">T1_FontInfo</a></td></tr>
-<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_Private">T1_Private</a></td></tr>
-<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_CUSTOM</a></td></tr>
-<tr><td><a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HEAD</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_EXPERT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HHEA</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_LATIN_1</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_MAXP</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_STANDARD</a></td></tr>
-<tr><td><a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td><td><a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_OS2</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_DEFAULT</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_PCLT</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_ISO_10646</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_POST</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_1_1</a></td></tr>
-<tr><td><a href="ft2-mac_specific.html#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_VHEA</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_2_0</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_32</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_VARIANT_SELECTOR</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a></td><td><a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a></td><td><a href="ft2-basic_types.html#FT_Short">FT_Short</a></td><td><a href="ft2-truetype_tables.html#TT_Header">TT_Header</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_BBOX</a></td><td><a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_CELL</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_35</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_NOMINAL</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_38</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_40</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_SCALES</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a></td><td><a href="ft2-header_file_macros.html#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_10646</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GLYPH_H">FT_GLYPH_H</a></td><td><a href="ft2-computations.html#FT_Sin">FT_Sin</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_7BIT_ASCII</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a></td><td><a href="ft2-base_interface.html#FT_Size">FT_Size</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_8859_1</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td><a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARABIC</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a></td><td><a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ARMENIAN</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BENGALI</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_BURMESE</a></td></tr>
-<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td><a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_DEVANAGARI</a></td></tr>
-<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEEZ</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td><td><a href="ft2-raster.html#FT_Span">FT_Span</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GEORGIAN</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td><a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GREEK</a></td></tr>
-<tr><td><a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GUJARATI</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_GURMUKHI</a></td></tr>
-<tr><td><a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td><td><a href="ft2-header_file_macros.html#FT_STROKER_H">FT_STROKER_H</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_HEBREW</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_JAPANESE</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KANNADA</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KHMER</a></td></tr>
-<tr><td><a href="ft2-gzip.html#FT_Gzip_Uncompress">FT_Gzip_Uncompress</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_KOREAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_LAOTIAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_FIXED</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALAYALAM</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MALDIVIAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_MONGOLIAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_BOLD</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ORIYA</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_ITALIC</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_ROMAN</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RSYMBOL</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="ft2-system_interface.html#FT_Stream">FT_Stream</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_RUSSIAN</a></td></tr>
-<tr><td><a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td><a href="ft2-system_interface.html#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SIMPLIFIED_CHINESE</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="ft2-system_interface.html#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINDHI</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td><td><a href="ft2-bzip2.html#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SINHALESE</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td><td><a href="ft2-gzip.html#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_SLAVIC</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a></td><td><a href="ft2-lzw.html#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TAMIL</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TELUGU</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td><td><a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_THAI</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="ft2-basic_types.html#FT_String">FT_String</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TIBETAN</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_TRADITIONAL_CHINESE</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_UNINTERP</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_VIETNAMESE</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Done">FT_Stroker_Done</a></td><td><a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_BIG_5</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int">FT_Int</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_GB2312</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int16">FT_Int16</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_JOHAB</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int32">FT_Int32</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SJIS</a></td></tr>
-<tr><td><a href="ft2-basic_types.html#FT_Int64">FT_Int64</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SYMBOL_CS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UCS_4</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_WANSUNG</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_New">FT_Stroker_New</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td><td><a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td><td><a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Set">FT_Stroker_Set</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a></td></tr>
-<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_2X2</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_CUSTOM</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY1</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_SCALE</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LIGHT</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a></td><td><a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a></td></tr>
-<tr><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XY_SCALE</a></td><td><a href="ft2-auto_hinter.html#warping">warping</a></td></tr>
-<tr><td><a href="ft2-header_file_macros.html#FT_LIST_H">FT_LIST_H</a></td><td><a href="ft2-base_interface.html#FT_SubGlyph">FT_SubGlyph</a></td><td></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#':'">':'</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNFITTED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_ATOM</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_UNSCALED</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Export">FT_Stroker_Export</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_CARDINAL</a></td><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_Kerning_Mode</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_INTEGER</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PROPERTY_TYPE_NONE</a></td><td><a href="ft2-header_file_macros.html#FT_LCD_FILTER_H">FT_LCD_FILTER_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_Property">BDF_Property</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyRec">BDF_PropertyRec</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LEGACY1</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#BDF_PropertyType">BDF_PropertyType</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_LIGHT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceDict">CID_FaceDict</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LCD_FILTER_NONE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_New">FT_Stroker_New</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceDictRec">CID_FaceDictRec</a></td><td><a href="ft2-lcd_filtering.html#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceInfo">CID_FaceInfo</a></td><td><a href="ft2-header_file_macros.html#FT_LIST_H">FT_LIST_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FaceInfoRec">CID_FaceInfoRec</a></td><td><a href="ft2-base_interface.html#FT_Library">FT_Library</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Set">FT_Stroker_Set</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_FontDict">CID_FontDict</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#CID_Info">CID_Info</a></td><td><a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_2X2</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#darkening-parameters(autofit)">darkening-parameters (autofit)</a></td><td><a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS</a></td></tr>
+<tr><td><a href="ft2-cff_driver.html#darkening-parameters(cff)">darkening-parameters (cff)</a></td><td><a href="ft2-list_processing.html#FT_List">FT_List</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#default-script">default-script</a></td><td><a href="ft2-list_processing.html#FT_List_Add">FT_List_Add</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MAJOR</a></td><td><a href="ft2-list_processing.html#FT_List_Destructor">FT_List_Destructor</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_SCALE</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_MINOR</a></td><td><a href="ft2-list_processing.html#FT_List_Finalize">FT_List_Finalize</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_USE_MY_METRICS</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_PATCH</a></td><td><a href="ft2-list_processing.html#FT_List_Find">FT_List_Find</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XXX</a></td></tr>
+<tr><td><a href="ft2-version.html#FREETYPE_XXX">FREETYPE_XXX</a></td><td><a href="ft2-list_processing.html#FT_List_Insert">FT_List_Insert</a></td><td><a href="ft2-base_interface.html#FT_SUBGLYPH_FLAG_XXX">FT_SUBGLYPH_FLAG_XY_SCALE</a></td></tr>
+<tr><td><a href="ft2-sizes_management.html#FT_Activate_Size">FT_Activate_Size</a></td><td><a href="ft2-list_processing.html#FT_List_Iterate">FT_List_Iterate</a></td><td><a href="ft2-base_interface.html#FT_SubGlyph">FT_SubGlyph</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_ADVANCE_FLAG_FAST_ONLY">FT_ADVANCE_FLAG_FAST_ONLY</a></td><td><a href="ft2-list_processing.html#FT_List_Iterator">FT_List_Iterator</a></td><td><a href="ft2-header_file_macros.html#FT_SYNTHESIS_H">FT_SYNTHESIS_H</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_ADVANCES_H">FT_ADVANCES_H</a></td><td><a href="ft2-list_processing.html#FT_List_Remove">FT_List_Remove</a></td><td><a href="ft2-header_file_macros.html#FT_SYSTEM_H">FT_SYSTEM_H</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="ft2-list_processing.html#FT_List_Up">FT_List_Up</a></td><td><a href="ft2-basic_types.html#FT_Tag">FT_Tag</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a></td><td><a href="ft2-list_processing.html#FT_ListNode">FT_ListNode</a></td><td><a href="ft2-computations.html#FT_Tan">FT_Tan</a></td></tr>
+<tr><td><a href="ft2-system_interface.html#FT_Alloc_Func">FT_Alloc_Func</a></td><td><a href="ft2-list_processing.html#FT_ListNodeRec">FT_ListNodeRec</a></td><td><a href="ft2-header_file_macros.html#FT_TRIGONOMETRY_H">FT_TRIGONOMETRY_H</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_2PI">FT_ANGLE_2PI</a></td><td><a href="ft2-list_processing.html#FT_ListRec">FT_ListRec</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_DRIVER_H">FT_TRUETYPE_DRIVER_H</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI">FT_ANGLE_PI</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_BITMAP_METRICS_ONLY</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_NONE</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI2">FT_ANGLE_PI2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COLOR</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_PATENTED</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_ANGLE_PI4">FT_ANGLE_PI4</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_COMPUTE_METRICS</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TRUETYPE_ENGINE_TYPE_UNPATENTED</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Angle">FT_Angle</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_CROP_BITMAP</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Angle_Diff">FT_Angle_Diff</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_DEFAULT</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TABLES_H">FT_TRUETYPE_TABLES_H</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Atan2">FT_Atan2</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_FORCE_AUTOHINT</a></td><td><a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Attach_File">FT_Attach_File</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH</a></td><td><a href="ft2-truetype_engine.html#FT_TrueTypeEngineType">FT_TrueTypeEngineType</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Attach_Stream">FT_Attach_Stream</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_IGNORE_TRANSFORM</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Free">FT_TrueTypeGX_Free</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_AUTOHINTER_H">FT_AUTOHINTER_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_LINEAR_DESIGN</a></td><td><a href="ft2-gx_validation.html#FT_TrueTypeGX_Validate">FT_TrueTypeGX_Validate</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_CJK</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_MONOCHROME</a></td><td><a href="ft2-header_file_macros.html#FT_TYPE1_TABLES_H">FT_TYPE1_TABLES_H</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_INDIC</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_AUTOHINT</a></td><td><a href="ft2-header_file_macros.html#FT_TYPES_H">FT_TYPES_H</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_LATIN</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_BITMAP</a></td><td><a href="ft2-basic_types.html#FT_UFWord">FT_UFWord</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_NONE</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_HINTING</a></td><td><a href="ft2-basic_types.html#FT_UInt">FT_UInt</a></td></tr>
+<tr><td><a href="ft2-auto_hinter.html#FT_AUTOHINTER_SCRIPT_XXX">FT_AUTOHINTER_SCRIPT_XXX</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_RECURSE</a></td><td><a href="ft2-basic_types.html#FT_UInt16">FT_UInt16</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BBOX_H">FT_BBOX_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a></td><td><a href="ft2-basic_types.html#FT_UInt32">FT_UInt32</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_BBox">FT_BBox</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_PEDANTIC</a></td><td><a href="ft2-basic_types.html#FT_UInt64">FT_UInt64</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BDF_H">FT_BDF_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_RENDER</a></td><td><a href="ft2-basic_types.html#FT_ULong">FT_ULong</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BITMAP_H">FT_BITMAP_H</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a></td><td><a href="ft2-header_file_macros.html#FT_UNPATENTED_HINTING_H">FT_UNPATENTED_HINTING_H</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD_V</a></td><td><a href="ft2-basic_types.html#FT_UnitVector">FT_UnitVector</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Convert">FT_Bitmap_Convert</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LIGHT</a></td><td><a href="ft2-basic_types.html#FT_UShort">FT_UShort</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Copy">FT_Bitmap_Copy</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_MODE">FT_LOAD_TARGET_MODE</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_APPLE</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Done">FT_Bitmap_Done</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_MONO</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_BASE</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Embolden">FT_Bitmap_Embolden</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_NORMAL</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_bsln</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_Bitmap_Init">FT_Bitmap_Init</a></td><td><a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERN</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Bitmap_Size">FT_Bitmap_Size</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_VERTICAL_LAYOUT</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_CKERNXXX</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyph">FT_BitmapGlyph</a></td><td><a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_XXX</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_feat</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_BitmapGlyphRec">FT_BitmapGlyphRec</a></td><td><a href="ft2-base_interface.html#FT_Load_Char">FT_Load_Char</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GDEF</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bool">FT_Bool</a></td><td><a href="ft2-base_interface.html#FT_Load_Glyph">FT_Load_Glyph</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GPOS</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Byte">FT_Byte</a></td><td><a href="ft2-truetype_tables.html#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_GSUB</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Bytes">FT_Bytes</a></td><td><a href="ft2-basic_types.html#FT_Long">FT_Long</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GX</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_BZIP2_H">FT_BZIP2_H</a></td><td><a href="ft2-header_file_macros.html#FT_LZW_H">FT_LZW_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GX_LENGTH">FT_VALIDATE_GX_LENGTH</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_CHARMAP_H">FT_CACHE_CHARMAP_H</a></td><td><a href="ft2-header_file_macros.html#FT_MAC_H">FT_MAC_H</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_GXXXX</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_H">FT_CACHE_H</a></td><td><a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_JSTF</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_IMAGE_H">FT_CACHE_IMAGE_H</a></td><td><a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_just</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CACHE_SMALL_BITMAPS_H">FT_CACHE_SMALL_BITMAPS_H</a></td><td><a href="ft2-computations.html#FT_Matrix_Invert">FT_Matrix_Invert</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_kern</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_CeilFix">FT_CeilFix</a></td><td><a href="ft2-computations.html#FT_Matrix_Multiply">FT_Matrix_Multiply</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_lcar</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CFF_DRIVER_H">FT_CFF_DRIVER_H</a></td><td><a href="ft2-system_interface.html#FT_Memory">FT_Memory</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_MATH</a></td></tr>
+<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_ADOBE</a></td><td><a href="ft2-system_interface.html#FT_MemoryRec">FT_MemoryRec</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_CKERNXXX">FT_VALIDATE_MS</a></td></tr>
+<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_FREETYPE</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_mort</a></td></tr>
+<tr><td><a href="ft2-cff_driver.html#FT_CFF_HINTING_XXX">FT_CFF_HINTING_XXX</a></td><td><a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_morx</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Char">FT_Char</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_ERRORS_H">FT_MODULE_ERRORS_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a></td><td><a href="ft2-header_file_macros.html#FT_MODULE_H">FT_MODULE_H</a></td><td><a href="ft2-ot_validation.html#FT_VALIDATE_OTXXX">FT_VALIDATE_OTXXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_CharMapRec">FT_CharMapRec</a></td><td><a href="ft2-module_management.html#FT_Module">FT_Module</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_opbd</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CID_H">FT_CID_H</a></td><td><a href="ft2-module_management.html#FT_Module_Class">FT_Module_Class</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_prop</a></td></tr>
+<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Free">FT_ClassicKern_Free</a></td><td><a href="ft2-module_management.html#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="ft2-gx_validation.html#FT_VALIDATE_GXXXX">FT_VALIDATE_trak</a></td></tr>
+<tr><td><a href="ft2-gx_validation.html#FT_ClassicKern_Validate">FT_ClassicKern_Validate</a></td><td><a href="ft2-module_management.html#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Axis">FT_Var_Axis</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_CONFIG_H">FT_CONFIG_CONFIG_H</a></td><td><a href="ft2-module_management.html#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="ft2-multiple_masters.html#FT_Var_Named_Style">FT_Var_Named_Style</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_MODULES_H">FT_CONFIG_MODULES_H</a></td><td><a href="ft2-header_file_macros.html#FT_MULTIPLE_MASTERS_H">FT_MULTIPLE_MASTERS_H</a></td><td><a href="ft2-basic_types.html#FT_Vector">FT_Vector</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_OPTIONS_H">FT_CONFIG_OPTIONS_H</a></td><td><a href="ft2-computations.html#FT_MulDiv">FT_MulDiv</a></td><td><a href="ft2-computations.html#FT_Vector_From_Polar">FT_Vector_From_Polar</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_CONFIG_STANDARD_LIBRARY_H">FT_CONFIG_STANDARD_LIBRARY_H</a></td><td><a href="ft2-computations.html#FT_MulFix">FT_MulFix</a></td><td><a href="ft2-computations.html#FT_Vector_Length">FT_Vector_Length</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_Cos">FT_Cos</a></td><td><a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="ft2-computations.html#FT_Vector_Polarize">FT_Vector_Polarize</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Data">FT_Data</a></td><td><a href="ft2-base_interface.html#FT_New_Face">FT_New_Face</a></td><td><a href="ft2-computations.html#FT_Vector_Rotate">FT_Vector_Rotate</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_DivFix">FT_DivFix</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FOND">FT_New_Face_From_FOND</a></td><td><a href="ft2-computations.html#FT_Vector_Transform">FT_Vector_Transform</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSRef">FT_New_Face_From_FSRef</a></td><td><a href="ft2-computations.html#FT_Vector_Unit">FT_Vector_Unit</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a></td><td><a href="ft2-mac_specific.html#FT_New_Face_From_FSSpec">FT_New_Face_From_FSSpec</a></td><td><a href="ft2-header_file_macros.html#FT_WINFONTS_H">FT_WINFONTS_H</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Done_Glyph">FT_Done_Glyph</a></td><td><a href="ft2-module_management.html#FT_New_Library">FT_New_Library</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_Header">FT_WinFNT_Header</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a></td><td><a href="ft2-base_interface.html#FT_New_Memory_Face">FT_New_Memory_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_HeaderRec">FT_WinFNT_HeaderRec</a></td></tr>
+<tr><td><a href="ft2-sizes_management.html#FT_Done_Size">FT_Done_Size</a></td><td><a href="ft2-sizes_management.html#FT_New_Size">FT_New_Size</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1250</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Driver">FT_Driver</a></td><td><a href="ft2-basic_types.html#FT_Offset">FT_Offset</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1251</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_ENC_TAG">FT_ENC_TAG</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_DRIVER</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1252</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_CUSTOM</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_MEMORY</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1253</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_EXPERT</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PARAMS</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1254</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_LATIN_1</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_PATHNAME</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1255</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_ADOBE_STANDARD</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_STREAM</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1256</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_APPLE_ROMAN</a></td><td><a href="ft2-base_interface.html#FT_OPEN_XXX">FT_OPEN_XXX</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1257</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a></td><td><a href="ft2-header_file_macros.html#FT_OPENTYPE_VALIDATE_H">FT_OPENTYPE_VALIDATE_H</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1258</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a></td><td><a href="ft2-base_interface.html#FT_Open_Args">FT_Open_Args</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP1361</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_BIG5</a></td><td><a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP874</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_GB2312</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Free">FT_OpenType_Free</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP932</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_JOHAB</a></td><td><a href="ft2-ot_validation.html#FT_OpenType_Validate">FT_OpenType_Validate</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP936</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP949</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_CP950</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_NONE</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_DEFAULT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_NONE</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_MAC</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_OLD_LATIN_2</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_OEM</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_PRC</a></td><td><a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_SYMBOL</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_EVEN_ODD_FILL</a></td><td><a href="ft2-winfnt_fonts.html#FT_WinFNT_ID_XXX">FT_WinFNT_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a></td><td><a href="ft2-header_file_macros.html#FT_OUTLINE_H">FT_OUTLINE_H</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache">FTC_CMapCache</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_HIGH_PRECISION</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_Lookup">FTC_CMapCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Encoding">FT_Encoding</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_CMapCache_New">FTC_CMapCache_New</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_ERRORS_H">FT_ERRORS_H</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a></td><td><a href="ft2-cache_subsystem.html#FTC_Face_Requester">FTC_Face_Requester</a></td></tr>
+<tr><td><a href="ft2-error_code_values.html#FT_Err_XXX">FT_Err_XXX</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_NONE</a></td><td><a href="ft2-cache_subsystem.html#FTC_FaceID">FTC_FaceID</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Error">FT_Error</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_OWNER</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache">FTC_ImageCache</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_F26Dot6">FT_F26Dot6</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_Lookup">FTC_ImageCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_F2Dot14">FT_F2Dot14</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SINGLE_PASS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_LookupScaler">FTC_ImageCache_LookupScaler</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_CID_KEYED</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageCache_New">FTC_ImageCache_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_COLOR</a></td><td><a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageType">FTC_ImageType</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_EXTERNAL_STREAM</a></td><td><a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a></td><td><a href="ft2-cache_subsystem.html#FTC_ImageTypeRec">FTC_ImageTypeRec</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FAST_GLYPHS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager">FTC_Manager</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_SIZES</a></td><td><a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Done">FTC_Manager_Done</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_FIXED_WIDTH</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupFace">FTC_Manager_LookupFace</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_GLYPH_NAMES</a></td><td><a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_LookupSize">FTC_Manager_LookupSize</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HINTER</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Decompose">FT_Outline_Decompose</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_New">FTC_Manager_New</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_HORIZONTAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_RemoveFaceID">FTC_Manager_RemoveFaceID</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_KERNING</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="ft2-cache_subsystem.html#FTC_Manager_Reset">FTC_Manager_Reset</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_MULTIPLE_MASTERS</a></td><td><a href="ft2-outline_processing.html#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node">FTC_Node</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SCALABLE</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a></td><td><a href="ft2-cache_subsystem.html#FTC_Node_Unref">FTC_Node_Unref</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_SFNT</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBit">FTC_SBit</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_TRICKY</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache">FTC_SBitCache</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_VERTICAL</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_Lookup">FTC_SBitCache_Lookup</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FACE_FLAG_XXX">FT_FACE_FLAG_XXX</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_LookupScaler">FTC_SBitCache_LookupScaler</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Face">FT_Face</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitCache_New">FTC_SBitCache_New</a></td></tr>
+<tr><td><a href="ft2-version.html#FT_Face_CheckTrueTypePatents">FT_Face_CheckTrueTypePatents</a></td><td><a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td><a href="ft2-cache_subsystem.html#FTC_SBitRec">FTC_SBitRec</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharsOfVariant">FT_Face_GetCharsOfVariant</a></td><td><a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_Scaler">FTC_Scaler</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIndex">FT_Face_GetCharVariantIndex</a></td><td><a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td><td><a href="ft2-cache_subsystem.html#FTC_ScalerRec">FTC_ScalerRec</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetCharVariantIsDefault">FT_Face_GetCharVariantIsDefault</a></td><td><a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a></td><td><a href="ft2-auto_hinter.html#fallback-script">fallback-script</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantSelectors">FT_Face_GetVariantSelectors</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a></td><td><a href="ft2-auto_hinter.html#glyph-to-script-map">glyph-to-script-map</a></td></tr>
+<tr><td><a href="ft2-glyph_variants.html#FT_Face_GetVariantsOfChar">FT_Face_GetVariantsOfChar</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td><a href="ft2-cff_driver.html#hinting-engine(cff)">hinting-engine (cff)</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Face_Internal">FT_Face_Internal</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="ft2-auto_hinter.html#increase-x-height">increase-x-height</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a></td><td><a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="ft2-tt_driver.html#interpreter-version">interpreter-version</a></td></tr>
+<tr><td><a href="ft2-version.html#FT_Face_SetUnpatentedHinting">FT_Face_SetUnpatentedHinting</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyph">FT_OutlineGlyph</a></td><td><a href="ft2-pcf_driver.html#no-long-family-names">no-long-family-names</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FaceRec">FT_FaceRec</a></td><td><a href="ft2-glyph_management.html#FT_OutlineGlyphRec">FT_OutlineGlyphRec</a></td><td><a href="ft2-auto_hinter.html#no-stem-darkening(autofit)">no-stem-darkening (autofit)</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</a></td><td><a href="ft2-cff_driver.html#no-stem-darkening(cff)">no-stem-darkening (cff)</a></td></tr>
+<tr><td><a href="ft2-computations.html#FT_FloorFix">FT_FloorFix</a></td><td><a href="ft2-sfnt_names.html#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_FUZZ</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_FONT_FORMATS_H">FT_FONT_FORMATS_H</a></td><td><a href="ft2-incremental.html#FT_PARAM_TAG_INCREMENTAL">FT_PARAM_TAG_INCREMENTAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SCALE</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_FREETYPE_H">FT_FREETYPE_H</a></td><td><a href="ft2-lcd_filtering.html#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_SHIFT</a></td></tr>
+<tr><td><a href="ft2-system_interface.html#FT_Free_Func">FT_Free_Func</a></td><td><a href="ft2-cff_driver.html#FT_PARAM_TAG_RANDOM_SEED">FT_PARAM_TAG_RANDOM_SEED</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_BLUE_VALUE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_BITMAP_EMBEDDING_ONLY</a></td><td><a href="ft2-auto_hinter.html#FT_PARAM_TAG_STEM_DARKENING">FT_PARAM_TAG_STEM_DARKENING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_EDITABLE_EMBEDDING</a></td><td><a href="ft2-truetype_tables.html#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_CHAR_STRING_KEY</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_INSTALLABLE_EMBEDDING</a></td><td><a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_ENTRY</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_NO_SUBSETTING</a></td><td><a href="ft2-header_file_macros.html#FT_PCF_DRIVER_H">FT_PCF_DRIVER_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ENCODING_TYPE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING</a></td><td><a href="ft2-header_file_macros.html#FT_PFR_H">FT_PFR_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_BLUE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_BGRA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_NAME</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_FSTYPE_XXX">FT_FSTYPE_XXX</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FAMILY_OTHER_BLUE</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_FWord">FT_FWord</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY2</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_BBOX</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRAY</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_GRAY4</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_MATRIX</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_DO_GRIDFIT</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_NAME</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GASP_H">FT_GASP_H</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FONT_TYPE</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_NO_TABLE</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FORCE_BOLD</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_GRIDFIT</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_PIXEL_MODE_NONE</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FS_TYPE</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_SYMMETRIC_SMOOTHING</a></td><td><a href="ft2-basic_types.html#FT_Pixel_Mode">FT_Pixel_Mode</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_FULL_NAME</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_GASP_XXX">FT_GASP_XXX</a></td><td><a href="ft2-basic_types.html#FT_Pointer">FT_Pointer</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_IS_FIXED_PITCH</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Generic">FT_Generic</a></td><td><a href="ft2-basic_types.html#FT_Pos">FT_Pos</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_ITALIC_ANGLE</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Generic_Finalizer">FT_Generic_Finalizer</a></td><td><a href="ft2-auto_hinter.html#FT_Prop_GlyphToScriptMap">FT_Prop_GlyphToScriptMap</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LANGUAGE_GROUP</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_Get_Advance">FT_Get_Advance</a></td><td><a href="ft2-auto_hinter.html#FT_Prop_IncreaseXHeight">FT_Prop_IncreaseXHeight</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_LEN_IV</a></td></tr>
+<tr><td><a href="ft2-quick_advance.html#FT_Get_Advances">FT_Get_Advances</a></td><td><a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_MIN_FEATURE</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Charset_ID">FT_Get_BDF_Charset_ID</a></td><td><a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NOTICE</a></td></tr>
+<tr><td><a href="ft2-bdf_fonts.html#FT_Get_BDF_Property">FT_Get_BDF_Property</a></td><td><a href="ft2-basic_types.html#FT_PtrDist">FT_PtrDist</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_BLUE_VALUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Char_Index">FT_Get_Char_Index</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_AA</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_CHAR_STRINGS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Charmap_Index">FT_Get_Charmap_Index</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_CLIP</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_BLUES</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_From_Glyph_Index">FT_Get_CID_From_Glyph_Index</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DEFAULT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_FAMILY_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Is_Internally_CID_Keyed">FT_Get_CID_Is_Internally_CID_Keyed</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-cid_fonts.html#FT_Get_CID_Registry_Ordering_Supplement">FT_Get_CID_Registry_Ordering_Supplement</a></td><td><a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_XXX</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_H</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td><td><a href="ft2-raster.html#FT_Raster">FT_Raster</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_STEM_SNAP_V</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="ft2-raster.html#FT_Raster_BitSet_Func">FT_Raster_BitSet_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_NUM_SUBRS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_First_Char">FT_Get_First_Char</a></td><td><a href="ft2-raster.html#FT_Raster_BitTest_Func">FT_Raster_BitTest_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_OTHER_BLUE</a></td></tr>
+<tr><td><a href="ft2-font_formats.html#FT_Get_Font_Format">FT_Get_Font_Format</a></td><td><a href="ft2-raster.html#FT_Raster_DoneFunc">FT_Raster_DoneFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PAINT_TYPE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_FSType_Flags">FT_Get_FSType_Flags</a></td><td><a href="ft2-raster.html#FT_Raster_Funcs">FT_Raster_Funcs</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_PASSWORD</a></td></tr>
+<tr><td><a href="ft2-gasp_table.html#FT_Get_Gasp">FT_Get_Gasp</a></td><td><a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_RND_STEM_UP</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Get_Glyph">FT_Get_Glyph</a></td><td><a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_HW</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a></td><td><a href="ft2-raster.html#FT_Raster_RenderFunc">FT_Raster_RenderFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STD_VW</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Kerning">FT_Get_Kerning</a></td><td><a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_H</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a></td><td><a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_STEM_SNAP_V</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="ft2-header_file_macros.html#FT_RENDER_H">FT_RENDER_H</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_SUBR</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Get_Module">FT_Get_Module</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_POSITION</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LCD_V</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNDERLINE_THICKNESS</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Name_Index">FT_Get_Name_Index</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_LIGHT</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_UNIQUE_ID</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Next_Char">FT_Get_Next_Char</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_MONO</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_VERSION</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Advance">FT_Get_PFR_Advance</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_RENDER_MODE_NORMAL</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_DICT_WEIGHT</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Kerning">FT_Get_PFR_Kerning</a></td><td><a href="ft2-system_interface.html#FT_Realloc_Func">FT_Realloc_Func</a></td><td><a href="ft2-type1_tables.html#PS_Dict_Keys">PS_Dict_Keys</a></td></tr>
+<tr><td><a href="ft2-pfr_fonts.html#FT_Get_PFR_Metrics">FT_Get_PFR_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Reference_Face">FT_Reference_Face</a></td><td><a href="ft2-type1_tables.html#PS_FontInfo">PS_FontInfo</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Postscript_Name">FT_Get_Postscript_Name</a></td><td><a href="ft2-module_management.html#FT_Reference_Library">FT_Reference_Library</a></td><td><a href="ft2-type1_tables.html#PS_FontInfoRec">PS_FontInfoRec</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Info">FT_Get_PS_Font_Info</a></td><td><a href="ft2-module_management.html#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="ft2-type1_tables.html#PS_Private">PS_Private</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Private">FT_Get_PS_Font_Private</a></td><td><a href="ft2-base_interface.html#FT_Render_Glyph">FT_Render_Glyph</a></td><td><a href="ft2-type1_tables.html#PS_PrivateRec">PS_PrivateRec</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Get_PS_Font_Value">FT_Get_PS_Font_Value</a></td><td><a href="ft2-base_interface.html#FT_Render_Mode">FT_Render_Mode</a></td><td><a href="ft2-cff_driver.html#random-seed">random-seed</a></td></tr>
+<tr><td><a href="ft2-module_management.html#FT_Get_Renderer">FT_Get_Renderer</a></td><td><a href="ft2-module_management.html#FT_Renderer">FT_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SCALE</a></td></tr>
+<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a></td><td><a href="ft2-module_management.html#FT_Renderer_Class">FT_Renderer_Class</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_SHIFT</a></td></tr>
+<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td><td><a href="ft2-base_interface.html#FT_Request_Size">FT_Request_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_BLUE_VALUES</a></td></tr>
+<tr><td><a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td><td><a href="ft2-computations.html#FT_RoundFix">FT_RoundFix</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_BLUES</a></td></tr>
+<tr><td><a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="ft2-base_interface.html#FT_Select_Charmap">FT_Select_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FAMILY_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_SubGlyph_Info">FT_Get_SubGlyph_Info</a></td><td><a href="ft2-base_interface.html#FT_Select_Size">FT_Select_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_FORCE_BOLD</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Get_Track_Kerning">FT_Get_Track_Kerning</a></td><td><a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_ITALIC_ANGLE</a></td></tr>
+<tr><td><a href="ft2-truetype_engine.html#FT_Get_TrueType_Engine_Type">FT_Get_TrueType_Engine_Type</a></td><td><a href="ft2-base_interface.html#FT_Set_Charmap">FT_Set_Charmap</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_OTHER_BLUES</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</a></td><td><a href="ft2-module_management.html#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_HEIGHT</a></td></tr>
+<tr><td><a href="ft2-multiple_masters.html#FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</a></td><td><a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STANDARD_WIDTH</a></td></tr>
+<tr><td><a href="ft2-winfnt_fonts.html#FT_Get_WinFNT_Header">FT_Get_WinFNT_Header</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_HEIGHTS</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_ATS_Name">FT_GetFile_From_Mac_ATS_Name</a></td><td><a href="ft2-multiple_masters.html#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_STEM_SNAP_WIDTHS</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFile_From_Mac_Name">FT_GetFile_From_Mac_Name</a></td><td><a href="ft2-base_interface.html#FT_Set_Pixel_Sizes">FT_Set_Pixel_Sizes</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_POSITION</a></td></tr>
+<tr><td><a href="ft2-mac_specific.html#FT_GetFilePath_From_Mac_ATS_Name">FT_GetFilePath_From_Mac_ATS_Name</a></td><td><a href="ft2-module_management.html#FT_Set_Renderer">FT_Set_Renderer</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_BLEND_UNDERLINE_THICKNESS</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_GRIDFIT</a></td><td><a href="ft2-base_interface.html#FT_Set_Transform">FT_Set_Transform</a></td><td><a href="ft2-type1_tables.html#T1_Blend_Flags">T1_Blend_Flags</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_PIXELS</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ARRAY</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_SUBPIXELS</a></td><td><a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_EXPERT</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_TRUNCATE</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HEAD</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_ISOLATIN1</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_GLYPH_BBOX_UNSCALED</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_HHEA</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_NONE</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_BITMAP</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_MAXP</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_ENCODING_TYPE_STANDARD</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_COMPOSITE</a></td><td><a href="ft2-header_file_macros.html#FT_SFNT_NAMES_H">FT_SFNT_NAMES_H</a></td><td><a href="ft2-type1_tables.html#T1_EncodingType">T1_EncodingType</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_NONE</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_OS2</a></td><td><a href="ft2-type1_tables.html#T1_FontInfo">T1_FontInfo</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_OUTLINE</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_PCLT</a></td><td><a href="ft2-type1_tables.html#T1_Private">T1_Private</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_GLYPH_FORMAT_PLOTTER</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_POST</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_CUSTOM</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GLYPH_H">FT_GLYPH_H</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_SFNT_VHEA</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_EXPERT</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph">FT_Glyph</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_LATIN_1</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_BBox_Mode">FT_Glyph_BBox_Mode</a></td><td><a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_STANDARD</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Copy">FT_Glyph_Copy</a></td><td><a href="ft2-sfnt_names.html#FT_SfntLangTag">FT_SfntLangTag</a></td><td><a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a></td><td><a href="ft2-sfnt_names.html#FT_SfntName">FT_SfntName</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_DEFAULT</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a></td><td><a href="ft2-basic_types.html#FT_Short">FT_Short</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_FULL_UNICODE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Glyph_Metrics">FT_Glyph_Metrics</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_BBOX</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_ISO_10646</a></td></tr>
+<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_CELL</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_1_1</a></td></tr>
+<tr><td><a href="ft2-glyph_stroker.html#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_NOMINAL</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_2_0</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_To_Bitmap">FT_Glyph_To_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_REAL_DIM</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_UNICODE_32</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_Glyph_Transform">FT_Glyph_Transform</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_SIZE_REQUEST_TYPE_SCALES</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_VARIANT_SELECTOR</a></td></tr>
+<tr><td><a href="ft2-glyph_management.html#FT_GlyphRec">FT_GlyphRec</a></td><td><a href="ft2-header_file_macros.html#FT_SIZES_H">FT_SIZES_H</a></td><td><a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_GlyphSlot">FT_GlyphSlot</a></td><td><a href="ft2-computations.html#FT_Sin">FT_Sin</a></td><td><a href="ft2-truetype_tables.html#TT_Header">TT_Header</a></td></tr>
+<tr><td><a href="ft2-bitmap_handling.html#FT_GlyphSlot_Own_Bitmap">FT_GlyphSlot_Own_Bitmap</a></td><td><a href="ft2-base_interface.html#FT_Size">FT_Size</a></td><td><a href="ft2-truetype_tables.html#TT_HoriHeader">TT_HoriHeader</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_GlyphSlotRec">FT_GlyphSlotRec</a></td><td><a href="ft2-base_interface.html#FT_Size_Internal">FT_Size_Internal</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_35</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GX_VALIDATE_H">FT_GX_VALIDATE_H</a></td><td><a href="ft2-base_interface.html#FT_Size_Metrics">FT_Size_Metrics</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_38</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_GZIP_H">FT_GZIP_H</a></td><td><a href="ft2-base_interface.html#FT_Size_Request">FT_Size_Request</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_40</a></td></tr>
+<tr><td><a href="ft2-gzip.html#FT_Gzip_Uncompress">FT_Gzip_Uncompress</a></td><td><a href="ft2-base_interface.html#FT_Size_Request_Type">FT_Size_Request_Type</a></td><td><a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_XXX">TT_INTERPRETER_VERSION_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_COLOR">FT_HAS_COLOR</a></td><td><a href="ft2-base_interface.html#FT_Size_RequestRec">FT_Size_RequestRec</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_10646</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_FAST_GLYPHS">FT_HAS_FAST_GLYPHS</a></td><td><a href="ft2-base_interface.html#FT_SizeRec">FT_SizeRec</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_7BIT_ASCII</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_FIXED_SIZES">FT_HAS_FIXED_SIZES</a></td><td><a href="ft2-base_interface.html#FT_Slot_Internal">FT_Slot_Internal</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_8859_1</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_GLYPH_NAMES">FT_HAS_GLYPH_NAMES</a></td><td><a href="ft2-raster.html#FT_Span">FT_Span</a></td><td><a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_HORIZONTAL">FT_HAS_HORIZONTAL</a></td><td><a href="ft2-raster.html#FT_SpanFunc">FT_SpanFunc</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_KERNING">FT_HAS_KERNING</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a></td><td><a href="ft2-truetype_tables.html#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_MULTIPLE_MASTERS">FT_HAS_MULTIPLE_MASTERS</a></td><td><a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a></td><td><a href="ft2-truetype_tables.html#TT_MaxProfile">TT_MaxProfile</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_HAS_VERTICAL">FT_HAS_VERTICAL</a></td><td><a href="ft2-header_file_macros.html#FT_STROKER_H">FT_STROKER_H</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_BIG_5</a></td></tr>
+<tr><td><a href="ft2-type1_tables.html#FT_Has_PS_Glyph_Names">FT_Has_PS_Glyph_Names</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_JOHAB</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_IMAGE_H">FT_IMAGE_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_PRC</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_IMAGE_TAG">FT_IMAGE_TAG</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SJIS</a></td></tr>
+<tr><td><a href="ft2-header_file_macros.html#FT_INCREMENTAL_H">FT_INCREMENTAL_H</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_SYMBOL_CS</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental">FT_Incremental</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UCS_4</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_FreeGlyphDataFunc">FT_Incremental_FreeGlyphDataFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_FIXED</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_UNICODE_CS</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_FuncsRec">FT_Incremental_FuncsRec</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER_VARIABLE</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_WANSUNG</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphDataFunc">FT_Incremental_GetGlyphDataFunc</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a></td><td><a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_GetGlyphMetricsFunc">FT_Incremental_GetGlyphMetricsFunc</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_BOLD</a></td><td><a href="ft2-truetype_tables.html#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_Interface">FT_Incremental_Interface</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_ITALIC</a></td><td><a href="ft2-truetype_tables.html#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_InterfaceRec">FT_Incremental_InterfaceRec</a></td><td><a href="ft2-base_interface.html#FT_STYLE_FLAG_XXX">FT_STYLE_FLAG_XXX</a></td><td><a href="ft2-truetype_tables.html#TT_OS2">TT_OS2</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_Metrics">FT_Incremental_Metrics</a></td><td><a href="ft2-system_interface.html#FT_Stream">FT_Stream</a></td><td><a href="ft2-truetype_tables.html#TT_PCLT">TT_PCLT</a></td></tr>
+<tr><td><a href="ft2-incremental.html#FT_Incremental_MetricsRec">FT_Incremental_MetricsRec</a></td><td><a href="ft2-system_interface.html#FT_Stream_CloseFunc">FT_Stream_CloseFunc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ADOBE</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a></td><td><a href="ft2-system_interface.html#FT_Stream_IoFunc">FT_Stream_IoFunc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int">FT_Int</a></td><td><a href="ft2-bzip2.html#FT_Stream_OpenBzip2">FT_Stream_OpenBzip2</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_CUSTOM</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int16">FT_Int16</a></td><td><a href="ft2-gzip.html#FT_Stream_OpenGzip">FT_Stream_OpenGzip</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_ISO</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int32">FT_Int32</a></td><td><a href="ft2-lzw.html#FT_Stream_OpenLZW">FT_Stream_OpenLZW</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a></td></tr>
+<tr><td><a href="ft2-basic_types.html#FT_Int64">FT_Int64</a></td><td><a href="ft2-system_interface.html#FT_StreamDesc">FT_StreamDesc</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_CID_KEYED">FT_IS_CID_KEYED</a></td><td><a href="ft2-system_interface.html#FT_StreamRec">FT_StreamRec</a></td><td><a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_FIXED_WIDTH">FT_IS_FIXED_WIDTH</a></td><td><a href="ft2-basic_types.html#FT_String">FT_String</a></td><td><a href="ft2-truetype_tables.html#TT_Postscript">TT_Postscript</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_NAMED_INSTANCE">FT_IS_NAMED_INSTANCE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a></td><td><a href="ft2-truetype_tables.html#TT_UCR_XXX">TT_UCR_XXX</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_SCALABLE">FT_IS_SCALABLE</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td><a href="ft2-truetype_tables.html#TT_VertHeader">TT_VertHeader</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_SFNT">FT_IS_SFNT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td><td><a href="ft2-auto_hinter.html#warping">warping</a></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_IS_TRICKY">FT_IS_TRICKY</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td><td></td></tr>
+<tr><td><a href="ft2-base_interface.html#FT_Kerning_Mode">FT_KERNING_DEFAULT</a></td><td><a href="ft2-glyph_stroker.html#FT_Stroker_Done">FT_Stroker_Done</a></td><td></td></tr>
 </table>
 <hr>
 <table class="index-toc-link"><tr><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
 
-<div class="timestamp">generated on Tue Jul 12 07:28:23 2016</div></body>
+<div class="timestamp">generated on Sat May 13 12:45:59 2017</div></body>
 </html>
index 764c0b0..c82fec4 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="lcd_filtering">LCD Filtering</h1>
 <h2>Synopsis</h2>
 <table class="synopsis">
 <tr><td><a href="#FT_LcdFilter">FT_LcdFilter</a></td><td><a href="#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a></td></tr>
-<tr><td><a href="#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td></td></tr>
+<tr><td><a href="#FT_Library_SetLcdFilter">FT_Library_SetLcdFilter</a></td><td><a href="#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a></td></tr>
 </table>
 
 
 
 <h4>note</h4>
 <p>Due to <b>PATENTS</b> covering subpixel rendering, this function doesn't do anything except returning &lsquo;FT_Err_Unimplemented_Feature&rsquo; if the configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined in your build of the library, which should correspond to all default builds of FreeType.</p>
+<p>LCD filter weights can also be set per face using <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> with <a href="ft2-lcd_filtering.html#FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</a>.</p>
 
 <h4>since</h4>
 <p>2.4.0</p>
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
+<div class="section">
+<h3 id="FT_PARAM_TAG_LCD_FILTER_WEIGHTS">FT_PARAM_TAG_LCD_FILTER_WEIGHTS</h3>
+<p>Defined in FT_LCD_FILTER_H (freetype/ftlcdfil.h).</p>
+<pre>
+#define <b>FT_PARAM_TAG_LCD_FILTER_WEIGHTS</b> \
+          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'l', 'c', 'd', 'f' )
+
+
+  /*
+   * @type:
+   *   FT_LcdFiveTapFilter
+   *
+   * @description:
+   *   A <span class="keyword">typedef</span> for passing the five LCD filter weights to
+   *   @<a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a> within an @<a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structure.
+   *
+   */
+#define FT_LCD_FILTER_FIVE_TAPS  5
+
+  <span class="keyword">typedef</span> <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>  FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];
+</pre>
+
+<p>An <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> tag to be used with <a href="ft2-base_interface.html#FT_Face_Properties">FT_Face_Properties</a>. The corresponding argument specifies the five LCD filter weights for a given face (if using <a href="ft2-base_interface.html#FT_LOAD_TARGET_XXX">FT_LOAD_TARGET_LCD</a>, for example), overriding the global default values or the values set up with <a href="ft2-lcd_filtering.html#FT_Library_SetLcdFilterWeights">FT_Library_SetLcdFilterWeights</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
 </body>
 </html>
index 9b74e3b..35a7a93 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="list_processing">List Processing</h1>
 <h2>Synopsis</h2>
index 7e7a8d3..1bf99d8 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="lzw">LZW Streams</h1>
 <h2>Synopsis</h2>
index 1750061..b669c68 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="mac_specific">Mac Specific Interface</h1>
 <h2>Synopsis</h2>
index 1ee45c9..ec16f12 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="module_management">Module Management</h1>
 <h2>Synopsis</h2>
 <table class="synopsis">
-<tr><td><a href="#FT_Module">FT_Module</a></td><td><a href="#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="#FT_Renderer">FT_Renderer</a></td></tr>
-<tr><td><a href="#FT_Module_Constructor">FT_Module_Constructor</a></td><td>&nbsp;</td><td><a href="#FT_Renderer_Class">FT_Renderer_Class</a></td></tr>
-<tr><td><a href="#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="#FT_Property_Set">FT_Property_Set</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="#FT_Property_Get">FT_Property_Get</a></td><td><a href="#FT_Get_Renderer">FT_Get_Renderer</a></td></tr>
-<tr><td><a href="#FT_Module_Class">FT_Module_Class</a></td><td>&nbsp;</td><td><a href="#FT_Set_Renderer">FT_Set_Renderer</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#FT_New_Library">FT_New_Library</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_Add_Module">FT_Add_Module</a></td><td><a href="#FT_Done_Library">FT_Done_Library</a></td><td><a href="#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td></tr>
-<tr><td><a href="#FT_Get_Module">FT_Get_Module</a></td><td><a href="#FT_Reference_Library">FT_Reference_Library</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#FT_Remove_Module">FT_Remove_Module</a></td><td>&nbsp;</td><td><a href="#FT_Driver">FT_Driver</a></td></tr>
+<tr><td><a href="#FT_Module">FT_Module</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Module_Constructor">FT_Module_Constructor</a></td><td><a href="#FT_New_Library">FT_New_Library</a></td></tr>
+<tr><td><a href="#FT_Module_Destructor">FT_Module_Destructor</a></td><td><a href="#FT_Done_Library">FT_Done_Library</a></td></tr>
+<tr><td><a href="#FT_Module_Requester">FT_Module_Requester</a></td><td><a href="#FT_Reference_Library">FT_Reference_Library</a></td></tr>
+<tr><td><a href="#FT_Module_Class">FT_Module_Class</a></td><td>&nbsp;</td></tr>
+<tr><td>&nbsp;</td><td><a href="#FT_Renderer">FT_Renderer</a></td></tr>
+<tr><td><a href="#FT_Add_Module">FT_Add_Module</a></td><td><a href="#FT_Renderer_Class">FT_Renderer_Class</a></td></tr>
+<tr><td><a href="#FT_Get_Module">FT_Get_Module</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Remove_Module">FT_Remove_Module</a></td><td><a href="#FT_Get_Renderer">FT_Get_Renderer</a></td></tr>
+<tr><td><a href="#FT_Add_Default_Modules">FT_Add_Default_Modules</a></td><td><a href="#FT_Set_Renderer">FT_Set_Renderer</a></td></tr>
+<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Property_Set">FT_Property_Set</a></td><td><a href="#FT_Set_Debug_Hook">FT_Set_Debug_Hook</a></td></tr>
+<tr><td><a href="#FT_Property_Get">FT_Property_Get</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#FT_Set_Default_Properties">FT_Set_Default_Properties</a></td><td><a href="#FT_Driver">FT_Driver</a></td></tr>
 </table>
 
 
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_ModuleRec_*  <b>FT_Module</b>;
 </pre>
 
-<p>A handle to a given FreeType module object. Each module can be a font driver, a renderer, or anything else that provides services to the formers.</p>
+<p>A handle to a given FreeType module object. A module can be a font driver, a renderer, or anything else that provides services to the former.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <div class="section">
+<h3 id="FT_Set_Default_Properties">FT_Set_Default_Properties</h3>
+<p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
+<pre>
+  FT_EXPORT( <span class="keyword">void</span> )
+  <b>FT_Set_Default_Properties</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library );
+</pre>
+
+<p>If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is set, this function reads the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable to control driver properties. See sections &lsquo;<a href="ft2-auto_hinter.html#auto_hinter">The auto-hinter</a>&rsquo;, &lsquo;<a href="ft2-cff_driver.html#cff_driver">The CFF driver</a>&rsquo;, &lsquo;<a href="ft2-pcf_driver.html#pcf_driver">The PCF driver</a>&rsquo;, and &lsquo;<a href="ft2-tt_driver.html#tt_driver">The TrueType driver</a>&rsquo; for more.</p>
+<p>If the compilation option is not set, this function does nothing.</p>
+<p>&lsquo;FREETYPE_PROPERTIES&rsquo; has the following syntax form (broken here into multiple lines for better readability).</p>
+<pre class="colored">
+  &lt;optional whitespace&gt;
+</pre>
+
+<h4>module-name1</h4>
+<p>':'</p>
+
+<h4>property-name1</h4>
+<p>'=' &lt;property-value1&gt;</p>
+
+<h4>module-name2</h4>
+<p>':'</p>
+
+<h4>property-name2</h4>
+<p>'=' &lt;property-value2&gt; ... }</p>
+<p>Example:</p>
+<pre class="colored">
+  FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
+                      cff:no-stem-darkening=1 \
+                      autofitter:warping=1
+</pre>
+
+<h4>inout</h4>
+<table class="fields">
+<tr><td class="val" id="library">library</td><td class="desc">
+<p>A handle to a new library object.</p>
+</td></tr>
+</table>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
 <h3 id="FT_New_Library">FT_New_Library</h3>
 <p>Defined in FT_MODULE_H (freetype/ftmodapi.h).</p>
 <pre>
 </pre>
 
 <p>This function is used to create a new FreeType library instance from a given memory object. It is thus possible to use libraries with distinct memory allocators within the same program. Note, however, that the used <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> structure is expected to remain valid for the life of the <a href="ft2-base_interface.html#FT_Library">FT_Library</a> object.</p>
-<p>Normally, you would call this function (followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>) instead of <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a> to initialize the FreeType library.</p>
+<p>Normally, you would call this function (followed by a call to <a href="ft2-module_management.html#FT_Add_Default_Modules">FT_Add_Default_Modules</a> or a series of calls to <a href="ft2-module_management.html#FT_Add_Module">FT_Add_Module</a>, and a call to <a href="ft2-module_management.html#FT_Set_Default_Properties">FT_Set_Default_Properties</a>) instead of <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a> to initialize the FreeType library.</p>
 <p>Don't use <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a> but <a href="ft2-module_management.html#FT_Done_Library">FT_Done_Library</a> to destroy a library instance.</p>
 
 <h4>input</h4>
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_RendererRec_*  <b>FT_Renderer</b>;
 </pre>
 
-<p>A handle to a given FreeType renderer. A renderer is a special module in charge of converting a glyph image to a bitmap, when necessary. Each renderer supports a given glyph image format, and one or more target surface depths.</p>
+<p>A handle to a given FreeType renderer. A renderer is a module in charge of converting a glyph's outline image to a bitmap. It supports a single glyph image format, and one or more target surface depths.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_DriverRec_*  <b>FT_Driver</b>;
 </pre>
 
-<p>A handle to a given FreeType font driver object. Each font driver is a special module capable of creating faces from font files.</p>
+<p>A handle to a given FreeType font driver object. A font driver is a module capable of creating faces from font files.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
index 9085e8d..2a69f91 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="multiple_masters">Multiple Masters</h1>
 <h2>Synopsis</h2>
 <table class="synopsis">
-<tr><td><a href="#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="#FT_Get_MM_Var">FT_Get_MM_Var</a></td></tr>
-<tr><td><a href="#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td></tr>
-<tr><td><a href="#FT_Var_Axis">FT_Var_Axis</a></td><td><a href="#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td></tr>
+<tr><td><a href="#FT_MM_Axis">FT_MM_Axis</a></td><td><a href="#FT_Set_MM_Design_Coordinates">FT_Set_MM_Design_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Multi_Master">FT_Multi_Master</a></td><td><a href="#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Var_Axis">FT_Var_Axis</a></td><td><a href="#FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</a></td></tr>
 <tr><td><a href="#FT_Var_Named_Style">FT_Var_Named_Style</a></td><td><a href="#FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</a></td></tr>
-<tr><td><a href="#FT_MM_Var">FT_MM_Var</a></td><td><a href="#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td></tr>
-<tr><td><a href="#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td></td></tr>
+<tr><td><a href="#FT_MM_Var">FT_MM_Var</a></td><td><a href="#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Get_Multi_Master">FT_Get_Multi_Master</a></td><td><a href="#FT_Set_Var_Blend_Coordinates">FT_Set_Var_Blend_Coordinates</a></td></tr>
+<tr><td><a href="#FT_Get_MM_Var">FT_Get_MM_Var</a></td><td><a href="#FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</a></td></tr>
 </table>
 
 
 <p>The following types and functions are used to manage Multiple Master fonts, i.e., the selection of specific design instances by setting design axis coordinates.</p>
-<p>George Williams has extended this interface to make it work with both Type&nbsp;1 Multiple Masters fonts and GX distortable (var) fonts. Some of these routines only work with MM fonts, others will work with both types. They are similar enough that a consistent interface makes sense.</p>
+<p>Besides Adobe MM fonts, the interface supports Apple's TrueType GX and OpenType variation fonts. Some of the routines only work with Adobe MM fonts, others will work with all three types. They are similar enough that a consistent interface makes sense.</p>
 
 <div class="section">
 <h3 id="FT_MM_Axis">FT_MM_Axis</h3>
   } <b>FT_MM_Axis</b>;
 </pre>
 
-<p>A simple structure used to model a given axis in design space for Multiple Masters fonts.</p>
-<p>This structure can't be used for GX var fonts.</p>
+<p>A structure to model a given axis in design space for Multiple Masters fonts.</p>
+<p>This structure can't be used for TrueType GX or OpenType variation fonts.</p>
 
 <h4>fields</h4>
 <table class="fields">
   } <b>FT_Multi_Master</b>;
 </pre>
 
-<p>A structure used to model the axes and space of a Multiple Masters font.</p>
-<p>This structure can't be used for GX var fonts.</p>
+<p>A structure to model the axes and space of a Multiple Masters font.</p>
+<p>This structure can't be used for TrueType GX or OpenType variation fonts.</p>
 
 <h4>fields</h4>
 <table class="fields">
   } <b>FT_Var_Axis</b>;
 </pre>
 
-<p>A simple structure used to model a given axis in design space for Multiple Masters and GX var fonts.</p>
+<p>A structure to model a given axis in design space for Multiple Masters, TrueType GX, and OpenType variation fonts.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <tr><td class="val" id="name">name</td><td class="desc">
-<p>The axis's name. Not always meaningful for GX.</p>
+<p>The axis's name. Not always meaningful for TrueType GX or OpenType variation fonts.</p>
 </td></tr>
 <tr><td class="val" id="minimum">minimum</td><td class="desc">
 <p>The axis's minimum design coordinate.</p>
 </td></tr>
 <tr><td class="val" id="def">def</td><td class="desc">
-<p>The axis's default design coordinate. FreeType computes meaningful default values for MM; it is then an integer value, not in 16.16 format.</p>
+<p>The axis's default design coordinate. FreeType computes meaningful default values for Adobe MM fonts.</p>
 </td></tr>
 <tr><td class="val" id="maximum">maximum</td><td class="desc">
 <p>The axis's maximum design coordinate.</p>
 </td></tr>
 <tr><td class="val" id="tag">tag</td><td class="desc">
-<p>The axis's tag (the GX equivalent to &lsquo;name&rsquo;). FreeType provides default values for MM if possible.</p>
+<p>The axis's tag (the equivalent to &lsquo;name&rsquo; for TrueType GX and OpenType variation fonts). FreeType provides default values for Adobe MM fonts if possible.</p>
 </td></tr>
 <tr><td class="val" id="strid">strid</td><td class="desc">
-<p>The entry in &lsquo;name&rsquo; table (another GX version of &lsquo;name&rsquo;). Not meaningful for MM.</p>
+<p>The axis name entry in the font's &lsquo;name&rsquo; table. This is another (and often better) version of the &lsquo;name&rsquo; field for TrueType GX or OpenType variation fonts. Not meaningful for Adobe MM fonts.</p>
 </td></tr>
 </table>
 
+<h4>note</h4>
+<p>The fields &lsquo;minimum&rsquo;, &lsquo;def&rsquo;, and &lsquo;maximum&rsquo; are 16.16 fractional values for TrueType GX and OpenType variation fonts. For Adobe MM fonts, the values are integers.</p>
+
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
   {
     <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords;
     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    strid;
+    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    psid;   /* since 2.7.1 */
 
   } <b>FT_Var_Named_Style</b>;
 </pre>
 
-<p>A simple structure used to model a named style in a GX var font.</p>
-<p>This structure can't be used for MM fonts.</p>
+<p>A structure to model a named instance in a TrueType GX or OpenType variation font.</p>
+<p>This structure can't be used for Adobe MM fonts.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <tr><td class="val" id="coords">coords</td><td class="desc">
-<p>The design coordinates for this style. This is an array with one entry for each axis.</p>
+<p>The design coordinates for this instance. This is an array with one entry for each axis.</p>
 </td></tr>
 <tr><td class="val" id="strid">strid</td><td class="desc">
-<p>The entry in &lsquo;name&rsquo; table identifying this style.</p>
+<p>The entry in &lsquo;name&rsquo; table identifying this instance.</p>
+</td></tr>
+<tr><td class="val" id="psid">psid</td><td class="desc">
+<p>The entry in &lsquo;name&rsquo; table identifying a PostScript name for this instance.</p>
 </td></tr>
 </table>
 
   } <b>FT_MM_Var</b>;
 </pre>
 
-<p>A structure used to model the axes and space of a Multiple Masters or GX var distortable font.</p>
-<p>Some fields are specific to one format and not to the other.</p>
+<p>A structure to model the axes and space of a Adobe MM, TrueType GX, or OpenType variation font.</p>
+<p>Some fields are specific to one format and not to the others.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <tr><td class="val" id="num_axis">num_axis</td><td class="desc">
-<p>The number of axes. The maximum value is&nbsp;4 for MM; no limit in GX.</p>
+<p>The number of axes. The maximum value is&nbsp;4 for Adobe MM fonts; no limit in TrueType GX or OpenType variation fonts.</p>
 </td></tr>
 <tr><td class="val" id="num_designs">num_designs</td><td class="desc">
-<p>The number of designs; should be normally 2^num_axis for MM fonts. Not meaningful for GX (where every glyph could have a different number of designs).</p>
+<p>The number of designs; should be normally 2^num_axis for Adobe MM fonts. Not meaningful for TrueType GX or OpenType variation fonts (where every glyph could have a different number of designs).</p>
 </td></tr>
 <tr><td class="val" id="num_namedstyles">num_namedstyles</td><td class="desc">
-<p>The number of named styles; only meaningful for GX that allows certain design coordinates to have a string ID (in the &lsquo;name&rsquo; table) associated with them. The font can tell the user that, for example, Weight=1.5 is &lsquo;Bold&rsquo;.</p>
+<p>The number of named styles; a &lsquo;named style&rsquo; is a tuple of design coordinates that has a string ID (in the &lsquo;name&rsquo; table) associated with it. The font can tell the user that, for example, [Weight=1.5,Width=1.1] is &lsquo;Bold&rsquo;. Another name for &lsquo;named style&rsquo; is &lsquo;named instance&rsquo;.</p>
+<p>For Adobe Multiple Masters fonts, this value is always zero because the format does not support named styles.</p>
 </td></tr>
 <tr><td class="val" id="axis">axis</td><td class="desc">
-<p>An axis descriptor table. GX fonts contain slightly more data than MM. Memory management of this pointer is done internally by FreeType.</p>
+<p>An axis descriptor table. TrueType GX and OpenType variation fonts contain slightly more data than Adobe MM fonts. Memory management of this pointer is done internally by FreeType.</p>
 </td></tr>
 <tr><td class="val" id="namedstyle">namedstyle</td><td class="desc">
-<p>A named style table. Only meaningful with GX. Memory management of this pointer is done internally by FreeType.</p>
+<p>A named style (instance) table. Only meaningful for TrueType GX and OpenType variation fonts. Memory management of this pointer is done internally by FreeType.</p>
 </td></tr>
 </table>
 
                        <a href="ft2-multiple_masters.html#FT_Multi_Master">FT_Multi_Master</a>  *amaster );
 </pre>
 
-<p>Retrieve the Multiple Master descriptor of a given font.</p>
-<p>This function can't be used with GX fonts.</p>
+<p>Retrieve a variation descriptor of a given Adobe MM font.</p>
+<p>This function can't be used with TrueType GX or OpenType variation fonts.</p>
 
 <h4>input</h4>
 <table class="fields">
                  <a href="ft2-multiple_masters.html#FT_MM_Var">FT_MM_Var</a>*  *amaster );
 </pre>
 
-<p>Retrieve the Multiple Master/GX var descriptor of a given font.</p>
+<p>Retrieve a variation descriptor for a given font.</p>
+<p>This function works with all supported variation formats.</p>
 
 <h4>input</h4>
 <table class="fields">
 <h4>output</h4>
 <table class="fields">
 <tr><td class="val" id="amaster">amaster</td><td class="desc">
-<p>The Multiple Masters/GX var descriptor. Allocates a data structure, which the user must deallocate with &lsquo;free&rsquo; after use.</p>
+<p>The variation descriptor. Allocates a data structure, which the user must deallocate with &lsquo;free&rsquo; after use.</p>
 </td></tr>
 </table>
 
                                 <a href="ft2-basic_types.html#FT_Long">FT_Long</a>*  coords );
 </pre>
 
-<p>For Multiple Masters fonts, choose an interpolated font design through design coordinates.</p>
-<p>This function can't be used with GX fonts.</p>
+<p>For Adobe MM fonts, choose an interpolated font design through design coordinates.</p>
+<p>This function can't be used with TrueType GX or OpenType variation fonts.</p>
 
 <h4>inout</h4>
 <table class="fields">
                                  <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
 </pre>
 
-<p>For Multiple Master or GX Var fonts, choose an interpolated font design through design coordinates.</p>
+<p>Choose an interpolated font design through design coordinates.</p>
+<p>This function works with all supported variation formats.</p>
 
 <h4>inout</h4>
 <table class="fields">
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <div class="section">
+<h3 id="FT_Get_Var_Design_Coordinates">FT_Get_Var_Design_Coordinates</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
+<pre>
+  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+  <b>FT_Get_Var_Design_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
+                                 <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
+                                 <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
+</pre>
+
+<p>Get the design coordinates of the currently selected interpolated font.</p>
+<p>This function works with all supported variation formats.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face.</p>
+</td></tr>
+<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
+<p>The number of design coordinates to retrieve. If it is larger than the number of axes, set the excess values to&nbsp;0.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="coords">coords</td><td class="desc">
+<p>The design coordinates array.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
 <h3 id="FT_Set_MM_Blend_Coordinates">FT_Set_MM_Blend_Coordinates</h3>
 <p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
 <pre>
                                <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
 </pre>
 
-<p>For Multiple Masters and GX var fonts, choose an interpolated font design through normalized blend coordinates.</p>
+<p>Choose an interpolated font design through normalized blend coordinates.</p>
+<p>This function works with all supported variation formats.</p>
 
 <h4>inout</h4>
 <table class="fields">
 <p>The number of available design coordinates. If it is larger than the number of axes, ignore the excess values. If it is smaller than the number of axes, use default values for the remaining axes.</p>
 </td></tr>
 <tr><td class="val" id="coords">coords</td><td class="desc">
-<p>The design coordinates array (each element must be between 0 and 1.0).</p>
+<p>The design coordinates array (each element must be between 0 and 1.0 for Adobe MM fonts, and between -1.0 and 1.0 for TrueType GX and OpenType variation fonts).</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
+<pre>
+  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+  <b>FT_Get_MM_Blend_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
+                               <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
+                               <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
+</pre>
+
+<p>Get the normalized blend coordinates of the currently selected interpolated font.</p>
+<p>This function works with all supported variation formats.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face.</p>
+</td></tr>
+<tr><td class="val" id="num_coords">num_coords</td><td class="desc">
+<p>The number of normalized blend coordinates to retrieve. If it is larger than the number of axes, set the excess values to&nbsp;0.5 for Adobe MM fonts, and to&nbsp;0 for TrueType GX and OpenType variation fonts.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="coords">coords</td><td class="desc">
+<p>The normalized blend coordinates array.</p>
 </td></tr>
 </table>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
+<div class="section">
+<h3 id="FT_Get_Var_Blend_Coordinates">FT_Get_Var_Blend_Coordinates</h3>
+<p>Defined in FT_MULTIPLE_MASTERS_H (freetype/ftmm.h).</p>
+<pre>
+  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+  <b>FT_Get_Var_Blend_Coordinates</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>    face,
+                                <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    num_coords,
+                                <a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a>*  coords );
+</pre>
+
+<p>This is another name of <a href="ft2-multiple_masters.html#FT_Get_MM_Blend_Coordinates">FT_Get_MM_Blend_Coordinates</a>.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
 </body>
 </html>
index 33a3c4c..d1e4f92 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="ot_validation">OpenType Validation</h1>
 <h2>Synopsis</h2>
index 059c65c..8b9dc3d 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="outline_processing">Outline Processing</h1>
 <h2>Synopsis</h2>
 <h4>return</h4>
 <p>FreeType error code. 0&nbsp;means success.</p>
 
+<h4>note</h4>
+<p>An empty outline, or an outline with a single point only is also valid.</p>
+
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 
 <h4>note</h4>
 <p>A contour that contains a single point only is represented by a &lsquo;move to&rsquo; operation followed by &lsquo;line to&rsquo; to the same point. In most cases, it is best to filter this out before using the outline for stroking purposes (otherwise it would result in a visible dot when round caps are used).</p>
+<p>Similarly, the function returns success for an empty outline also (doing nothing, this is, not calling any emitter); if necessary, you should filter this out, too.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple:</p>
 <pre class="colored">
   x' = (x &lt;&lt; shift) - delta
-  y' = (x &lt;&lt; shift) - delta
+  y' = (y &lt;&lt; shift) - delta
 </pre>
 <p>Set the values of &lsquo;shift&rsquo; and &lsquo;delta&rsquo; to&nbsp;0 to get the original point coordinates.</p>
 
diff --git a/docs/reference/ft2-pcf_driver.html b/docs/reference/ft2-pcf_driver.html
new file mode 100644 (file)
index 0000000..31008bc
--- /dev/null
@@ -0,0 +1,151 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>FreeType-2.8 API Reference</title>
+<style type="text/css">
+  a:link { color: #0000EF; }
+  a:visited { color: #51188E; }
+  a:hover { color: #FF0000; }
+
+  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+         color: #000000;
+         background: #FFFFFF;
+         width: 87%;
+         margin: auto; }
+
+  div.section { width: 75%;
+                margin: auto; }
+  div.section hr { margin: 4ex 0 1ex 0; }
+  div.section h4 { background-color: #EEEEFF;
+                   font-size: medium;
+                   font-style: oblique;
+                   font-weight: bold;
+                   margin: 3ex 0 1.5ex 9%;
+                   padding: 0.3ex 0 0.3ex 1%; }
+  div.section p { margin: 1.5ex 0 1.5ex 10%; }
+  div.section pre { margin: 3ex 0 3ex 9%;
+                    background-color: #D6E8FF;
+                    padding: 2ex 0 2ex 1%; }
+  div.section table.fields { width: 90%;
+                             margin: 1.5ex 0 1.5ex 10%; }
+  div.section table.toc { width: 95%;
+                          margin: 1.5ex 0 1.5ex 5%; }
+  div.timestamp { text-align: center;
+                  font-size: 69%;
+                  margin: 1.5ex 0 1.5ex 0; }
+
+  h1 { text-align: center; }
+  h3 { font-size: medium;
+       margin: 4ex 0 1.5ex 0; }
+
+  p { text-align: justify; }
+
+  pre.colored { color: blue; }
+
+  span.keyword { font-family: monospace;
+                 text-align: left;
+                 white-space: pre;
+                 color: darkblue; }
+
+  table.fields td.val { font-weight: bold;
+                        text-align: right;
+                        width: 30%;
+                        vertical-align: baseline;
+                        padding: 1ex 1em 1ex 0; }
+  table.fields td.desc { vertical-align: baseline;
+                         padding: 1ex 0 1ex 1em; }
+  table.fields td.desc p:first-child { margin: 0; }
+  table.fields td.desc p { margin: 1.5ex 0 0 0; }
+  table.index { margin: 6ex auto 6ex auto;
+                border: 0;
+                border-collapse: separate;
+                border-spacing: 1em 0.3ex; }
+  table.index tr { padding: 0; }
+  table.index td { padding: 0; }
+  table.index-toc-link { width: 100%;
+                         border: 0;
+                         border-spacing: 0;
+                         margin: 1ex 0 1ex 0; }
+  table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+                                 font-size: 83%;
+                                 text-align: left; }
+  table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
+                                   font-size: 83%;
+                                   text-align: center; }
+  table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+                                  font-size: 83%;
+                                  text-align: right; }
+  table.synopsis { margin: 6ex auto 6ex auto;
+                   border: 0;
+                   border-collapse: separate;
+                   border-spacing: 2em 0.6ex; }
+  table.synopsis tr { padding: 0; }
+  table.synopsis td { padding: 0; }
+  table.toc td.link { width: 30%;
+                      text-align: right;
+                      vertical-align: baseline;
+                      padding: 1ex 1em 1ex 0; }
+  table.toc td.desc { vertical-align: baseline;
+                      padding: 1ex 0 1ex 1em;
+                      text-align: left; }
+  table.toc td.desc p:first-child { margin: 0;
+                                    text-align: left; }
+  table.toc td.desc p { margin: 1.5ex 0 0 0;
+                        text-align: left; }
+
+</style>
+</head>
+<body>
+
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
+<h1>FreeType-2.8 API Reference</h1>
+
+<h1 id="pcf_driver">The PCF driver</h1>
+<h2>Synopsis</h2>
+<table class="synopsis">
+<tr><td><a href="#no-long-family-names">no-long-family-names</a></td><td></td><td></td></tr>
+</table>
+
+
+<p>While FreeType's PCF driver doesn't expose API functions by itself, it is possible to control its behaviour with <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a> and <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a>. Right now, there is a single property &lsquo;no-long-family-names&rsquo; available if FreeType is compiled with PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.</p>
+<p>The PCF driver's module name is &lsquo;pcf&rsquo;.</p>
+
+<div class="section">
+<h3 id="no-long-family-names">no-long-family-names</h3>
+<p>Defined in FT_PCF_DRIVER_H (freetype/ftpcfdrv.h).</p>
+<pre>
+FT_END_HEADER
+
+
+#endif /* FTPCFDRV_H_ */
+
+
+/* END */
+</pre>
+
+<p>If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling FreeType, the PCF driver constructs long family names.</p>
+<p>There are many PCF fonts just called &lsquo;Fixed&rsquo; which look completely different, and which have nothing to do with each other. When selecting &lsquo;Fixed&rsquo; in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are &lsquo;wide&rsquo; characters; all put together, family names like &lsquo;Sony Fixed&rsquo; or &lsquo;Misc Fixed Wide&rsquo; are constructed.</p>
+<p>If &lsquo;no-long-family-names&rsquo; is set, this feature gets switched off.</p>
+<pre class="colored">
+  FT_Library  library;
+  FT_Bool     no_long_family_names = TRUE;
+
+
+  FT_Init_FreeType( &amp;library );
+
+  FT_Property_Set( library, "pcf",
+                            "no-long-family-names",
+                            &amp;no_long_family_names );
+</pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+</body>
+</html>
index 26aff21..36f2f8e 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="pfr_fonts">PFR Fonts</h1>
 <h2>Synopsis</h2>
index 308f033..81b051d 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="quick_advance">Quick retrieval of advance values</h1>
 <h2>Synopsis</h2>
index f938c2c..929c5db 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="raster">Scanline Converter</h1>
 <h2>Synopsis</h2>
 <h4>note</h4>
 <p>This callback allows client applications to directly render the gray spans of the anti-aliased bitmap to any kind of surfaces.</p>
 <p>This can be used to write anti-aliased outlines directly to a given background bitmap, and even perform translucency.</p>
-<p>Note that the &lsquo;count&rsquo; field cannot be greater than a fixed value defined by the &lsquo;FT_MAX_GRAY_SPANS&rsquo; configuration macro in &lsquo;ftoption.h&rsquo;. By default, this value is set to&nbsp;32, which means that if there are more than 32&nbsp;spans on a given scanline, the callback is called several times with the same &lsquo;y&rsquo; parameter in order to draw all callbacks.</p>
-<p>Otherwise, the callback is only called once per scan-line, and only for those scanlines that do have &lsquo;gray&rsquo; pixels on them.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Raster_Funcs_
   {
     <a href="ft2-basic_types.html#FT_Glyph_Format">FT_Glyph_Format</a>        glyph_format;
+
     <a href="ft2-raster.html#FT_Raster_NewFunc">FT_Raster_NewFunc</a>      raster_new;
     <a href="ft2-raster.html#FT_Raster_ResetFunc">FT_Raster_ResetFunc</a>    raster_reset;
     <a href="ft2-raster.html#FT_Raster_SetModeFunc">FT_Raster_SetModeFunc</a>  raster_set_mode;
index 33f645a..97548e1 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="sfnt_names">SFNT Names</h1>
 <h2>Synopsis</h2>
 <tr><td><a href="#FT_SfntName">FT_SfntName</a></td></tr>
 <tr><td><a href="#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a></td></tr>
 <tr><td><a href="#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a></td></tr>
-<tr><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</a></td></tr>
-<tr><td><a href="#FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</a></td></tr>
+<tr><td><a href="#FT_SfntLangTag">FT_SfntLangTag</a></td></tr>
+<tr><td><a href="#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</a></td></tr>
+<tr><td><a href="#FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</a></td></tr>
 </table>
 
 
-<p>The TrueType and OpenType specifications allow the inclusion of a special &lsquo;names table&rsquo; in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p>
+<p>The TrueType and OpenType specifications allow the inclusion of a special names table (&lsquo;name&rsquo;) in font files. This table contains textual (and internationalized) information regarding the font, like family name, copyright, version, etc.</p>
 <p>The definitions below are used to access them if available.</p>
 <p>Note that this has nothing to do with glyph names!</p>
 
     <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  name_id;
 
     <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*   string;      /* this string is *not* null-terminated! */
-    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    string_len;  /* in bytes */
+    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>    string_len;  /* in bytes                              */
 
   } <b>FT_SfntName</b>;
 </pre>
 <h4>fields</h4>
 <table class="fields">
 <tr><td class="val" id="platform_id">platform_id</td><td class="desc">
-<p>The platform ID for &lsquo;string&rsquo;.</p>
+<p>The platform ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a> for possible values.</p>
 </td></tr>
 <tr><td class="val" id="encoding_id">encoding_id</td><td class="desc">
-<p>The encoding ID for &lsquo;string&rsquo;.</p>
+<p>The encoding ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a>, and <a href="ft2-truetype_tables.html#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a> for possible values.</p>
 </td></tr>
 <tr><td class="val" id="language_id">language_id</td><td class="desc">
-<p>The language ID for &lsquo;string&rsquo;.</p>
+<p>The language ID for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a> and <a href="ft2-truetype_tables.html#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a> for possible values.</p>
+<p>Registered OpenType values for &lsquo;language_id&rsquo; are always smaller than 0x8000; values equal or larger than 0x8000 usually indicate a language tag string (introduced in OpenType version 1.6). Use function <a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a> with &lsquo;language_id&rsquo; as its argument to retrieve the associated language tag.</p>
 </td></tr>
 <tr><td class="val" id="name_id">name_id</td><td class="desc">
-<p>An identifier for &lsquo;string&rsquo;.</p>
+<p>An identifier for &lsquo;string&rsquo;. See <a href="ft2-truetype_tables.html#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a> for possible values.</p>
 </td></tr>
 <tr><td class="val" id="string">string</td><td class="desc">
-<p>The &lsquo;name&rsquo; string. Note that its format differs depending on the (platform,encoding) pair. It can be a Pascal String, a UTF-16 one, etc.</p>
-<p>Generally speaking, the string is not zero-terminated. Please refer to the TrueType specification for details.</p>
+<p>The &lsquo;name&rsquo; string. Note that its format differs depending on the (platform,encoding) pair, being either a string of bytes (without a terminating NULL byte) or containing UTF-16BE entities.</p>
 </td></tr>
 <tr><td class="val" id="string_len">string_len</td><td class="desc">
 <p>The length of &lsquo;string&rsquo; in bytes.</p>
 </table>
 
 <h4>note</h4>
-<p>Possible values for &lsquo;platform_id&rsquo;, &lsquo;encoding_id&rsquo;, &lsquo;language_id&rsquo;, and &lsquo;name_id&rsquo; are given in the file &lsquo;ttnameid.h&rsquo;. For details please refer to the TrueType or OpenType specification.</p>
-<p>See also <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a>, <a href="ft2-truetype_tables.html#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a>, <a href="ft2-truetype_tables.html#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a>, and <a href="ft2-truetype_tables.html#TT_MS_ID_XXX">TT_MS_ID_XXX</a>.</p>
+<p>Please refer to the TrueType or OpenType specification for more details.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <p>FreeType error code. 0&nbsp;means success.</p>
 
 <h4>note</h4>
-<p>The &lsquo;string&rsquo; array returned in the &lsquo;aname&rsquo; structure is not null-terminated. The application should deallocate it if it is no longer in use.</p>
+<p>The &lsquo;string&rsquo; array returned in the &lsquo;aname&rsquo; structure is not null-terminated. Note that you don't have to deallocate &lsquo;string&rsquo; by yourself; FreeType takes care of it if you call <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
 <p>Use <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name_Count">FT_Get_Sfnt_Name_Count</a> to get the total number of available &lsquo;name&rsquo; table entries, then do a loop until you get the right platform, encoding, and name ID.</p>
+<p>&lsquo;name&rsquo; table format&nbsp;1 entries can use language tags also, see <a href="ft2-sfnt_names.html#FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</a>.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <div class="section">
-<h3 id="FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</h3>
+<h3 id="FT_SfntLangTag">FT_SfntLangTag</h3>
 <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
 <pre>
-#define <b>FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY</b>  <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 'f' )
+  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_SfntLangTag_
+  {
+    <a href="ft2-basic_types.html#FT_Byte">FT_Byte</a>*  string;      /* this string is *not* null-terminated! */
+    <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>   string_len;  /* in bytes                              */
+
+  } <b>FT_SfntLangTag</b>;
 </pre>
 
-<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred family subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems that have a 4-face-per-family restriction.</p>
+<p>A structure to model a language tag entry from an SFNT &lsquo;name&rsquo; table.</p>
+
+<h4>fields</h4>
+<table class="fields">
+<tr><td class="val" id="string">string</td><td class="desc">
+<p>The language tag string, encoded in UTF-16BE (without trailing NULL bytes).</p>
+</td></tr>
+<tr><td class="val" id="string_len">string_len</td><td class="desc">
+<p>The length of &lsquo;string&rsquo; in <b>bytes</b>.</p>
+</td></tr>
+</table>
+
+<h4>note</h4>
+<p>Please refer to the TrueType or OpenType specification for more details.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 <div class="section">
-<h3 id="FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY">FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</h3>
+<h3 id="FT_Get_Sfnt_LangTag">FT_Get_Sfnt_LangTag</h3>
 <p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
 <pre>
-#define <b>FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY</b>  <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 's' )
+  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
+  <b>FT_Get_Sfnt_LangTag</b>( <a href="ft2-base_interface.html#FT_Face">FT_Face</a>          face,
+                       <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>          langID,
+                       <a href="ft2-sfnt_names.html#FT_SfntLangTag">FT_SfntLangTag</a>  *alangTag );
+</pre>
+
+<p>Retrieve the language tag associated with a language ID of an SFNT &lsquo;name&rsquo; table entry.</p>
+
+<h4>input</h4>
+<table class="fields">
+<tr><td class="val" id="face">face</td><td class="desc">
+<p>A handle to the source face.</p>
+</td></tr>
+<tr><td class="val" id="langID">langID</td><td class="desc">
+<p>The language ID, as returned by <a href="ft2-sfnt_names.html#FT_Get_Sfnt_Name">FT_Get_Sfnt_Name</a>. This is always a value larger than 0x8000.</p>
+</td></tr>
+</table>
+
+<h4>output</h4>
+<table class="fields">
+<tr><td class="val" id="alangTag">alangTag</td><td class="desc">
+<p>The language tag associated with the &lsquo;name&rsquo; table entry's language ID.</p>
+</td></tr>
+</table>
+
+<h4>return</h4>
+<p>FreeType error code. 0&nbsp;means success.</p>
+
+<h4>note</h4>
+<p>The &lsquo;string&rsquo; array returned in the &lsquo;alangTag&rsquo; structure is not null-terminated. Note that you don't have to deallocate &lsquo;string&rsquo; by yourself; FreeType takes care of it if you call <a href="ft2-base_interface.html#FT_Done_Face">FT_Done_Face</a>.</p>
+<p>Only &lsquo;name&rsquo; table format&nbsp;1 supports language tags. For format&nbsp;0 tables, this function always returns FT_Err_Invalid_Table. For invalid format&nbsp;1 language ID values, FT_Err_Invalid_Argument is returned.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</h3>
+<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
+<pre>
+#define <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</b> \
+          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 'f' )
+
+
+  /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
+          <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY</b>
+</pre>
+
+<p>A tag for <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> to make <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> ignore typographic family names in the &lsquo;name&rsquo; table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY">FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</h3>
+<p>Defined in FT_SFNT_NAMES_H (freetype/ftsnames.h).</p>
+<pre>
+#define <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</b> \
+          <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>( 'i', 'g', 'p', 's' )
+
+
+  /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
+          <b>FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY</b>
 </pre>
 
-<p>A constant used as the tag of <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> structures to make FT_Open_Face() ignore preferred subfamily names in &lsquo;name&rsquo; table since OpenType version 1.4. For backwards compatibility with legacy systems that have a 4-face-per-family restriction.</p>
+<p>A tag for <a href="ft2-base_interface.html#FT_Parameter">FT_Parameter</a> to make <a href="ft2-base_interface.html#FT_Open_Face">FT_Open_Face</a> ignore typographic subfamily names in the &lsquo;name&rsquo; table (introduced in OpenType version 1.4). Use this for backward compatibility with legacy systems that have a four-faces-per-family restriction.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
index f792625..7ed1aca 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="sizes_management">Size Management</h1>
 <h2>Synopsis</h2>
index 27cfddd..9427146 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="system_interface">System Interface</h1>
 <h2>Synopsis</h2>
index 23b7621..ace5445 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1>Table of Contents</h1>
 <div class="section">
 <tr><td class="link"><a href="ft2-base_interface.html">Base Interface</a></td><td class="desc">
 <p>The FreeType&nbsp;2 base font interface.</p>
 </td></tr>
-<tr><td class="link"><a href="ft2-glyph_variants.html">Glyph Variants</a></td><td class="desc">
-<p>The FreeType&nbsp;2 interface to Unicode Ideographic Variation Sequences (IVS), using the SFNT cmap format&nbsp;14.</p>
+<tr><td class="link"><a href="ft2-glyph_variants.html">Unicode Variation Sequences</a></td><td class="desc">
+<p>The FreeType&nbsp;2 interface to Unicode Variation Sequences (UVS), using the SFNT cmap format&nbsp;14.</p>
 </td></tr>
 <tr><td class="link"><a href="ft2-glyph_management.html">Glyph Management</a></td><td class="desc">
 <p>Generic interface to manage individual glyph data.</p>
 <tr><td class="link"><a href="ft2-tt_driver.html">The TrueType driver</a></td><td class="desc">
 <p>Controlling the TrueType driver module.</p>
 </td></tr>
+<tr><td class="link"><a href="ft2-pcf_driver.html">The PCF driver</a></td><td class="desc">
+<p>Controlling the PCF driver module.</p>
+</td></tr>
 </table>
 </div>
 <div class="section">
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td></tr></table>
 
-<div class="timestamp">generated on Tue Jul 12 07:28:23 2016</div></body>
+<div class="timestamp">generated on Sat May 13 12:45:59 2017</div></body>
 </html>
index 6f150c9..25725ec 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="truetype_engine">The TrueType Engine</h1>
 <h2>Synopsis</h2>
index e72d8a4..b5d3446 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="truetype_tables">TrueType Tables</h1>
 <h2>Synopsis</h2>
 <table class="synopsis">
-<tr><td><a href="#TT_Header">TT_Header</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#TT_HoriHeader">TT_HoriHeader</a></td><td><a href="#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td></tr>
-<tr><td><a href="#TT_VertHeader">TT_VertHeader</a></td><td><a href="#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td></tr>
+<tr><td><a href="#TT_Header">TT_Header</a></td><td><a href="#FT_Get_CMap_Format">FT_Get_CMap_Format</a></td></tr>
+<tr><td><a href="#TT_HoriHeader">TT_HoriHeader</a></td><td>&nbsp;</td></tr>
+<tr><td><a href="#TT_VertHeader">TT_VertHeader</a></td><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td></tr>
 <tr><td><a href="#TT_OS2">TT_OS2</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#TT_Postscript">TT_Postscript</a></td><td><a href="#FT_PARAM_TAG_UNPATENTED_HINTING">FT_PARAM_TAG_UNPATENTED_HINTING</a></td></tr>
-<tr><td><a href="#TT_PCLT">TT_PCLT</a></td><td>&nbsp;</td></tr>
-<tr><td><a href="#TT_MaxProfile">TT_MaxProfile</a></td><td><a href="#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
-<tr><td>&nbsp;</td><td><a href="#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
-<tr><td><a href="#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
-<tr><td><a href="#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
-<tr><td><a href="#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
-<tr><td><a href="#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
+<tr><td><a href="#TT_Postscript">TT_Postscript</a></td><td><a href="#TT_PLATFORM_XXX">TT_PLATFORM_XXX</a></td></tr>
+<tr><td><a href="#TT_PCLT">TT_PCLT</a></td><td><a href="#TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</a></td></tr>
+<tr><td><a href="#TT_MaxProfile">TT_MaxProfile</a></td><td><a href="#TT_MAC_ID_XXX">TT_MAC_ID_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#TT_ISO_ID_XXX">TT_ISO_ID_XXX</a></td></tr>
+<tr><td><a href="#FT_Sfnt_Tag">FT_Sfnt_Tag</a></td><td><a href="#TT_MS_ID_XXX">TT_MS_ID_XXX</a></td></tr>
+<tr><td><a href="#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a></td><td><a href="#TT_ADOBE_ID_XXX">TT_ADOBE_ID_XXX</a></td></tr>
+<tr><td><a href="#FT_Load_Sfnt_Table">FT_Load_Sfnt_Table</a></td><td><a href="#TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</a></td></tr>
+<tr><td><a href="#FT_Sfnt_Table_Info">FT_Sfnt_Table_Info</a></td><td><a href="#TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</a></td></tr>
+<tr><td>&nbsp;</td><td><a href="#TT_NAME_ID_XXX">TT_NAME_ID_XXX</a></td></tr>
+<tr><td><a href="#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a></td><td><a href="#TT_UCR_XXX">TT_UCR_XXX</a></td></tr>
 </table>
 
 
-<p>This section contains the definition of TrueType-specific tables as well as some routines used to access and process them.</p>
+<p>This section contains definitions of some basic tables specific to TrueType and OpenType as well as some routines used to access and process them.</p>
 
 <div class="section">
 <h3 id="TT_Header">TT_Header</h3>
   } <b>TT_Header</b>;
 </pre>
 
-<p>A structure used to model a TrueType font header table. All fields follow the TrueType specification.</p>
+<p>A structure to model a TrueType font header table. All fields follow the OpenType specification.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
     <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   metric_Data_Format;
     <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  number_Of_HMetrics;
 
-    /* The following fields are not defined by the TrueType specification */
+    /* The following fields are not defined by the OpenType specification */
     /* but they are used to connect the metrics header to the relevant    */
-    /* `HMTX' table.                                                      */
+    /* `hmtx' table.                                                      */
 
     <span class="keyword">void</span>*      long_metrics;
     <span class="keyword">void</span>*      short_metrics;
   } <b>TT_HoriHeader</b>;
 </pre>
 
-<p>A structure used to model a TrueType horizontal header, the &lsquo;hhea&rsquo; table, as well as the corresponding horizontal metrics table, i.e., the &lsquo;hmtx&rsquo; table.</p>
+<p>A structure to model a TrueType horizontal header, the &lsquo;hhea&rsquo; table, as well as the corresponding horizontal metrics table, &lsquo;hmtx&rsquo;.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <tr><td class="val" id="Ascender">Ascender</td><td class="desc">
 <p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p>
 <p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
-<p>You should use the &lsquo;sTypoAscender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
+<p>You should use the &lsquo;sTypoAscender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
 </td></tr>
 <tr><td class="val" id="Descender">Descender</td><td class="desc">
 <p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p>
 <p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
-<p>You should use the &lsquo;sTypoDescender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
+<p>You should use the &lsquo;sTypoDescender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
 </td></tr>
 <tr><td class="val" id="Line_Gap">Line_Gap</td><td class="desc">
 <p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p>
 <tr><td class="val" id="caret_Slope_Run">caret_Slope_Run</td><td class="desc">
 <p>The run coefficient of the cursor's slope.</p>
 </td></tr>
+<tr><td class="val" id="caret_Offset">caret_Offset</td><td class="desc">
+<p>The cursor's offset for slanted fonts.</p>
+</td></tr>
 <tr><td class="val" id="Reserved">Reserved</td><td class="desc">
 <p>8&nbsp;reserved bytes.</p>
 </td></tr>
 </table>
 
 <h4>note</h4>
-<p>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields, which are different.</p>
-<p>This ensures that a single function in the &lsquo;ttload&rsquo; module is able to read both the horizontal and vertical headers.</p>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;caret_Slope_Rise&rsquo;, &lsquo;caret_Slope_Run&rsquo;, and &lsquo;caret_Offset&rsquo;.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
     <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  advance_Height_Max;      /* advance height maximum */
 
-    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */
-    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */
-    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yMax_Extent;             /* xmax or ymax extents            */
+    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Top_Side_Bearing;    /* minimum top-sb          */
+    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   min_Bottom_Side_Bearing; /* minimum bottom-sb       */
+    <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   yMax_Extent;             /* ymax extents            */
     <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Rise;
     <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Slope_Run;
     <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   caret_Offset;
     <a href="ft2-basic_types.html#FT_Short">FT_Short</a>   metric_Data_Format;
     <a href="ft2-basic_types.html#FT_UShort">FT_UShort</a>  number_Of_VMetrics;
 
-    /* The following fields are not defined by the TrueType specification */
-    /* but they're used to connect the metrics header to the relevant     */
-    /* `HMTX' or `VMTX' table.                                            */
+    /* The following fields are not defined by the OpenType specification */
+    /* but they are used to connect the metrics header to the relevant    */
+    /* `vmtx' table.                                                      */
 
     <span class="keyword">void</span>*      long_metrics;
     <span class="keyword">void</span>*      short_metrics;
   } <b>TT_VertHeader</b>;
 </pre>
 
-<p>A structure used to model a TrueType vertical header, the &lsquo;vhea&rsquo; table, as well as the corresponding vertical metrics table, i.e., the &lsquo;vmtx&rsquo; table.</p>
+<p>A structure used to model a TrueType vertical header, the &lsquo;vhea&rsquo; table, as well as the corresponding vertical metrics table, &lsquo;vmtx&rsquo;.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <tr><td class="val" id="Ascender">Ascender</td><td class="desc">
 <p>The font's ascender, i.e., the distance from the baseline to the top-most of all glyph points found in the font.</p>
 <p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
-<p>You should use the &lsquo;sTypoAscender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
+<p>You should use the &lsquo;sTypoAscender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
 </td></tr>
 <tr><td class="val" id="Descender">Descender</td><td class="desc">
 <p>The font's descender, i.e., the distance from the baseline to the bottom-most of all glyph points found in the font. It is negative.</p>
 <p>This value is invalid in many fonts, as it is usually set by the font designer, and often reflects only a portion of the glyphs found in the font (maybe ASCII).</p>
-<p>You should use the &lsquo;sTypoDescender&rsquo; field of the OS/2 table instead if you want the correct one.</p>
+<p>You should use the &lsquo;sTypoDescender&rsquo; field of the &lsquo;OS/2&rsquo; table instead if you want the correct one.</p>
 </td></tr>
 <tr><td class="val" id="Line_Gap">Line_Gap</td><td class="desc">
 <p>The font's line gap, i.e., the distance to add to the ascender and descender to get the BTB, i.e., the baseline-to-baseline distance for the font.</p>
 <p>The run coefficient of the cursor's slope.</p>
 </td></tr>
 <tr><td class="val" id="caret_Offset">caret_Offset</td><td class="desc">
-<p>The cursor's offset for slanted fonts. This value is &lsquo;reserved&rsquo; in vmtx version 1.0.</p>
+<p>The cursor's offset for slanted fonts.</p>
 </td></tr>
 <tr><td class="val" id="Reserved">Reserved</td><td class="desc">
 <p>8&nbsp;reserved bytes.</p>
 <tr><td class="val" id="metric_Data_Format">metric_Data_Format</td><td class="desc">
 <p>Always&nbsp;0.</p>
 </td></tr>
-<tr><td class="val" id="number_Of_HMetrics">number_Of_HMetrics</td><td class="desc">
+<tr><td class="val" id="number_Of_VMetrics">number_Of_VMetrics</td><td class="desc">
 <p>Number of VMetrics entries in the &lsquo;vmtx&rsquo; table -- this value can be smaller than the total number of glyphs in the font.</p>
 </td></tr>
 <tr><td class="val" id="long_metrics">long_metrics</td><td class="desc">
 </table>
 
 <h4>note</h4>
-<p>IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should be identical except for the names of their fields, which are different.</p>
-<p>This ensures that a single function in the &lsquo;ttload&rsquo; module is able to read both the horizontal and vertical headers.</p>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;Ascender&rsquo;, &lsquo;Descender&rsquo;, &lsquo;Line_Gap&rsquo;, &lsquo;caret_Slope_Rise&rsquo;, &lsquo;caret_Slope_Run&rsquo;, and &lsquo;caret_Offset&rsquo;.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   } <b>TT_OS2</b>;
 </pre>
 
-<p>A structure used to model a TrueType OS/2 table. All fields comply to the OpenType specification.</p>
-<p>Note that we now support old Mac fonts that do not include an OS/2 table. In this case, the &lsquo;version&rsquo; field is always set to 0xFFFF.</p>
+<p>A structure to model a TrueType &lsquo;OS/2&rsquo; table. All fields comply to the OpenType specification.</p>
+<p>Note that we now support old Mac fonts that do not include an &lsquo;OS/2&rsquo; table. In this case, the &lsquo;version&rsquo; field is always set to 0xFFFF.</p>
+
+<h4>note</h4>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;sCapHeight&rsquo;, &lsquo;sTypoAscender&rsquo;, &lsquo;sTypoDescender&rsquo;, &lsquo;sTypoLineGap&rsquo;, &lsquo;sxHeight&rsquo;, &lsquo;usWinAscent&rsquo;, &lsquo;usWinDescent&rsquo;, &lsquo;yStrikeoutPosition&rsquo;, &lsquo;yStrikeoutSize&rsquo;, &lsquo;ySubscriptXOffset&rsquo;, &lsquo;ySubScriptXSize&rsquo;, &lsquo;ySubscriptYOffset&rsquo;, &lsquo;ySubscriptYSize&rsquo;, &lsquo;ySuperscriptXOffset&rsquo;, &lsquo;ySuperscriptXSize&rsquo;, &lsquo;ySuperscriptYOffset&rsquo;, and &lsquo;ySuperscriptYSize&rsquo;.</p>
+<p>Possible values for bits in the &lsquo;ulUnicodeRangeX&rsquo; fields are given by the <a href="ft2-truetype_tables.html#TT_UCR_XXX">TT_UCR_XXX</a> macros.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
     <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  minMemType1;
     <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>  maxMemType1;
 
-    /* Glyph names follow in the file, but we don't   */
-    /* load them by default.  See the ttpost.c file.  */
+    /* Glyph names follow in the `post' table, but we don't */
+    /* load them by default.                                */
 
   } <b>TT_Postscript</b>;
 </pre>
 
-<p>A structure used to model a TrueType PostScript table. All fields comply to the TrueType specification. This structure does not reference the PostScript glyph names, which can be nevertheless accessed with the &lsquo;ttpost&rsquo; module.</p>
+<p>A structure to model a TrueType &lsquo;post&rsquo; table. All fields comply to the OpenType specification. This structure does not reference a font's PostScript glyph names; use <a href="ft2-base_interface.html#FT_Get_Glyph_Name">FT_Get_Glyph_Name</a> to retrieve them.</p>
+
+<h4>note</h4>
+<p>For an OpenType variation font, the values of the following fields can change after a call to <a href="ft2-multiple_masters.html#FT_Set_Var_Design_Coordinates">FT_Set_Var_Design_Coordinates</a> (and friends) if the font contains an &lsquo;MVAR&rsquo; table: &lsquo;underlinePosition&rsquo; and &lsquo;underlineThickness&rsquo;.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   } <b>TT_PCLT</b>;
 </pre>
 
-<p>A structure used to model a TrueType PCLT table. All fields comply to the TrueType specification.</p>
+<p>A structure to model a TrueType &lsquo;PCLT&rsquo; table. All fields comply to the OpenType specification.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
   } <b>TT_MaxProfile</b>;
 </pre>
 
-<p>The maximum profile is a table containing many max values, which can be used to pre-allocate arrays. This ensures that no memory allocation occurs during a glyph load.</p>
+<p>The maximum profile (&lsquo;maxp&rsquo;) table contains many max values, which can be used to pre-allocate arrays for speeding up glyph loading and hinting.</p>
 
 <h4>fields</h4>
 <table class="fields">
 <p>The number of glyphs in this TrueType font.</p>
 </td></tr>
 <tr><td class="val" id="maxPoints">maxPoints</td><td class="desc">
-<p>The maximum number of points in a non-composite TrueType glyph. See also the structure element &lsquo;maxCompositePoints&rsquo;.</p>
+<p>The maximum number of points in a non-composite TrueType glyph. See also &lsquo;maxCompositePoints&rsquo;.</p>
 </td></tr>
 <tr><td class="val" id="maxContours">maxContours</td><td class="desc">
-<p>The maximum number of contours in a non-composite TrueType glyph. See also the structure element &lsquo;maxCompositeContours&rsquo;.</p>
+<p>The maximum number of contours in a non-composite TrueType glyph. See also &lsquo;maxCompositeContours&rsquo;.</p>
 </td></tr>
 <tr><td class="val" id="maxCompositePoints">maxCompositePoints</td><td class="desc">
-<p>The maximum number of points in a composite TrueType glyph. See also the structure element &lsquo;maxPoints&rsquo;.</p>
+<p>The maximum number of points in a composite TrueType glyph. See also &lsquo;maxPoints&rsquo;.</p>
 </td></tr>
 <tr><td class="val" id="maxCompositeContours">maxCompositeContours</td><td class="desc">
-<p>The maximum number of contours in a composite TrueType glyph. See also the structure element &lsquo;maxContours&rsquo;.</p>
+<p>The maximum number of contours in a composite TrueType glyph. See also &lsquo;maxContours&rsquo;.</p>
 </td></tr>
 <tr><td class="val" id="maxZones">maxZones</td><td class="desc">
 <p>The maximum number of zones used for glyph hinting.</p>
 #define ft_sfnt_pclt  <a href="ft2-truetype_tables.html#FT_SFNT_PCLT">FT_SFNT_PCLT</a>
 </pre>
 
-<p>An enumeration used to specify the index of an SFNT table. Used in the <a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a> API function.</p>
+<p>An enumeration to specify indices of SFNT tables loaded and parsed by FreeType during initialization of an SFNT font. Used in the <a href="ft2-truetype_tables.html#FT_Get_Sfnt_Table">FT_Get_Sfnt_Table</a> API function.</p>
 
 <h4>values</h4>
 <table class="fields">
                      <a href="ft2-truetype_tables.html#FT_Sfnt_Tag">FT_Sfnt_Tag</a>  tag );
 </pre>
 
-<p>Return a pointer to a given SFNT table within a face.</p>
+<p>Return a pointer to a given SFNT table stored within a face.</p>
 
 <h4>input</h4>
 <table class="fields">
 </table>
 
 <h4>return</h4>
-<p>A type-less pointer to the table. This will be&nbsp;0 in case of error, or if the corresponding table was not found <b>OR</b> loaded from the file.</p>
+<p>A type-less pointer to the table. This will be NULL in case of error, or if the corresponding table was not found <b>OR</b> loaded from the file.</p>
 <p>Use a typecast according to &lsquo;tag&rsquo; to access the structure elements.</p>
 
 <h4>note</h4>
                       <a href="ft2-basic_types.html#FT_ULong">FT_ULong</a>*  length );
 </pre>
 
-<p>Load any font table into client memory.</p>
+<p>Load any SFNT font table into client memory.</p>
 
 <h4>input</h4>
 <table class="fields">
 <p>A handle to the source face.</p>
 </td></tr>
 <tr><td class="val" id="tag">tag</td><td class="desc">
-<p>The four-byte tag of the table to load. Use the value&nbsp;0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a> file, or forge a new one with <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>.</p>
+<p>The four-byte tag of the table to load. Use value&nbsp;0 if you want to access the whole font file. Otherwise, you can use one of the definitions found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_TAGS_H">FT_TRUETYPE_TAGS_H</a> file, or forge a new one with <a href="ft2-basic_types.html#FT_MAKE_TAG">FT_MAKE_TAG</a>.</p>
 </td></tr>
 <tr><td class="val" id="offset">offset</td><td class="desc">
-<p>The starting offset in the table (or file if tag == 0).</p>
+<p>The starting offset in the table (or file if tag&nbsp;==&nbsp;0).</p>
 </td></tr>
 </table>
 
 <h4>inout</h4>
 <table class="fields">
 <tr><td class="val" id="length">length</td><td class="desc">
-<p>If the &lsquo;length&rsquo; parameter is NULL, then try to load the whole table. Return an error code if it fails.</p>
+<p>If the &lsquo;length&rsquo; parameter is NULL, try to load the whole table. Return an error code if it fails.</p>
 <p>Else, if &lsquo;*length&rsquo; is&nbsp;0, exit immediately while returning the table's (or file) full size in it.</p>
 <p>Else the number of bytes to read from the table or file, from the starting offset.</p>
 </td></tr>
   <b>FT_Get_CMap_Language_ID</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a>  charmap );
 </pre>
 
-<p>Return TrueType/sfnt specific cmap language ID. Definitions of language ID values are in &lsquo;ttnameid.h&rsquo;.</p>
+<p>Return cmap language ID as specified in the OpenType standard. Definitions of language ID values are in file <a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a>.</p>
 
 <h4>input</h4>
 <table class="fields">
 </table>
 
 <h4>return</h4>
-<p>The language ID of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to a TrueType/sfnt face, just return&nbsp;0 as the default value.</p>
+<p>The language ID of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to an SFNT face, just return&nbsp;0 as the default value.</p>
 <p>For a format&nbsp;14 cmap (to access Unicode IVS), the return value is 0xFFFFFFFF.</p>
 
 <hr>
   <b>FT_Get_CMap_Format</b>( <a href="ft2-base_interface.html#FT_CharMap">FT_CharMap</a>  charmap );
 </pre>
 
-<p>Return TrueType/sfnt specific cmap format.</p>
+<p>Return the format of an SFNT &lsquo;cmap&rsquo; table.</p>
 
 <h4>input</h4>
 <table class="fields">
 </table>
 
 <h4>return</h4>
-<p>The format of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to a TrueType/sfnt face, return -1.</p>
+<p>The format of &lsquo;charmap&rsquo;. If &lsquo;charmap&rsquo; doesn't belong to an SFNT face, return -1.</p>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 <h3 id="TT_APPLE_ID_XXX">TT_APPLE_ID_XXX</h3>
 <p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
 <pre>
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_DEFAULT">TT_APPLE_ID_DEFAULT</a>           0 /* Unicode 1.0 */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_1_1">TT_APPLE_ID_UNICODE_1_1</a>       1 /* specify Hangul at U+34xx */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_ISO_10646">TT_APPLE_ID_ISO_10646</a>         2 /* deprecated */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_2_0">TT_APPLE_ID_UNICODE_2_0</a>       3 /* or later */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_DEFAULT">TT_APPLE_ID_DEFAULT</a>           0 /* Unicode 1.0                   */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_1_1">TT_APPLE_ID_UNICODE_1_1</a>       1 /* specify Hangul at U+34xx      */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_ISO_10646">TT_APPLE_ID_ISO_10646</a>         2 /* deprecated                    */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_2_0">TT_APPLE_ID_UNICODE_2_0</a>       3 /* or later                      */
 #define <a href="ft2-truetype_tables.html#TT_APPLE_ID_UNICODE_32">TT_APPLE_ID_UNICODE_32</a>        4 /* 2.0 or later, full repertoire */
-#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</a>  5 /* variation selector data */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</a>  5 /* variation selector data       */
+#define <a href="ft2-truetype_tables.html#TT_APPLE_ID_FULL_UNICODE">TT_APPLE_ID_FULL_UNICODE</a>      6 /* used with type 13 cmaps       */
 </pre>
 
 <p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_APPLE_UNICODE</a> charmaps and name entries.</p>
 <tr><td class="val" id="TT_APPLE_ID_VARIANT_SELECTOR">TT_APPLE_ID_VARIANT_SELECTOR</td><td class="desc">
 <p>From Adobe, not Apple. Not a normal cmap. Specifies variations on a real cmap.</p>
 </td></tr>
+<tr><td class="val" id="TT_APPLE_ID_FULL_UNICODE">TT_APPLE_ID_FULL_UNICODE</td><td class="desc">
+<p>Used for fallback fonts that provide complete Unicode coverage with a type&nbsp;13 cmap.</p>
+</td></tr>
 </table>
 
 <hr>
 <h3 id="TT_MAC_ID_XXX">TT_MAC_ID_XXX</h3>
 <p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
 <pre>
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ROMAN">TT_MAC_ID_ROMAN</a>                 0
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_JAPANESE">TT_MAC_ID_JAPANESE</a>              1
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TRADITIONAL_CHINESE">TT_MAC_ID_TRADITIONAL_CHINESE</a>   2
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KOREAN">TT_MAC_ID_KOREAN</a>                3
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ARABIC">TT_MAC_ID_ARABIC</a>                4
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_HEBREW">TT_MAC_ID_HEBREW</a>                5
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GREEK">TT_MAC_ID_GREEK</a>                 6
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_RUSSIAN">TT_MAC_ID_RUSSIAN</a>               7
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_RSYMBOL">TT_MAC_ID_RSYMBOL</a>               8
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_DEVANAGARI">TT_MAC_ID_DEVANAGARI</a>            9
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GURMUKHI">TT_MAC_ID_GURMUKHI</a>             10
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GUJARATI">TT_MAC_ID_GUJARATI</a>             11
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ORIYA">TT_MAC_ID_ORIYA</a>                12
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_BENGALI">TT_MAC_ID_BENGALI</a>              13
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TAMIL">TT_MAC_ID_TAMIL</a>                14
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TELUGU">TT_MAC_ID_TELUGU</a>               15
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KANNADA">TT_MAC_ID_KANNADA</a>              16
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MALAYALAM">TT_MAC_ID_MALAYALAM</a>            17
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SINHALESE">TT_MAC_ID_SINHALESE</a>            18
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_BURMESE">TT_MAC_ID_BURMESE</a>              19
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_KHMER">TT_MAC_ID_KHMER</a>                20
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_THAI">TT_MAC_ID_THAI</a>                 21
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_LAOTIAN">TT_MAC_ID_LAOTIAN</a>              22
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GEORGIAN">TT_MAC_ID_GEORGIAN</a>             23
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_ARMENIAN">TT_MAC_ID_ARMENIAN</a>             24
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MALDIVIAN">TT_MAC_ID_MALDIVIAN</a>            25
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SIMPLIFIED_CHINESE">TT_MAC_ID_SIMPLIFIED_CHINESE</a>   25
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_TIBETAN">TT_MAC_ID_TIBETAN</a>              26
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_MONGOLIAN">TT_MAC_ID_MONGOLIAN</a>            27
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_GEEZ">TT_MAC_ID_GEEZ</a>                 28
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SLAVIC">TT_MAC_ID_SLAVIC</a>               29
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_VIETNAMESE">TT_MAC_ID_VIETNAMESE</a>           30
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_SINDHI">TT_MAC_ID_SINDHI</a>               31
-#define <a href="ft2-truetype_tables.html#TT_MAC_ID_UNINTERP">TT_MAC_ID_UNINTERP</a>             32
+#define TT_MAC_ID_ROMAN                 0
+#define TT_MAC_ID_JAPANESE              1
+#define TT_MAC_ID_TRADITIONAL_CHINESE   2
+#define TT_MAC_ID_KOREAN                3
+#define TT_MAC_ID_ARABIC                4
+#define TT_MAC_ID_HEBREW                5
+#define TT_MAC_ID_GREEK                 6
+#define TT_MAC_ID_RUSSIAN               7
+#define TT_MAC_ID_RSYMBOL               8
+#define TT_MAC_ID_DEVANAGARI            9
+#define TT_MAC_ID_GURMUKHI             10
+#define TT_MAC_ID_GUJARATI             11
+#define TT_MAC_ID_ORIYA                12
+#define TT_MAC_ID_BENGALI              13
+#define TT_MAC_ID_TAMIL                14
+#define TT_MAC_ID_TELUGU               15
+#define TT_MAC_ID_KANNADA              16
+#define TT_MAC_ID_MALAYALAM            17
+#define TT_MAC_ID_SINHALESE            18
+#define TT_MAC_ID_BURMESE              19
+#define TT_MAC_ID_KHMER                20
+#define TT_MAC_ID_THAI                 21
+#define TT_MAC_ID_LAOTIAN              22
+#define TT_MAC_ID_GEORGIAN             23
+#define TT_MAC_ID_ARMENIAN             24
+#define TT_MAC_ID_MALDIVIAN            25
+#define TT_MAC_ID_SIMPLIFIED_CHINESE   25
+#define TT_MAC_ID_TIBETAN              26
+#define TT_MAC_ID_MONGOLIAN            27
+#define TT_MAC_ID_GEEZ                 28
+#define TT_MAC_ID_SLAVIC               29
+#define TT_MAC_ID_VIETNAMESE           30
+#define TT_MAC_ID_SINDHI               31
+#define TT_MAC_ID_UNINTERP             32
 </pre>
 
 <p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a> charmaps and name entries.</p>
 
-<h4>values</h4>
-<table class="fields">
-<tr><td class="val" id="TT_MAC_ID_ROMAN">TT_MAC_ID_ROMAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_JAPANESE">TT_MAC_ID_JAPANESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_TRADITIONAL_CHINESE">TT_MAC_ID_TRADITIONAL_CHINESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_KOREAN">TT_MAC_ID_KOREAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_ARABIC">TT_MAC_ID_ARABIC</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_HEBREW">TT_MAC_ID_HEBREW</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GREEK">TT_MAC_ID_GREEK</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_RUSSIAN">TT_MAC_ID_RUSSIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_RSYMBOL">TT_MAC_ID_RSYMBOL</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_DEVANAGARI">TT_MAC_ID_DEVANAGARI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GURMUKHI">TT_MAC_ID_GURMUKHI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GUJARATI">TT_MAC_ID_GUJARATI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_ORIYA">TT_MAC_ID_ORIYA</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_BENGALI">TT_MAC_ID_BENGALI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_TAMIL">TT_MAC_ID_TAMIL</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_TELUGU">TT_MAC_ID_TELUGU</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_KANNADA">TT_MAC_ID_KANNADA</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_MALAYALAM">TT_MAC_ID_MALAYALAM</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_SINHALESE">TT_MAC_ID_SINHALESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_BURMESE">TT_MAC_ID_BURMESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_KHMER">TT_MAC_ID_KHMER</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_THAI">TT_MAC_ID_THAI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_LAOTIAN">TT_MAC_ID_LAOTIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GEORGIAN">TT_MAC_ID_GEORGIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_ARMENIAN">TT_MAC_ID_ARMENIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_MALDIVIAN">TT_MAC_ID_MALDIVIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_SIMPLIFIED_CHINESE">TT_MAC_ID_SIMPLIFIED_CHINESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_TIBETAN">TT_MAC_ID_TIBETAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_MONGOLIAN">TT_MAC_ID_MONGOLIAN</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_GEEZ">TT_MAC_ID_GEEZ</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_SLAVIC">TT_MAC_ID_SLAVIC</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_VIETNAMESE">TT_MAC_ID_VIETNAMESE</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_SINDHI">TT_MAC_ID_SINDHI</td><td class="desc">
-<p></p>
-</td></tr>
-<tr><td class="val" id="TT_MAC_ID_UNINTERP">TT_MAC_ID_UNINTERP</td><td class="desc">
-<p></p>
-</td></tr>
-</table>
-
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 #define <a href="ft2-truetype_tables.html#TT_MS_ID_SYMBOL_CS">TT_MS_ID_SYMBOL_CS</a>    0
 #define <a href="ft2-truetype_tables.html#TT_MS_ID_UNICODE_CS">TT_MS_ID_UNICODE_CS</a>   1
 #define <a href="ft2-truetype_tables.html#TT_MS_ID_SJIS">TT_MS_ID_SJIS</a>         2
-#define <a href="ft2-truetype_tables.html#TT_MS_ID_GB2312">TT_MS_ID_GB2312</a>       3
+#define <a href="ft2-truetype_tables.html#TT_MS_ID_PRC">TT_MS_ID_PRC</a>          3
 #define <a href="ft2-truetype_tables.html#TT_MS_ID_BIG_5">TT_MS_ID_BIG_5</a>        4
 #define <a href="ft2-truetype_tables.html#TT_MS_ID_WANSUNG">TT_MS_ID_WANSUNG</a>      5
 #define <a href="ft2-truetype_tables.html#TT_MS_ID_JOHAB">TT_MS_ID_JOHAB</a>        6
 #define <a href="ft2-truetype_tables.html#TT_MS_ID_UCS_4">TT_MS_ID_UCS_4</a>       10
+
+  /* this value is deprecated */
+#define TT_MS_ID_GB2312  <a href="ft2-truetype_tables.html#TT_MS_ID_PRC">TT_MS_ID_PRC</a>
 </pre>
 
 <p>A list of valid values for the &lsquo;encoding_id&rsquo; for <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a> charmaps and name entries.</p>
 <h4>values</h4>
 <table class="fields">
 <tr><td class="val" id="TT_MS_ID_SYMBOL_CS">TT_MS_ID_SYMBOL_CS</td><td class="desc">
-<p>Corresponds to Microsoft symbol encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>.</p>
+<p>Microsoft symbol encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_MS_SYMBOL</a>.</p>
 </td></tr>
 <tr><td class="val" id="TT_MS_ID_UNICODE_CS">TT_MS_ID_UNICODE_CS</td><td class="desc">
-<p>Corresponds to a Microsoft WGL4 charmap, matching Unicode. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>.</p>
+<p>Microsoft WGL4 charmap, matching Unicode. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_UNICODE</a>.</p>
 </td></tr>
 <tr><td class="val" id="TT_MS_ID_SJIS">TT_MS_ID_SJIS</td><td class="desc">
-<p>Corresponds to SJIS Japanese encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>.</p>
+<p>Shift JIS Japanese encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_SJIS</a>.</p>
 </td></tr>
-<tr><td class="val" id="TT_MS_ID_GB2312">TT_MS_ID_GB2312</td><td class="desc">
-<p>Corresponds to Simplified Chinese as used in Mainland China. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_GB2312</a>.</p>
+<tr><td class="val" id="TT_MS_ID_PRC">TT_MS_ID_PRC</td><td class="desc">
+<p>Chinese encodings as used in the People's Republic of China (PRC). This means the encodings GB&nbsp;2312 and its supersets GBK and GB&nbsp;18030. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_PRC</a>.</p>
 </td></tr>
 <tr><td class="val" id="TT_MS_ID_BIG_5">TT_MS_ID_BIG_5</td><td class="desc">
-<p>Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>.</p>
+<p>Traditional Chinese as used in Taiwan and Hong Kong. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_BIG5</a>.</p>
 </td></tr>
 <tr><td class="val" id="TT_MS_ID_WANSUNG">TT_MS_ID_WANSUNG</td><td class="desc">
-<p>Corresponds to Korean Wansung encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>.</p>
+<p>Korean Extended Wansung encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_WANSUNG</a>.</p>
 </td></tr>
 <tr><td class="val" id="TT_MS_ID_JOHAB">TT_MS_ID_JOHAB</td><td class="desc">
-<p>Corresponds to Johab encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>.</p>
+<p>Korean Johab encoding. See <a href="ft2-base_interface.html#FT_Encoding">FT_ENCODING_JOHAB</a>.</p>
 </td></tr>
 <tr><td class="val" id="TT_MS_ID_UCS_4">TT_MS_ID_UCS_4</td><td class="desc">
-<p>Corresponds to UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001.)</p>
+<p>UCS-4 or UTF-32 charmaps. This has been added to the OpenType specification version 1.4 (mid-2001).</p>
 </td></tr>
 </table>
 
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
+<div class="section">
+<h3 id="TT_MAC_LANGID_XXX">TT_MAC_LANGID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
+<pre>
+#define TT_MAC_LANGID_ENGLISH                       0
+#define TT_MAC_LANGID_FRENCH                        1
+#define TT_MAC_LANGID_GERMAN                        2
+#define TT_MAC_LANGID_ITALIAN                       3
+#define TT_MAC_LANGID_DUTCH                         4
+#define TT_MAC_LANGID_SWEDISH                       5
+#define TT_MAC_LANGID_SPANISH                       6
+#define TT_MAC_LANGID_DANISH                        7
+#define TT_MAC_LANGID_PORTUGUESE                    8
+#define TT_MAC_LANGID_NORWEGIAN                     9
+#define TT_MAC_LANGID_HEBREW                       10
+#define TT_MAC_LANGID_JAPANESE                     11
+#define TT_MAC_LANGID_ARABIC                       12
+#define TT_MAC_LANGID_FINNISH                      13
+#define TT_MAC_LANGID_GREEK                        14
+#define TT_MAC_LANGID_ICELANDIC                    15
+#define TT_MAC_LANGID_MALTESE                      16
+#define TT_MAC_LANGID_TURKISH                      17
+#define TT_MAC_LANGID_CROATIAN                     18
+#define TT_MAC_LANGID_CHINESE_TRADITIONAL          19
+#define TT_MAC_LANGID_URDU                         20
+#define TT_MAC_LANGID_HINDI                        21
+#define TT_MAC_LANGID_THAI                         22
+#define TT_MAC_LANGID_KOREAN                       23
+#define TT_MAC_LANGID_LITHUANIAN                   24
+#define TT_MAC_LANGID_POLISH                       25
+#define TT_MAC_LANGID_HUNGARIAN                    26
+#define TT_MAC_LANGID_ESTONIAN                     27
+#define TT_MAC_LANGID_LETTISH                      28
+#define TT_MAC_LANGID_SAAMISK                      29
+#define TT_MAC_LANGID_FAEROESE                     30
+#define TT_MAC_LANGID_FARSI                        31
+#define TT_MAC_LANGID_RUSSIAN                      32
+#define TT_MAC_LANGID_CHINESE_SIMPLIFIED           33
+#define TT_MAC_LANGID_FLEMISH                      34
+#define TT_MAC_LANGID_IRISH                        35
+#define TT_MAC_LANGID_ALBANIAN                     36
+#define TT_MAC_LANGID_ROMANIAN                     37
+#define TT_MAC_LANGID_CZECH                        38
+#define TT_MAC_LANGID_SLOVAK                       39
+#define TT_MAC_LANGID_SLOVENIAN                    40
+#define TT_MAC_LANGID_YIDDISH                      41
+#define TT_MAC_LANGID_SERBIAN                      42
+#define TT_MAC_LANGID_MACEDONIAN                   43
+#define TT_MAC_LANGID_BULGARIAN                    44
+#define TT_MAC_LANGID_UKRAINIAN                    45
+#define TT_MAC_LANGID_BYELORUSSIAN                 46
+#define TT_MAC_LANGID_UZBEK                        47
+#define TT_MAC_LANGID_KAZAKH                       48
+#define TT_MAC_LANGID_AZERBAIJANI                  49
+#define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT  49
+#define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT    50
+#define TT_MAC_LANGID_ARMENIAN                     51
+#define TT_MAC_LANGID_GEORGIAN                     52
+#define TT_MAC_LANGID_MOLDAVIAN                    53
+#define TT_MAC_LANGID_KIRGHIZ                      54
+#define TT_MAC_LANGID_TAJIKI                       55
+#define TT_MAC_LANGID_TURKMEN                      56
+#define TT_MAC_LANGID_MONGOLIAN                    57
+#define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT   57
+#define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT    58
+#define TT_MAC_LANGID_PASHTO                       59
+#define TT_MAC_LANGID_KURDISH                      60
+#define TT_MAC_LANGID_KASHMIRI                     61
+#define TT_MAC_LANGID_SINDHI                       62
+#define TT_MAC_LANGID_TIBETAN                      63
+#define TT_MAC_LANGID_NEPALI                       64
+#define TT_MAC_LANGID_SANSKRIT                     65
+#define TT_MAC_LANGID_MARATHI                      66
+#define TT_MAC_LANGID_BENGALI                      67
+#define TT_MAC_LANGID_ASSAMESE                     68
+#define TT_MAC_LANGID_GUJARATI                     69
+#define TT_MAC_LANGID_PUNJABI                      70
+#define TT_MAC_LANGID_ORIYA                        71
+#define TT_MAC_LANGID_MALAYALAM                    72
+#define TT_MAC_LANGID_KANNADA                      73
+#define TT_MAC_LANGID_TAMIL                        74
+#define TT_MAC_LANGID_TELUGU                       75
+#define TT_MAC_LANGID_SINHALESE                    76
+#define TT_MAC_LANGID_BURMESE                      77
+#define TT_MAC_LANGID_KHMER                        78
+#define TT_MAC_LANGID_LAO                          79
+#define TT_MAC_LANGID_VIETNAMESE                   80
+#define TT_MAC_LANGID_INDONESIAN                   81
+#define TT_MAC_LANGID_TAGALOG                      82
+#define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT           83
+#define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT          84
+#define TT_MAC_LANGID_AMHARIC                      85
+#define TT_MAC_LANGID_TIGRINYA                     86
+#define TT_MAC_LANGID_GALLA                        87
+#define TT_MAC_LANGID_SOMALI                       88
+#define TT_MAC_LANGID_SWAHILI                      89
+#define TT_MAC_LANGID_RUANDA                       90
+#define TT_MAC_LANGID_RUNDI                        91
+#define TT_MAC_LANGID_CHEWA                        92
+#define TT_MAC_LANGID_MALAGASY                     93
+#define TT_MAC_LANGID_ESPERANTO                    94
+#define TT_MAC_LANGID_WELSH                       128
+#define TT_MAC_LANGID_BASQUE                      129
+#define TT_MAC_LANGID_CATALAN                     130
+#define TT_MAC_LANGID_LATIN                       131
+#define TT_MAC_LANGID_QUECHUA                     132
+#define TT_MAC_LANGID_GUARANI                     133
+#define TT_MAC_LANGID_AYMARA                      134
+#define TT_MAC_LANGID_TATAR                       135
+#define TT_MAC_LANGID_UIGHUR                      136
+#define TT_MAC_LANGID_DZONGKHA                    137
+#define TT_MAC_LANGID_JAVANESE                    138
+#define TT_MAC_LANGID_SUNDANESE                   139
+
+  /* The following codes are new as of 2000-03-10 */
+#define TT_MAC_LANGID_GALICIAN                    140
+#define TT_MAC_LANGID_AFRIKAANS                   141
+#define TT_MAC_LANGID_BRETON                      142
+#define TT_MAC_LANGID_INUKTITUT                   143
+#define TT_MAC_LANGID_SCOTTISH_GAELIC             144
+#define TT_MAC_LANGID_MANX_GAELIC                 145
+#define TT_MAC_LANGID_IRISH_GAELIC                146
+#define TT_MAC_LANGID_TONGAN                      147
+#define TT_MAC_LANGID_GREEK_POLYTONIC             148
+#define TT_MAC_LANGID_GREELANDIC                  149
+#define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150
+</pre>
+
+<p>Possible values of the language identifier field in the name records of the SFNT &lsquo;name&rsquo; table if the &lsquo;platform&rsquo; identifier code is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MACINTOSH</a>. These values are also used as return values for function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a>.</p>
+<p>The canonical source for Apple's IDs is</p>
+<p><a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html">https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html</a></p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_MS_LANGID_XXX">TT_MS_LANGID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
+<pre>
+#define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401
+#define TT_MS_LANGID_ARABIC_IRAQ                       0x0801
+#define TT_MS_LANGID_ARABIC_EGYPT                      0x0C01
+#define TT_MS_LANGID_ARABIC_LIBYA                      0x1001
+#define TT_MS_LANGID_ARABIC_ALGERIA                    0x1401
+#define TT_MS_LANGID_ARABIC_MOROCCO                    0x1801
+#define TT_MS_LANGID_ARABIC_TUNISIA                    0x1C01
+#define TT_MS_LANGID_ARABIC_OMAN                       0x2001
+#define TT_MS_LANGID_ARABIC_YEMEN                      0x2401
+#define TT_MS_LANGID_ARABIC_SYRIA                      0x2801
+#define TT_MS_LANGID_ARABIC_JORDAN                     0x2C01
+#define TT_MS_LANGID_ARABIC_LEBANON                    0x3001
+#define TT_MS_LANGID_ARABIC_KUWAIT                     0x3401
+#define TT_MS_LANGID_ARABIC_UAE                        0x3801
+#define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3C01
+#define TT_MS_LANGID_ARABIC_QATAR                      0x4001
+#define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402
+#define TT_MS_LANGID_CATALAN_CATALAN                   0x0403
+#define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404
+#define TT_MS_LANGID_CHINESE_PRC                       0x0804
+#define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0C04
+#define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004
+#define TT_MS_LANGID_CHINESE_MACAO                     0x1404
+#define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405
+#define TT_MS_LANGID_DANISH_DENMARK                    0x0406
+#define TT_MS_LANGID_GERMAN_GERMANY                    0x0407
+#define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807
+#define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0C07
+#define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007
+#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN              0x1407
+#define TT_MS_LANGID_GREEK_GREECE                      0x0408
+#define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409
+#define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809
+#define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0C09
+#define TT_MS_LANGID_ENGLISH_CANADA                    0x1009
+#define TT_MS_LANGID_ENGLISH_NEW_ZEALAND               0x1409
+#define TT_MS_LANGID_ENGLISH_IRELAND                   0x1809
+#define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA              0x1C09
+#define TT_MS_LANGID_ENGLISH_JAMAICA                   0x2009
+#define TT_MS_LANGID_ENGLISH_CARIBBEAN                 0x2409
+#define TT_MS_LANGID_ENGLISH_BELIZE                    0x2809
+#define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2C09
+#define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009
+#define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409
+#define TT_MS_LANGID_ENGLISH_INDIA                     0x4009
+#define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409
+#define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809
+#define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040A
+#define TT_MS_LANGID_SPANISH_MEXICO                    0x080A
+#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT         0x0C0A
+#define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100A
+#define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140A
+#define TT_MS_LANGID_SPANISH_PANAMA                    0x180A
+#define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC        0x1C0A
+#define TT_MS_LANGID_SPANISH_VENEZUELA                 0x200A
+#define TT_MS_LANGID_SPANISH_COLOMBIA                  0x240A
+#define TT_MS_LANGID_SPANISH_PERU                      0x280A
+#define TT_MS_LANGID_SPANISH_ARGENTINA                 0x2C0A
+#define TT_MS_LANGID_SPANISH_ECUADOR                   0x300A
+#define TT_MS_LANGID_SPANISH_CHILE                     0x340A
+#define TT_MS_LANGID_SPANISH_URUGUAY                   0x380A
+#define TT_MS_LANGID_SPANISH_PARAGUAY                  0x3C0A
+#define TT_MS_LANGID_SPANISH_BOLIVIA                   0x400A
+#define TT_MS_LANGID_SPANISH_EL_SALVADOR               0x440A
+#define TT_MS_LANGID_SPANISH_HONDURAS                  0x480A
+#define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4C0A
+#define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500A
+#define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540A
+#define TT_MS_LANGID_FINNISH_FINLAND                   0x040B
+#define TT_MS_LANGID_FRENCH_FRANCE                     0x040C
+#define TT_MS_LANGID_FRENCH_BELGIUM                    0x080C
+#define TT_MS_LANGID_FRENCH_CANADA                     0x0C0C
+#define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100C
+#define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140C
+#define TT_MS_LANGID_FRENCH_MONACO                     0x180C
+#define TT_MS_LANGID_HEBREW_ISRAEL                     0x040D
+#define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040E
+#define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040F
+#define TT_MS_LANGID_ITALIAN_ITALY                     0x0410
+#define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810
+#define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411
+#define TT_MS_LANGID_KOREAN_KOREA                      0x0412
+#define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413
+#define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813
+#define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414
+#define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK          0x0814
+#define TT_MS_LANGID_POLISH_POLAND                     0x0415
+#define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416
+#define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816
+#define TT_MS_LANGID_ROMANSH_SWITZERLAND               0x0417
+#define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418
+#define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419
+#define TT_MS_LANGID_CROATIAN_CROATIA                  0x041A
+#define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081A
+#define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0C1A
+#define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA       0x101A
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x141A
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN         0x181A
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x1C1A
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC      0x201A
+#define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041B
+#define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041C
+#define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041D
+#define TT_MS_LANGID_SWEDISH_FINLAND                   0x081D
+#define TT_MS_LANGID_THAI_THAILAND                     0x041E
+#define TT_MS_LANGID_TURKISH_TURKEY                    0x041F
+#define TT_MS_LANGID_URDU_PAKISTAN                     0x0420
+#define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421
+#define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422
+#define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423
+#define TT_MS_LANGID_SLOVENIAN_SLOVENIA                0x0424
+#define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425
+#define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426
+#define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427
+#define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428
+#define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042A
+#define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042B
+#define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042C
+#define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082C
+#define TT_MS_LANGID_BASQUE_BASQUE                     0x042D
+#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY             0x042E
+#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY             0x082E
+#define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042F
+#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA             0x0432
+#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA             0x0434
+#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA              0x0435
+#define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436
+#define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437
+#define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438
+#define TT_MS_LANGID_HINDI_INDIA                       0x0439
+#define TT_MS_LANGID_MALTESE_MALTA                     0x043A
+#define TT_MS_LANGID_SAMI_NORTHERN_NORWAY              0x043B
+#define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN              0x083B
+#define TT_MS_LANGID_SAMI_NORTHERN_FINLAND             0x0C3B
+#define TT_MS_LANGID_SAMI_LULE_NORWAY                  0x103B
+#define TT_MS_LANGID_SAMI_LULE_SWEDEN                  0x143B
+#define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY              0x183B
+#define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN              0x1C3B
+#define TT_MS_LANGID_SAMI_SKOLT_FINLAND                0x203B
+#define TT_MS_LANGID_SAMI_INARI_FINLAND                0x243B
+#define TT_MS_LANGID_IRISH_IRELAND                     0x083C
+#define TT_MS_LANGID_MALAY_MALAYSIA                    0x043E
+#define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083E
+#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN                 0x043F
+#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/   0x0440
+#define TT_MS_LANGID_KISWAHILI_KENYA                   0x0441
+#define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442
+#define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443
+#define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843
+#define TT_MS_LANGID_TATAR_RUSSIA                      0x0444
+#define TT_MS_LANGID_BENGALI_INDIA                     0x0445
+#define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845
+#define TT_MS_LANGID_PUNJABI_INDIA                     0x0446
+#define TT_MS_LANGID_GUJARATI_INDIA                    0x0447
+#define TT_MS_LANGID_ODIA_INDIA                        0x0448
+#define TT_MS_LANGID_TAMIL_INDIA                       0x0449
+#define TT_MS_LANGID_TELUGU_INDIA                      0x044A
+#define TT_MS_LANGID_KANNADA_INDIA                     0x044B
+#define TT_MS_LANGID_MALAYALAM_INDIA                   0x044C
+#define TT_MS_LANGID_ASSAMESE_INDIA                    0x044D
+#define TT_MS_LANGID_MARATHI_INDIA                     0x044E
+#define TT_MS_LANGID_SANSKRIT_INDIA                    0x044F
+#define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
+#define TT_MS_LANGID_MONGOLIAN_PRC                     0x0850
+#define TT_MS_LANGID_TIBETAN_PRC                       0x0451
+#define TT_MS_LANGID_WELSH_UNITED_KINGDOM              0x0452
+#define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453
+#define TT_MS_LANGID_LAO_LAOS                          0x0454
+#define TT_MS_LANGID_GALICIAN_GALICIAN                 0x0456
+#define TT_MS_LANGID_KONKANI_INDIA                     0x0457
+#define TT_MS_LANGID_SYRIAC_SYRIA                      0x045A
+#define TT_MS_LANGID_SINHALA_SRI_LANKA                 0x045B
+#define TT_MS_LANGID_INUKTITUT_CANADA                  0x045D
+#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN            0x085D
+#define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045E
+#define TT_MS_LANGID_TAMAZIGHT_ALGERIA                 0x085F
+#define TT_MS_LANGID_NEPALI_NEPAL                      0x0461
+#define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462
+#define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463
+#define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464
+#define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465
+#define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468
+#define TT_MS_LANGID_YORUBA_NIGERIA                    0x046A
+#define TT_MS_LANGID_QUECHUA_BOLIVIA                   0x046B
+#define TT_MS_LANGID_QUECHUA_ECUADOR                   0x086B
+#define TT_MS_LANGID_QUECHUA_PERU                      0x0C6B
+#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA     0x046C
+#define TT_MS_LANGID_BASHKIR_RUSSIA                    0x046D
+#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG          0x046E
+#define TT_MS_LANGID_GREENLANDIC_GREENLAND             0x046F
+#define TT_MS_LANGID_IGBO_NIGERIA                      0x0470
+#define TT_MS_LANGID_YI_PRC                            0x0478
+#define TT_MS_LANGID_MAPUDUNGUN_CHILE                  0x047A
+#define TT_MS_LANGID_MOHAWK_MOHAWK                     0x047C
+#define TT_MS_LANGID_BRETON_FRANCE                     0x047E
+#define TT_MS_LANGID_UIGHUR_PRC                        0x0480
+#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481
+#define TT_MS_LANGID_OCCITAN_FRANCE                    0x0482
+#define TT_MS_LANGID_CORSICAN_FRANCE                   0x0483
+#define TT_MS_LANGID_ALSATIAN_FRANCE                   0x0484
+#define TT_MS_LANGID_YAKUT_RUSSIA                      0x0485
+#define TT_MS_LANGID_KICHE_GUATEMALA                   0x0486
+#define TT_MS_LANGID_KINYARWANDA_RWANDA                0x0487
+#define TT_MS_LANGID_WOLOF_SENEGAL                     0x0488
+#define TT_MS_LANGID_DARI_AFGHANISTAN                  0x048C
+</pre>
+
+<p>Possible values of the language identifier field in the name records of the SFNT &lsquo;name&rsquo; table if the &lsquo;platform&rsquo; identifier code is <a href="ft2-truetype_tables.html#TT_PLATFORM_XXX">TT_PLATFORM_MICROSOFT</a>. These values are also used as return values for function <a href="ft2-truetype_tables.html#FT_Get_CMap_Language_ID">FT_Get_CMap_Language_ID</a>.</p>
+<p>The canonical source for Microsoft's IDs is</p>
+<p><a href="http://www.microsoft.com/globaldev/reference/lcid-all.mspx">http://www.microsoft.com/globaldev/reference/lcid-all.mspx</a> ,</p>
+<p>however, we only provide macros for language identifiers present in the OpenType specification: Microsoft has abandoned the concept of LCIDs (language code identifiers), and format&nbsp;1 of the &lsquo;name&rsquo; table provides a better mechanism for languages not covered here.</p>
+<p>More legacy values not listed in the reference can be found in the <a href="ft2-header_file_macros.html#FT_TRUETYPE_IDS_H">FT_TRUETYPE_IDS_H</a> header file.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_NAME_ID_XXX">TT_NAME_ID_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
+<pre>
+#define TT_NAME_ID_COPYRIGHT              0
+#define TT_NAME_ID_FONT_FAMILY            1
+#define TT_NAME_ID_FONT_SUBFAMILY         2
+#define TT_NAME_ID_UNIQUE_ID              3
+#define TT_NAME_ID_FULL_NAME              4
+#define TT_NAME_ID_VERSION_STRING         5
+#define TT_NAME_ID_PS_NAME                6
+#define TT_NAME_ID_TRADEMARK              7
+
+  /* the following values are from the OpenType spec */
+#define TT_NAME_ID_MANUFACTURER           8
+#define TT_NAME_ID_DESIGNER               9
+#define TT_NAME_ID_DESCRIPTION            10
+#define TT_NAME_ID_VENDOR_URL             11
+#define TT_NAME_ID_DESIGNER_URL           12
+#define TT_NAME_ID_LICENSE                13
+#define TT_NAME_ID_LICENSE_URL            14
+  /* number 15 is reserved */
+#define TT_NAME_ID_TYPOGRAPHIC_FAMILY     16
+#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY  17
+#define TT_NAME_ID_MAC_FULL_NAME          18
+
+  /* The following code is new as of 2000-01-21 */
+#define TT_NAME_ID_SAMPLE_TEXT            19
+
+  /* This is new in OpenType 1.3 */
+#define TT_NAME_ID_CID_FINDFONT_NAME      20
+
+  /* This is new in OpenType 1.5 */
+#define TT_NAME_ID_WWS_FAMILY             21
+#define TT_NAME_ID_WWS_SUBFAMILY          22
+
+  /* This is new in OpenType 1.7 */
+#define TT_NAME_ID_LIGHT_BACKGROUND       23
+#define TT_NAME_ID_DARK_BACKGROUND        24
+
+  /* This is new in OpenType 1.8 */
+#define TT_NAME_ID_VARIATIONS_PREFIX      25
+
+  /* these two values are deprecated */
+#define TT_NAME_ID_PREFERRED_FAMILY     TT_NAME_ID_TYPOGRAPHIC_FAMILY
+#define TT_NAME_ID_PREFERRED_SUBFAMILY  TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
+</pre>
+
+<p>Possible values of the &lsquo;name&rsquo; identifier field in the name records of an SFNT &lsquo;name&rsquo; table. These values are platform independent.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
+<div class="section">
+<h3 id="TT_UCR_XXX">TT_UCR_XXX</h3>
+<p>Defined in FT_TRUETYPE_IDS_H (freetype/ttnameid.h).</p>
+<pre>
+  /* ulUnicodeRange1 */
+  /* --------------- */
+
+  /* Bit  0   Basic Latin */
+#define TT_UCR_BASIC_LATIN                     (1L &lt;&lt;  0) /* U+0020-U+007E */
+  /* Bit  1   C1 Controls and Latin-1 Supplement */
+#define TT_UCR_LATIN1_SUPPLEMENT               (1L &lt;&lt;  1) /* U+0080-U+00FF */
+  /* Bit  2   Latin Extended-A */
+#define TT_UCR_LATIN_EXTENDED_A                (1L &lt;&lt;  2) /* U+0100-U+017F */
+  /* Bit  3   Latin Extended-B */
+#define TT_UCR_LATIN_EXTENDED_B                (1L &lt;&lt;  3) /* U+0180-U+024F */
+  /* Bit  4   IPA Extensions                 */
+  /*          Phonetic Extensions            */
+  /*          Phonetic Extensions Supplement */
+#define TT_UCR_IPA_EXTENSIONS                  (1L &lt;&lt;  4) /* U+0250-U+02AF */
+                                                          /* U+1D00-U+1D7F */
+                                                          /* U+1D80-U+1DBF */
+  /* Bit  5   Spacing Modifier Letters */
+  /*          Modifier Tone Letters    */
+#define TT_UCR_SPACING_MODIFIER                (1L &lt;&lt;  5) /* U+02B0-U+02FF */
+                                                          /* U+A700-U+A71F */
+  /* Bit  6   Combining Diacritical Marks            */
+  /*          Combining Diacritical Marks Supplement */
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS     (1L &lt;&lt;  6) /* U+0300-U+036F */
+                                                          /* U+1DC0-U+1DFF */
+  /* Bit  7   Greek and Coptic */
+#define TT_UCR_GREEK                           (1L &lt;&lt;  7) /* U+0370-U+03FF */
+  /* Bit  8   Coptic */
+#define TT_UCR_COPTIC                          (1L &lt;&lt;  8) /* U+2C80-U+2CFF */
+  /* Bit  9   Cyrillic            */
+  /*          Cyrillic Supplement */
+  /*          Cyrillic Extended-A */
+  /*          Cyrillic Extended-B */
+#define TT_UCR_CYRILLIC                        (1L &lt;&lt;  9) /* U+0400-U+04FF */
+                                                          /* U+0500-U+052F */
+                                                          /* U+2DE0-U+2DFF */
+                                                          /* U+A640-U+A69F */
+  /* Bit 10   Armenian */
+#define TT_UCR_ARMENIAN                        (1L &lt;&lt; 10) /* U+0530-U+058F */
+  /* Bit 11   Hebrew */
+#define TT_UCR_HEBREW                          (1L &lt;&lt; 11) /* U+0590-U+05FF */
+  /* Bit 12   Vai */
+#define TT_UCR_VAI                             (1L &lt;&lt; 12) /* U+A500-U+A63F */
+  /* Bit 13   Arabic            */
+  /*          Arabic Supplement */
+#define TT_UCR_ARABIC                          (1L &lt;&lt; 13) /* U+0600-U+06FF */
+                                                          /* U+0750-U+077F */
+  /* Bit 14   NKo */
+#define TT_UCR_NKO                             (1L &lt;&lt; 14) /* U+07C0-U+07FF */
+  /* Bit 15   Devanagari */
+#define TT_UCR_DEVANAGARI                      (1L &lt;&lt; 15) /* U+0900-U+097F */
+  /* Bit 16   Bengali */
+#define TT_UCR_BENGALI                         (1L &lt;&lt; 16) /* U+0980-U+09FF */
+  /* Bit 17   Gurmukhi */
+#define TT_UCR_GURMUKHI                        (1L &lt;&lt; 17) /* U+0A00-U+0A7F */
+  /* Bit 18   Gujarati */
+#define TT_UCR_GUJARATI                        (1L &lt;&lt; 18) /* U+0A80-U+0AFF */
+  /* Bit 19   Oriya */
+#define TT_UCR_ORIYA                           (1L &lt;&lt; 19) /* U+0B00-U+0B7F */
+  /* Bit 20   Tamil */
+#define TT_UCR_TAMIL                           (1L &lt;&lt; 20) /* U+0B80-U+0BFF */
+  /* Bit 21   Telugu */
+#define TT_UCR_TELUGU                          (1L &lt;&lt; 21) /* U+0C00-U+0C7F */
+  /* Bit 22   Kannada */
+#define TT_UCR_KANNADA                         (1L &lt;&lt; 22) /* U+0C80-U+0CFF */
+  /* Bit 23   Malayalam */
+#define TT_UCR_MALAYALAM                       (1L &lt;&lt; 23) /* U+0D00-U+0D7F */
+  /* Bit 24   Thai */
+#define TT_UCR_THAI                            (1L &lt;&lt; 24) /* U+0E00-U+0E7F */
+  /* Bit 25   Lao */
+#define TT_UCR_LAO                             (1L &lt;&lt; 25) /* U+0E80-U+0EFF */
+  /* Bit 26   Georgian            */
+  /*          Georgian Supplement */
+#define TT_UCR_GEORGIAN                        (1L &lt;&lt; 26) /* U+10A0-U+10FF */
+                                                          /* U+2D00-U+2D2F */
+  /* Bit 27   Balinese */
+#define TT_UCR_BALINESE                        (1L &lt;&lt; 27) /* U+1B00-U+1B7F */
+  /* Bit 28   Hangul Jamo */
+#define TT_UCR_HANGUL_JAMO                     (1L &lt;&lt; 28) /* U+1100-U+11FF */
+  /* Bit 29   Latin Extended Additional */
+  /*          Latin Extended-C          */
+  /*          Latin Extended-D          */
+#define TT_UCR_LATIN_EXTENDED_ADDITIONAL       (1L &lt;&lt; 29) /* U+1E00-U+1EFF */
+                                                          /* U+2C60-U+2C7F */
+                                                          /* U+A720-U+A7FF */
+  /* Bit 30   Greek Extended */
+#define TT_UCR_GREEK_EXTENDED                  (1L &lt;&lt; 30) /* U+1F00-U+1FFF */
+  /* Bit 31   General Punctuation      */
+  /*          Supplemental Punctuation */
+#define TT_UCR_GENERAL_PUNCTUATION             (1L &lt;&lt; 31) /* U+2000-U+206F */
+                                                          /* U+2E00-U+2E7F */
+
+  /* ulUnicodeRange2 */
+  /* --------------- */
+
+  /* Bit 32   Superscripts And Subscripts */
+#define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L &lt;&lt;  0) /* U+2070-U+209F */
+  /* Bit 33   Currency Symbols */
+#define TT_UCR_CURRENCY_SYMBOLS                (1L &lt;&lt;  1) /* U+20A0-U+20CF */
+  /* Bit 34   Combining Diacritical Marks For Symbols */
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
+                                               (1L &lt;&lt;  2) /* U+20D0-U+20FF */
+  /* Bit 35   Letterlike Symbols */
+#define TT_UCR_LETTERLIKE_SYMBOLS              (1L &lt;&lt;  3) /* U+2100-U+214F */
+  /* Bit 36   Number Forms */
+#define TT_UCR_NUMBER_FORMS                    (1L &lt;&lt;  4) /* U+2150-U+218F */
+  /* Bit 37   Arrows                           */
+  /*          Supplemental Arrows-A            */
+  /*          Supplemental Arrows-B            */
+  /*          Miscellaneous Symbols and Arrows */
+#define TT_UCR_ARROWS                          (1L &lt;&lt;  5) /* U+2190-U+21FF */
+                                                          /* U+27F0-U+27FF */
+                                                          /* U+2900-U+297F */
+                                                          /* U+2B00-U+2BFF */
+  /* Bit 38   Mathematical Operators               */
+  /*          Supplemental Mathematical Operators  */
+  /*          Miscellaneous Mathematical Symbols-A */
+  /*          Miscellaneous Mathematical Symbols-B */
+#define TT_UCR_MATHEMATICAL_OPERATORS          (1L &lt;&lt;  6) /* U+2200-U+22FF */
+                                                          /* U+2A00-U+2AFF */
+                                                          /* U+27C0-U+27EF */
+                                                          /* U+2980-U+29FF */
+  /* Bit 39 Miscellaneous Technical */
+#define TT_UCR_MISCELLANEOUS_TECHNICAL         (1L &lt;&lt;  7) /* U+2300-U+23FF */
+  /* Bit 40   Control Pictures */
+#define TT_UCR_CONTROL_PICTURES                (1L &lt;&lt;  8) /* U+2400-U+243F */
+  /* Bit 41   Optical Character Recognition */
+#define TT_UCR_OCR                             (1L &lt;&lt;  9) /* U+2440-U+245F */
+  /* Bit 42   Enclosed Alphanumerics */
+#define TT_UCR_ENCLOSED_ALPHANUMERICS          (1L &lt;&lt; 10) /* U+2460-U+24FF */
+  /* Bit 43   Box Drawing */
+#define TT_UCR_BOX_DRAWING                     (1L &lt;&lt; 11) /* U+2500-U+257F */
+  /* Bit 44   Block Elements */
+#define TT_UCR_BLOCK_ELEMENTS                  (1L &lt;&lt; 12) /* U+2580-U+259F */
+  /* Bit 45   Geometric Shapes */
+#define TT_UCR_GEOMETRIC_SHAPES                (1L &lt;&lt; 13) /* U+25A0-U+25FF */
+  /* Bit 46   Miscellaneous Symbols */
+#define TT_UCR_MISCELLANEOUS_SYMBOLS           (1L &lt;&lt; 14) /* U+2600-U+26FF */
+  /* Bit 47   Dingbats */
+#define TT_UCR_DINGBATS                        (1L &lt;&lt; 15) /* U+2700-U+27BF */
+  /* Bit 48   CJK Symbols and Punctuation */
+#define TT_UCR_CJK_SYMBOLS                     (1L &lt;&lt; 16) /* U+3000-U+303F */
+  /* Bit 49   Hiragana */
+#define TT_UCR_HIRAGANA                        (1L &lt;&lt; 17) /* U+3040-U+309F */
+  /* Bit 50   Katakana                     */
+  /*          Katakana Phonetic Extensions */
+#define TT_UCR_KATAKANA                        (1L &lt;&lt; 18) /* U+30A0-U+30FF */
+                                                          /* U+31F0-U+31FF */
+  /* Bit 51   Bopomofo          */
+  /*          Bopomofo Extended */
+#define TT_UCR_BOPOMOFO                        (1L &lt;&lt; 19) /* U+3100-U+312F */
+                                                          /* U+31A0-U+31BF */
+  /* Bit 52   Hangul Compatibility Jamo */
+#define TT_UCR_HANGUL_COMPATIBILITY_JAMO       (1L &lt;&lt; 20) /* U+3130-U+318F */
+  /* Bit 53   Phags-Pa */
+#define TT_UCR_CJK_MISC                        (1L &lt;&lt; 21) /* U+A840-U+A87F */
+#define TT_UCR_KANBUN  TT_UCR_CJK_MISC /* deprecated */
+#define TT_UCR_PHAGSPA
+  /* Bit 54   Enclosed CJK Letters and Months */
+#define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS     (1L &lt;&lt; 22) /* U+3200-U+32FF */
+  /* Bit 55   CJK Compatibility */
+#define TT_UCR_CJK_COMPATIBILITY               (1L &lt;&lt; 23) /* U+3300-U+33FF */
+  /* Bit 56   Hangul Syllables */
+#define TT_UCR_HANGUL                          (1L &lt;&lt; 24) /* U+AC00-U+D7A3 */
+  /* Bit 57   High Surrogates              */
+  /*          High Private Use Surrogates  */
+  /*          Low Surrogates               */
+
+  /* According to OpenType specs v.1.3+,   */
+  /* setting bit 57 implies that there is  */
+  /* at least one codepoint beyond the     */
+  /* Basic Multilingual Plane that is      */
+  /* supported by this font.  So it really */
+  /* means &gt;= U+10000.                     */
+#define TT_UCR_SURROGATES                      (1L &lt;&lt; 25) /* U+D800-U+DB7F */
+                                                          /* U+DB80-U+DBFF */
+                                                          /* U+DC00-U+DFFF */
+#define TT_UCR_NON_PLANE_0  TT_UCR_SURROGATES
+  /* Bit 58  Phoenician */
+#define TT_UCR_PHOENICIAN                      (1L &lt;&lt; 26) /*U+10900-U+1091F*/
+  /* Bit 59   CJK Unified Ideographs             */
+  /*          CJK Radicals Supplement            */
+  /*          Kangxi Radicals                    */
+  /*          Ideographic Description Characters */
+  /*          CJK Unified Ideographs Extension A */
+  /*          CJK Unified Ideographs Extension B */
+  /*          Kanbun                             */
+#define TT_UCR_CJK_UNIFIED_IDEOGRAPHS          (1L &lt;&lt; 27) /* U+4E00-U+9FFF */
+                                                          /* U+2E80-U+2EFF */
+                                                          /* U+2F00-U+2FDF */
+                                                          /* U+2FF0-U+2FFF */
+                                                          /* U+3400-U+4DB5 */
+                                                          /*U+20000-U+2A6DF*/
+                                                          /* U+3190-U+319F */
+  /* Bit 60   Private Use */
+#define TT_UCR_PRIVATE_USE                     (1L &lt;&lt; 28) /* U+E000-U+F8FF */
+  /* Bit 61   CJK Strokes                             */
+  /*          CJK Compatibility Ideographs            */
+  /*          CJK Compatibility Ideographs Supplement */
+#define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS    (1L &lt;&lt; 29) /* U+31C0-U+31EF */
+                                                          /* U+F900-U+FAFF */
+                                                          /*U+2F800-U+2FA1F*/
+  /* Bit 62   Alphabetic Presentation Forms */
+#define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L &lt;&lt; 30) /* U+FB00-U+FB4F */
+  /* Bit 63   Arabic Presentation Forms-A */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_A     (1L &lt;&lt; 31) /* U+FB50-U+FDFF */
+
+  /* ulUnicodeRange3 */
+  /* --------------- */
+
+  /* Bit 64   Combining Half Marks */
+#define TT_UCR_COMBINING_HALF_MARKS            (1L &lt;&lt;  0) /* U+FE20-U+FE2F */
+  /* Bit 65   Vertical forms          */
+  /*          CJK Compatibility Forms */
+#define TT_UCR_CJK_COMPATIBILITY_FORMS         (1L &lt;&lt;  1) /* U+FE10-U+FE1F */
+                                                          /* U+FE30-U+FE4F */
+  /* Bit 66   Small Form Variants */
+#define TT_UCR_SMALL_FORM_VARIANTS             (1L &lt;&lt;  2) /* U+FE50-U+FE6F */
+  /* Bit 67   Arabic Presentation Forms-B */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_B     (1L &lt;&lt;  3) /* U+FE70-U+FEFE */
+  /* Bit 68   Halfwidth and Fullwidth Forms */
+#define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L &lt;&lt;  4) /* U+FF00-U+FFEF */
+  /* Bit 69   Specials */
+#define TT_UCR_SPECIALS                        (1L &lt;&lt;  5) /* U+FFF0-U+FFFD */
+  /* Bit 70   Tibetan */
+#define TT_UCR_TIBETAN                         (1L &lt;&lt;  6) /* U+0F00-U+0FFF */
+  /* Bit 71   Syriac */
+#define TT_UCR_SYRIAC                          (1L &lt;&lt;  7) /* U+0700-U+074F */
+  /* Bit 72   Thaana */
+#define TT_UCR_THAANA                          (1L &lt;&lt;  8) /* U+0780-U+07BF */
+  /* Bit 73   Sinhala */
+#define TT_UCR_SINHALA                         (1L &lt;&lt;  9) /* U+0D80-U+0DFF */
+  /* Bit 74   Myanmar */
+#define TT_UCR_MYANMAR                         (1L &lt;&lt; 10) /* U+1000-U+109F */
+  /* Bit 75   Ethiopic            */
+  /*          Ethiopic Supplement */
+  /*          Ethiopic Extended   */
+#define TT_UCR_ETHIOPIC                        (1L &lt;&lt; 11) /* U+1200-U+137F */
+                                                          /* U+1380-U+139F */
+                                                          /* U+2D80-U+2DDF */
+  /* Bit 76   Cherokee */
+#define TT_UCR_CHEROKEE                        (1L &lt;&lt; 12) /* U+13A0-U+13FF */
+  /* Bit 77   Unified Canadian Aboriginal Syllabics */
+#define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS   (1L &lt;&lt; 13) /* U+1400-U+167F */
+  /* Bit 78   Ogham */
+#define TT_UCR_OGHAM                           (1L &lt;&lt; 14) /* U+1680-U+169F */
+  /* Bit 79   Runic */
+#define TT_UCR_RUNIC                           (1L &lt;&lt; 15) /* U+16A0-U+16FF */
+  /* Bit 80   Khmer         */
+  /*          Khmer Symbols */
+#define TT_UCR_KHMER                           (1L &lt;&lt; 16) /* U+1780-U+17FF */
+                                                          /* U+19E0-U+19FF */
+  /* Bit 81   Mongolian */
+#define TT_UCR_MONGOLIAN                       (1L &lt;&lt; 17) /* U+1800-U+18AF */
+  /* Bit 82   Braille Patterns */
+#define TT_UCR_BRAILLE                         (1L &lt;&lt; 18) /* U+2800-U+28FF */
+  /* Bit 83   Yi Syllables */
+  /*          Yi Radicals  */
+#define TT_UCR_YI                              (1L &lt;&lt; 19) /* U+A000-U+A48F */
+                                                          /* U+A490-U+A4CF */
+  /* Bit 84   Tagalog  */
+  /*          Hanunoo  */
+  /*          Buhid    */
+  /*          Tagbanwa */
+#define TT_UCR_PHILIPPINE                      (1L &lt;&lt; 20) /* U+1700-U+171F */
+                                                          /* U+1720-U+173F */
+                                                          /* U+1740-U+175F */
+                                                          /* U+1760-U+177F */
+  /* Bit 85   Old Italic */
+#define TT_UCR_OLD_ITALIC                      (1L &lt;&lt; 21) /*U+10300-U+1032F*/
+  /* Bit 86   Gothic */
+#define TT_UCR_GOTHIC                          (1L &lt;&lt; 22) /*U+10330-U+1034F*/
+  /* Bit 87   Deseret */
+#define TT_UCR_DESERET                         (1L &lt;&lt; 23) /*U+10400-U+1044F*/
+  /* Bit 88   Byzantine Musical Symbols      */
+  /*          Musical Symbols                */
+  /*          Ancient Greek Musical Notation */
+#define TT_UCR_MUSICAL_SYMBOLS                 (1L &lt;&lt; 24) /*U+1D000-U+1D0FF*/
+                                                          /*U+1D100-U+1D1FF*/
+                                                          /*U+1D200-U+1D24F*/
+  /* Bit 89   Mathematical Alphanumeric Symbols */
+#define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS       (1L &lt;&lt; 25) /*U+1D400-U+1D7FF*/
+  /* Bit 90   Private Use (plane 15) */
+  /*          Private Use (plane 16) */
+#define TT_UCR_PRIVATE_USE_SUPPLEMENTARY       (1L &lt;&lt; 26) /*U+F0000-U+FFFFD*/
+                                                        /*U+100000-U+10FFFD*/
+  /* Bit 91   Variation Selectors            */
+  /*          Variation Selectors Supplement */
+#define TT_UCR_VARIATION_SELECTORS             (1L &lt;&lt; 27) /* U+FE00-U+FE0F */
+                                                          /*U+E0100-U+E01EF*/
+  /* Bit 92   Tags */
+#define TT_UCR_TAGS                            (1L &lt;&lt; 28) /*U+E0000-U+E007F*/
+  /* Bit 93   Limbu */
+#define TT_UCR_LIMBU                           (1L &lt;&lt; 29) /* U+1900-U+194F */
+  /* Bit 94   Tai Le */
+#define TT_UCR_TAI_LE                          (1L &lt;&lt; 30) /* U+1950-U+197F */
+  /* Bit 95   New Tai Lue */
+#define TT_UCR_NEW_TAI_LUE                     (1L &lt;&lt; 31) /* U+1980-U+19DF */
+
+  /* ulUnicodeRange4 */
+  /* --------------- */
+
+  /* Bit 96   Buginese */
+#define TT_UCR_BUGINESE                        (1L &lt;&lt;  0) /* U+1A00-U+1A1F */
+  /* Bit 97   Glagolitic */
+#define TT_UCR_GLAGOLITIC                      (1L &lt;&lt;  1) /* U+2C00-U+2C5F */
+  /* Bit 98   Tifinagh */
+#define TT_UCR_TIFINAGH                        (1L &lt;&lt;  2) /* U+2D30-U+2D7F */
+  /* Bit 99   Yijing Hexagram Symbols */
+#define TT_UCR_YIJING                          (1L &lt;&lt;  3) /* U+4DC0-U+4DFF */
+  /* Bit 100  Syloti Nagri */
+#define TT_UCR_SYLOTI_NAGRI                    (1L &lt;&lt;  4) /* U+A800-U+A82F */
+  /* Bit 101  Linear B Syllabary */
+  /*          Linear B Ideograms */
+  /*          Aegean Numbers     */
+#define TT_UCR_LINEAR_B                        (1L &lt;&lt;  5) /*U+10000-U+1007F*/
+                                                          /*U+10080-U+100FF*/
+                                                          /*U+10100-U+1013F*/
+  /* Bit 102  Ancient Greek Numbers */
+#define TT_UCR_ANCIENT_GREEK_NUMBERS           (1L &lt;&lt;  6) /*U+10140-U+1018F*/
+  /* Bit 103  Ugaritic */
+#define TT_UCR_UGARITIC                        (1L &lt;&lt;  7) /*U+10380-U+1039F*/
+  /* Bit 104  Old Persian */
+#define TT_UCR_OLD_PERSIAN                     (1L &lt;&lt;  8) /*U+103A0-U+103DF*/
+  /* Bit 105  Shavian */
+#define TT_UCR_SHAVIAN                         (1L &lt;&lt;  9) /*U+10450-U+1047F*/
+  /* Bit 106  Osmanya */
+#define TT_UCR_OSMANYA                         (1L &lt;&lt; 10) /*U+10480-U+104AF*/
+  /* Bit 107  Cypriot Syllabary */
+#define TT_UCR_CYPRIOT_SYLLABARY               (1L &lt;&lt; 11) /*U+10800-U+1083F*/
+  /* Bit 108  Kharoshthi */
+#define TT_UCR_KHAROSHTHI                      (1L &lt;&lt; 12) /*U+10A00-U+10A5F*/
+  /* Bit 109  Tai Xuan Jing Symbols */
+#define TT_UCR_TAI_XUAN_JING                   (1L &lt;&lt; 13) /*U+1D300-U+1D35F*/
+  /* Bit 110  Cuneiform                         */
+  /*          Cuneiform Numbers and Punctuation */
+#define TT_UCR_CUNEIFORM                       (1L &lt;&lt; 14) /*U+12000-U+123FF*/
+                                                          /*U+12400-U+1247F*/
+  /* Bit 111  Counting Rod Numerals */
+#define TT_UCR_COUNTING_ROD_NUMERALS           (1L &lt;&lt; 15) /*U+1D360-U+1D37F*/
+  /* Bit 112  Sundanese */
+#define TT_UCR_SUNDANESE                       (1L &lt;&lt; 16) /* U+1B80-U+1BBF */
+  /* Bit 113  Lepcha */
+#define TT_UCR_LEPCHA                          (1L &lt;&lt; 17) /* U+1C00-U+1C4F */
+  /* Bit 114  Ol Chiki */
+#define TT_UCR_OL_CHIKI                        (1L &lt;&lt; 18) /* U+1C50-U+1C7F */
+  /* Bit 115  Saurashtra */
+#define TT_UCR_SAURASHTRA                      (1L &lt;&lt; 19) /* U+A880-U+A8DF */
+  /* Bit 116  Kayah Li */
+#define TT_UCR_KAYAH_LI                        (1L &lt;&lt; 20) /* U+A900-U+A92F */
+  /* Bit 117  Rejang */
+#define TT_UCR_REJANG                          (1L &lt;&lt; 21) /* U+A930-U+A95F */
+  /* Bit 118  Cham */
+#define TT_UCR_CHAM                            (1L &lt;&lt; 22) /* U+AA00-U+AA5F */
+  /* Bit 119  Ancient Symbols */
+#define TT_UCR_ANCIENT_SYMBOLS                 (1L &lt;&lt; 23) /*U+10190-U+101CF*/
+  /* Bit 120  Phaistos Disc */
+#define TT_UCR_PHAISTOS_DISC                   (1L &lt;&lt; 24) /*U+101D0-U+101FF*/
+  /* Bit 121  Carian */
+  /*          Lycian */
+  /*          Lydian */
+#define TT_UCR_OLD_ANATOLIAN                   (1L &lt;&lt; 25) /*U+102A0-U+102DF*/
+                                                          /*U+10280-U+1029F*/
+                                                          /*U+10920-U+1093F*/
+  /* Bit 122  Domino Tiles  */
+  /*          Mahjong Tiles */
+#define TT_UCR_GAME_TILES                      (1L &lt;&lt; 26) /*U+1F030-U+1F09F*/
+                                                          /*U+1F000-U+1F02F*/
+  /* Bit 123-127 Reserved for process-internal usage */
+</pre>
+
+<p>Possible bit mask values for the &lsquo;ulUnicodeRangeX&rsquo; fields in an SFNT &lsquo;OS/2&rsquo; table.</p>
+
+<hr>
+<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
+
 </body>
 </html>
index b76b587..b3b905a 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="tt_driver">The TrueType driver</h1>
 <h2>Synopsis</h2>
 <p>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 <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec20">http://www.beatstamm.com/typography/RTRCh4.htm#Sec20</a>. Somewhat by definition, compatible width ClearType allows for non-linear widths, but only when the bi-level version has non-linear widths.</p>
 <p><i>ClearType</i> <i>Subpixel</i> <i>Positioning</i></p>
 <p>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 &lsquo;natural mode&rsquo;, not to be confused with GDI's &lsquo;natural widths&rsquo;. Subpixel positioning, in the current implementation of Direct Write, unfortunately does not support hinted advance widths, see <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec22">http://www.beatstamm.com/typography/RTRCh4.htm#Sec22</a>. Note that the TrueType interpreter fully allows the advance width to be adjusted in this mode, just the DWrite client will ignore those changes.</p>
-<p><i>ClearType</i> <i>Backwards</i> <i>Compatibility</i></p>
-<p>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 <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec1">http://www.beatstamm.com/typography/RTRCh4.htm#Sec1</a> and <a href="http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>. 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.</p>
+<p><i>ClearType</i> <i>Backward</i> <i>Compatibility</i></p>
+<p>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 <a href="http://www.beatstamm.com/typography/RTRCh4.htm#Sec1">http://www.beatstamm.com/typography/RTRCh4.htm#Sec1</a> and <a href="http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>. This technique is not to be confused with ClearType compatible widths. ClearType backward 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 backward compatibility mode.</p>
 <p><i>Native</i> <i>ClearType</i> <i>Mode</i></p>
 <p>(Not to be confused with &lsquo;natural widths&rsquo;.) This mode removes all the exceptions in the TrueType interpreter when running with ClearType. Any issues on widths would still apply, though.</p>
 
 <div class="section">
 <h3 id="interpreter-version">interpreter-version</h3>
-<p>Defined in FT_TRUETYPE_DRIVER_H (freetype/ftttdrv.h).</p>
-<pre>
-   *   Currently, three versions are available, two representing the
-   *   bytecode interpreter with subpixel hinting support (old `Infinality'
-   *   code and new stripped-down and higher performance `minimal' code) and
-   *   one without, respectively.  The default is subpixel support if
-   *   TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support
-   *   otherwise (since it isn't available then).
-   *
-   *   If subpixel hinting is on, many TrueType bytecode instructions behave
-   *   differently compared to B/W or grayscale rendering (except if `native
-   *   ClearType' is selected by the font).  Microsoft's main idea is to
-   *   render at a much increased horizontal resolution, then sampling down
-   *   the created output to subpixel precision.  However, many older fonts
-   *   are not suited to this and must be specially taken care of by
-   *   applying (hardcoded) tweaks in Microsoft's interpreter.
-   *
-   *   Details on subpixel hinting and some of the necessary tweaks can be
-   *   found in Greg Hitchcock's whitepaper at
-   *   `http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx'. 
-   *   Note that FreeType currently doesn't really `subpixel hint' (6x1, 6x2,
-   *   or 6x5 supersampling) like discussed in the paper.  Depending on the
-   *   chosen interpreter, it simply ignores instructions on vertical stems
-   *   to arrive at very similar results.
-   *
-   *   The following example code demonstrates how to deactivate subpixel
-   *   hinting (omitting the error handling).
-   *
-   *   {
-   *     <a href="ft2-base_interface.html#FT_Library">FT_Library</a>  library;
-   *     <a href="ft2-base_interface.html#FT_Face">FT_Face</a>     face;
-   *     <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>     interpreter_version = <a href="ft2-tt_driver.html#TT_INTERPRETER_VERSION_35">TT_INTERPRETER_VERSION_35</a>;
-   *
-   *
-   *     <a href="ft2-base_interface.html#FT_Init_FreeType">FT_Init_FreeType</a>( &amp;library );
-   *
-   *     <a href="ft2-module_management.html#FT_Property_Set">FT_Property_Set</a>( library, "truetype",
-   *                               "interpreter-version",
-   *                               &amp;interpreter_version );
-   *   }
-   *
-   * @note:
-   *   This property can be used with @<a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.
-   *
-   */
+
+<p>Currently, three versions are available, two representing the bytecode interpreter with subpixel hinting support (old &lsquo;Infinality&rsquo; code and new stripped-down and higher performance &lsquo;minimal&rsquo; code) and one without, respectively. The default is subpixel support if TT_CONFIG_OPTION_SUBPIXEL_HINTING is defined, and no subpixel support otherwise (since it isn't available then).</p>
+<p>If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering (except if &lsquo;native ClearType&rsquo; is selected by the font). Microsoft's main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) tweaks in Microsoft's interpreter.</p>
+<p>Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at &lsquo;<a href="http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>&rsquo;. Note that FreeType currently doesn't really &lsquo;subpixel hint&rsquo; (6x1, 6x2, or 6x5 supersampling) like discussed in the paper. Depending on the chosen interpreter, it simply ignores instructions on vertical stems to arrive at very similar results.</p>
+<p>The following example code demonstrates how to deactivate subpixel hinting (omitting the error handling).</p>
+<pre class="colored">
+  FT_Library  library;
+  FT_Face     face;
+  FT_UInt     interpreter_version = TT_INTERPRETER_VERSION_35;
+
+
+  FT_Init_FreeType( &amp;library );
+
+  FT_Property_Set( library, "truetype",
+                            "interpreter-version",
+                            &amp;interpreter_version );
 </pre>
+
+<h4>note</h4>
+<p>This property can be used with <a href="ft2-module_management.html#FT_Property_Get">FT_Property_Get</a> also.</p>
+<p>This property can be set via the &lsquo;FREETYPE_PROPERTIES&rsquo; environment variable (using values &lsquo;35&rsquo;, &lsquo;38&rsquo;, or &lsquo;40&rsquo;).</p>
+
 <hr>
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
 
 
 <h4>note</h4>
 <p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <b>not</b> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p>
-<p>If FreeType has not been compiled with the configuration option FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version&nbsp;38 or&nbsp;40 causes an &lsquo;FT_Err_Unimplemented_Feature&rsquo; error.</p>
+<p>If FreeType has not been compiled with the configuration option TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version&nbsp;38 or&nbsp;40 causes an &lsquo;FT_Err_Unimplemented_Feature&rsquo; error.</p>
 <p>Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the &lsquo;GETINFO&rsquo; bytecode instruction are more convoluted than desired.</p>
 <p>Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it.</p>
 <pre class="colored">
index 2129c07..a7bd0ac 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="type1_tables">Type 1 Tables</h1>
 <h2>Synopsis</h2>
index d2eb209..52d05f6 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="user_allocation">User allocation</h1>
 
index 2893688..5982f60 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="version">FreeType Version</h1>
 <h2>Synopsis</h2>
 <p>Defined in FT_FREETYPE_H (freetype/freetype.h).</p>
 <pre>
 #define <a href="ft2-version.html#FREETYPE_MAJOR">FREETYPE_MAJOR</a>  2
-#define <a href="ft2-version.html#FREETYPE_MINOR">FREETYPE_MINOR</a>  6
-#define <a href="ft2-version.html#FREETYPE_PATCH">FREETYPE_PATCH</a>  5
+#define <a href="ft2-version.html#FREETYPE_MINOR">FREETYPE_MINOR</a>  8
+#define <a href="ft2-version.html#FREETYPE_PATCH">FREETYPE_PATCH</a>  0
 </pre>
 
 <p>These three macros identify the FreeType source code version. Use <a href="ft2-version.html#FT_Library_Version">FT_Library_Version</a> to access them at runtime.</p>
index 9dbe9c3..be2a6a0 100644 (file)
@@ -3,7 +3,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>FreeType-2.6.5 API Reference</title>
+<title>FreeType-2.8 API Reference</title>
 <style type="text/css">
   a:link { color: #0000EF; }
   a:visited { color: #51188E; }
 <body>
 
 <table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
-<h1>FreeType-2.6.5 API Reference</h1>
+<h1>FreeType-2.8 API Reference</h1>
 
 <h1 id="winfnt_fonts">Window FNT Files</h1>
 <h2>Synopsis</h2>
index fc03a50..f07b067 100644 (file)
@@ -189,7 +189,7 @@ How to prepare a new release
 
 ----------------------------------------------------------------------
 
-Copyright 2003-2016 by
+Copyright 2003-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index 157a704..889aebf 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    ANSI-specific configuration file (specification only).               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -143,6 +143,14 @@ FT_BEGIN_HEADER
 #endif
 
 
+  /* Fix compiler warning with sgi compiler */
+#if defined( __sgi ) && !defined( __GNUC__ )
+#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
+#pragma set woff 3505
+#endif
+#endif
+
+
   /*************************************************************************/
   /*                                                                       */
   /* <Section>                                                             */
@@ -325,6 +333,15 @@ FT_BEGIN_HEADER
 #endif
 
 
+#ifdef _WIN64
+  /* only 64bit Windows uses the LLP64 data model, i.e., */
+  /* 32bit integers, 64bit pointers                      */
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
+#else
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
+#endif
+
+
   /*************************************************************************/
   /*                                                                       */
   /* miscellaneous                                                         */
@@ -338,10 +355,11 @@ FT_BEGIN_HEADER
 
 
   /* typeof condition taken from gnulib's `intprops.h' header file */
-#if ( __GNUC__ >= 2                         || \
-      defined( __IBM__TYPEOF__ )            || \
-      ( __SUNPRO_C >= 0x5110 && !__STDC__ ) )
-#define FT_TYPEOF( type )  (__typeof__ (type))
+#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 )                       || \
+      ( defined( __IBMC__ ) && __IBMC__ >= 1210 &&                      \
+        defined( __IBM__TYPEOF__ ) )                                 || \
+      ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
+#define FT_TYPEOF( type )  ( __typeof__ ( type ) )
 #else
 #define FT_TYPEOF( type )  /* empty */
 #endif
index 68e1483..d491af5 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Build macros of the FreeType 2 library.                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   /*************************************************************************
    *
    * @macro:
+   *   FT_PCF_DRIVER_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing
+   *   structures and macros related to the PCF driver module.
+   *
+   */
+#define FT_PCF_DRIVER_H  <freetype/ftpcfdrv.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
    *   FT_TYPE1_TABLES_H
    *
    * @description:
index 2556c64..1bf6e8f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    User-selectable configuration macros (specification only).           */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -77,6 +77,36 @@ FT_BEGIN_HEADER
 
   /*************************************************************************/
   /*                                                                       */
+  /* If you enable this configuration option, FreeType recognizes an       */
+  /* environment variable called `FREETYPE_PROPERTIES', which can be used  */
+  /* to control the various font drivers and modules.  The controllable    */
+  /* properties are listed in the section `Controlling FreeType Modules'   */
+  /* in the reference's table of contents; currently there are properties  */
+  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'),      */
+  /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h').             */
+  /*                                                                       */
+  /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
+  /* multiple lines for better readability).                               */
+  /*                                                                       */
+  /*   <optional whitespace>                                               */
+  /*   <module-name1> ':'                                                  */
+  /*   <property-name1> '=' <property-value1>                              */
+  /*   <whitespace>                                                        */
+  /*   <module-name2> ':'                                                  */
+  /*   <property-name2> '=' <property-value2>                              */
+  /*   ...                                                                 */
+  /*                                                                       */
+  /* Example:                                                              */
+  /*                                                                       */
+  /*   FREETYPE_PROPERTIES=truetype:interpreter-version=35 \               */
+  /*                       cff:no-stem-darkening=1 \                       */
+  /*                       autofitter:warping=1                            */
+  /*                                                                       */
+#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+
+
+  /*************************************************************************/
+  /*                                                                       */
   /* Uncomment the line below if you want to activate sub-pixel rendering  */
   /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */
   /*                                                                       */
@@ -492,7 +522,21 @@ FT_BEGIN_HEADER
   /*   code will be used.                                                  */
   /*                                                                       */
   /*   Setting this macro is needed for systems that prohibit address      */
-  /*   fixups, such as BREW.                                               */
+  /*   fixups, such as BREW.  [Note that standard compilers like gcc or    */
+  /*   clang handle PIC generation automatically; you don't have to set    */
+  /*   FT_CONFIG_OPTION_PIC, which is only necessary for very special      */
+  /*   compilers.]                                                         */
+  /*                                                                       */
+  /*   Note that FT_CONFIG_OPTION_PIC support is not available for all     */
+  /*   modules (see `modules.cfg' for a complete list).  For building with */
+  /*   FT_CONFIG_OPTION_PIC support, do the following.                     */
+  /*                                                                       */
+  /*     0. Clone the repository.                                          */
+  /*     1. Define FT_CONFIG_OPTION_PIC.                                   */
+  /*     2. Remove all subdirectories in `src' that don't have             */
+  /*        FT_CONFIG_OPTION_PIC support.                                  */
+  /*     3. Comment out the corresponding modules in `modules.cfg'.        */
+  /*     4. Compile.                                                       */
   /*                                                                       */
 /* #define FT_CONFIG_OPTION_PIC */
 
@@ -596,17 +640,21 @@ FT_BEGIN_HEADER
   /* [1] for a technical overview on what this means.  See `ttinterp.h'    */
   /* for more details on the LEAN option.                                  */
   /*                                                                       */
-  /* There are three options.                                              */
+  /* There are three possible values.                                      */
   /*                                                                       */
-  /* 1. This option is associated with the `Infinality' moniker.           */
-  /*    Contributed by an individual nicknamed Infinality with the goal of */
+  /* Value 1:                                                              */
+  /*    This value is associated with the `Infinality' moniker,            */
+  /*    contributed by an individual nicknamed Infinality with the goal of */
   /*    making TrueType fonts render better than on Windows.  A high       */
   /*    amount of configurability and flexibility, down to rules for       */
   /*    single glyphs in fonts, but also very slow.  Its experimental and  */
   /*    slow nature and the original developer losing interest meant that  */
   /*    this option was never enabled in default builds.                   */
   /*                                                                       */
-  /* 2. The new default mode for the TrueType driver.  The Infinality code */
+  /*    The corresponding interpreter version is v38.                      */
+  /*                                                                       */
+  /* Value 2:                                                              */
+  /*    The new default mode for the TrueType driver.  The Infinality code */
   /*    base was stripped to the bare minimum and all configurability      */
   /*    removed in the name of speed and simplicity.  The configurability  */
   /*    was mainly aimed at legacy fonts like Arial, Times New Roman, or   */
@@ -616,14 +664,19 @@ FT_BEGIN_HEADER
   /*    that modern and web fonts render well while legacy fonts render    */
   /*    okay.                                                              */
   /*                                                                       */
-  /* 3. Compile both.                                                      */
+  /*    The corresponding interpreter version is v40.                      */
+  /*                                                                       */
+  /* Value 3:                                                              */
+  /*    Compile both, making both v38 and v40 available (the latter is the */
+  /*    default).                                                          */
   /*                                                                       */
   /* By undefining these, you get rendering behavior like on Windows       */
   /* without ClearType, i.e., Windows XP without ClearType enabled and     */
   /* Win9x (interpreter version v35).  Or not, depending on how much       */
   /* hinting blood and testing tears the font designer put into a given    */
   /* font.  If you define one or both subpixel hinting options, you can    */
-  /* switch between between v35 and the ones you define.                   */
+  /* switch between between v35 and the ones you define (using             */
+  /* `FT_Property_Set').                                                   */
   /*                                                                       */
   /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be      */
   /* defined.                                                              */
@@ -631,7 +684,7 @@ FT_BEGIN_HEADER
   /* [1] http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
   /*                                                                       */
 /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1         */
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2         */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2
 /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 ) */
 
 
@@ -791,6 +844,33 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*************************************************************************/
   /****                                                                 ****/
+  /****         P C F   D R I V E R    C O N F I G U R A T I O N        ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* There are many PCF fonts just called `Fixed' which look completely    */
+  /* different, and which have nothing to do with each other.  When        */
+  /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
+  /* random, the style changes often if one changes the size and one       */
+  /* cannot select some fonts at all.  This option makes the PCF module    */
+  /* prepend the foundry name (plus a space) to the family name.           */
+  /*                                                                       */
+  /* We also check whether we have `wide' characters; all put together, we */
+  /* get family names like `Sony Fixed' or `Misc Fixed Wide'.              */
+  /*                                                                       */
+  /* If this option is activated, it can be controlled with the            */
+  /* `no-long-family-names' property of the pcf driver module.             */
+  /*                                                                       */
+/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
   /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/
   /****                                                                 ****/
   /*************************************************************************/
@@ -806,7 +886,9 @@ FT_BEGIN_HEADER
 
   /*************************************************************************/
   /*                                                                       */
-  /* Compile autofit module with Indic script support.                     */
+  /* Compile autofit module with fallback Indic script support, covering   */
+  /* some scripts that the `latin' submodule of the autofit module doesn't */
+  /* (yet) handle.                                                         */
   /*                                                                       */
 #define AF_CONFIG_OPTION_INDIC
 
@@ -825,6 +907,26 @@ FT_BEGIN_HEADER
   /*                                                                       */
 #define AF_CONFIG_OPTION_USE_WARPER
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* Use TrueType-like size metrics for `light' auto-hinting.              */
+  /*                                                                       */
+  /* It is strongly recommended to avoid this option, which exists only to */
+  /* help some legacy applications retain its appearance and behaviour     */
+  /* with respect to auto-hinted TrueType fonts.                           */
+  /*                                                                       */
+  /* The very reason this option exists at all are GNU/Linux distributions */
+  /* like Fedora that did not un-patch the following change (which was     */
+  /* present in FreeType between versions 2.4.6 and 2.7.1, inclusive).     */
+  /*                                                                       */
+  /*   2011-07-16  Steven Chu  <steven.f.chu@gmail.com>                    */
+  /*                                                                       */
+  /*     [truetype] Fix metrics on size request for scalable fonts.        */
+  /*                                                                       */
+  /* This problematic commit is now reverted (more or less).               */
+  /*                                                                       */
+/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */
+
   /* */
 
 
@@ -842,6 +944,7 @@ FT_BEGIN_HEADER
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 #define  TT_USE_BYTECODE_INTERPRETER
 
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
 #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
 #define  TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
 #endif
@@ -850,6 +953,7 @@ FT_BEGIN_HEADER
 #define  TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
 #endif
 #endif
+#endif
 
 
   /*
index 562e255..05a4845 100644 (file)
@@ -5,7 +5,7 @@
 /*    ANSI-specific library and header configuration file (specification   */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   /**********************************************************************/
 
 
-#define ft_atol  atol
+#define ft_strtol  strtol
+#define ft_getenv  getenv
 
 
   /**********************************************************************/
index 45e10c4..2989fbb 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType high-level API and common types (specification only).       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -175,6 +175,7 @@ FT_BEGIN_HEADER
   /*    FT_Done_Face                                                       */
   /*    FT_Reference_Face                                                  */
   /*    FT_New_Memory_Face                                                 */
+  /*    FT_Face_Properties                                                 */
   /*    FT_Open_Face                                                       */
   /*    FT_Open_Args                                                       */
   /*    FT_Parameter                                                       */
@@ -265,8 +266,8 @@ FT_BEGIN_HEADER
   /*    FT_Glyph_Metrics                                                   */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model the metrics of a single glyph.  The      */
-  /*    values are expressed in 26.6 fractional pixel format; if the flag  */
+  /*    A structure to model the metrics of a single glyph.  The values    */
+  /*    are expressed in 26.6 fractional pixel format; if the flag         */
   /*    @FT_LOAD_NO_SCALE has been used while loading the glyph, values    */
   /*    are expressed in font units instead.                               */
   /*                                                                       */
@@ -305,6 +306,11 @@ FT_BEGIN_HEADER
   /*    `horiAdvance' or `vertAdvance'; you have to manually adjust these  */
   /*    values to account for the added width and height.                  */
   /*                                                                       */
+  /*    FreeType doesn't use the `VORG' table data for CFF fonts because   */
+  /*    it doesn't have an interface to quickly retrieve the glyph height. */
+  /*    The y~coordinate of the vertical origin can be simply computed as  */
+  /*    `vertBearingY + height' after loading a glyph.                     */
+  /*                                                                       */
   typedef struct  FT_Glyph_Metrics_
   {
     FT_Pos  width;
@@ -349,10 +355,10 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Note>                                                                */
   /*    Windows FNT:                                                       */
-  /*      The nominal size given in a FNT font is not reliable.  Thus when */
-  /*      the driver finds it incorrect, it sets `size' to some calculated */
-  /*      values and sets `x_ppem' and `y_ppem' to the pixel width and     */
-  /*      height given in the font, respectively.                          */
+  /*      The nominal size given in a FNT font is not reliable.  If the    */
+  /*      driver finds it incorrect, it sets `size' to some calculated     */
+  /*      values, and `x_ppem' and `y_ppem' to the pixel width and height  */
+  /*      given in the font, respectively.                                 */
   /*                                                                       */
   /*    TrueType embedded bitmaps:                                         */
   /*      `size', `width', and `height' values are not contained in the    */
@@ -421,9 +427,9 @@ FT_BEGIN_HEADER
   /*    FT_Module                                                          */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A handle to a given FreeType module object.  Each module can be a  */
+  /*    A handle to a given FreeType module object.  A module can be a     */
   /*    font driver, a renderer, or anything else that provides services   */
-  /*    to the formers.                                                    */
+  /*    to the former                                                    */
   /*                                                                       */
   typedef struct FT_ModuleRec_*  FT_Module;
 
@@ -434,8 +440,8 @@ FT_BEGIN_HEADER
   /*    FT_Driver                                                          */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A handle to a given FreeType font driver object.  Each font driver */
-  /*    is a special module capable of creating faces from font files.     */
+  /*    A handle to a given FreeType font driver object.  A font driver    */
+  /*    is a module capable of creating faces from font files.             */
   /*                                                                       */
   typedef struct FT_DriverRec_*  FT_Driver;
 
@@ -446,10 +452,10 @@ FT_BEGIN_HEADER
   /*    FT_Renderer                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A handle to a given FreeType renderer.  A renderer is a special    */
-  /*    module in charge of converting a glyph image to a bitmap, when     */
-  /*    necessary.  Each renderer supports a given glyph image format, and */
-  /*    one or more target surface depths.                                 */
+  /*    A handle to a given FreeType renderer.  A renderer is a module in  */
+  /*    charge of converting a glyph's outline image to a bitmap.  It      */
+  /*    supports a single glyph image format, and one or more target       */
+  /*    surface depths.                                                    */
   /*                                                                       */
   typedef struct FT_RendererRec_*  FT_Renderer;
 
@@ -467,15 +473,15 @@ FT_BEGIN_HEADER
   /*    FT_Face                                                            */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A handle to a given typographic face object.  A face object models */
-  /*    a given typeface, in a given style.                                */
+  /*    A handle to a typographic face object.  A face object models a     */
+  /*    given typeface, in a given style.                                  */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    Each face object also owns a single @FT_GlyphSlot object, as well  */
+  /*    A face object also owns a single @FT_GlyphSlot object, as well     */
   /*    as one or more @FT_Size objects.                                   */
   /*                                                                       */
   /*    Use @FT_New_Face or @FT_Open_Face to create a new face object from */
-  /*    a given filepathname or a custom input stream.                     */
+  /*    a given filepath or a custom input stream.                         */
   /*                                                                       */
   /*    Use @FT_Done_Face to destroy it (along with its slot and sizes).   */
   /*                                                                       */
@@ -500,11 +506,11 @@ FT_BEGIN_HEADER
   /*    FT_Size                                                            */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A handle to an object used to model a face scaled to a given       */
+  /*    A handle to an object that models a face scaled to a given         */
   /*    character size.                                                    */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    Each @FT_Face has an _active_ @FT_Size object that is used by      */
+  /*    An @FT_Face has one _active_ @FT_Size object that is used by       */
   /*    functions like @FT_Load_Glyph to determine the scaling             */
   /*    transformation that in turn is used to load and hint glyphs and    */
   /*    metrics.                                                           */
@@ -531,9 +537,8 @@ FT_BEGIN_HEADER
   /*    FT_GlyphSlot                                                       */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A handle to a given `glyph slot'.  A slot is a container where it  */
-  /*    is possible to load any of the glyphs contained in its parent      */
-  /*    face.                                                              */
+  /*    A handle to a given `glyph slot'.  A slot is a container that can  */
+  /*    hold any of the glyphs contained in its parent face.               */
   /*                                                                       */
   /*    In other words, each time you call @FT_Load_Glyph or               */
   /*    @FT_Load_Char, the slot's content is erased by the new glyph data, */
@@ -552,13 +557,14 @@ FT_BEGIN_HEADER
   /*    FT_CharMap                                                         */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A handle to a given character map.  A charmap is used to translate */
-  /*    character codes in a given encoding into glyph indexes for its     */
-  /*    parent's face.  Some font formats may provide several charmaps per */
-  /*    font.                                                              */
+  /*    A handle to a character map (usually abbreviated to `charmap').  A */
+  /*    charmap is used to translate character codes in a given encoding   */
+  /*    into glyph indexes for its parent's face.  Some font formats may   */
+  /*    provide several charmaps per font.                                 */
   /*                                                                       */
   /*    Each face object owns zero or more charmaps, but only one of them  */
-  /*    can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char.   */
+  /*    can be `active', providing the data used by @FT_Get_Char_Index or  */
+  /*    @FT_Load_Char.                                                     */
   /*                                                                       */
   /*    The list of available charmaps in a face is available through the  */
   /*    `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec.   */
@@ -615,8 +621,8 @@ FT_BEGIN_HEADER
   /*    FT_Encoding                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    An enumeration used to specify character sets supported by         */
-  /*    charmaps.  Used in the @FT_Select_Charmap API function.            */
+  /*    An enumeration to specify character sets supported by charmaps.    */
+  /*    Used in the @FT_Select_Charmap API function.                       */
   /*                                                                       */
   /* <Note>                                                                */
   /*    Despite the name, this enumeration lists specific character        */
@@ -630,18 +636,17 @@ FT_BEGIN_HEADER
   /*      The encoding value~0 is reserved.                                */
   /*                                                                       */
   /*    FT_ENCODING_UNICODE ::                                             */
-  /*      Corresponds to the Unicode character set.  This value covers     */
-  /*      all versions of the Unicode repertoire, including ASCII and      */
-  /*      Latin-1.  Most fonts include a Unicode charmap, but not all      */
-  /*      of them.                                                         */
+  /*      The Unicode character set.  This value covers all versions of    */
+  /*      the Unicode repertoire, including ASCII and Latin-1.  Most fonts */
+  /*      include a Unicode charmap, but not all of them.                  */
   /*                                                                       */
   /*      For example, if you want to access Unicode value U+1F028 (and    */
   /*      the font contains it), use value 0x1F028 as the input value for  */
   /*      @FT_Get_Char_Index.                                              */
   /*                                                                       */
   /*    FT_ENCODING_MS_SYMBOL ::                                           */
-  /*      Corresponds to the Microsoft Symbol encoding, used to encode     */
-  /*      mathematical symbols and wingdings.  For more information, see   */
+  /*      Microsoft Symbol encoding, used to encode mathematical symbols   */
+  /*      and wingdings.  For more information, see                        */
   /*      `http://www.microsoft.com/typography/otspec/recom.htm',          */
   /*      `http://www.kostis.net/charsets/symbol.htm', and                 */
   /*      `http://www.kostis.net/charsets/wingding.htm'.                   */
@@ -650,60 +655,60 @@ FT_BEGIN_HEADER
   /*      Area) in the range U+F020-U+F0FF.                                */
   /*                                                                       */
   /*    FT_ENCODING_SJIS ::                                                */
-  /*      Corresponds to Japanese SJIS encoding.  More info at             */
-  /*      `http://en.wikipedia.org/wiki/Shift_JIS'.                        */
-  /*      See note on multi-byte encodings below.                          */
+  /*      Shift JIS encoding for Japanese.  More info at                   */
+  /*      `http://en.wikipedia.org/wiki/Shift_JIS'.  See note on           */
+  /*      multi-byte encodings below.                                      */
   /*                                                                       */
-  /*    FT_ENCODING_GB2312 ::                                              */
-  /*      Corresponds to an encoding system for Simplified Chinese as      */
-  /*      used in mainland China.                                          */
+  /*    FT_ENCODING_PRC ::                                                 */
+  /*      Corresponds to encoding systems mainly for Simplified Chinese as */
+  /*      used in People's Republic of China (PRC).  The encoding layout   */
+  /*      is based on GB~2312 and its supersets GBK and GB~18030.          */
   /*                                                                       */
   /*    FT_ENCODING_BIG5 ::                                                */
   /*      Corresponds to an encoding system for Traditional Chinese as     */
   /*      used in Taiwan and Hong Kong.                                    */
   /*                                                                       */
   /*    FT_ENCODING_WANSUNG ::                                             */
-  /*      Corresponds to the Korean encoding system known as Wansung.      */
+  /*      Corresponds to the Korean encoding system known as Extended      */
+  /*      Wansung (MS Windows code page 949).                              */
   /*      For more information see                                         */
-  /*      `https://msdn.microsoft.com/en-US/goglobal/cc305154'.            */
+  /*      `http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */
   /*                                                                       */
   /*    FT_ENCODING_JOHAB ::                                               */
   /*      The Korean standard character set (KS~C 5601-1992), which        */
   /*      corresponds to MS Windows code page 1361.  This character set    */
-  /*      includes all possible Hangeul character combinations.            */
+  /*      includes all possible Hangul character combinations.             */
   /*                                                                       */
   /*    FT_ENCODING_ADOBE_LATIN_1 ::                                       */
   /*      Corresponds to a Latin-1 encoding as defined in a Type~1         */
   /*      PostScript font.  It is limited to 256 character codes.          */
   /*                                                                       */
   /*    FT_ENCODING_ADOBE_STANDARD ::                                      */
-  /*      Corresponds to the Adobe Standard encoding, as found in Type~1,  */
-  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */
-  /*      codes.                                                           */
+  /*      Adobe Standard encoding, as found in Type~1, CFF, and            */
+  /*      OpenType/CFF fonts.  It is limited to 256 character codes.       */
   /*                                                                       */
   /*    FT_ENCODING_ADOBE_EXPERT ::                                        */
-  /*      Corresponds to the Adobe Expert encoding, as found in Type~1,    */
-  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */
-  /*      codes.                                                           */
+  /*      Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF */
+  /*      fonts.  It is limited to 256 character codes.                    */
   /*                                                                       */
   /*    FT_ENCODING_ADOBE_CUSTOM ::                                        */
   /*      Corresponds to a custom encoding, as found in Type~1, CFF, and   */
   /*      OpenType/CFF fonts.  It is limited to 256 character codes.       */
   /*                                                                       */
   /*    FT_ENCODING_APPLE_ROMAN ::                                         */
-  /*      Corresponds to the 8-bit Apple roman encoding.  Many TrueType    */
-  /*      and OpenType fonts contain a charmap for this encoding, since    */
-  /*      older versions of Mac OS are able to use it.                     */
+  /*      Apple roman encoding.  Many TrueType and OpenType fonts contain  */
+  /*      a charmap for this 8-bit encoding, since older versions of Mac   */
+  /*      OS are able to use it.                                           */
   /*                                                                       */
   /*    FT_ENCODING_OLD_LATIN_2 ::                                         */
-  /*      This value is deprecated and was never used nor reported by      */
+  /*      This value is deprecated and was neither used nor reported by    */
   /*      FreeType.  Don't use or test for it.                             */
   /*                                                                       */
   /*    FT_ENCODING_MS_SJIS ::                                             */
   /*      Same as FT_ENCODING_SJIS.  Deprecated.                           */
   /*                                                                       */
   /*    FT_ENCODING_MS_GB2312 ::                                           */
-  /*      Same as FT_ENCODING_GB2312.  Deprecated.                         */
+  /*      Same as FT_ENCODING_PRC.  Deprecated.                            */
   /*                                                                       */
   /*    FT_ENCODING_MS_BIG5 ::                                             */
   /*      Same as FT_ENCODING_BIG5.  Deprecated.                           */
@@ -716,7 +721,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Note>                                                                */
   /*    By default, FreeType automatically synthesizes a Unicode charmap   */
-  /*    for PostScript fonts, using their glyph names dictionaries.        */
+  /*    for PostScript fonts, using their glyph name dictionaries.         */
   /*    However, it also reports the encodings defined explicitly in the   */
   /*    font file, for the cases when they are needed, with the Adobe      */
   /*    values as well.                                                    */
@@ -736,7 +741,7 @@ FT_BEGIN_HEADER
   /*    Russian).                                                          */
   /*                                                                       */
   /*    FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */
-  /*    and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to  */
+  /*    and `encoding_id' is not `TT_MAC_ID_ROMAN' (otherwise it is set to */
   /*    FT_ENCODING_APPLE_ROMAN).                                          */
   /*                                                                       */
   /*    If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function       */
@@ -748,9 +753,9 @@ FT_BEGIN_HEADER
   /*    to get an idea how to do that.  Basically, if the language ID      */
   /*    is~0, don't use it, otherwise subtract 1 from the language ID.     */
   /*    Then examine `encoding_id'.  If, for example, `encoding_id' is     */
-  /*    @TT_MAC_ID_ROMAN and the language ID (minus~1) is                  */
+  /*    `TT_MAC_ID_ROMAN' and the language ID (minus~1) is                 */
   /*    `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman.        */
-  /*    @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi       */
+  /*    `TT_MAC_ID_ARABIC' with `TT_MAC_LANGID_FARSI' means the Farsi      */
   /*    variant the Arabic encoding.                                       */
   /*                                                                       */
   typedef enum  FT_Encoding_
@@ -761,14 +766,15 @@ FT_BEGIN_HEADER
     FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),
 
     FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),
-    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),
+    FT_ENC_TAG( FT_ENCODING_PRC,     'g', 'b', ' ', ' ' ),
     FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),
     FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
     FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),
 
-    /* for backwards compatibility */
+    /* for backward compatibility */
+    FT_ENCODING_GB2312     = FT_ENCODING_PRC,
     FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,
-    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,
+    FT_ENCODING_MS_GB2312  = FT_ENCODING_PRC,
     FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,
     FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
     FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,
@@ -793,7 +799,7 @@ FT_BEGIN_HEADER
 #define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1
 #define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2
 #define ft_encoding_sjis            FT_ENCODING_SJIS
-#define ft_encoding_gb2312          FT_ENCODING_GB2312
+#define ft_encoding_gb2312          FT_ENCODING_PRC
 #define ft_encoding_big5            FT_ENCODING_BIG5
 #define ft_encoding_wansung         FT_ENCODING_WANSUNG
 #define ft_encoding_johab           FT_ENCODING_JOHAB
@@ -820,11 +826,11 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    platform_id :: An ID number describing the platform for the        */
   /*                   following encoding ID.  This comes directly from    */
-  /*                   the TrueType specification and should be emulated   */
-  /*                   for other formats.                                  */
+  /*                   the TrueType specification and gets emulated for    */
+  /*                   other formats.                                      */
   /*                                                                       */
   /*    encoding_id :: A platform specific encoding number.  This also     */
-  /*                   comes from the TrueType specification and should be */
+  /*                   comes from the TrueType specification and gets      */
   /*                   emulated similarly.                                 */
   /*                                                                       */
   typedef struct  FT_CharMapRec_
@@ -852,8 +858,8 @@ FT_BEGIN_HEADER
   /*    FT_Face_Internal                                                   */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    An opaque handle to an `FT_Face_InternalRec' structure, used to    */
-  /*    model private data of a given @FT_Face object.                     */
+  /*    An opaque handle to an `FT_Face_InternalRec' structure that models */
+  /*    the private data of a given @FT_Face object.                       */
   /*                                                                       */
   /*    This structure might change between releases of FreeType~2 and is  */
   /*    not generally available to client applications.                    */
@@ -873,7 +879,7 @@ FT_BEGIN_HEADER
   /* <Fields>                                                              */
   /*    num_faces           :: The number of faces in the font file.  Some */
   /*                           font formats can have multiple faces in     */
-  /*                           a font file.                                */
+  /*                           a single font file.                         */
   /*                                                                       */
   /*    face_index          :: This field holds two different values.      */
   /*                           Bits 0-15 are the index of the face in the  */
@@ -881,14 +887,15 @@ FT_BEGIN_HEADER
   /*                           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.          */
+  /*                           Bits 16-30 are relevant to GX and OpenType  */
+  /*                           variation fonts only, holding the named     */
+  /*                           instance index for the current face index   */
+  /*                           (starting with value~1; value~0 indicates   */
+  /*                           font access without a named instance).  For */
+  /*                           non-variation 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).   */
@@ -902,17 +909,21 @@ FT_BEGIN_HEADER
   /*                           @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).                            */
+  /*                           GX or OpenType variation (sub)font.  Bit 31 */
+  /*                           is always zero (this is, `style_flags' is   */
+  /*                           always a positive value).  Note that a      */
+  /*                           variation font has always at least one      */
+  /*                           named instance, namely the default          */
+  /*                           instance.                                   */
   /*                                                                       */
   /*    num_glyphs          :: The number of glyphs in the face.  If the   */
   /*                           face is scalable and has sbits (see         */
   /*                           `num_fixed_sizes'), it is set to the number */
   /*                           of outline glyphs.                          */
   /*                                                                       */
-  /*                           For CID-keyed fonts, this value gives the   */
-  /*                           highest CID used in the font.               */
+  /*                           For CID-keyed fonts (not in an SFNT         */
+  /*                           wrapper) this value gives the highest CID   */
+  /*                           used in the font.                           */
   /*                                                                       */
   /*    family_name         :: The face's family name.  This is an ASCII   */
   /*                           string, usually in English, that describes  */
@@ -951,6 +962,10 @@ FT_BEGIN_HEADER
   /*                           strikes in the face.  It is set to NULL if  */
   /*                           there is no bitmap strike.                  */
   /*                                                                       */
+  /*                           Note that FreeType tries to sanitize the    */
+  /*                           strike data since they are sometimes sloppy */
+  /*                           or incorrect, but this can easily fail.     */
+  /*                                                                       */
   /*    num_charmaps        :: The number of charmaps in the face.         */
   /*                                                                       */
   /*    charmaps            :: An array of the charmaps of the face.       */
@@ -986,8 +1001,8 @@ FT_BEGIN_HEADER
   /*                           expressed in font units.  For font formats  */
   /*                           not having this information, it is set to   */
   /*                           `bbox.yMin'.  Note that this field is       */
-  /*                           usually negative.  Only relevant for        */
-  /*                           scalable formats.                           */
+  /*                           negative for values below the baseline.     */
+  /*                           Only relevant for scalable formats.         */
   /*                                                                       */
   /*    height              :: This value is the vertical distance         */
   /*                           between two consecutive baselines,          */
@@ -1030,6 +1045,12 @@ FT_BEGIN_HEADER
   /*    Fields may be changed after a call to @FT_Attach_File or           */
   /*    @FT_Attach_Stream.                                                 */
   /*                                                                       */
+  /*    For an OpenType variation font, the values of the following fields */
+  /*    can change after a call to @FT_Set_Var_Design_Coordinates (and     */
+  /*    friends) if the font contains an `MVAR' table: `ascender',         */
+  /*    `descender', `height', `underline_position', and                   */
+  /*    `underline_thickness'.                                             */
+  /*                                                                       */
   typedef struct  FT_FaceRec_
   {
     FT_Long           num_faces;
@@ -1101,49 +1122,51 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Values>                                                              */
   /*    FT_FACE_FLAG_SCALABLE ::                                           */
-  /*      Indicates that the face contains outline glyphs.  This doesn't   */
-  /*      prevent bitmap strikes, i.e., a face can have both this and      */
+  /*      The face contains outline glyphs.  Note that a face can contain  */
+  /*      bitmap strikes also, i.e., a face can have both this flag and    */
   /*      @FT_FACE_FLAG_FIXED_SIZES set.                                   */
   /*                                                                       */
   /*    FT_FACE_FLAG_FIXED_SIZES ::                                        */
-  /*      Indicates that the face contains bitmap strikes.  See also the   */
+  /*      The face contains bitmap strikes.  See also the                  */
   /*      `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec.   */
   /*                                                                       */
   /*    FT_FACE_FLAG_FIXED_WIDTH ::                                        */
-  /*      Indicates that the face contains fixed-width characters (like    */
-  /*      Courier, Lucido, MonoType, etc.).                                */
+  /*      The face contains fixed-width characters (like Courier, Lucida,  */
+  /*      MonoType, etc.).                                                 */
   /*                                                                       */
   /*    FT_FACE_FLAG_SFNT ::                                               */
-  /*      Indicates that the face uses the `sfnt' storage scheme.  For     */
-  /*      now, this means TrueType and OpenType.                           */
+  /*      The face uses the SFNT storage scheme.  For now, this means      */
+  /*      TrueType and OpenType.                                           */
   /*                                                                       */
   /*    FT_FACE_FLAG_HORIZONTAL ::                                         */
-  /*      Indicates that the face contains horizontal glyph metrics.  This */
-  /*      should be set for all common formats.                            */
+  /*      The face contains horizontal glyph metrics.  This should be set  */
+  /*      for all common formats.                                          */
   /*                                                                       */
   /*    FT_FACE_FLAG_VERTICAL ::                                           */
-  /*      Indicates that the face contains vertical glyph metrics.  This   */
-  /*      is only available in some formats, not all of them.              */
+  /*      The face contains vertical glyph metrics.  This is only          */
+  /*      available in some formats, not all of them.                      */
   /*                                                                       */
   /*    FT_FACE_FLAG_KERNING ::                                            */
-  /*      Indicates that the face contains kerning information.  If set,   */
-  /*      the kerning distance can be retrieved through the function       */
-  /*      @FT_Get_Kerning.  Otherwise the function always return the       */
-  /*      vector (0,0).  Note that FreeType doesn't handle kerning data    */
-  /*      from the `GPOS' table (as present in some OpenType fonts).       */
+  /*      The face contains kerning information.  If set, the kerning      */
+  /*      distance can be retrieved using the function @FT_Get_Kerning.    */
+  /*      Otherwise the function always return the vector (0,0).  Note     */
+  /*      that FreeType doesn't handle kerning data from the SFNT `GPOS'   */
+  /*      table (as present in many OpenType fonts).                       */
   /*                                                                       */
   /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */
   /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */
   /*                                                                       */
   /*    FT_FACE_FLAG_MULTIPLE_MASTERS ::                                   */
-  /*      Indicates that the font contains multiple masters and is capable */
-  /*      of interpolating between them.  See the multiple-masters         */
-  /*      specific API for details.                                        */
+  /*      The face contains multiple masters and is capable of             */
+  /*      interpolating between them.  Supported formats are Adobe MM,     */
+  /*      TrueType GX, and OpenType variation fonts.                       */
+  /*                                                                       */
+  /*      See the multiple-masters specific API for details.               */
   /*                                                                       */
   /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
-  /*      Indicates that the font contains glyph names that can be         */
-  /*      retrieved through @FT_Get_Glyph_Name.  Note that some TrueType   */
-  /*      fonts contain broken glyph name tables.  Use the function        */
+  /*      The face contains glyph names, which can be retrieved using      */
+  /*      @FT_Get_Glyph_Name.  Note that some TrueType fonts contain       */
+  /*      broken glyph name tables.  Use the function                      */
   /*      @FT_Has_PS_Glyph_Names when needed.                              */
   /*                                                                       */
   /*    FT_FACE_FLAG_EXTERNAL_STREAM ::                                    */
@@ -1152,31 +1175,31 @@ FT_BEGIN_HEADER
   /*      when @FT_Done_Face is called.  Don't read or test this flag.     */
   /*                                                                       */
   /*    FT_FACE_FLAG_HINTER ::                                             */
-  /*      Set if the font driver has a hinting machine of its own.  For    */
-  /*      example, with TrueType fonts, it makes sense to use data from    */
-  /*      the SFNT `gasp' table only if the native TrueType hinting engine */
-  /*      (with the bytecode interpreter) is available and active.         */
+  /*      The font driver has a hinting machine of its own.  For example,  */
+  /*      with TrueType fonts, it makes sense to use data from the SFNT    */
+  /*      `gasp' table only if the native TrueType hinting engine (with    */
+  /*      the bytecode interpreter) is available and active.               */
   /*                                                                       */
   /*    FT_FACE_FLAG_CID_KEYED ::                                          */
-  /*      Set if the font is CID-keyed.  In that case, the font is not     */
-  /*      accessed by glyph indices but by CID values.  For subsetted      */
-  /*      CID-keyed fonts this has the consequence that not all index      */
-  /*      values are a valid argument to FT_Load_Glyph.  Only the CID      */
-  /*      values for which corresponding glyphs in the subsetted font      */
-  /*      exist make FT_Load_Glyph return successfully; in all other cases */
-  /*      you get an `FT_Err_Invalid_Argument' error.                      */
-  /*                                                                       */
-  /*      Note that CID-keyed fonts that are in an SFNT wrapper don't      */
-  /*      have this flag set since the glyphs are accessed in the normal   */
-  /*      way (using contiguous indices); the `CID-ness' isn't visible to  */
-  /*      the application.                                                 */
+  /*      The face is CID-keyed.  In that case, the face is not accessed   */
+  /*      by glyph indices but by CID values.  For subsetted CID-keyed     */
+  /*      fonts this has the consequence that not all index values are a   */
+  /*      valid argument to @FT_Load_Glyph.  Only the CID values for which */
+  /*      corresponding glyphs in the subsetted font exist make            */
+  /*      `FT_Load_Glyph' return successfully; in all other cases you get  */
+  /*      an `FT_Err_Invalid_Argument' error.                              */
+  /*                                                                       */
+  /*      Note that CID-keyed fonts that are in an SFNT wrapper (this is,  */
+  /*      all OpenType/CFF fonts) don't have this flag set since the       */
+  /*      glyphs are accessed in the normal way (using contiguous          */
+  /*      indices); the `CID-ness' isn't visible to the application.       */
   /*                                                                       */
   /*    FT_FACE_FLAG_TRICKY ::                                             */
-  /*      Set if the font is `tricky', this is, it always needs the        */
-  /*      font format's native hinting engine to get a reasonable result.  */
-  /*      A typical example is the Chinese font `mingli.ttf' that uses     */
-  /*      TrueType bytecode instructions to move and scale all of its      */
-  /*      subglyphs.                                                       */
+  /*      The face is `tricky', this is, it always needs the font format's */
+  /*      native hinting engine to get a reasonable result.  A typical     */
+  /*      example is the old Chinese font `mingli.ttf' (but not            */
+  /*      `mingliu.ttc') that uses TrueType bytecode instructions to move  */
+  /*      and scale all of its subglyphs.                                  */
   /*                                                                       */
   /*      It is not possible to auto-hint such fonts using                 */
   /*      @FT_LOAD_FORCE_AUTOHINT; it will also ignore                     */
@@ -1188,8 +1211,8 @@ FT_BEGIN_HEADER
   /*      tricky fonts; they are hard-coded in file `ttobjs.c'.            */
   /*                                                                       */
   /*    FT_FACE_FLAG_COLOR ::                                              */
-  /*      Set if the font has color glyph tables.  To access color glyphs  */
-  /*      use @FT_LOAD_COLOR.                                              */
+  /*      The face has color glyph tables.  To access color glyphs use     */
+  /*      @FT_LOAD_COLOR.                                                  */
   /*                                                                       */
 #define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
 #define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
@@ -1261,7 +1284,7 @@ FT_BEGIN_HEADER
    * @description:
    *   A macro that returns true whenever a face object contains a scalable
    *   font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF,
-   *   and PFR font formats.
+   *   and PFR font formats).
    *
    */
 #define FT_IS_SCALABLE( face ) \
@@ -1361,6 +1384,20 @@ FT_BEGIN_HEADER
   /*************************************************************************
    *
    * @macro:
+   *   FT_IS_NAMED_INSTANCE( face )
+   *
+   * @description:
+   *   A macro that returns true whenever a face object is a named instance
+   *   of a GX or OpenType variation font.
+   *
+   */
+#define FT_IS_NAMED_INSTANCE( face ) \
+          ( (face)->face_index & 0x7FFF0000L )
+
+
+  /*************************************************************************
+   *
+   * @macro:
    *   FT_IS_CID_KEYED( face )
    *
    * @description:
@@ -1410,15 +1447,15 @@ FT_BEGIN_HEADER
   /*    FT_STYLE_FLAG_XXX                                                  */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    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.          */
+  /*    A list of bit flags to indicate the style of a given face.  These  */
+  /*    are used in the `style_flags' field of @FT_FaceRec.                */
   /*                                                                       */
   /* <Values>                                                              */
   /*    FT_STYLE_FLAG_ITALIC ::                                            */
-  /*      Indicates that a given face style is italic or oblique.          */
+  /*      The face style is italic or oblique.                             */
   /*                                                                       */
   /*    FT_STYLE_FLAG_BOLD ::                                              */
-  /*      Indicates that a given face is bold.                             */
+  /*      The face is bold.                                                */
   /*                                                                       */
   /* <Note>                                                                */
   /*    The style information as provided by FreeType is very basic.  More */
@@ -1459,43 +1496,50 @@ FT_BEGIN_HEADER
   /*                    hence the term `ppem' (pixels per EM).  It is also */
   /*                    referred to as `nominal height'.                   */
   /*                                                                       */
-  /*    x_scale      :: A 16.16 fractional scaling value used to convert   */
+  /*    x_scale      :: A 16.16 fractional scaling value to convert        */
   /*                    horizontal metrics from font units to 26.6         */
   /*                    fractional pixels.  Only relevant for scalable     */
   /*                    font formats.                                      */
   /*                                                                       */
-  /*    y_scale      :: A 16.16 fractional scaling value used to convert   */
+  /*    y_scale      :: A 16.16 fractional scaling value to convert        */
   /*                    vertical metrics from font units to 26.6           */
   /*                    fractional pixels.  Only relevant for scalable     */
   /*                    font formats.                                      */
   /*                                                                       */
-  /*    ascender     :: The ascender in 26.6 fractional pixels.  See       */
-  /*                    @FT_FaceRec for the details.                       */
+  /*    ascender     :: The ascender in 26.6 fractional pixels, rounded up */
+  /*                    to an integer value.  See @FT_FaceRec for the      */
+  /*                    details.                                           */
   /*                                                                       */
-  /*    descender    :: The descender in 26.6 fractional pixels.  See      */
-  /*                    @FT_FaceRec for the details.                       */
+  /*    descender    :: The descender in 26.6 fractional pixels, rounded   */
+  /*                    down to an integer value.  See @FT_FaceRec for the */
+  /*                    details.                                           */
   /*                                                                       */
-  /*    height       :: The height in 26.6 fractional pixels.  See         */
-  /*                    @FT_FaceRec for the details.                       */
+  /*    height       :: The height in 26.6 fractional pixels, rounded to   */
+  /*                    an integer value.  See @FT_FaceRec for the         */
+  /*                    details.                                           */
   /*                                                                       */
   /*    max_advance  :: The maximum advance width in 26.6 fractional       */
-  /*                    pixels.  See @FT_FaceRec for the details.          */
+  /*                    pixels, rounded to an integer value.  See          */
+  /*                    @FT_FaceRec for the details.                       */
   /*                                                                       */
   /* <Note>                                                                */
   /*    The scaling values, if relevant, are determined first during a     */
   /*    size changing operation.  The remaining fields are then set by the */
   /*    driver.  For scalable formats, they are usually set to scaled      */
-  /*    values of the corresponding fields in @FT_FaceRec.                 */
+  /*    values of the corresponding fields in @FT_FaceRec.  Some values    */
+  /*    like ascender or descender are rounded for historical reasons;     */
+  /*    more precise values (for outline fonts) can be derived by scaling  */
+  /*    the corresponding @FT_FaceRec values manually.                     */
   /*                                                                       */
-  /*    Note that due to glyph hinting, these values might not be exact    */
-  /*    for certain fonts.  Thus they must be treated as unreliable        */
-  /*    with an error margin of at least one pixel!                        */
+  /*    Note that due to glyph hinting and the selected rendering mode     */
+  /*    these values are usually not exact; consequently, they must be     */
+  /*    treated as unreliable with an error margin of at least one pixel!  */
   /*                                                                       */
   /*    Indeed, the only way to get the exact metrics is to render _all_   */
   /*    glyphs.  As this would be a definite performance hit, it is up to  */
   /*    client applications to perform such computations.                  */
   /*                                                                       */
-  /*    The FT_Size_Metrics structure is valid for bitmap fonts also.      */
+  /*    The `FT_Size_Metrics' structure is valid for bitmap fonts also.    */
   /*                                                                       */
   typedef struct  FT_Size_Metrics_
   {
@@ -1635,8 +1679,8 @@ FT_BEGIN_HEADER
   /*                         contained in the glyph slot.  Typically       */
   /*                         @FT_GLYPH_FORMAT_BITMAP,                      */
   /*                         @FT_GLYPH_FORMAT_OUTLINE, or                  */
-  /*                         @FT_GLYPH_FORMAT_COMPOSITE, but others are    */
-  /*                         possible.                                     */
+  /*                         @FT_GLYPH_FORMAT_COMPOSITE, but other values  */
+  /*                         are possible.                                 */
   /*                                                                       */
   /*    bitmap            :: This field is used as a bitmap descriptor     */
   /*                         when the slot format is                       */
@@ -1651,16 +1695,15 @@ FT_BEGIN_HEADER
   /*                         glyph slot contains a bitmap.                 */
   /*                                                                       */
   /*    bitmap_top        :: The bitmap's top bearing expressed in integer */
-  /*                         pixels.  Remember that this is the distance   */
-  /*                         from the baseline to the top-most glyph       */
-  /*                         scanline, upwards y~coordinates being         */
-  /*                         *positive*.                                   */
+  /*                         pixels.  This is the distance from the        */
+  /*                         baseline to the top-most glyph scanline,      */
+  /*                         upwards y~coordinates being *positive*.       */
   /*                                                                       */
   /*    outline           :: The outline descriptor for the current glyph  */
   /*                         image if its format is                        */
   /*                         @FT_GLYPH_FORMAT_OUTLINE.  Once a glyph is    */
   /*                         loaded, `outline' can be transformed,         */
-  /*                         distorted, embolded, etc.  However, it must   */
+  /*                         distorted, emboldened, etc.  However, it must */
   /*                         not be freed.                                 */
   /*                                                                       */
   /*    num_subglyphs     :: The number of subglyphs in a composite glyph. */
@@ -1676,15 +1719,13 @@ FT_BEGIN_HEADER
   /*    control_data      :: Certain font drivers can also return the      */
   /*                         control data for a given glyph image (e.g.    */
   /*                         TrueType bytecode, Type~1 charstrings, etc.). */
-  /*                         This field is a pointer to such data.         */
+  /*                         This field is a pointer to such data; it is   */
+  /*                         currently internal to FreeType.               */
   /*                                                                       */
   /*    control_len       :: This is the length in bytes of the control    */
-  /*                         data.                                         */
+  /*                         data.  Currently internal to FreeType.        */
   /*                                                                       */
-  /*    other             :: Really wicked formats can use this pointer to */
-  /*                         present their own glyph image to client       */
-  /*                         applications.  Note that the application      */
-  /*                         needs to know about the image format.         */
+  /*    other             :: Reserved.                                     */
   /*                                                                       */
   /*    lsb_delta         :: The difference between hinted and unhinted    */
   /*                         left side bearing while auto-hinting is       */
@@ -1701,7 +1742,7 @@ FT_BEGIN_HEADER
   /*    formats).                                                          */
   /*                                                                       */
   /*    This image can later be converted into a bitmap by calling         */
-  /*    @FT_Render_Glyph.  This function finds the current renderer for    */
+  /*    @FT_Render_Glyph.  This function searches the current renderer for */
   /*    the native image's format, then invokes it.                        */
   /*                                                                       */
   /*    The renderer is in charge of transforming the native image through */
@@ -1713,34 +1754,65 @@ FT_BEGIN_HEADER
   /*    position (e.g., coordinates (0,0) on the baseline).  Of course,    */
   /*    `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP.         */
   /*                                                                       */
-  /* <Note>                                                                */
   /*    Here is a small pseudo code fragment that shows how to use         */
-  /*    `lsb_delta' and `rsb_delta':                                       */
+  /*    `lsb_delta' and `rsb_delta' to do fractional positioning of        */
+  /*    glyphs:                                                            */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      FT_GlyphSlot  slot     = face->glyph;                            */
+  /*      FT_Pos        origin_x = 0;                                      */
+  /*                                                                       */
+  /*                                                                       */
+  /*      for all glyphs do                                                */
+  /*        <load glyph with `FT_Load_Glyph'>                              */
+  /*                                                                       */
+  /*        FT_Outline_Translate( slot->outline, origin_x & 63, 0 );       */
+  /*                                                                       */
+  /*        <save glyph image, or render glyph, or ...>                    */
+  /*                                                                       */
+  /*        <compute kern between current and next glyph                   */
+  /*         and add it to `origin_x'>                                     */
+  /*                                                                       */
+  /*        origin_x += slot->advance.x;                                   */
+  /*        origin_x += slot->rsb_delta - slot->lsb_relta;                 */
+  /*      endfor                                                           */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    Here is another small pseudo code fragment that shows how to use   */
+  /*    `lsb_delta' and `rsb_delta' to improve integer positioning of      */
+  /*    glyphs:                                                            */
   /*                                                                       */
   /*    {                                                                  */
-  /*      FT_Pos  origin_x       = 0;                                      */
-  /*      FT_Pos  prev_rsb_delta = 0;                                      */
+  /*      FT_GlyphSlot  slot           = face->glyph;                      */
+  /*      FT_Pos        origin_x       = 0;                                */
+  /*      FT_Pos        prev_rsb_delta = 0;                                */
   /*                                                                       */
   /*                                                                       */
   /*      for all glyphs do                                                */
-  /*        <compute kern between current and previous glyph and add it to */
-  /*         `origin_x'>                                                   */
+  /*        <compute kern between current and previous glyph               */
+  /*         and add it to `origin_x'>                                     */
   /*                                                                       */
   /*        <load glyph with `FT_Load_Glyph'>                              */
   /*                                                                       */
-  /*        if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 )           */
+  /*        if ( prev_rsb_delta - slot->lsb_delta >= 32 )                  */
   /*          origin_x -= 64;                                              */
-  /*        else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 )      */
+  /*        else if ( prev_rsb_delta - slot->lsb_delta < -32 )             */
   /*          origin_x += 64;                                              */
   /*                                                                       */
-  /*        prev_rsb_delta = face->glyph->rsb_delta;                       */
+  /*        prev_rsb_delta = slot->rsb_delta;                              */
   /*                                                                       */
   /*        <save glyph image, or render glyph, or ...>                    */
   /*                                                                       */
-  /*        origin_x += face->glyph->advance.x;                            */
+  /*        origin_x += slot->advance.x;                                   */
   /*      endfor                                                           */
   /*    }                                                                  */
   /*                                                                       */
+  /*    If you use strong auto-hinting, you *must* apply these delta       */
+  /*    values!  Otherwise you will experience far too large inter-glyph   */
+  /*    spacing at small rendering sizes in most cases.  Note that it      */
+  /*    doesn't harm to use the above code for other hinting modes also,   */
+  /*    since the delta values are zero then.                              */
+  /*                                                                       */
   typedef struct  FT_GlyphSlotRec_
   {
     FT_Library        library;
@@ -1805,7 +1877,8 @@ FT_BEGIN_HEADER
   /* <Note>                                                                */
   /*    In case you want to provide your own memory allocating routines,   */
   /*    use @FT_New_Library instead, followed by a call to                 */
-  /*    @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module).  */
+  /*    @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module)   */
+  /*    and @FT_Set_Default_Properties.                                    */
   /*                                                                       */
   /*    See the documentation of @FT_Library and @FT_Face for              */
   /*    multi-threading issues.                                            */
@@ -1813,6 +1886,11 @@ FT_BEGIN_HEADER
   /*    If you need reference-counting (cf. @FT_Reference_Library), use    */
   /*    @FT_New_Library and @FT_Done_Library.                              */
   /*                                                                       */
+  /*    If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is   */
+  /*    set, this function reads the `FREETYPE_PROPERTIES' environment     */
+  /*    variable to control driver properties.  See sections @auto_hinter, */
+  /*    @cff_driver, @pcf_driver, and @tt_driver for more.                 */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Init_FreeType( FT_Library  *alibrary );
 
@@ -1883,8 +1961,8 @@ FT_BEGIN_HEADER
   /*    FT_Parameter                                                       */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A simple structure used to pass more or less generic parameters to */
-  /*    @FT_Open_Face.                                                     */
+  /*    A simple structure to pass more or less generic parameters to      */
+  /*    @FT_Open_Face and @FT_Face_Properties.                             */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    tag  :: A four-byte identification tag.                            */
@@ -1909,9 +1987,9 @@ FT_BEGIN_HEADER
   /*    FT_Open_Args                                                       */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to indicate how to open a new font file or        */
-  /*    stream.  A pointer to such a structure can be used as a parameter  */
-  /*    for the functions @FT_Open_Face and @FT_Attach_Stream.             */
+  /*    A structure to indicate how to open a new font file or stream.  A  */
+  /*    pointer to such a structure can be used as a parameter for the     */
+  /*    functions @FT_Open_Face and @FT_Attach_Stream.                     */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    flags       :: A set of bit flags indicating how to use the        */
@@ -1926,9 +2004,10 @@ FT_BEGIN_HEADER
   /*    stream      :: A handle to a source stream object.                 */
   /*                                                                       */
   /*    driver      :: This field is exclusively used by @FT_Open_Face;    */
-  /*                   it simply specifies the font driver to use to open  */
-  /*                   the face.  If set to~0, FreeType tries to load the  */
-  /*                   face with each one of the drivers in its list.      */
+  /*                   it simply specifies the font driver to use for      */
+  /*                   opening the face.  If set to NULL, FreeType tries   */
+  /*                   to load the face with each one of the drivers in    */
+  /*                   its list.                                           */
   /*                                                                       */
   /*    num_params  :: The number of extra parameters.                     */
   /*                                                                       */
@@ -1958,7 +2037,7 @@ FT_BEGIN_HEADER
   /*    `num_params' and `params' is used.  They are ignored otherwise.    */
   /*                                                                       */
   /*    Ideally, both the `pathname' and `params' fields should be tagged  */
-  /*    as `const'; this is missing for API backwards compatibility.  In   */
+  /*    as `const'; this is missing for API backward compatibility.  In    */
   /*    other words, applications should treat them as read-only.          */
   /*                                                                       */
   typedef struct  FT_Open_Args_
@@ -1981,7 +2060,7 @@ FT_BEGIN_HEADER
   /*    FT_New_Face                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    This function calls @FT_Open_Face to open a font by its pathname.  */
+  /*    Call @FT_Open_Face to open a font by its pathname.                 */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    library    :: A handle to the library resource.                    */
@@ -2016,8 +2095,8 @@ FT_BEGIN_HEADER
   /*    FT_New_Memory_Face                                                 */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    This function calls @FT_Open_Face to open a font that has been     */
-  /*    loaded into memory.                                                */
+  /*    Call @FT_Open_Face to open a font that has been loaded into        */
+  /*    memory.                                                            */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    library    :: A handle to the library resource.                    */
@@ -2069,20 +2148,21 @@ FT_BEGIN_HEADER
   /*                  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           */
+  /*                  Bits 16-30 are relevant to GX and OpenType 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-variation 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    */
+  /*                  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        */
@@ -2091,10 +2171,10 @@ FT_BEGIN_HEADER
   /*                  `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        */
+  /*                  the negative value `-(N+1)' (with `N' a non-negative */
+  /*                  16-bit value), bits 16-30 in `face->style_flags'     */
+  /*                  give the number of named instances in face `N' if we */
+  /*                  have a variation font (or zero otherwise).  After    */
   /*                  examination, the returned @FT_Face structure should  */
   /*                  be deallocated with a call to @FT_Done_Face.         */
   /*                                                                       */
@@ -2201,7 +2281,7 @@ FT_BEGIN_HEADER
   /*    FT_Attach_File                                                     */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    This function calls @FT_Attach_Stream to attach a file.            */
+  /*    Call @FT_Attach_Stream to attach a file.                           */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face         :: The target face object.                            */
@@ -2245,7 +2325,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    Client applications are expected to know what they are doing       */
   /*    when invoking this function.  Most drivers simply do not implement */
-  /*    file attachments.                                                  */
+  /*    file or stream attachments.                                        */
   /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Attach_Stream( FT_Face        face,
@@ -2308,7 +2388,10 @@ FT_BEGIN_HEADER
   /*    FT_Select_Size                                                     */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Select a bitmap strike.                                            */
+  /*    Select a bitmap strike.  To be more precise, this function sets    */
+  /*    the scaling factors of the active @FT_Size object in a face so     */
+  /*    that bitmaps from this particular strike are taken by              */
+  /*    @FT_Load_Glyph and friends.                                        */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face         :: A handle to a target face object.                  */
@@ -2320,6 +2403,20 @@ FT_BEGIN_HEADER
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
+  /* <Note>                                                                */
+  /*    For bitmaps embedded in outline fonts it is common that only a     */
+  /*    subset of the available glyphs at a given ppem value is available. */
+  /*    FreeType silently uses outlines if there is no bitmap for a given  */
+  /*    glyph index.                                                       */
+  /*                                                                       */
+  /*    For GX and OpenType variation fonts, a bitmap strike makes sense   */
+  /*    only if the default instance is active (this is, no glyph          */
+  /*    variation takes place); otherwise, FreeType simply ignores bitmap  */
+  /*    strikes.  The same is true for all named instances that are        */
+  /*    different from the default instance.                               */
+  /*                                                                       */
+  /*    Don't use this function if you are using the FreeType cache API.   */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Select_Size( FT_Face  face,
                   FT_Int   strike_index );
@@ -2331,16 +2428,25 @@ FT_BEGIN_HEADER
   /*    FT_Size_Request_Type                                               */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    An enumeration type that lists the supported size request types.   */
+  /*    An enumeration type that lists the supported size request types,   */
+  /*    i.e., what input size (in font units) maps to the requested output */
+  /*    size (in pixels, as computed from the arguments of                 */
+  /*    @FT_Size_Request).                                                 */
   /*                                                                       */
   /* <Values>                                                              */
   /*    FT_SIZE_REQUEST_TYPE_NOMINAL ::                                    */
   /*      The nominal size.  The `units_per_EM' field of @FT_FaceRec is    */
   /*      used to determine both scaling values.                           */
   /*                                                                       */
+  /*      This is the standard scaling found in most applications.  In     */
+  /*      particular, use this size request type for TrueType fonts if     */
+  /*      they provide optical scaling or something similar.  Note,        */
+  /*      however, that `units_per_EM' is a rather abstract value which    */
+  /*      bears no relation to the actual size of the glyphs in a font.    */
+  /*                                                                       */
   /*    FT_SIZE_REQUEST_TYPE_REAL_DIM ::                                   */
   /*      The real dimension.  The sum of the `ascender' and (minus of)    */
-  /*      the `descender' fields of @FT_FaceRec are used to determine both */
+  /*      the `descender' fields of @FT_FaceRec is used to determine both  */
   /*      scaling values.                                                  */
   /*                                                                       */
   /*    FT_SIZE_REQUEST_TYPE_BBOX ::                                       */
@@ -2386,27 +2492,36 @@ FT_BEGIN_HEADER
   /*    FT_Size_RequestRec                                                 */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model a size request.                          */
+  /*    A structure to model a size request.                               */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    type           :: See @FT_Size_Request_Type.                       */
   /*                                                                       */
-  /*    width          :: The desired width.                               */
+  /*    width          :: The desired width, given as a 26.6 fractional    */
+  /*                      point value (with 72pt = 1in).                   */
   /*                                                                       */
-  /*    height         :: The desired height.                              */
+  /*    height         :: The desired height, given as a 26.6 fractional   */
+  /*                      point value (with 72pt = 1in).                   */
   /*                                                                       */
-  /*    horiResolution :: The horizontal resolution.  If set to zero,      */
-  /*                      `width' is treated as a 26.6 fractional pixel    */
-  /*                      value.                                           */
+  /*    horiResolution :: The horizontal resolution (dpi, i.e., pixels per */
+  /*                      inch).  If set to zero, `width' is treated as a  */
+  /*                      26.6 fractional *pixel* value, which gets        */
+  /*                      internally rounded to an integer.                */
   /*                                                                       */
-  /*    vertResolution :: The vertical resolution.  If set to zero,        */
-  /*                      `height' is treated as a 26.6 fractional pixel   */
-  /*                      value.                                           */
+  /*    vertResolution :: The vertical resolution (dpi, i.e., pixels per   */
+  /*                      inch).  If set to zero, `height' is treated as a */
+  /*                      26.6 fractional *pixel* value, which gets        */
+  /*                      internally rounded to an integer.                */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    If `width' is zero, then the horizontal scaling value is set equal */
+  /*    If `width' is zero, the horizontal scaling value is set equal      */
   /*    to the vertical scaling value, and vice versa.                     */
   /*                                                                       */
+  /*    If `type' is FT_SIZE_REQUEST_TYPE_SCALES, `width' and `height' are */
+  /*    interpreted directly as 16.16 fractional scaling values, without   */
+  /*    any further modification, and both `horiResolution' and            */
+  /*    `vertResolution' are ignored.                                      */
+  /*                                                                       */
   typedef struct  FT_Size_RequestRec_
   {
     FT_Size_Request_Type  type;
@@ -2456,7 +2571,11 @@ FT_BEGIN_HEADER
   /*    size is dependent entirely on how the size is defined in the       */
   /*    source face.  The font designer chooses the final size of each     */
   /*    glyph relative to this size.  For more information refer to        */
-  /*    `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'      */
+  /*    `https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'.    */
+  /*                                                                       */
+  /*    Contrary to @FT_Set_Char_Size, this function doesn't have special  */
+  /*    code to normalize zero-valued widths, heights, or resolutions      */
+  /*    (which lead to errors in most cases).                              */
   /*                                                                       */
   /*    Don't use this function if you are using the FreeType cache API.   */
   /*                                                                       */
@@ -2471,8 +2590,7 @@ FT_BEGIN_HEADER
   /*    FT_Set_Char_Size                                                   */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    This function calls @FT_Request_Size to request the nominal size   */
-  /*    (in points).                                                       */
+  /*    Call @FT_Request_Size to request the nominal size (in points).     */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face            :: A handle to a target face object.               */
@@ -2490,6 +2608,10 @@ FT_BEGIN_HEADER
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /* <Note>                                                                */
+  /*    While this function allows fractional points as input values, the  */
+  /*    resulting ppem value for the given resolution is always rounded to */
+  /*    the nearest integer.                                               */
+  /*                                                                       */
   /*    If either the character width or height is zero, it is set equal   */
   /*    to the other value.                                                */
   /*                                                                       */
@@ -2515,8 +2637,7 @@ FT_BEGIN_HEADER
   /*    FT_Set_Pixel_Sizes                                                 */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    This function calls @FT_Request_Size to request the nominal size   */
-  /*    (in pixels).                                                       */
+  /*    Call @FT_Request_Size to request the nominal size (in pixels).     */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face         :: A handle to the target face object.                */
@@ -2530,8 +2651,8 @@ FT_BEGIN_HEADER
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    You should not rely on the resulting glyphs matching, or being     */
-  /*    constrained, to this pixel size.  Refer to @FT_Request_Size to     */
+  /*    You should not rely on the resulting glyphs matching or being      */
+  /*    constrained to this pixel size.  Refer to @FT_Request_Size to      */
   /*    understand how requested sizes relate to actual sizes.             */
   /*                                                                       */
   /*    Don't use this function if you are using the FreeType cache API.   */
@@ -2548,8 +2669,7 @@ FT_BEGIN_HEADER
   /*    FT_Load_Glyph                                                      */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A function used to load a single glyph into the glyph slot of a    */
-  /*    face object.                                                       */
+  /*    Load a glyph into the glyph slot of a face object.                 */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face        :: A handle to the target face object where the glyph  */
@@ -2594,8 +2714,8 @@ FT_BEGIN_HEADER
   /*    FT_Load_Char                                                       */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A function used to load a single glyph into the glyph slot of a    */
-  /*    face object, according to its character code.                      */
+  /*    Load a glyph into the glyph slot of a face object, accessed by its */
+  /*    character code.                                                    */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face        :: A handle to a target face object where the glyph    */
@@ -2617,6 +2737,10 @@ FT_BEGIN_HEADER
   /* <Note>                                                                */
   /*    This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph.  */
   /*                                                                       */
+  /*    Many fonts contain glyphs that can't be loaded by this function    */
+  /*    since its glyph indices are not listed in any of the font's        */
+  /*    charmaps.                                                          */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Load_Char( FT_Face   face,
                 FT_ULong  char_code,
@@ -2629,8 +2753,8 @@ FT_BEGIN_HEADER
    *   FT_LOAD_XXX
    *
    * @description:
-   *   A list of bit field constants used with @FT_Load_Glyph to indicate
-   *   what kind of operations to perform during glyph loading.
+   *   A list of bit field constants for @FT_Load_Glyph to indicate what
+   *   kind of operations to perform during glyph loading.
    *
    * @values:
    *   FT_LOAD_DEFAULT ::
@@ -2642,13 +2766,13 @@ FT_BEGIN_HEADER
    *        The bitmap data can be accessed from the glyph slot (see note
    *        below).
    *
-   *     2. If no embedded bitmap is searched or found, FreeType looks for a
-   *        scalable outline.  If one is found, it is loaded from the font
-   *        file, scaled to device pixels, then `hinted' to the pixel grid
-   *        in order to optimize it.  The outline data can be accessed from
-   *        the glyph slot (see note below).
+   *     2. If no embedded bitmap is searched for or found, FreeType looks
+   *        for a scalable outline.  If one is found, it is loaded from
+   *        the font file, scaled to device pixels, then `hinted' to the
+   *        pixel grid in order to optimize it.  The outline data can be
+   *        accessed from the glyph slot (see note below).
    *
-   *     Note that by default, the glyph loader doesn't render outlines into
+   *     Note that by default the glyph loader doesn't render outlines into
    *     bitmaps.  The following flags are used to modify this default
    *     behaviour to more specific and useful cases.
    *
@@ -2695,13 +2819,13 @@ FT_BEGIN_HEADER
    *     various font formats.
    *
    *   FT_LOAD_FORCE_AUTOHINT ::
-   *     Indicates that the auto-hinter is preferred over the font's native
-   *     hinter.  See also the note below.
+   *     Prefer the auto-hinter over the font's native hinter.  See also
+   *     the note below.
    *
    *   FT_LOAD_PEDANTIC ::
-   *     Indicates that the font driver should perform pedantic verifications
-   *     during glyph loading.  This is mostly used to detect broken glyphs
-   *     in fonts.  By default, FreeType tries to handle broken fonts also.
+   *     Make the font driver perform pedantic verifications during glyph
+   *     loading.  This is mostly used to detect broken glyphs in fonts.
+   *     By default, FreeType tries to handle broken fonts also.
    *
    *     In particular, errors from the TrueType bytecode engine are not
    *     passed to the application if this flag is not set; this might
@@ -2709,17 +2833,16 @@ FT_BEGIN_HEADER
    *     bytecode is buggy.
    *
    *   FT_LOAD_NO_RECURSE ::
-   *     Indicate that the font driver should not load composite glyphs
-   *     recursively.  Instead, it should set the `num_subglyph' and
-   *     `subglyphs' values of the glyph slot accordingly, and set
-   *     `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE.  The description of
-   *     subglyphs can then be accessed with @FT_Get_SubGlyph_Info.
+   *     Don't load composite glyphs recursively.  Instead, the font
+   *     driver should set the `num_subglyph' and `subglyphs' values of
+   *     the glyph slot accordingly, and set `glyph->format' to
+   *     @FT_GLYPH_FORMAT_COMPOSITE.  The description of subglyphs can
+   *     then be accessed with @FT_Get_SubGlyph_Info.
    *
    *     This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
    *
    *   FT_LOAD_IGNORE_TRANSFORM ::
-   *     Indicates that the transform matrix set by @FT_Set_Transform should
-   *     be ignored.
+   *     Ignore the transform matrix set by @FT_Set_Transform.
    *
    *   FT_LOAD_MONOCHROME ::
    *     This flag is used with @FT_LOAD_RENDER to indicate that you want to
@@ -2731,31 +2854,37 @@ FT_BEGIN_HEADER
    *     monochrome-optimized hinting algorithm is used.
    *
    *   FT_LOAD_LINEAR_DESIGN ::
-   *     Indicates that the `linearHoriAdvance' and `linearVertAdvance'
-   *     fields of @FT_GlyphSlotRec should be kept in font units.  See
-   *     @FT_GlyphSlotRec for details.
+   *     Keep  `linearHoriAdvance' and `linearVertAdvance' fields of
+   *     @FT_GlyphSlotRec in font units.  See @FT_GlyphSlotRec for
+   *     details.
    *
    *   FT_LOAD_NO_AUTOHINT ::
-   *     Disable auto-hinter.  See also the note below.
+   *     Disable the auto-hinter.  See also the note below.
    *
    *   FT_LOAD_COLOR ::
-   *     This flag is used to request loading of color embedded-bitmap
-   *     images.  The resulting color bitmaps, if available, will have the
-   *     @FT_PIXEL_MODE_BGRA format.  When the flag is not used and color
-   *     bitmaps are found, they will be converted to 256-level gray
-   *     bitmaps transparently.  Those bitmaps will be in the
+   *     Load embedded color bitmap images.  The resulting color bitmaps,
+   *     if available, will have the @FT_PIXEL_MODE_BGRA format.  If the
+   *     flag is not set and color bitmaps are found, they are converted
+   *     to 256-level gray bitmaps transparently, using 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
+   *     Compute glyph metrics from the glyph data, without the use of
+   *     bundled metrics tables (for example, the `hdmx' table in TrueType
+   *     fonts).  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_BITMAP_METRICS_ONLY ::
+   *     Request loading of the metrics and bitmap image information of a
+   *     (possibly embedded) bitmap glyph without allocating or copying
+   *     the bitmap image data itself.  No effect if the target glyph is
+   *     not a bitmap image.
+   *
+   *     This flag unsets @FT_LOAD_RENDER.
+   *
    *   FT_LOAD_CROP_BITMAP ::
    *     Ignored.  Deprecated.
    *
@@ -2799,13 +2928,14 @@ FT_BEGIN_HEADER
 #define FT_LOAD_MONOCHROME                   ( 1L << 12 )
 #define FT_LOAD_LINEAR_DESIGN                ( 1L << 13 )
 #define FT_LOAD_NO_AUTOHINT                  ( 1L << 15 )
-  /* Bits 16..19 are used by `FT_LOAD_TARGET_' */
+  /* Bits 16-19 are used by `FT_LOAD_TARGET_' */
 #define FT_LOAD_COLOR                        ( 1L << 20 )
 #define FT_LOAD_COMPUTE_METRICS              ( 1L << 21 )
+#define FT_LOAD_BITMAP_METRICS_ONLY          ( 1L << 22 )
 
   /* */
 
-  /* used internally only by certain font drivers! */
+  /* used internally only by certain font drivers */
 #define FT_LOAD_ADVANCE_ONLY                 ( 1L << 8 )
 #define FT_LOAD_SBITS_ONLY                   ( 1L << 14 )
 
@@ -2816,37 +2946,48 @@ FT_BEGIN_HEADER
    *   FT_LOAD_TARGET_XXX
    *
    * @description:
-   *   A list of values that are used to select a specific hinting algorithm
-   *   to use by the hinter.  You should OR one of these values to your
-   *   `load_flags' when calling @FT_Load_Glyph.
+   *   A list of values to select a specific hinting algorithm for the
+   *   hinter.  You should OR one of these values to your `load_flags'
+   *   when calling @FT_Load_Glyph.
    *
-   *   Note that font's native hinters may ignore the hinting algorithm you
-   *   have specified (e.g., the TrueType bytecode interpreter).  You can set
-   *   @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
+   *   Note that a font's native hinters may ignore the hinting algorithm
+   *   you have specified (e.g., the TrueType bytecode interpreter).  You
+   *   can set @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is
+   *   used.
    *
    * @values:
    *   FT_LOAD_TARGET_NORMAL ::
-   *     This corresponds to the default hinting algorithm, optimized for
-   *     standard gray-level rendering.  For monochrome output, use
-   *     @FT_LOAD_TARGET_MONO instead.
+   *     The default hinting algorithm, optimized for standard gray-level
+   *     rendering.  For monochrome output, use @FT_LOAD_TARGET_MONO
+   *     instead.
    *
    *   FT_LOAD_TARGET_LIGHT ::
    *     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
+   *     (Y-axis), as is done by FreeType's new CFF engine or Microsoft's
+   *     ClearType 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
+   *     driver, if the driver itself and the font support it, or by the
    *     auto-hinter.
    *
+   *     Advance widths are rounded to integer values; however, using the
+   *     `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is
+   *     possible to get fractional advance widths for sub-pixel positioning
+   *     (which is recommended to use).
+   *
+   *     If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active,
+   *     TrueType-like metrics are used to make this mode behave similarly
+   *     as in unpatched FreeType versions between 2.4.6 and 2.7.1
+   *     (inclusive).
+   *
    *   FT_LOAD_TARGET_MONO ::
    *     Strong hinting algorithm that should only be used for monochrome
    *     output.  The result is probably unpleasant if the glyph is rendered
    *     in non-monochrome modes.
    *
    *   FT_LOAD_TARGET_LCD ::
-   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
+   *     A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally
    *     decimated LCD displays.
    *
    *   FT_LOAD_TARGET_LCD_V ::
@@ -2874,6 +3015,13 @@ FT_BEGIN_HEADER
    *       FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
    *     }
    *
+   *   In general, you should stick with one rendering mode.  For example,
+   *   switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO
+   *   enforces a lot of recomputation for TrueType fonts, which is slow.
+   *   Another reason is caching: Selecting a different mode usually causes
+   *   changes in both the outlines and the rasterized bitmaps; it is thus
+   *   necessary to empty the cache after a mode switch to avoid false hits.
+   *
    */
 #define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )
 
@@ -2903,18 +3051,17 @@ FT_BEGIN_HEADER
   /*    FT_Set_Transform                                                   */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A function used to set the transformation that is applied to glyph */
-  /*    images when they are loaded into a glyph slot through              */
-  /*    @FT_Load_Glyph.                                                    */
+  /*    Set the transformation that is applied to glyph images when they   */
+  /*    are loaded into a glyph slot through @FT_Load_Glyph.               */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face   :: A handle to the source face object.                      */
   /*                                                                       */
   /* <Input>                                                               */
-  /*    matrix :: A pointer to the transformation's 2x2 matrix.  Use~0 for */
-  /*              the identity matrix.                                     */
-  /*    delta  :: A pointer to the translation vector.  Use~0 for the null */
-  /*              vector.                                                  */
+  /*    matrix :: A pointer to the transformation's 2x2 matrix.  Use NULL  */
+  /*              for the identity matrix.                                 */
+  /*    delta  :: A pointer to the translation vector.  Use NULL for the   */
+  /*              null vector.                                             */
   /*                                                                       */
   /* <Note>                                                                */
   /*    The transformation is only applied to scalable image formats after */
@@ -2937,9 +3084,8 @@ FT_BEGIN_HEADER
   /*    FT_Render_Mode                                                     */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    An enumeration type that lists the render modes supported by       */
-  /*    FreeType~2.  Each mode corresponds to a specific type of scanline  */
-  /*    conversion performed on the outline.                               */
+  /*    Render modes supported by FreeType~2.  Each mode corresponds to a  */
+  /*    specific type of scanline conversion performed on the outline.     */
   /*                                                                       */
   /*    For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode'     */
   /*    field in the @FT_GlyphSlotRec structure gives the format of the    */
@@ -2952,8 +3098,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Values>                                                              */
   /*    FT_RENDER_MODE_NORMAL ::                                           */
-  /*      This is the default render mode; it corresponds to 8-bit         */
-  /*      anti-aliased bitmaps.                                            */
+  /*      Default render mode; it corresponds to 8-bit anti-aliased        */
+  /*      bitmaps.                                                         */
   /*                                                                       */
   /*    FT_RENDER_MODE_LIGHT ::                                            */
   /*      This is equivalent to @FT_RENDER_MODE_NORMAL.  It is only        */
@@ -2978,11 +3124,11 @@ FT_BEGIN_HEADER
   /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */
-  /*    filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */
-  /*    (not active in the default builds).  It is up to the caller to     */
-  /*    either call @FT_Library_SetLcdFilter (if available) or do the      */
-  /*    filtering itself.                                                  */
+  /*    The LCD-optimized glyph bitmaps produced by `FT_Render_Glyph' can  */
+  /*    be filtered to reduce color-fringes by using                       */
+  /*    @FT_Library_SetLcdFilter (not active in the default builds).  It   */
+  /*    is up to the caller to either call `FT_Library_SetLcdFilter' (if   */
+  /*    available) or do the filtering itself.                             */
   /*                                                                       */
   /*    The selected render mode only affects vector glyphs of a font.     */
   /*    Embedded bitmaps often have a different pixel mode like            */
@@ -3023,16 +3169,16 @@ FT_BEGIN_HEADER
   /*                   convert.                                            */
   /*                                                                       */
   /* <Input>                                                               */
-  /*    render_mode :: This is the render mode used to render the glyph    */
-  /*                   image into a bitmap.  See @FT_Render_Mode for a     */
-  /*                   list of possible values.                            */
+  /*    render_mode :: The render mode used to render the glyph image into */
+  /*                   a bitmap.  See @FT_Render_Mode for a list of        */
+  /*                   possible values.                                    */
   /*                                                                       */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
   /* <Note>                                                                */
   /*    To get meaningful results, font scaling values must be set with    */
-  /*    functions like @FT_Set_Char_Size before calling FT_Render_Glyph.   */
+  /*    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         */
@@ -3058,7 +3204,7 @@ FT_BEGIN_HEADER
   /*    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    */
+  /*    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         */
@@ -3122,17 +3268,15 @@ FT_BEGIN_HEADER
   /*    FT_Kerning_Mode                                                    */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    An enumeration used to specify which kerning values to return in   */
+  /*    An enumeration to specify the format of kerning values returned by */
   /*    @FT_Get_Kerning.                                                   */
   /*                                                                       */
   /* <Values>                                                              */
   /*    FT_KERNING_DEFAULT  :: Return grid-fitted kerning distances in     */
-  /*                           pixels (value is~0).  Whether they are      */
-  /*                           scaled depends on @FT_LOAD_NO_SCALE.        */
+  /*                           26.6 fractional pixels.                     */
   /*                                                                       */
   /*    FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in  */
-  /*                           26.6 fractional pixels.  Whether they are   */
-  /*                           scaled depends on @FT_LOAD_NO_SCALE.        */
+  /*                           26.6 fractional pixels.                     */
   /*                                                                       */
   /*    FT_KERNING_UNSCALED :: Return the kerning vector in original font  */
   /*                           units.                                      */
@@ -3142,9 +3286,13 @@ FT_BEGIN_HEADER
   /*    FreeType heuristically scale down kerning distances at small ppem  */
   /*    values so that they don't become too big.                          */
   /*                                                                       */
+  /*    Both FT_KERNING_DEFAULT and FT_KERNING_UNFITTED use the current    */
+  /*    horizontal scaling factor (as set e.g. with @FT_Set_Char_Size) to  */
+  /*    convert font units to pixels.                                      */
+  /*                                                                       */
   typedef enum  FT_Kerning_Mode_
   {
-    FT_KERNING_DEFAULT  = 0,
+    FT_KERNING_DEFAULT = 0,
     FT_KERNING_UNFITTED,
     FT_KERNING_UNSCALED
 
@@ -3164,7 +3312,7 @@ FT_BEGIN_HEADER
   /*    FT_Get_Kerning                                                     */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Return the kerning vector between two glyphs of a same face.       */
+  /*    Return the kerning vector between two glyphs of the same face.     */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face        :: A handle to a source face object.                   */
@@ -3192,6 +3340,10 @@ FT_BEGIN_HEADER
   /*    kernings, are out of the scope of this API function -- they can be */
   /*    implemented through format-specific interfaces.                    */
   /*                                                                       */
+  /*    Kerning for OpenType fonts implemented in a `GPOS' table is not    */
+  /*    supported; use @FT_HAS_KERNING to find out whether a font has data */
+  /*    that can be extracted with `FT_Get_Kerning'.                       */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Kerning( FT_Face     face,
                   FT_UInt     left_glyph,
@@ -3231,7 +3383,7 @@ FT_BEGIN_HEADER
   /*    @FT_Attach_Stream).                                                */
   /*                                                                       */
   /*    Only very few AFM files come with track kerning data; please refer */
-  /*    to the Adobe's AFM specification for more details.                 */
+  /*    to Adobe's AFM specification for more details.                     */
   /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Track_Kerning( FT_Face    face,
@@ -3293,7 +3445,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Description>                                                         */
   /*    Retrieve the ASCII PostScript name of a given face, if available.  */
-  /*    This only works with PostScript and TrueType fonts.                */
+  /*    This only works with PostScript, TrueType, and OpenType fonts.     */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face :: A handle to the source face object.                        */
@@ -3305,6 +3457,13 @@ FT_BEGIN_HEADER
   /*    The returned pointer is owned by the face and is destroyed with    */
   /*    it.                                                                */
   /*                                                                       */
+  /*    For variation fonts, this string changes if you select a different */
+  /*    instance, and you have to call `FT_Get_PostScript_Name' again to   */
+  /*    retrieve it.  FreeType follows Adobe TechNote #5902, `Generating   */
+  /*    PostScript Names for Fonts Using OpenType Font Variations'.        */
+  /*                                                                       */
+  /*      http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5902.AdobePSNameGeneration.html */
+  /*                                                                       */
   FT_EXPORT( const char* )
   FT_Get_Postscript_Name( FT_Face  face );
 
@@ -3364,7 +3523,8 @@ FT_BEGIN_HEADER
   /*    the face (i.e., if it is not listed in the `face->charmaps'        */
   /*    table).                                                            */
   /*                                                                       */
-  /*    It also fails if a type~14 charmap is selected.                    */
+  /*    It also fails if an OpenType type~14 charmap is selected (which    */
+  /*    doesn't map character codes to glyph indices at all).              */
   /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Set_Charmap( FT_Face     face,
@@ -3399,7 +3559,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Description>                                                         */
   /*    Return the glyph index of a given character code.  This function   */
-  /*    uses a charmap object to do the mapping.                           */
+  /*    uses the currently selected charmap to do the mapping.             */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face     :: A handle to the source face object.                    */
@@ -3433,9 +3593,8 @@ FT_BEGIN_HEADER
   /*    FT_Get_First_Char                                                  */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    This function is used to return the first character code in the    */
-  /*    current charmap of a given face.  It also returns the              */
-  /*    corresponding glyph index.                                         */
+  /*    Return the first character code in the current charmap of a given  */
+  /*    face, together with its corresponding glyph index.                 */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face    :: A handle to the source face object.                     */
@@ -3448,7 +3607,7 @@ FT_BEGIN_HEADER
   /*    The charmap's first character code.                                */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    You should use this function with @FT_Get_Next_Char to be able to  */
+  /*    You should use this function together with @FT_Get_Next_Char to    */
   /*    parse all character codes available in a given charmap.  The code  */
   /*    should look like this:                                             */
   /*                                                                       */
@@ -3488,12 +3647,13 @@ FT_BEGIN_HEADER
   /*    FT_Get_Next_Char                                                   */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    This function is used to return the next character code in the     */
-  /*    current charmap of a given face following the value `char_code',   */
-  /*    as well as the corresponding glyph index.                          */
+  /*    Return the next character code in the current charmap of a given   */
+  /*    face following the value `char_code', as well as the corresponding */
+  /*    glyph index.                                                       */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face      :: A handle to the source face object.                   */
+  /*                                                                       */
   /*    char_code :: The starting character code.                          */
   /*                                                                       */
   /* <Output>                                                              */
@@ -3506,7 +3666,7 @@ FT_BEGIN_HEADER
   /* <Note>                                                                */
   /*    You should use this function with @FT_Get_First_Char to walk       */
   /*    over all character codes available in a given charmap.  See the    */
-  /*    note for this function for a simple code example.                  */
+  /*    note for that function for a simple code example.                  */
   /*                                                                       */
   /*    Note that `*agindex' is set to~0 when there are no more codes in   */
   /*    the charmap.                                                       */
@@ -3517,14 +3677,109 @@ FT_BEGIN_HEADER
                     FT_UInt   *agindex );
 
 
+  /*************************************************************************
+   *
+   * @function:
+   *   FT_Face_Properties
+   *
+   * @description:
+   *   Set or override certain (library or module-wide) properties on a
+   *   face-by-face basis.  Useful for finer-grained control and avoiding
+   *   locks on shared structures (threads can modify their own faces as
+   *   they see fit).
+   *
+   *   Contrary to @FT_Property_Set, this function uses @FT_Parameter so
+   *   that you can pass multiple properties to the target face in one call.
+   *   Note that only a subset of the available properties can be
+   *   controlled.
+   *
+   *   * Stem darkening (@FT_PARAM_TAG_STEM_DARKENING, corresponding to the
+   *     property `no-stem-darkening' provided by the `autofit' and `cff'
+   *     modules; see @no-stem-darkening[autofit] and
+   *     @no-stem-darkening[cff]).
+   *
+   *   * LCD filter weights (@FT_PARAM_TAG_LCD_FILTER_WEIGHTS, corresponding
+   *     to function @FT_Library_SetLcdFilterWeights).
+   *
+   *   * Seed value for the CFF `random' operator
+   *     (@FT_PARAM_TAG_RANDOM_SEED, corresponding to the `random-seed'
+   *     property provided by the `cff' module; see @random-seed).
+   *
+   *   Pass NULL as `data' in @FT_Parameter for a given tag to reset the
+   *   option and use the library or module default again.
+   *
+   * @input:
+   *   face ::
+   *     A handle to the source face object.
+   *
+   *   num_properties ::
+   *     The number of properties that follow.
+   *
+   *   properties ::
+   *     A handle to an @FT_Parameter array with `num_properties' elements.
+   *
+   * @return:
+   *   FreeType error code.  0~means success.
+   *
+   * @note:
+   *   Here an example that sets three properties.  You must define
+   *   FT_CONFIG_OPTION_SUBPIXEL_RENDERING to make the LCD filter examples
+   *   work.
+   *
+   *   {
+   *     FT_Parameter         property1;
+   *     FT_Bool              darken_stems = 1;
+   *
+   *     FT_Parameter         property2;
+   *     FT_LcdFiveTapFilter  custom_weight =
+   *                            { 0x11, 0x44, 0x56, 0x44, 0x11 };
+   *
+   *     FT_Parameter         property3;
+   *     FT_Int32             random_seed = 314159265;
+   *
+   *     FT_Parameter         properties[3] = { property1,
+   *                                            property2,
+   *                                            property3 };
+   *
+   *
+   *     property1.tag  = FT_PARAM_TAG_STEM_DARKENING;
+   *     property1.data = &darken_stems;
+   *
+   *     property2.tag  = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
+   *     property2.data = custom_weight;
+   *
+   *     property3.tag  = FT_PARAM_TAG_RANDOM_SEED;
+   *     property3.data = &random_seed;
+   *
+   *     FT_Face_Properties( face, 3, properties );
+   *   }
+   *
+   *   The next example resets a single property to its default value.
+   *
+   *   {
+   *     FT_Parameter  property;
+   *
+   *
+   *     property.tag  = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
+   *     property.data = NULL;
+   *
+   *     FT_Face_Properties( face, 1, &property );
+   *   }
+   *
+   */
+  FT_EXPORT( FT_Error )
+  FT_Face_Properties( FT_Face        face,
+                      FT_UInt        num_properties,
+                      FT_Parameter*  properties );
+
+
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
   /*    FT_Get_Name_Index                                                  */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Return the glyph index of a given glyph name.  This function uses  */
-  /*    driver specific objects to do the translation.                     */
+  /*    Return the glyph index of a given glyph name.                      */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face       :: A handle to the source face object.                  */
@@ -3545,8 +3800,10 @@ FT_BEGIN_HEADER
    *   FT_SUBGLYPH_FLAG_XXX
    *
    * @description:
-   *   A list of constants used to describe subglyphs.  Please refer to the
-   *   TrueType specification for the meaning of the various flags.
+   *   A list of constants describing subglyphs.  Please refer to the
+   *   `glyf' table description in the OpenType specification for the
+   *   meaning of the various flags (which get synthesized for
+   *   non-OpenType subglyphs).
    *
    * @values:
    *   FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::
@@ -3607,7 +3864,7 @@ FT_BEGIN_HEADER
    * @note:
    *   The values of `*p_arg1', `*p_arg2', and `*p_transform' must be
    *   interpreted depending on the flags returned in `*p_flags'.  See the
-   *   TrueType specification for details.
+   *   OpenType specification for details.
    *
    */
   FT_EXPORT( FT_Error )
@@ -3647,33 +3904,31 @@ FT_BEGIN_HEADER
   /*      the font software copyright owner.                               */
   /*                                                                       */
   /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING ::                           */
-  /*      If this bit is set, the font may be embedded and temporarily     */
-  /*      loaded on the remote system.  Documents containing Preview &     */
-  /*      Print fonts must be opened `read-only'; no edits can be applied  */
-  /*      to the document.                                                 */
+  /*      The font may be embedded and temporarily loaded on the remote    */
+  /*      system.  Documents containing Preview & Print fonts must be      */
+  /*      opened `read-only'; no edits can be applied to the document.     */
   /*                                                                       */
   /*    FT_FSTYPE_EDITABLE_EMBEDDING ::                                    */
-  /*      If this bit is set, the font may be embedded but must only be    */
-  /*      installed temporarily on other systems.  In contrast to Preview  */
-  /*      & Print fonts, documents containing editable fonts may be opened */
-  /*      for reading, editing is permitted, and changes may be saved.     */
+  /*      The font may be embedded but must only be installed temporarily  */
+  /*      on other systems.  In contrast to Preview & Print fonts,         */
+  /*      documents containing editable fonts may be opened for reading,   */
+  /*      editing is permitted, and changes may be saved.                  */
   /*                                                                       */
   /*    FT_FSTYPE_NO_SUBSETTING ::                                         */
-  /*      If this bit is set, the font may not be subsetted prior to       */
-  /*      embedding.                                                       */
+  /*      The font may not be subsetted prior to embedding.                */
   /*                                                                       */
   /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY ::                                 */
-  /*      If this bit is set, only bitmaps contained in the font may be    */
-  /*      embedded; no outline data may be embedded.  If there are no      */
-  /*      bitmaps available in the font, then the font is unembeddable.    */
+  /*      Only bitmaps contained in the font may be embedded; no outline   */
+  /*      data may be embedded.  If there are no 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.                                                  */
+  /*    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.                                              */
   /*                                                                       */
 #define FT_FSTYPE_INSTALLABLE_EMBEDDING         0x0000
 #define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING  0x0002
@@ -3689,13 +3944,13 @@ FT_BEGIN_HEADER
   /*    FT_Get_FSType_Flags                                                */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Return the fsType flags for a font.                                */
+  /*    Return the `fsType' flags for a font.                              */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face :: A handle to the source face object.                        */
   /*                                                                       */
   /* <Return>                                                              */
-  /*    The fsType flags, @FT_FSTYPE_XXX.                                  */
+  /*    The `fsType' flags, see @FT_FSTYPE_XXX.                            */
   /*                                                                       */
   /* <Note>                                                                */
   /*    Use this function rather than directly reading the `fs_type' field */
@@ -3715,39 +3970,51 @@ FT_BEGIN_HEADER
   /*    glyph_variants                                                     */
   /*                                                                       */
   /* <Title>                                                               */
-  /*    Glyph Variants                                                     */
+  /*    Unicode Variation Sequences                                        */
   /*                                                                       */
   /* <Abstract>                                                            */
-  /*    The FreeType~2 interface to Unicode Ideographic Variation          */
-  /*    Sequences (IVS), using the SFNT cmap format~14.                    */
+  /*    The FreeType~2 interface to Unicode Variation Sequences (UVS),     */
+  /*    using the SFNT cmap format~14.                                     */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Many CJK characters have variant forms.  They are a sort of grey   */
-  /*    area somewhere between being totally irrelevant and semantically   */
-  /*    distinct; for this reason, the Unicode consortium decided to       */
-  /*    introduce Ideographic Variation Sequences (IVS), consisting of a   */
-  /*    Unicode base character and one of 240 variant selectors            */
-  /*    (U+E0100-U+E01EF), instead of further extending the already huge   */
-  /*    code range for CJK characters.                                     */
-  /*                                                                       */
-  /*    An IVS is registered and unique; for further details please refer  */
-  /*    to Unicode Technical Standard #37, the Ideographic Variation       */
-  /*    Database:                                                          */
-  /*                                                                       */
-  /*      http://www.unicode.org/reports/tr37/                             */
-  /*                                                                       */
-  /*    To date (November 2014), the character with the most variants is   */
-  /*    U+9089, having 32 such IVS.                                        */
-  /*                                                                       */
-  /*    Adobe and MS decided to support IVS with a new cmap subtable       */
-  /*    (format~14).  It is an odd subtable because it is not a mapping of */
-  /*    input code points to glyphs, but contains lists of all variants    */
-  /*    supported by the font.                                             */
-  /*                                                                       */
-  /*    A variant may be either `default' or `non-default'.  A default     */
-  /*    variant is the one you will get for that code point if you look it */
-  /*    up in the standard Unicode cmap.  A non-default variant is a       */
-  /*    different glyph.                                                   */
+  /*    Many characters, especially for CJK scripts, have variant forms.   */
+  /*    They are a sort of grey area somewhere between being totally       */
+  /*    irrelevant and semantically distinct; for this reason, the Unicode */
+  /*    consortium decided to introduce Variation Sequences (VS),          */
+  /*    consisting of a Unicode base character and a variation selector    */
+  /*    instead of further extending the already huge number of            */
+  /*    characters.                                                        */
+  /*                                                                       */
+  /*    Unicode maintains two different sets, namely `Standardized         */
+  /*    Variation Sequences' and registered `Ideographic Variation         */
+  /*    Sequences' (IVS), collected in the `Ideographic Variation          */
+  /*    Database' (IVD).                                                   */
+  /*                                                                       */
+  /*      http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */
+  /*      http://unicode.org/reports/tr37/                                 */
+  /*      http://unicode.org/ivd/                                          */
+  /*                                                                       */
+  /*    To date (January 2017), the character with the most ideographic    */
+  /*    variations is U+9089, having 32 such IVS.                          */
+  /*                                                                       */
+  /*    Three Mongolian Variation Selectors have the values U+180B-U+180D; */
+  /*    256 generic Variation Selectors are encoded in the ranges          */
+  /*    U+FE00-U+FE0F and U+E0100-U+E01EF.  IVS currently use Variation    */
+  /*    Selectors from the range U+E0100-U+E01EF only.                     */
+  /*                                                                       */
+  /*    A VS consists of the base character value followed by a single     */
+  /*    Variation Selector.  For example, to get the first variation of    */
+  /*    U+9089, you have to write the character sequence `U+9089 U+E0100'. */
+  /*                                                                       */
+  /*    Adobe and MS decided to support both standardized and ideographic  */
+  /*    VS with a new cmap subtable (format~14).  It is an odd subtable    */
+  /*    because it is not a mapping of input code points to glyphs, but    */
+  /*    contains lists of all variations supported by the font.            */
+  /*                                                                       */
+  /*    A variation may be either `default' or `non-default' for a given   */
+  /*    font.  A default variation is the one you will get for that code   */
+  /*    point if you look it up in the standard Unicode cmap.  A           */
+  /*    non-default variation is a different glyph.                        */
   /*                                                                       */
   /*************************************************************************/
 
@@ -3803,8 +4070,8 @@ FT_BEGIN_HEADER
   /*    FT_Face_GetCharVariantIsDefault                                    */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Check whether this variant of this Unicode character is the one to */
-  /*    be found in the `cmap'.                                            */
+  /*    Check whether this variation of this Unicode character is the one  */
+  /*    to be found in the `cmap'.                                         */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face ::                                                            */
@@ -3818,7 +4085,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Return>                                                              */
   /*    1~if found in the standard (Unicode) cmap, 0~if found in the       */
-  /*    variation selector cmap, or -1 if it is not a variant.             */
+  /*    variation selector cmap, or -1 if it is not a variation.           */
   /*                                                                       */
   /* <Note>                                                                */
   /*    This function is only meaningful if the font has a variation       */
@@ -3839,7 +4106,7 @@ FT_BEGIN_HEADER
   /*    FT_Face_GetVariantSelectors                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Return a zero-terminated list of Unicode variant selectors found   */
+  /*    Return a zero-terminated list of Unicode variation selectors found */
   /*    in the font.                                                       */
   /*                                                                       */
   /* <Input>                                                               */
@@ -3848,7 +4115,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Return>                                                              */
   /*    A pointer to an array of selector code points, or NULL if there is */
-  /*    no valid variant selector cmap subtable.                           */
+  /*    no valid variation selector cmap subtable.                         */
   /*                                                                       */
   /* <Note>                                                                */
   /*    The last item in the array is~0; the array is owned by the         */
@@ -3868,7 +4135,7 @@ FT_BEGIN_HEADER
   /*    FT_Face_GetVariantsOfChar                                          */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Return a zero-terminated list of Unicode variant selectors found   */
+  /*    Return a zero-terminated list of Unicode variation selectors found */
   /*    for the specified character code.                                  */
   /*                                                                       */
   /* <Input>                                                               */
@@ -3879,7 +4146,7 @@ FT_BEGIN_HEADER
   /*      The character codepoint in Unicode.                              */
   /*                                                                       */
   /* <Return>                                                              */
-  /*    A pointer to an array of variant selector code points that are     */
+  /*    A pointer to an array of variation selector code points that are   */
   /*    active for the given character, or NULL if the corresponding list  */
   /*    is empty.                                                          */
   /*                                                                       */
@@ -3903,19 +4170,19 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Description>                                                         */
   /*    Return a zero-terminated list of Unicode character codes found for */
-  /*    the specified variant selector.                                    */
+  /*    the specified variation selector.                                  */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face ::                                                            */
   /*      A handle to the source face object.                              */
   /*                                                                       */
   /*    variantSelector ::                                                 */
-  /*      The variant selector code point in Unicode.                      */
+  /*      The variation selector code point in Unicode.                    */
   /*                                                                       */
   /* <Return>                                                              */
   /*    A list of all the code points that are specified by this selector  */
   /*    (both default and non-default codes are returned) or NULL if there */
-  /*    is no valid cmap or the variant selector is invalid.               */
+  /*    is no valid cmap or the variation selector is invalid.             */
   /*                                                                       */
   /* <Note>                                                                */
   /*    The last item in the array is~0; the array is owned by the         */
@@ -3965,16 +4232,17 @@ FT_BEGIN_HEADER
   /*    FT_MulDiv                                                          */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A very simple function used to perform the computation `(a*b)/c'   */
-  /*    with maximum accuracy (it uses a 64-bit intermediate integer       */
-  /*    whenever necessary).                                               */
+  /*    Compute `(a*b)/c' with maximum accuracy, using a 64-bit            */
+  /*    intermediate integer whenever necessary.                           */
   /*                                                                       */
   /*    This function isn't necessarily as fast as some processor specific */
   /*    operations, but is at least completely portable.                   */
   /*                                                                       */
   /* <Input>                                                               */
   /*    a :: The first multiplier.                                         */
+  /*                                                                       */
   /*    b :: The second multiplier.                                        */
+  /*                                                                       */
   /*    c :: The divisor.                                                  */
   /*                                                                       */
   /* <Return>                                                              */
@@ -3994,12 +4262,12 @@ FT_BEGIN_HEADER
   /*    FT_MulFix                                                          */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A very simple function used to perform the computation             */
-  /*    `(a*b)/0x10000' with maximum accuracy.  Most of the time this is   */
-  /*    used to multiply a given value by a 16.16 fixed-point factor.      */
+  /*    Compute `(a*b)/0x10000' with maximum accuracy.  Its main use is to */
+  /*    multiply a given value by a 16.16 fixed-point factor.              */
   /*                                                                       */
   /* <Input>                                                               */
   /*    a :: The first multiplier.                                         */
+  /*                                                                       */
   /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
   /*         possible (see note below).                                    */
   /*                                                                       */
@@ -4028,12 +4296,12 @@ FT_BEGIN_HEADER
   /*    FT_DivFix                                                          */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A very simple function used to perform the computation             */
-  /*    `(a*0x10000)/b' with maximum accuracy.  Most of the time, this is  */
-  /*    used to divide a given value by a 16.16 fixed-point factor.        */
+  /*    Compute `(a*0x10000)/b' with maximum accuracy.  Its main use is to */
+  /*    divide a given value by a 16.16 fixed-point factor.                */
   /*                                                                       */
   /* <Input>                                                               */
   /*    a :: The numerator.                                                */
+  /*                                                                       */
   /*    b :: The denominator.  Use a 16.16 factor here.                    */
   /*                                                                       */
   /* <Return>                                                              */
@@ -4050,13 +4318,13 @@ FT_BEGIN_HEADER
   /*    FT_RoundFix                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A very simple function used to round a 16.16 fixed number.         */
+  /*    Round a 16.16 fixed number.                                        */
   /*                                                                       */
   /* <Input>                                                               */
   /*    a :: The number to be rounded.                                     */
   /*                                                                       */
   /* <Return>                                                              */
-  /*    `a' rounded to nearest 16.16 fixed integer, halfway cases away     */
+  /*    `a' rounded to the nearest 16.16 fixed integer, halfway cases away */
   /*    from zero.                                                         */
   /*                                                                       */
   FT_EXPORT( FT_Fixed )
@@ -4069,8 +4337,7 @@ FT_BEGIN_HEADER
   /*    FT_CeilFix                                                         */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A very simple function used to compute the ceiling function of a   */
-  /*    16.16 fixed number.                                                */
+  /*    Compute the smallest following integer of a 16.16 fixed number.    */
   /*                                                                       */
   /* <Input>                                                               */
   /*    a :: The number for which the ceiling function is to be computed.  */
@@ -4088,8 +4355,7 @@ FT_BEGIN_HEADER
   /*    FT_FloorFix                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A very simple function used to compute the floor function of a     */
-  /*    16.16 fixed number.                                                */
+  /*    Compute the largest previous integer of a 16.16 fixed number.      */
   /*                                                                       */
   /* <Input>                                                               */
   /*    a :: The number for which the floor function is to be computed.    */
@@ -4175,8 +4441,8 @@ FT_BEGIN_HEADER
    *
    */
 #define FREETYPE_MAJOR  2
-#define FREETYPE_MINOR  6
-#define FREETYPE_PATCH  5
+#define FREETYPE_MINOR  8
+#define FREETYPE_PATCH  0
 
 
   /*************************************************************************/
index 023dd84..dea96e0 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Quick computation of advance widths (specification only).            */
 /*                                                                         */
-/*  Copyright 2008-2016 by                                                 */
+/*  Copyright 2008-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 40c8003..abd540f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for controlling the auto-hinter (specification only).   */
 /*                                                                         */
-/*  Copyright 2012-2016 by                                                 */
+/*  Copyright 2012-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -428,6 +428,9 @@ FT_BEGIN_HEADER
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values 1 and 0 for `on' and `off', respectively).
+   *
    *   The warping code can also change advance widths.  Have a look at the
    *   `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure
    *   for details on improving inter-glyph distances while rendering.
@@ -445,7 +448,7 @@ FT_BEGIN_HEADER
    *   no-stem-darkening[autofit]
    *
    * @description:
-   *   *Experimental* *only,* *requires* *linear* *alpha* *blending* *and*
+   *   *Experimental* *only*, *requires* *linear* *alpha* *blending* *and*
    *   *gamma* *correction*
    *
    *   Stem darkening emboldens glyphs at smaller sizes to make them more
@@ -473,7 +476,32 @@ FT_BEGIN_HEADER
    *   The smaller the size (especially 9ppem and down), the higher the loss
    *   of emboldening versus the CFF driver.
    *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable similar to the CFF driver.  It can also be set per face
+   *   using @FT_Face_Properties with @FT_PARAM_TAG_STEM_DARKENING.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_STEM_DARKENING
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding Boolean argument specifies whether to apply stem
+   *   darkening, overriding the global default values or the values set up
+   *   with @FT_Property_Set (see @no-stem-darkening[autofit] and
+   *   @no-stem-darkening[cff]).
+   *
+   *   This is a passive setting that only takes effect if the font driver
+   *   or autohinter honors it, which the CFF driver always does, but the
+   *   autohinter only in `light' hinting mode (as of version 2.7.0).
+   *
    */
+#define FT_PARAM_TAG_STEM_DARKENING \
+          FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
 
 
   /**************************************************************************
@@ -489,6 +517,8 @@ FT_BEGIN_HEADER
    *   CFF_CONFIG_OPTION_DARKENING_PARAMETER_* #defines for consistency.
    *   Note the differences described in @no-stem-darkening[autofit].
    *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable similar to the CFF driver.
    */
 
 
index 2a4d214..f03bdc1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType exact bbox computation (specification).                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 016dba0..3d3106b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for accessing BDF-specific strings (specification).     */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 0eac7b9..04b2402 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType utility functions for bitmaps (specification).              */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index b7f2eee..9147a79 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Bzip2-compressed stream support.                                     */
 /*                                                                         */
-/*  Copyright 2010-2016 by                                                 */
+/*  Copyright 2010-2017 by                                                 */
 /*  Joel Klinghed.                                                         */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 883c88d..5ff3ccf 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Cache subsystem (specification).                            */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index ad34541..477b6dd 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for controlling the CFF driver (specification only).    */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -113,6 +113,7 @@ FT_BEGIN_HEADER
    *   hinting-engine[cff]
    *   no-stem-darkening[cff]
    *   darkening-parameters[cff]
+   *   random-seed
    *
    */
 
@@ -148,6 +149,8 @@ FT_BEGIN_HEADER
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values `adobe' or `freetype').
    */
 
 
@@ -199,6 +202,11 @@ FT_BEGIN_HEADER
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values 1 and 0 for `on' and `off', respectively).
+   *   It can also be set per face using @FT_Face_Properties with
+   *   @FT_PARAM_TAG_STEM_DARKENING.
+   *
    */
 
 
@@ -248,7 +256,58 @@ FT_BEGIN_HEADER
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable, using eight comma-separated integers without spaces.  Here
+   *   the above example, using `\' to break the line for readability.
+   *
+   *   {
+   *     FREETYPE_PROPERTIES=\
+   *     cff:darkening-parameters=500,300,1000,200,1500,100,2000,0
+   *   }
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   random-seed
+   *
+   * @description:
+   *   By default, the seed value for the CFF `random' operator is set to a
+   *   random value.  However, mainly for debugging purposes, it is often
+   *   necessary to use a known value as a seed so that the pseudo-random
+   *   number sequences generated by `random' are repeatable.
+   *
+   *   The `random-seed' property does that.  Its argument is a signed 32bit
+   *   integer; if the value is zero or negative, the seed given by the
+   *   `intitialRandomSeed' private DICT operator in a CFF file gets used
+   *   (or a default value if there is no such operator).  If the value is
+   *   positive, use it instead of `initialRandomSeed', which is
+   *   consequently ignored.
+   *
+   * @note:
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable.  It can also be set per face using @FT_Face_Properties with
+   *   @FT_PARAM_TAG_RANDOM_SEED.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_RANDOM_SEED
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding 32bit signed integer argument overrides the CFF
+   *   module's random seed value with a face-specific one; see
+   *   @random-seed.
+   *
    */
+#define FT_PARAM_TAG_RANDOM_SEED \
+          FT_MAKE_TAG( 's', 'e', 'e', 'd' )
+
 
   /* */
 
index ab43895..a0a121b 100644 (file)
@@ -77,6 +77,7 @@
 /*    auto_hinter                                                          */
 /*    cff_driver                                                           */
 /*    tt_driver                                                            */
+/*    pcf_driver                                                           */
 /*                                                                         */
 /***************************************************************************/
 
index e1bc9fe..4adcbee 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for accessing CID font information (specification).     */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  Dereg Clegg and Michael Toftdal.                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 3f53dd5..cabbac8 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType error codes (specification).                                */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
                 "invalid PostScript (post) table format" )
   FT_ERRORDEF_( Invalid_Post_Table,                          0x9B,
                 "invalid PostScript (post) table" )
+  FT_ERRORDEF_( DEF_In_Glyf_Bytecode,                        0x9C,
+                "found FDEF or IDEF opcode in glyf bytecode" )
 
   /* CFF, CID, and Type 1 errors */
 
index e15bfb0..42769fa 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType error code handling (specification).                        */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   /*                                                                   */
   /*   #undefine __FTERRORS_H__                                        */
   /*                                                                   */
-  /* work for backwards compatibility.                                 */
+  /* work for backward compatibility.                                  */
   /*                                                                   */
 #if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) )
 #define FTERRORS_H_
index bd42324..3377583 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Support functions for font formats.                                  */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 3f5b3bc..ce18d64 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Access of TrueType's `gasp' table (specification).                   */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -92,8 +92,8 @@
 #define FT_GASP_NO_TABLE               -1
 #define FT_GASP_DO_GRIDFIT           0x01
 #define FT_GASP_DO_GRAY              0x02
+#define FT_GASP_SYMMETRIC_GRIDFIT    0x04
 #define FT_GASP_SYMMETRIC_SMOOTHING  0x08
-#define FT_GASP_SYMMETRIC_GRIDFIT    0x10
 
 
   /*************************************************************************
    *   FT_Get_Gasp
    *
    * @description:
-   *   Read the `gasp' table from a TrueType or OpenType font file and
-   *   return the entry corresponding to a given character pixel size.
+   *   For a TrueType or OpenType font file, return the rasterizer behaviour
+   *   flags from the font's `gasp' table corresponding to a given
+   *   character pixel size.
    *
    * @input:
    *   face :: The source face handle.
+   *
    *   ppem :: The vertical character pixel size.
    *
    * @return:
    *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
    *   `gasp' table in the face.
    *
+   * @note:
+   *   If you want to use the MM functionality of OpenType variation fonts
+   *   (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this
+   *   function *after* setting an instance since the return values can
+   *   change.
+   *
    * @since:
    *   2.3.0
    */
index d9840a8..79879a7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType convenience functions to handle glyphs (specification).     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -453,7 +453,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*                                                                       */
   /*        // load glyph                                                  */
-  /*        error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT );     */
+  /*        error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );    */
   /*                                                                       */
   /*        // extract glyph image                                         */
   /*        error = FT_Get_Glyph( face->glyph, &glyph );                   */
index a58e86a..f239c71 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  Masatake YAMATO, Redhat K.K,                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 3932ce6..bd5ceaa 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Gzip-compressed stream support.                                      */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 28b2704..1a049ef 100644 (file)
@@ -5,7 +5,7 @@
 /*    FreeType glyph image formats and default raster interface            */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -619,7 +619,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    {                                                                  */
   /*      x' = (x << shift) - delta                                        */
-  /*      y' = (x << shift) - delta                                        */
+  /*      y' = (y << shift) - delta                                        */
   /*    }                                                                  */
   /*                                                                       */
   /*    Set the values of `shift' and `delta' to~0 to get the original     */
@@ -860,16 +860,6 @@ FT_BEGIN_HEADER
   /*    This can be used to write anti-aliased outlines directly to a      */
   /*    given background bitmap, and even perform translucency.            */
   /*                                                                       */
-  /*    Note that the `count' field cannot be greater than a fixed value   */
-  /*    defined by the `FT_MAX_GRAY_SPANS' configuration macro in          */
-  /*    `ftoption.h'.  By default, this value is set to~32, which means    */
-  /*    that if there are more than 32~spans on a given scanline, the      */
-  /*    callback is called several times with the same `y' parameter in    */
-  /*    order to draw all callbacks.                                       */
-  /*                                                                       */
-  /*    Otherwise, the callback is only called once per scan-line, and     */
-  /*    only for those scanlines that do have `gray' pixels on them.       */
-  /*                                                                       */
   typedef void
   (*FT_SpanFunc)( int             y,
                   int             count,
@@ -1190,6 +1180,7 @@ FT_BEGIN_HEADER
   typedef struct  FT_Raster_Funcs_
   {
     FT_Glyph_Format        glyph_format;
+
     FT_Raster_NewFunc      raster_new;
     FT_Raster_ResetFunc    raster_reset;
     FT_Raster_SetModeFunc  raster_set_mode;
index 46b58b7..f6ae2ba 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType incremental loading (specification).                        */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e06a895..680bd90 100644 (file)
@@ -5,7 +5,7 @@
 /*    FreeType API for color filtering of subpixel bitmap glyphs           */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -268,6 +268,9 @@ FT_BEGIN_HEADER
    *   defined in your build of the library, which should correspond to all
    *   default builds of FreeType.
    *
+   *   LCD filter weights can also be set per face using @FT_Face_Properties
+   *   with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
+   *
    * @since:
    *   2.4.0
    */
@@ -275,6 +278,38 @@ FT_BEGIN_HEADER
   FT_Library_SetLcdFilterWeights( FT_Library      library,
                                   unsigned char  *weights );
 
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_LCD_FILTER_WEIGHTS
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding argument specifies the five LCD filter weights for a
+   *   given face (if using @FT_LOAD_TARGET_LCD, for example), overriding
+   *   the global default values or the values set up with
+   *   @FT_Library_SetLcdFilterWeights.
+   *
+   */
+#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
+          FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
+
+
+  /*
+   * @type:
+   *   FT_LcdFiveTapFilter
+   *
+   * @description:
+   *   A typedef for passing the five LCD filter weights to
+   *   @FT_Face_Properties within an @FT_Parameter structure.
+   *
+   */
+#define FT_LCD_FILTER_FIVE_TAPS  5
+
+  typedef FT_Byte  FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS];
+
+
   /* */
 
 
index 82f437a..5309cb1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Generic list support for FreeType (specification).                   */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 582e2c1..a82c95e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    LZW-compressed stream support.                                       */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index adb15ca..ad97c6e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Additional Mac-specific API.                                         */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 6c05f0c..c41b80e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Multiple Master font interface (specification).             */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -43,11 +43,10 @@ FT_BEGIN_HEADER
   /*    Master fonts, i.e., the selection of specific design instances by  */
   /*    setting design axis coordinates.                                   */
   /*                                                                       */
-  /*    George Williams has extended this interface to make it work with   */
-  /*    both Type~1 Multiple Masters fonts and GX distortable (var)        */
-  /*    fonts.  Some of these routines only work with MM fonts, others     */
-  /*    will work with both types.  They are similar enough that a         */
-  /*    consistent interface makes sense.                                  */
+  /*    Besides Adobe MM fonts, the interface supports Apple's TrueType GX */
+  /*    and OpenType variation fonts.  Some of the routines only work with */
+  /*    Adobe MM fonts, others will work with all three types.  They are   */
+  /*    similar enough that a consistent interface makes sense.            */
   /*                                                                       */
   /*************************************************************************/
 
@@ -58,10 +57,11 @@ FT_BEGIN_HEADER
   /*    FT_MM_Axis                                                         */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A simple structure used to model a given axis in design space for  */
-  /*    Multiple Masters fonts.                                            */
+  /*    A structure to model a given axis in design space for Multiple     */
+  /*    Masters fonts.                                                     */
   /*                                                                       */
-  /*    This structure can't be used for GX var fonts.                     */
+  /*    This structure can't be used for TrueType GX or OpenType variation */
+  /*    fonts.                                                             */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    name    :: The axis's name.                                        */
@@ -85,10 +85,11 @@ FT_BEGIN_HEADER
   /*    FT_Multi_Master                                                    */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model the axes and space of a Multiple Masters */
+  /*    A structure to model the axes and space of a Multiple Masters      */
   /*    font.                                                              */
   /*                                                                       */
-  /*    This structure can't be used for GX var fonts.                     */
+  /*    This structure can't be used for TrueType GX or OpenType variation */
+  /*    fonts.                                                             */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    num_axis    :: Number of axes.  Cannot exceed~4.                   */
@@ -115,27 +116,35 @@ FT_BEGIN_HEADER
   /*    FT_Var_Axis                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A simple structure used to model a given axis in design space for  */
-  /*    Multiple Masters and GX var fonts.                                 */
+  /*    A structure to model a given axis in design space for Multiple     */
+  /*    Masters, TrueType GX, and OpenType variation fonts.                */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    name    :: The axis's name.                                        */
-  /*               Not always meaningful for GX.                           */
+  /*               Not always meaningful for TrueType GX or OpenType       */
+  /*               variation fonts.                                        */
   /*                                                                       */
   /*    minimum :: The axis's minimum design coordinate.                   */
   /*                                                                       */
   /*    def     :: The axis's default design coordinate.                   */
-  /*               FreeType computes meaningful default values for MM; it  */
-  /*               is then an integer value, not in 16.16 format.          */
+  /*               FreeType computes meaningful default values for Adobe   */
+  /*               MM fonts.                                               */
   /*                                                                       */
   /*    maximum :: The axis's maximum design coordinate.                   */
   /*                                                                       */
-  /*    tag     :: The axis's tag (the GX equivalent to `name').           */
-  /*               FreeType provides default values for MM if possible.    */
+  /*    tag     :: The axis's tag (the equivalent to `name' for TrueType   */
+  /*               GX and OpenType variation fonts).  FreeType provides    */
+  /*               default values for Adobe MM fonts if possible.          */
   /*                                                                       */
-  /*    strid   :: The entry in `name' table (another GX version of        */
-  /*               `name').                                                */
-  /*               Not meaningful for MM.                                  */
+  /*    strid   :: The axis name entry in the font's `name' table.  This   */
+  /*               is another (and often better) version of the `name'     */
+  /*               field for TrueType GX or OpenType variation fonts.  Not */
+  /*               meaningful for Adobe MM fonts.                          */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The fields `minimum', `def', and `maximum' are 16.16 fractional    */
+  /*    values for TrueType GX and OpenType variation fonts.  For Adobe MM */
+  /*    fonts, the values are integers.                                    */
   /*                                                                       */
   typedef struct  FT_Var_Axis_
   {
@@ -157,20 +166,25 @@ FT_BEGIN_HEADER
   /*    FT_Var_Named_Style                                                 */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A simple structure used to model a named style in a GX var font.   */
+  /*    A structure to model a named instance in a TrueType GX or OpenType */
+  /*    variation font.                                                    */
   /*                                                                       */
-  /*    This structure can't be used for MM fonts.                         */
+  /*    This structure can't be used for Adobe MM fonts.                   */
   /*                                                                       */
   /* <Fields>                                                              */
-  /*    coords :: The design coordinates for this style.                   */
+  /*    coords :: The design coordinates for this instance.                */
   /*              This is an array with one entry for each axis.           */
   /*                                                                       */
-  /*    strid  :: The entry in `name' table identifying this style.        */
+  /*    strid  :: The entry in `name' table identifying this instance.     */
+  /*                                                                       */
+  /*    psid   :: The entry in `name' table identifying a PostScript name  */
+  /*              for this instance.                                       */
   /*                                                                       */
   typedef struct  FT_Var_Named_Style_
   {
     FT_Fixed*  coords;
     FT_UInt    strid;
+    FT_UInt    psid;   /* since 2.7.1 */
 
   } FT_Var_Named_Style;
 
@@ -181,35 +195,43 @@ FT_BEGIN_HEADER
   /*    FT_MM_Var                                                          */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model the axes and space of a Multiple Masters */
-  /*    or GX var distortable font.                                        */
+  /*    A structure to model the axes and space of a Adobe MM, TrueType    */
+  /*    GX, or OpenType variation font.                                    */
   /*                                                                       */
-  /*    Some fields are specific to one format and not to the other      */
+  /*    Some fields are specific to one format and not to the others.      */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    num_axis        :: The number of axes.  The maximum value is~4 for */
-  /*                       MM; no limit in GX.                             */
+  /*                       Adobe MM fonts; no limit in TrueType GX or      */
+  /*                       OpenType variation fonts.                       */
   /*                                                                       */
   /*    num_designs     :: The number of designs; should be normally       */
-  /*                       2^num_axis for MM fonts.  Not meaningful for GX */
+  /*                       2^num_axis for Adobe MM fonts.  Not meaningful  */
+  /*                       for TrueType GX or OpenType variation fonts     */
   /*                       (where every glyph could have a different       */
   /*                       number of designs).                             */
   /*                                                                       */
-  /*    num_namedstyles :: The number of named styles; only meaningful for */
-  /*                       GX that allows certain design coordinates to    */
-  /*                       have a string ID (in the `name' table)          */
-  /*                       associated with them.  The font can tell the    */
-  /*                       user that, for example, Weight=1.5 is `Bold'.   */
+  /*    num_namedstyles :: The number of named styles; a `named style' is  */
+  /*                       a tuple of design coordinates that has a string */
+  /*                       ID (in the `name' table) associated with it.    */
+  /*                       The font can tell the user that, for example,   */
+  /*                       [Weight=1.5,Width=1.1] is `Bold'.  Another name */
+  /*                       for `named style' is `named instance'.          */
+  /*                                                                       */
+  /*                       For Adobe Multiple Masters fonts, this value is */
+  /*                       always zero because the format does not support */
+  /*                       named styles.                                   */
   /*                                                                       */
   /*    axis            :: An axis descriptor table.                       */
-  /*                       GX fonts contain slightly more data than MM.    */
+  /*                       TrueType GX and OpenType variation fonts        */
+  /*                       contain slightly more data than Adobe MM fonts. */
   /*                       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.                         */
+  /*    namedstyle      :: A named style (instance) table.                 */
+  /*                       Only meaningful for TrueType GX and OpenType    */
+  /*                       variation fonts.  Memory management of this     */
+  /*                       pointer is done internally by FreeType.         */
   /*                                                                       */
   typedef struct  FT_MM_Var_
   {
@@ -228,9 +250,10 @@ FT_BEGIN_HEADER
   /*    FT_Get_Multi_Master                                                */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Retrieve the Multiple Master descriptor of a given font.           */
+  /*    Retrieve a variation descriptor of a given Adobe MM font.          */
   /*                                                                       */
-  /*    This function can't be used with GX fonts.                         */
+  /*    This function can't be used with TrueType GX or OpenType variation */
+  /*    fonts.                                                             */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face    :: A handle to the source face.                            */
@@ -252,13 +275,15 @@ FT_BEGIN_HEADER
   /*    FT_Get_MM_Var                                                      */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Retrieve the Multiple Master/GX var descriptor of a given font.    */
+  /*    Retrieve a variation descriptor for a given font.                  */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face    :: A handle to the source face.                            */
   /*                                                                       */
   /* <Output>                                                              */
-  /*    amaster :: The Multiple Masters/GX var descriptor.                 */
+  /*    amaster :: The variation descriptor.                               */
   /*               Allocates a data structure, which the user must         */
   /*               deallocate with `free' after use.                       */
   /*                                                                       */
@@ -276,10 +301,11 @@ FT_BEGIN_HEADER
   /*    FT_Set_MM_Design_Coordinates                                       */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    For Multiple Masters fonts, choose an interpolated font design     */
-  /*    through design coordinates.                                        */
+  /*    For Adobe MM fonts, choose an interpolated font design through     */
+  /*    design coordinates.                                                */
   /*                                                                       */
-  /*    This function can't be used with GX fonts.                         */
+  /*    This function can't be used with TrueType GX or OpenType variation */
+  /*    fonts.                                                             */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face       :: A handle to the source face.                         */
@@ -307,8 +333,9 @@ FT_BEGIN_HEADER
   /*    FT_Set_Var_Design_Coordinates                                      */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    For Multiple Master or GX Var fonts, choose an interpolated font   */
-  /*    design through design coordinates.                                 */
+  /*    Choose an interpolated font design through design coordinates.     */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face       :: A handle to the source face.                         */
@@ -333,11 +360,43 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
+  /*    FT_Get_Var_Design_Coordinates                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the design coordinates of the currently selected interpolated  */
+  /*    font.                                                              */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /*    num_coords :: The number of design coordinates to retrieve.  If it */
+  /*                  is larger than the number of axes, set the excess    */
+  /*                  values to~0.                                         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    coords     :: The design coordinates array.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Var_Design_Coordinates( FT_Face    face,
+                                 FT_UInt    num_coords,
+                                 FT_Fixed*  coords );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
   /*    FT_Set_MM_Blend_Coordinates                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    For Multiple Masters and GX var fonts, choose an interpolated font */
-  /*    design through normalized blend coordinates.                       */
+  /*    Choose an interpolated font design through normalized blend        */
+  /*    coordinates.                                                       */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face       :: A handle to the source face.                         */
@@ -349,7 +408,9 @@ FT_BEGIN_HEADER
   /*                  use default values for the remaining axes.           */
   /*                                                                       */
   /*    coords     :: The design coordinates array (each element must be   */
-  /*                  between 0 and 1.0).                                  */
+  /*                  between 0 and 1.0 for Adobe MM fonts, and between    */
+  /*                  -1.0 and 1.0 for TrueType GX and OpenType variation  */
+  /*                  fonts).                                              */
   /*                                                                       */
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
@@ -363,6 +424,37 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
+  /*    FT_Get_MM_Blend_Coordinates                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the normalized blend coordinates of the currently selected     */
+  /*    interpolated font.                                                 */
+  /*                                                                       */
+  /*    This function works with all supported variation formats.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /*    num_coords :: The number of normalized blend coordinates to        */
+  /*                  retrieve.  If it is larger than the number of axes,  */
+  /*                  set the excess values to~0.5 for Adobe MM fonts, and */
+  /*                  to~0 for TrueType GX and OpenType variation fonts.   */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    coords     :: The normalized blend coordinates array.              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_MM_Blend_Coordinates( FT_Face    face,
+                               FT_UInt    num_coords,
+                               FT_Fixed*  coords );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
   /*    FT_Set_Var_Blend_Coordinates                                       */
   /*                                                                       */
   /* <Description>                                                         */
@@ -373,6 +465,20 @@ FT_BEGIN_HEADER
                                 FT_UInt    num_coords,
                                 FT_Fixed*  coords );
 
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Var_Blend_Coordinates                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This is another name of @FT_Get_MM_Blend_Coordinates.              */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Var_Blend_Coordinates( FT_Face    face,
+                                FT_UInt    num_coords,
+                                FT_Fixed*  coords );
+
   /* */
 
 
index b4d2758..4147aad 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType modules public interface (specification).                   */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -89,6 +89,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    FT_Property_Set                                                    */
   /*    FT_Property_Get                                                    */
+  /*    FT_Set_Default_Properties                                          */
   /*                                                                       */
   /*    FT_New_Library                                                     */
   /*    FT_Done_Library                                                    */
@@ -440,6 +441,47 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
+  /*    FT_Set_Default_Properties                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is   */
+  /*    set, this function reads the `FREETYPE_PROPERTIES' environment     */
+  /*    variable to control driver properties.  See sections @auto_hinter, */
+  /*    @cff_driver, @pcf_driver, and @tt_driver for more.                 */
+  /*                                                                       */
+  /*    If the compilation option is not set, this function does nothing.  */
+  /*                                                                       */
+  /*    `FREETYPE_PROPERTIES' has the following syntax form (broken here   */
+  /*    into multiple lines for better readability).                       */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      <optional whitespace>                                            */
+  /*      <module-name1> ':'                                               */
+  /*      <property-name1> '=' <property-value1>                           */
+  /*      <whitespace>                                                     */
+  /*      <module-name2> ':'                                               */
+  /*      <property-name2> '=' <property-value2>                           */
+  /*      ...                                                              */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    Example:                                                           */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      FREETYPE_PROPERTIES=truetype:interpreter-version=35 \            */
+  /*                          cff:no-stem-darkening=1 \                    */
+  /*                          autofitter:warping=1                         */
+  /*    }                                                                  */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    library :: A handle to a new library object.                       */
+  /*                                                                       */
+  FT_EXPORT( void )
+  FT_Set_Default_Properties( FT_Library  library );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
   /*    FT_Reference_Library                                               */
   /*                                                                       */
   /* <Description>                                                         */
@@ -477,8 +519,9 @@ FT_BEGIN_HEADER
   /*    valid for the life of the @FT_Library object.                      */
   /*                                                                       */
   /*    Normally, you would call this function (followed by a call to      */
-  /*    @FT_Add_Default_Modules or a series of calls to @FT_Add_Module)    */
-  /*    instead of @FT_Init_FreeType to initialize the FreeType library.   */
+  /*    @FT_Add_Default_Modules or a series of calls to @FT_Add_Module,    */
+  /*    and a call to @FT_Set_Default_Properties) instead of               */
+  /*    @FT_Init_FreeType to initialize the FreeType library.              */
   /*                                                                       */
   /*    Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a      */
   /*    library instance.                                                  */
index 2a7671c..7f60837 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType module error offsets (specification).                       */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 3e6e18d..b5d27cf 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for validating OpenType tables (specification).         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 6a64512..07f73eb 100644 (file)
@@ -5,7 +5,7 @@
 /*    Support for the FT_Outline type used to store glyph shapes of        */
 /*    most scalable font formats (specification).                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -115,6 +115,10 @@ FT_BEGIN_HEADER
   /*    outline for stroking purposes (otherwise it would result in a      */
   /*    visible dot when round caps are used).                             */
   /*                                                                       */
+  /*    Similarly, the function returns success for an empty outline also  */
+  /*    (doing nothing, this is, not calling any emitter); if necessary,   */
+  /*    you should filter this out, too.                                   */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Decompose( FT_Outline*              outline,
                         const FT_Outline_Funcs*  func_interface,
@@ -213,6 +217,10 @@ FT_BEGIN_HEADER
   /* <Return>                                                              */
   /*    FreeType error code.  0~means success.                             */
   /*                                                                       */
+  /* <Note>                                                                */
+  /*    An empty outline, or an outline with a single point only is also   */
+  /*    valid.                                                             */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Outline_Check( FT_Outline*  outline );
 
diff --git a/include/freetype/ftpcfdrv.h b/include/freetype/ftpcfdrv.h
new file mode 100644 (file)
index 0000000..6622c93
--- /dev/null
@@ -0,0 +1,105 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftpcfdrv.h                                                             */
+/*                                                                         */
+/*    FreeType API for controlling the PCF driver (specification only).    */
+/*                                                                         */
+/*  Copyright 2017 by                                                      */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef FTPCFDRV_H_
+#define FTPCFDRV_H_
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   pcf_driver
+   *
+   * @title:
+   *   The PCF driver
+   *
+   * @abstract:
+   *   Controlling the PCF driver module.
+   *
+   * @description:
+   *   While FreeType's PCF driver doesn't expose API functions by itself,
+   *   it is possible to control its behaviour with @FT_Property_Set and
+   *   @FT_Property_Get.  Right now, there is a single property
+   *   `no-long-family-names' available if FreeType is compiled with
+   *   PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
+   *
+   *   The PCF driver's module name is `pcf'.
+   *
+   */
+
+
+  /**************************************************************************
+   *
+   * @property:
+   *   no-long-family-names
+   *
+   * @description:
+   *   If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling
+   *   FreeType, the PCF driver constructs long family names.
+   *
+   *   There are many PCF fonts just called `Fixed' which look completely
+   *   different, and which have nothing to do with each other.  When
+   *   selecting `Fixed' in KDE or Gnome one gets results that appear rather
+   *   random, the style changes often if one changes the size and one
+   *   cannot select some fonts at all.  The improve this situation, the PCF
+   *   module prepends the foundry name (plus a space) to the family name. 
+   *   It also checks whether there are `wide' characters; all put together,
+   *   family names like `Sony Fixed' or `Misc Fixed Wide' are constructed.
+   *
+   *   If `no-long-family-names' is set, this feature gets switched off.
+   *
+   *   {
+   *     FT_Library  library;
+   *     FT_Bool     no_long_family_names = TRUE;
+   *
+   *
+   *     FT_Init_FreeType( &library );
+   *
+   *     FT_Property_Set( library, "pcf",
+   *                               "no-long-family-names",
+   *                               &no_long_family_names );
+   *   }
+   *
+   * @note:
+   *   This property can be used with @FT_Property_Get also.
+   *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values 1 and 0 for `on' and `off', respectively).
+   *
+   */
+
+
+FT_END_HEADER
+
+
+#endif /* FTPCFDRV_H_ */
+
+
+/* END */
index 2e1bff2..f2a6ae9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for accessing PFR-specific data (specification only).   */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 9f7ed9e..9608375 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType renderer modules public interface (specification).          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -75,6 +75,7 @@ FT_BEGIN_HEADER
   {
     FT_Long                 glyph_size;
     FT_Glyph_Format         glyph_format;
+
     FT_Glyph_InitFunc       glyph_init;
     FT_Glyph_DoneFunc       glyph_done;
     FT_Glyph_CopyFunc       glyph_copy;
index 55e0d5c..2f3958a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType size objects management (specification).                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index a7b51c2..a316540 100644 (file)
@@ -2,12 +2,12 @@
 /*                                                                         */
 /*  ftsnames.h                                                             */
 /*                                                                         */
-/*    Simple interface to access SFNT name tables (which are used          */
+/*    Simple interface to access SFNT `name' tables (which are used        */
 /*    to hold font names, copyright info, notices, etc.) (specification).  */
 /*                                                                         */
 /*    This is _not_ used to retrieve glyph names!                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -49,7 +49,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Description>                                                         */
   /*    The TrueType and OpenType specifications allow the inclusion of    */
-  /*    a special `names table' in font files.  This table contains        */
+  /*    a special names table (`name') in font files.  This table contains */
   /*    textual (and internationalized) information regarding the font,    */
   /*    like family name, copyright, version, etc.                         */
   /*                                                                       */
@@ -70,30 +70,37 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Fields>                                                              */
   /*    platform_id :: The platform ID for `string'.                       */
+  /*                   See @TT_PLATFORM_XXX for possible values.           */
   /*                                                                       */
   /*    encoding_id :: The encoding ID for `string'.                       */
+  /*                   See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,               */
+  /*                   @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX */
+  /*                   for possible values.                                */
   /*                                                                       */
   /*    language_id :: The language ID for `string'.                       */
+  /*                   See @TT_MAC_LANGID_XXX and @TT_MS_LANGID_XXX for    */
+  /*                   possible values.                                    */
+  /*                                                                       */
+  /*                   Registered OpenType values for `language_id' are    */
+  /*                   always smaller than 0x8000; values equal or larger  */
+  /*                   than 0x8000 usually indicate a language tag string  */
+  /*                   (introduced in OpenType version 1.6).  Use function */
+  /*                   @FT_Get_Sfnt_LangTag with `language_id' as its      */
+  /*                   argument to retrieve the associated language tag.   */
   /*                                                                       */
   /*    name_id     :: An identifier for `string'.                         */
+  /*                   See @TT_NAME_ID_XXX for possible values.            */
   /*                                                                       */
   /*    string      :: The `name' string.  Note that its format differs    */
-  /*                   depending on the (platform,encoding) pair.  It can  */
-  /*                   be a Pascal String, a UTF-16 one, etc.              */
-  /*                                                                       */
-  /*                   Generally speaking, the string is not               */
-  /*                   zero-terminated.  Please refer to the TrueType      */
-  /*                   specification for details.                          */
+  /*                   depending on the (platform,encoding) pair, being    */
+  /*                   either a string of bytes (without a terminating     */
+  /*                   NULL byte) or containing UTF-16BE entities.         */
   /*                                                                       */
   /*    string_len  :: The length of `string' in bytes.                    */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    Possible values for `platform_id', `encoding_id', `language_id',   */
-  /*    and `name_id' are given in the file `ttnameid.h'.  For details     */
-  /*    please refer to the TrueType or OpenType specification.            */
-  /*                                                                       */
-  /*    See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,       */
-  /*    @TT_ISO_ID_XXX, and @TT_MS_ID_XXX.                                 */
+  /*    Please refer to the TrueType or OpenType specification for more    */
+  /*    details.                                                           */
   /*                                                                       */
   typedef struct  FT_SfntName_
   {
@@ -103,7 +110,7 @@ FT_BEGIN_HEADER
     FT_UShort  name_id;
 
     FT_Byte*   string;      /* this string is *not* null-terminated! */
-    FT_UInt    string_len;  /* in bytes */
+    FT_UInt    string_len;  /* in bytes                              */
 
   } FT_SfntName;
 
@@ -147,47 +154,127 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Note>                                                                */
   /*    The `string' array returned in the `aname' structure is not        */
-  /*    null-terminated.  The application should deallocate it if it is no */
-  /*    longer in use.                                                     */
+  /*    null-terminated.  Note that you don't have to deallocate `string'  */
+  /*    by yourself; FreeType takes care of it if you call @FT_Done_Face.  */
   /*                                                                       */
   /*    Use @FT_Get_Sfnt_Name_Count to get the total number of available   */
   /*    `name' table entries, then do a loop until you get the right       */
   /*    platform, encoding, and name ID.                                   */
   /*                                                                       */
+  /*    `name' table format~1 entries can use language tags also, see      */
+  /*    @FT_Get_Sfnt_LangTag.                                              */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Get_Sfnt_Name( FT_Face       face,
                     FT_UInt       idx,
                     FT_SfntName  *aname );
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_SfntLangTag                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure to model a language tag entry from an SFNT `name'      */
+  /*    table.                                                             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    string      :: The language tag string, encoded in UTF-16BE        */
+  /*                   (without trailing NULL bytes).                      */
+  /*                                                                       */
+  /*    string_len  :: The length of `string' in *bytes*.                  */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Please refer to the TrueType or OpenType specification for more    */
+  /*    details.                                                           */
+  /*                                                                       */
+  typedef struct  FT_SfntLangTag_
+  {
+    FT_Byte*  string;      /* this string is *not* null-terminated! */
+    FT_UInt   string_len;  /* in bytes                              */
+
+  } FT_SfntLangTag;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Sfnt_LangTag                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieve the language tag associated with a language ID of an SFNT */
+  /*    `name' table entry.                                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face     :: A handle to the source face.                           */
+  /*                                                                       */
+  /*    langID   :: The language ID, as returned by @FT_Get_Sfnt_Name.     */
+  /*                This is always a value larger than 0x8000.             */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    alangTag :: The language tag associated with the `name' table      */
+  /*                entry's language ID.                                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The `string' array returned in the `alangTag' structure is not     */
+  /*    null-terminated.  Note that you don't have to deallocate `string'  */
+  /*    by yourself; FreeType takes care of it if you call @FT_Done_Face.  */
+  /*                                                                       */
+  /*    Only `name' table format~1 supports language tags.  For format~0   */
+  /*    tables, this function always returns FT_Err_Invalid_Table.  For    */
+  /*    invalid format~1 language ID values, FT_Err_Invalid_Argument is    */
+  /*    returned.                                                          */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Get_Sfnt_LangTag( FT_Face          face,
+                       FT_UInt          langID,
+                       FT_SfntLangTag  *alangTag );
+
+
   /***************************************************************************
    *
    * @constant:
-   *   FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
+   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
    *
    * @description:
-   *   A constant used as the tag of @FT_Parameter structures to make
-   *   FT_Open_Face() ignore preferred family subfamily names in `name'
-   *   table since OpenType version 1.4.  For backwards compatibility with
-   *   legacy systems that have a 4-face-per-family restriction.
+   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
+   *   family names in the `name' table (introduced in OpenType version
+   *   1.4).  Use this for backward compatibility with legacy systems that
+   *   have a four-faces-per-family restriction.
    *
    */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY  FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
+#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
+          FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
+
+
+  /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
+          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
 
 
   /***************************************************************************
    *
    * @constant:
-   *   FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
+   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
    *
    * @description:
-   *   A constant used as the tag of @FT_Parameter structures to make
-   *   FT_Open_Face() ignore preferred subfamily names in `name' table since
-   *   OpenType version 1.4.  For backwards compatibility with legacy
-   *   systems that have a 4-face-per-family restriction.
+   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
+   *   subfamily names in the `name' table (introduced in OpenType version
+   *   1.4).  Use this for backward compatibility with legacy systems that
+   *   have a four-faces-per-family restriction.
    *
    */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY  FT_MAKE_TAG( 'i', 'g', 'p', 's' )
+#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
+          FT_MAKE_TAG( 'i', 'g', 'p', 's' )
+
+
+  /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
+          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
 
   /* */
 
index b3b9922..4a20667 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType path stroker (specification).                               */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -136,7 +136,7 @@ FT_BEGIN_HEADER
    *     FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
    *     join as used in XPS.  FT_STROKER_LINEJOIN_MITER is an alias
    *     for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
-   *     backwards compatibility.
+   *     backward compatibility.
    */
   typedef enum  FT_Stroker_LineJoin_
   {
index fdfcb69..1863fa2 100644 (file)
@@ -5,7 +5,7 @@
 /*    FreeType synthesizing code for emboldening and slanting              */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index a75f958..1aa4762 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType low-level system interface definition (specification).      */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f789b52..89f0350 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType trigonometric functions (specification).                    */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 0d868bc..26bc5e9 100644 (file)
@@ -5,7 +5,7 @@
 /*    FreeType API for controlling the TrueType driver                     */
 /*    (specification only).                                                */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -110,7 +110,7 @@ FT_BEGIN_HEADER
    *   TrueType interpreter fully allows the advance width to be adjusted in
    *   this mode, just the DWrite client will ignore those changes.
    *
-   *   _ClearType_ _Backwards_ _Compatibility_
+   *   _ClearType_ _Backward_ _Compatibility_
    *
    *   This is a set of exceptions made in the TrueType interpreter to
    *   minimize hinting techniques that were problematic with the extra
@@ -118,9 +118,9 @@ FT_BEGIN_HEADER
    *   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
+   *   widths.  ClearType backward 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
+   *   disabling some deltas.  This could be worked around in backward
    *   compatibility mode.
    *
    *   _Native_ _ClearType_ _Mode_
@@ -138,7 +138,6 @@ FT_BEGIN_HEADER
    *   interpreter-version
    *
    * @description:
-
    *   Currently, three versions are available, two representing the
    *   bytecode interpreter with subpixel hinting support (old `Infinality'
    *   code and new stripped-down and higher performance `minimal' code) and
@@ -181,6 +180,8 @@ FT_BEGIN_HEADER
    * @note:
    *   This property can be used with @FT_Property_Get also.
    *
+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
+   *   variable (using values `35', `38', or `40').
    */
 
 
@@ -224,7 +225,7 @@ FT_BEGIN_HEADER
    *   filtering.
    *
    *   If FreeType has not been compiled with the configuration option
-   *   FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes
+   *   TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes
    *   an `FT_Err_Unimplemented_Feature' error.
    *
    *   Depending on the graphics framework, Microsoft uses different
index 2673e79..eab8ada 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType simple types definitions (specification only).              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index a1a715b..1eeef6c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for accessing Windows fnt-specific data.                */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 7ef82b8..bae83e7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level `autohint' module-specific interface (specification).     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 8a884f6..c9ac9d8 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Arithmetic computations (specification).                             */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d110457..5dcd2b1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Debugging and logging component (specification).                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 3e1e66e..e82fa8d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType font driver interface (specification).                      */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -67,15 +67,6 @@ FT_BEGIN_HEADER
                        FT_Int32      load_flags );
 
 
-  typedef FT_UInt
-  (*FT_CharMap_CharIndexFunc)( FT_CharMap  charmap,
-                               FT_Long     charcode );
-
-  typedef FT_Long
-  (*FT_CharMap_CharNextFunc)( FT_CharMap  charmap,
-                              FT_Long     charcode );
-
-
   typedef FT_Error
   (*FT_Face_GetKerningFunc)( FT_Face     face,
                              FT_UInt     left_glyph,
index bebf5db..f41c3df 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph loader (specification).                           */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 8c06fc2..59e5b58 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType memory management macros (specification).               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -108,10 +108,12 @@ extern "C++"
 
   /*
    *  The allocation functions return a pointer, and the error code
-   *  is written to through the `p_error' parameter.  See below for
-   *  for documentation.
+   *  is written to through the `p_error' parameter.
    */
 
+  /* The `q' variants of the functions below (`q' for `quick') don't fill */
+  /* the allocated or reallocated memory with zero bytes.                 */
+
   FT_BASE( FT_Pointer )
   ft_mem_alloc( FT_Memory  memory,
                 FT_Long    size,
@@ -143,6 +145,9 @@ extern "C++"
                const void*  P );
 
 
+  /* The `Q' variants of the macros below (`Q' for `quick') don't fill */
+  /* the allocated or reallocated memory with zero bytes.              */
+
 #define FT_MEM_ALLOC( ptr, size )                               \
           FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory,          \
                                                (FT_Long)(size), \
index e3fa320..5584091 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType private base classes (specification).                   */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -193,6 +193,7 @@ FT_BEGIN_HEADER
   typedef struct  FT_CMap_ClassRec_
   {
     FT_ULong               size;
+
     FT_CMap_InitFunc       init;
     FT_CMap_DoneFunc       done;
     FT_CMap_CharIndexFunc  char_index;
@@ -341,6 +342,20 @@ FT_BEGIN_HEADER
   /*      this data when first opened.  This field exists only if          */
   /*      @FT_CONFIG_OPTION_INCREMENTAL is defined.                        */
   /*                                                                       */
+  /*    no_stem_darkening ::                                               */
+  /*      Overrides the module-level default, see @stem-darkening[cff],    */
+  /*      for example.  FALSE and TRUE toggle stem darkening on and off,   */
+  /*      respectively, value~-1 means to use the module/driver default.   */
+  /*                                                                       */
+  /*    random_seed ::                                                     */
+  /*      If positive, override the seed value for the CFF `random'        */
+  /*      operator.  Value~0 means to use the font's value.  Value~-1      */
+  /*      means to use the CFF driver's default.                           */
+  /*                                                                       */
+  /*    lcd_weights ::                                                     */
+  /*      Overrides the library default with custom weights for the 5-tap  */
+  /*      FIR filter.  `{0, 0, 0, 0, 0}' means to use the library default. */
+  /*                                                                       */
   /*    refcount ::                                                        */
   /*      A counter initialized to~1 at the time an @FT_Face structure is  */
   /*      created.  @FT_Reference_Face increments this counter, and        */
@@ -349,9 +364,9 @@ FT_BEGIN_HEADER
   /*                                                                       */
   typedef struct  FT_Face_InternalRec_
   {
-    FT_Matrix           transform_matrix;
-    FT_Vector           transform_delta;
-    FT_Int              transform_flags;
+    FT_Matrix  transform_matrix;
+    FT_Vector  transform_delta;
+    FT_Int     transform_flags;
 
     FT_ServiceCacheRec  services;
 
@@ -359,7 +374,13 @@ FT_BEGIN_HEADER
     FT_Incremental_InterfaceRec*  incremental_interface;
 #endif
 
-    FT_Int              refcount;
+    FT_Char              no_stem_darkening;
+    FT_Int32             random_seed;
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+    FT_LcdFiveTapFilter  lcd_weights;  /* preset or custom filter weights */
+#endif
+
+    FT_Int  refcount;
 
   } FT_Face_InternalRec;
 
@@ -412,8 +433,6 @@ FT_BEGIN_HEADER
   } FT_GlyphSlot_InternalRec;
 
 
-#if 0
-
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
@@ -421,17 +440,25 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Description>                                                         */
   /*    This structure contains the internal fields of each FT_Size        */
-  /*    object.  Currently, it's empty.                                    */
+  /*    object.                                                            */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    module_data      :: Data specific to a driver module.              */
+  /*                                                                       */
+  /*    autohint_mode    :: The used auto-hinting mode.                    */
+  /*                                                                       */
+  /*    autohint_metrics :: Metrics used by the auto-hinter.               */
   /*                                                                       */
   /*************************************************************************/
 
   typedef struct  FT_Size_InternalRec_
   {
-    /* empty */
+    void*  module_data;
 
-  } FT_Size_InternalRec;
+    FT_Render_Mode   autohint_mode;
+    FT_Size_Metrics  autohint_metrics;
 
-#endif
+  } FT_Size_InternalRec;
 
 
   /*************************************************************************/
@@ -530,7 +557,16 @@ FT_BEGIN_HEADER
 
   FT_BASE( FT_Pointer )
   ft_module_get_service( FT_Module    module,
-                         const char*  service_id );
+                         const char*  service_id,
+                         FT_Bool      global );
+
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+  FT_BASE( FT_Error )
+  ft_property_string_set( FT_Library        library,
+                          const FT_String*  module_name,
+                          const FT_String*  property_name,
+                          FT_String*        value );
+#endif
 
   /* */
 
@@ -765,12 +801,19 @@ FT_BEGIN_HEADER
 
   /* This hook is used by the TrueType debugger.  It must be set to an */
   /* alternate truetype bytecode interpreter function.                 */
-#define FT_DEBUG_HOOK_TRUETYPE            0
+#define FT_DEBUG_HOOK_TRUETYPE  0
 
 
   typedef void  (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap*      bitmap,
                                             FT_Render_Mode  render_mode,
-                                            FT_Library      library );
+                                            FT_Byte*        weights );
+
+
+  /* This is the default LCD filter, an in-place, 5-tap FIR filter. */
+  FT_BASE( void )
+  ft_lcd_filter_fir( FT_Bitmap*           bitmap,
+                     FT_Render_Mode       mode,
+                     FT_LcdFiveTapFilter  weights );
 
 
   /*************************************************************************/
@@ -811,14 +854,17 @@ FT_BEGIN_HEADER
   /*                        handle to the current renderer for the         */
   /*                        FT_GLYPH_FORMAT_OUTLINE format.                */
   /*                                                                       */
-  /*    auto_hinter      :: XXX                                            */
+  /*    auto_hinter      :: The auto-hinter module interface.              */
   /*                                                                       */
   /*    raster_pool      :: The raster object's render pool.  This can     */
   /*                        ideally be changed dynamically at run-time.    */
   /*                                                                       */
   /*    raster_pool_size :: The size of the render pool in bytes.          */
   /*                                                                       */
-  /*    debug_hooks      :: XXX                                            */
+  /*    debug_hooks      :: An array of four function pointers that allow  */
+  /*                        debuggers to hook into a font format's         */
+  /*                        interpreter.  Currently, only the TrueType     */
+  /*                        bytecode debugger uses this.                   */
   /*                                                                       */
   /*    lcd_filter       :: If subpixel rendering is activated, the        */
   /*                        selected LCD filter mode.                      */
@@ -866,7 +912,7 @@ FT_BEGIN_HEADER
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
     FT_LcdFilter             lcd_filter;
     FT_Int                   lcd_extra;        /* number of extra pixels */
-    FT_Byte                  lcd_weights[7];   /* filter weights, if any */
+    FT_LcdFiveTapFilter      lcd_weights;      /* filter weights, if any */
     FT_Bitmap_LcdFilterFunc  lcd_filter_func;  /* filtering callback     */
 #endif
 
index 6d800a0..0d43ed2 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services (declaration).       */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index b923401..25a44a4 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Embedded resource forks accessor (specification).                    */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  Masatake YAMATO and Redhat K.K.                                        */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -43,11 +43,12 @@ FT_BEGIN_HEADER
 
   typedef struct  FT_RFork_Ref_
   {
-    FT_UShort  res_id;
-    FT_Long    offset;
+    FT_Short  res_id;
+    FT_Long   offset;
 
   } FT_RFork_Ref;
 
+
 #ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
   typedef FT_Error
   (*ft_raccess_guess_func)( FT_Library  library,
index 9189717..71ef9ca 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType services (specification only).                          */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -109,27 +109,27 @@ FT_BEGIN_HEADER
    */
 #ifdef __cplusplus
 
-#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \
-  FT_BEGIN_STMNT                                                   \
-    FT_Module    module = FT_MODULE( FT_FACE( face )->driver );    \
-    FT_Pointer   _tmp_;                                            \
-    FT_Pointer*  _pptr_ = (FT_Pointer*)&(ptr);                     \
-                                                                   \
-                                                                   \
-    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
-    *_pptr_ = _tmp_;                                               \
+#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )                  \
+  FT_BEGIN_STMNT                                                      \
+    FT_Module    module = FT_MODULE( FT_FACE( face )->driver );       \
+    FT_Pointer   _tmp_;                                               \
+    FT_Pointer*  _pptr_ = (FT_Pointer*)&(ptr);                        \
+                                                                      \
+                                                                      \
+    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id, 1 ); \
+    *_pptr_ = _tmp_;                                                  \
   FT_END_STMNT
 
 #else /* !C++ */
 
-#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \
-  FT_BEGIN_STMNT                                                   \
-    FT_Module   module = FT_MODULE( FT_FACE( face )->driver );     \
-    FT_Pointer  _tmp_;                                             \
-                                                                   \
-                                                                   \
-    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
-    ptr   = _tmp_;                                                 \
+#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )                  \
+  FT_BEGIN_STMNT                                                      \
+    FT_Module   module = FT_MODULE( FT_FACE( face )->driver );        \
+    FT_Pointer  _tmp_;                                                \
+                                                                      \
+                                                                      \
+    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id, 1 ); \
+    ptr   = _tmp_;                                                    \
   FT_END_STMNT
 
 #endif /* !C++ */
@@ -167,6 +167,7 @@ FT_BEGIN_HEADER
   /*    FT_DEFINE_SERVICEDESCREC5                                          */
   /*    FT_DEFINE_SERVICEDESCREC6                                          */
   /*    FT_DEFINE_SERVICEDESCREC7                                          */
+  /*    FT_DEFINE_SERVICEDESCREC8                                          */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Used to initialize an array of FT_ServiceDescRec structures.       */
@@ -283,6 +284,52 @@ FT_BEGIN_HEADER
     { NULL, NULL }                                                          \
   };
 
+#define FT_DEFINE_SERVICEDESCREC8( class_,                                  \
+                                   serv_id_1, serv_data_1,                  \
+                                   serv_id_2, serv_data_2,                  \
+                                   serv_id_3, serv_data_3,                  \
+                                   serv_id_4, serv_data_4,                  \
+                                   serv_id_5, serv_data_5,                  \
+                                   serv_id_6, serv_data_6,                  \
+                                   serv_id_7, serv_data_7,                  \
+                                   serv_id_8, serv_data_8 )                 \
+  static const FT_ServiceDescRec  class_[] =                                \
+  {                                                                         \
+    { serv_id_1, serv_data_1 },                                             \
+    { serv_id_2, serv_data_2 },                                             \
+    { serv_id_3, serv_data_3 },                                             \
+    { serv_id_4, serv_data_4 },                                             \
+    { serv_id_5, serv_data_5 },                                             \
+    { serv_id_6, serv_data_6 },                                             \
+    { serv_id_7, serv_data_7 },                                             \
+    { serv_id_8, serv_data_8 },                                             \
+    { NULL, NULL }                                                          \
+  };
+
+#define FT_DEFINE_SERVICEDESCREC9( class_,                                  \
+                                   serv_id_1, serv_data_1,                  \
+                                   serv_id_2, serv_data_2,                  \
+                                   serv_id_3, serv_data_3,                  \
+                                   serv_id_4, serv_data_4,                  \
+                                   serv_id_5, serv_data_5,                  \
+                                   serv_id_6, serv_data_6,                  \
+                                   serv_id_7, serv_data_7,                  \
+                                   serv_id_8, serv_data_8,                  \
+                                   serv_id_9, serv_data_9 )                 \
+  static const FT_ServiceDescRec  class_[] =                                \
+  {                                                                         \
+    { serv_id_1, serv_data_1 },                                             \
+    { serv_id_2, serv_data_2 },                                             \
+    { serv_id_3, serv_data_3 },                                             \
+    { serv_id_4, serv_data_4 },                                             \
+    { serv_id_5, serv_data_5 },                                             \
+    { serv_id_6, serv_data_6 },                                             \
+    { serv_id_7, serv_data_7 },                                             \
+    { serv_id_8, serv_data_8 },                                             \
+    { serv_id_9, serv_data_9 },                                             \
+    { NULL, NULL }                                                          \
+  };
+
 #else /* FT_CONFIG_OPTION_PIC */
 
 #define FT_DEFINE_SERVICEDESCREC1( class_,                                  \
@@ -593,6 +640,121 @@ FT_BEGIN_HEADER
     return FT_Err_Ok;                                                       \
   }
 
+#define FT_DEFINE_SERVICEDESCREC8( class_,                                  \
+                                   serv_id_1, serv_data_1,                  \
+                                   serv_id_2, serv_data_2,                  \
+                                   serv_id_3, serv_data_3,                  \
+                                   serv_id_4, serv_data_4,                  \
+                                   serv_id_5, serv_data_5,                  \
+                                   serv_id_6, serv_data_6,                  \
+                                   serv_id_7, serv_data_7,                  \
+                                   serv_id_8, serv_data_8 )                 \
+  void                                                                      \
+  FT_Destroy_Class_ ## class_( FT_Library          library,                 \
+                               FT_ServiceDescRec*  clazz )                  \
+  {                                                                         \
+    FT_Memory  memory = library->memory;                                    \
+                                                                            \
+                                                                            \
+    if ( clazz )                                                            \
+      FT_FREE( clazz );                                                     \
+  }                                                                         \
+                                                                            \
+  FT_Error                                                                  \
+  FT_Create_Class_ ## class_( FT_Library           library,                 \
+                              FT_ServiceDescRec**  output_class)            \
+  {                                                                         \
+    FT_ServiceDescRec*  clazz  = NULL;                                      \
+    FT_Error            error;                                              \
+    FT_Memory           memory = library->memory;                           \
+                                                                            \
+                                                                            \
+    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 9 ) )                         \
+      return error;                                                         \
+                                                                            \
+    clazz[0].serv_id   = serv_id_1;                                         \
+    clazz[0].serv_data = serv_data_1;                                       \
+    clazz[1].serv_id   = serv_id_2;                                         \
+    clazz[1].serv_data = serv_data_2;                                       \
+    clazz[2].serv_id   = serv_id_3;                                         \
+    clazz[2].serv_data = serv_data_3;                                       \
+    clazz[3].serv_id   = serv_id_4;                                         \
+    clazz[3].serv_data = serv_data_4;                                       \
+    clazz[4].serv_id   = serv_id_5;                                         \
+    clazz[4].serv_data = serv_data_5;                                       \
+    clazz[5].serv_id   = serv_id_6;                                         \
+    clazz[5].serv_data = serv_data_6;                                       \
+    clazz[6].serv_id   = serv_id_7;                                         \
+    clazz[6].serv_data = serv_data_7;                                       \
+    clazz[7].serv_id   = serv_id_8;                                         \
+    clazz[7].serv_data = serv_data_8;                                       \
+    clazz[8].serv_id   = NULL;                                              \
+    clazz[8].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
+#define FT_DEFINE_SERVICEDESCREC9( class_,                                  \
+                                   serv_id_1, serv_data_1,                  \
+                                   serv_id_2, serv_data_2,                  \
+                                   serv_id_3, serv_data_3,                  \
+                                   serv_id_4, serv_data_4,                  \
+                                   serv_id_5, serv_data_5,                  \
+                                   serv_id_6, serv_data_6,                  \
+                                   serv_id_7, serv_data_7,                  \
+                                   serv_id_8, serv_data_8,                  \
+                                   serv_id_9, serv_data_9 )                 \
+  void                                                                      \
+  FT_Destroy_Class_ ## class_( FT_Library          library,                 \
+                               FT_ServiceDescRec*  clazz )                  \
+  {                                                                         \
+    FT_Memory  memory = library->memory;                                    \
+                                                                            \
+                                                                            \
+    if ( clazz )                                                            \
+      FT_FREE( clazz );                                                     \
+  }                                                                         \
+                                                                            \
+  FT_Error                                                                  \
+  FT_Create_Class_ ## class_( FT_Library           library,                 \
+                              FT_ServiceDescRec**  output_class)            \
+  {                                                                         \
+    FT_ServiceDescRec*  clazz  = NULL;                                      \
+    FT_Error            error;                                              \
+    FT_Memory           memory = library->memory;                           \
+                                                                            \
+                                                                            \
+    if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 10 ) )                        \
+      return error;                                                         \
+                                                                            \
+    clazz[0].serv_id   = serv_id_1;                                         \
+    clazz[0].serv_data = serv_data_1;                                       \
+    clazz[1].serv_id   = serv_id_2;                                         \
+    clazz[1].serv_data = serv_data_2;                                       \
+    clazz[2].serv_id   = serv_id_3;                                         \
+    clazz[2].serv_data = serv_data_3;                                       \
+    clazz[3].serv_id   = serv_id_4;                                         \
+    clazz[3].serv_data = serv_data_4;                                       \
+    clazz[4].serv_id   = serv_id_5;                                         \
+    clazz[4].serv_data = serv_data_5;                                       \
+    clazz[5].serv_id   = serv_id_6;                                         \
+    clazz[5].serv_data = serv_data_6;                                       \
+    clazz[6].serv_id   = serv_id_7;                                         \
+    clazz[6].serv_data = serv_data_7;                                       \
+    clazz[7].serv_id   = serv_id_8;                                         \
+    clazz[7].serv_data = serv_data_8;                                       \
+    clazz[8].serv_id   = serv_id_9;                                         \
+    clazz[8].serv_data = serv_data_9;                                       \
+    clazz[9].serv_id   = NULL;                                              \
+    clazz[9].serv_data = NULL;                                              \
+                                                                            \
+    *output_class = clazz;                                                  \
+                                                                            \
+    return FT_Err_Ok;                                                       \
+  }
+
 #endif /* FT_CONFIG_OPTION_PIC */
 
 
@@ -635,6 +797,7 @@ FT_BEGIN_HEADER
   {
     FT_Pointer  service_POSTSCRIPT_FONT_NAME;
     FT_Pointer  service_MULTI_MASTERS;
+    FT_Pointer  service_METRICS_VARIATIONS;
     FT_Pointer  service_GLYPH_DICT;
     FT_Pointer  service_PFR_METRICS;
     FT_Pointer  service_WINFNT;
@@ -655,7 +818,7 @@ FT_BEGIN_HEADER
    *   FT_FACE_LOOKUP_SERVICE
    *
    * @description:
-   *   This macro is used to lookup a service from a face's driver module
+   *   This macro is used to look up a service from a face's driver module
    *   using its cache.
    *
    * @input:
@@ -739,6 +902,7 @@ FT_BEGIN_HEADER
 #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_METRICS_VARIATIONS_H <freetype/internal/services/svmetric.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>
index 6d04875..3e2c07b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Stream handling (specification).                                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -502,7 +502,7 @@ FT_BEGIN_HEADER
 #define FT_STREAM_READ_AT( position, buffer, count )            \
           FT_SET_ERROR( FT_Stream_ReadAt( stream,               \
                                           (FT_ULong)(position), \
-                                          (FT_Byte*)buffer,     \
+                                          (FT_Byte*)(buffer),   \
                                           (FT_ULong)(count) ) )
 
 #define FT_STREAM_READ_FIELDS( fields, object )                          \
index efb3355..caf5fc9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Tracing handling (specification only).                               */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index aac92c9..df6f7c5 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType validation support (specification).                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 8c3c14c..0204681 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Internal header files (specification only).                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 15dedfd..935eb1a 100644 (file)
@@ -5,7 +5,7 @@
 /*    Auxiliary functions and data structures related to PostScript fonts  */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -817,7 +817,7 @@ FT_BEGIN_HEADER
 
   } PSAux_ServiceRec, *PSAux_Service;
 
-  /* backwards-compatible type definition */
+  /* backward compatible type definition */
   typedef PSAux_ServiceRec   PSAux_Interface;
 
 
index e60dc9c..49116eb 100644 (file)
@@ -6,7 +6,7 @@
 /*    recorders (specification only).  These are used to support native    */
 /*    T1/T2 hints in the `type1', `cid', and `cff' font drivers.           */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c24475f..eeebf67 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType BDF services (specification).                           */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index dbbe604..cce94d8 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType CID font services (specification).                      */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  Derek Clegg and Michael Toftdal.                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index bd295c9..376d925 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType font format service (specification only).               */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index fff29bc..0cd1361 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph dictionary services (specification).              */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index fb8ffba..71bfa97 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  Masatake YAMATO, Red Hat K.K.,                                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index a636f1a..b8344e9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType Kerning service (specification).                        */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/include/freetype/internal/services/svmetric.h b/include/freetype/internal/services/svmetric.h
new file mode 100644 (file)
index 0000000..1f7d5dd
--- /dev/null
@@ -0,0 +1,153 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svmetric.h                                                             */
+/*                                                                         */
+/*    The FreeType services for metrics variations (specification).        */
+/*                                                                         */
+/*  Copyright 2016-2017 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef SVMETRIC_H_
+#define SVMETRIC_H_
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*
+   *  A service to manage the `HVAR, `MVAR', and `VVAR' OpenType tables.
+   *
+   */
+
+#define FT_SERVICE_ID_METRICS_VARIATIONS  "metrics-variations"
+
+
+  /* HVAR */
+
+  typedef FT_Error
+  (*FT_HAdvance_Adjust_Func)( FT_Face  face,
+                              FT_UInt  gindex,
+                              FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_LSB_Adjust_Func)( FT_Face  face,
+                         FT_UInt  gindex,
+                         FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_RSB_Adjust_Func)( FT_Face  face,
+                         FT_UInt  gindex,
+                         FT_Int  *avalue );
+
+  /* VVAR */
+
+  typedef FT_Error
+  (*FT_VAdvance_Adjust_Func)( FT_Face  face,
+                              FT_UInt  gindex,
+                              FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_TSB_Adjust_Func)( FT_Face  face,
+                         FT_UInt  gindex,
+                         FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_BSB_Adjust_Func)( FT_Face  face,
+                         FT_UInt  gindex,
+                         FT_Int  *avalue );
+
+  typedef FT_Error
+  (*FT_VOrg_Adjust_Func)( FT_Face  face,
+                          FT_UInt  gindex,
+                          FT_Int  *avalue );
+
+  /* MVAR */
+
+  typedef void
+  (*FT_Metrics_Adjust_Func)( FT_Face  face );
+
+
+  FT_DEFINE_SERVICE( MetricsVariations )
+  {
+    FT_HAdvance_Adjust_Func  hadvance_adjust;
+    FT_LSB_Adjust_Func       lsb_adjust;
+    FT_RSB_Adjust_Func       rsb_adjust;
+
+    FT_VAdvance_Adjust_Func  vadvance_adjust;
+    FT_TSB_Adjust_Func       tsb_adjust;
+    FT_BSB_Adjust_Func       bsb_adjust;
+    FT_VOrg_Adjust_Func      vorg_adjust;
+
+    FT_Metrics_Adjust_Func   metrics_adjust;
+  };
+
+
+#ifndef FT_CONFIG_OPTION_PIC
+
+#define FT_DEFINE_SERVICE_METRICSVARIATIONSREC( class_,            \
+                                                hadvance_adjust_,  \
+                                                lsb_adjust_,       \
+                                                rsb_adjust_,       \
+                                                vadvance_adjust_,  \
+                                                tsb_adjust_,       \
+                                                bsb_adjust_,       \
+                                                vorg_adjust_,      \
+                                                metrics_adjust_  ) \
+  static const FT_Service_MetricsVariationsRec  class_ =           \
+  {                                                                \
+    hadvance_adjust_,                                              \
+    lsb_adjust_,                                                   \
+    rsb_adjust_,                                                   \
+    vadvance_adjust_,                                              \
+    tsb_adjust_,                                                   \
+    bsb_adjust_,                                                   \
+    vorg_adjust_,                                                  \
+    metrics_adjust_                                                \
+  };
+
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define FT_DEFINE_SERVICE_METRICSVARIATIONSREC( class_,               \
+                                                hadvance_adjust_,     \
+                                                lsb_adjust_,          \
+                                                rsb_adjust_,          \
+                                                vadvance_adjust_,     \
+                                                tsb_adjust_,          \
+                                                bsb_adjust_,          \
+                                                vorg_adjust_,         \
+                                                metrics_adjust_  )    \
+  void                                                                \
+  FT_Init_Class_ ## class_( FT_Service_MetricsVariationsRec*  clazz ) \
+  {                                                                   \
+    clazz->hadvance_adjust = hadvance_adjust_;                        \
+    clazz->lsb_adjust      = lsb_adjust_;                             \
+    clazz->rsb_adjust      = rsb_adjust_;                             \
+    clazz->vadvance_adjust = vadvance_adjust_;                        \
+    clazz->tsb_adjust      = tsb_adjust_;                             \
+    clazz->bsb_adjust      = bsb_adjust_;                             \
+    clazz->vorg_adjust     = vorg_adjust_;                            \
+    clazz->metrics_adjust  = metrics_adjust_;                         \
+  }
+
+#endif /* FT_CONFIG_OPTION_PIC */
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* SVMETRIC_H_ */
+
+
+/* END */
index b78a19f..1d51cd9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType Multiple Masters and GX var services (specification).   */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -58,46 +58,92 @@ FT_BEGIN_HEADER
                            FT_UInt   num_coords,
                            FT_Long*  coords );
 
+  typedef FT_Error
+  (*FT_Get_Var_Design_Func)( FT_Face    face,
+                             FT_UInt    num_coords,
+                             FT_Fixed*  coords );
+
+  typedef FT_Error
+  (*FT_Get_MM_Blend_Func)( FT_Face   face,
+                           FT_UInt   num_coords,
+                           FT_Long*  coords );
+
+  typedef FT_Error
+  (*FT_Get_Var_Blend_Func)( FT_Face      face,
+                            FT_UInt     *num_coords,
+                            FT_Fixed*   *coords,
+                            FT_Fixed*   *normalizedcoords,
+                            FT_MM_Var*  *mm_var );
+
+  typedef void
+  (*FT_Done_Blend_Func)( FT_Face );
+
 
   FT_DEFINE_SERVICE( MultiMasters )
   {
     FT_Get_MM_Func          get_mm;
     FT_Set_MM_Design_Func   set_mm_design;
     FT_Set_MM_Blend_Func    set_mm_blend;
+    FT_Get_MM_Blend_Func    get_mm_blend;
     FT_Get_MM_Var_Func      get_mm_var;
     FT_Set_Var_Design_Func  set_var_design;
+    FT_Get_Var_Design_Func  get_var_design;
+
+    /* for internal use; only needed for code sharing between modules */
+    FT_Get_Var_Blend_Func   get_var_blend;
+    FT_Done_Blend_Func      done_blend;
   };
 
 
 #ifndef FT_CONFIG_OPTION_PIC
 
-#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,                          \
-                                           get_mm_,                         \
-                                           set_mm_design_,                  \
-                                           set_mm_blend_,                   \
-                                           get_mm_var_,                     \
-                                           set_var_design_ )                \
-  static const FT_Service_MultiMastersRec  class_ =                         \
-  {                                                                         \
-    get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_    \
+#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,           \
+                                           get_mm_,          \
+                                           set_mm_design_,   \
+                                           set_mm_blend_,    \
+                                           get_mm_blend_,    \
+                                           get_mm_var_,      \
+                                           set_var_design_,  \
+                                           get_var_design_,  \
+                                           get_var_blend_,   \
+                                           done_blend_     ) \
+  static const FT_Service_MultiMastersRec  class_ =          \
+  {                                                          \
+    get_mm_,                                                 \
+    set_mm_design_,                                          \
+    set_mm_blend_,                                           \
+    get_mm_blend_,                                           \
+    get_mm_var_,                                             \
+    set_var_design_,                                         \
+    get_var_design_,                                         \
+    get_var_blend_,                                          \
+    done_blend_                                              \
   };
 
 #else /* FT_CONFIG_OPTION_PIC */
 
-#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,                          \
-                                           get_mm_,                         \
-                                           set_mm_design_,                  \
-                                           set_mm_blend_,                   \
-                                           get_mm_var_,                     \
-                                           set_var_design_ )                \
-  void                                                                      \
-  FT_Init_Class_ ## class_( FT_Service_MultiMastersRec*  clazz )            \
-  {                                                                         \
-    clazz->get_mm         = get_mm_;                                        \
-    clazz->set_mm_design  = set_mm_design_;                                 \
-    clazz->set_mm_blend   = set_mm_blend_;                                  \
-    clazz->get_mm_var     = get_mm_var_;                                    \
-    clazz->set_var_design = set_var_design_;                                \
+#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_,               \
+                                           get_mm_,              \
+                                           set_mm_design_,       \
+                                           set_mm_blend_,        \
+                                           get_mm_blend_,        \
+                                           get_mm_var_,          \
+                                           set_var_design_,      \
+                                           get_var_design_,      \
+                                           get_var_blend_,       \
+                                           done_blend_ )         \
+  void                                                           \
+  FT_Init_Class_ ## class_( FT_Service_MultiMastersRec*  clazz ) \
+  {                                                              \
+    clazz->get_mm         = get_mm_;                             \
+    clazz->set_mm_design  = set_mm_design_;                      \
+    clazz->set_mm_blend   = set_mm_blend_;                       \
+    clazz->get_mm_blend   = get_mm_blend_;                       \
+    clazz->get_mm_var     = get_mm_var_;                         \
+    clazz->set_var_design = set_var_design_;                     \
+    clazz->get_var_design = get_var_design_;                     \
+    clazz->get_var_blend  = get_var_blend_;                      \
+    clazz->done_blend     = done_blend_;                         \
   }
 
 #endif /* FT_CONFIG_OPTION_PIC */
index bc929d4..ac84abe 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType OpenType validation service (specification).            */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d0f7c4d..c9a182f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Internal PFR service functions (specification).                      */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f124380..022cdec 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType PostScript name services (specification).               */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 870e90e..eb2d4ee 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType property service (specification).                       */
 /*                                                                         */
-/*  Copyright 2012-2016 by                                                 */
+/*  Copyright 2012-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -29,7 +29,8 @@ FT_BEGIN_HEADER
   typedef FT_Error
   (*FT_Properties_SetFunc)( FT_Module    module,
                             const char*  property_name,
-                            const void*  value );
+                            const void*  value,
+                            FT_Bool      value_is_string );
 
   typedef FT_Error
   (*FT_Properties_GetFunc)( FT_Module    module,
index 9acc216..b32122e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType PostScript charmap service (specification).             */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f2c8060..0220ce5 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType PostScript info service (specification).                */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 0f38cf1..49d18e4 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType SFNT table loading service (specification).             */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 772c721..30f7fee 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType TrueType/sfnt cmap extra information service.           */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  Masatake YAMATO, Redhat K.K.,                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index c55061a..e4b368a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType TrueType engine query service (specification).          */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c33edd4..b779305 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType TrueType glyph service.                                 */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  David Turner.                                                          */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c2f6d4c..c94b7e1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType Windows FNT/FONT service (specification).               */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e139315..b8667a0 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level `sfnt' driver interface (specification).                  */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -458,6 +458,37 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* <FuncType>                                                            */
+  /*    TT_Get_Name_ID_Func                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Search whether an ENGLISH version for a given name ID is in the    */
+  /*    `name' table.                                                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face     :: A handle to the source face object.                    */
+  /*                                                                       */
+  /*    nameid   :: The name id of the name record to return.              */
+  /*                                                                       */
+  /* <Out>                                                                 */
+  /*    win      :: If non-negative, an index into the `name' table with   */
+  /*                the corresponding (3,1) or (3,0) Windows entry.        */
+  /*                                                                       */
+  /*    apple    :: If non-negative, an index into the `name' table with   */
+  /*                the corresponding (1,0) Apple entry.                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    1 if there is either a win or apple entry (or both), 0 otheriwse.  */
+  /*                                                                       */
+  typedef FT_Bool
+  (*TT_Get_Name_ID_Func)( TT_Face    face,
+                          FT_UShort  nameid,
+                          FT_Int    *win,
+                          FT_Int    *apple );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
   /*    TT_Load_Table_Func                                                 */
   /*                                                                       */
   /* <Description>                                                         */
@@ -588,6 +619,7 @@ FT_BEGIN_HEADER
     TT_Get_Metrics_Func          get_metrics;
 
     TT_Get_Name_Func             get_name;
+    TT_Get_Name_ID_Func          get_name_id;
 
   } SFNT_Interface;
 
@@ -628,7 +660,8 @@ FT_BEGIN_HEADER
           set_sbit_strike_,              \
           load_strike_metrics_,          \
           get_metrics_,                  \
-          get_name_ )                    \
+          get_name_,                     \
+          get_name_id_ )                 \
   static const SFNT_Interface  class_ =  \
   {                                      \
     goto_table_,                         \
@@ -661,6 +694,7 @@ FT_BEGIN_HEADER
     load_strike_metrics_,                \
     get_metrics_,                        \
     get_name_,                           \
+    get_name_id_                         \
   };
 
 #else /* FT_CONFIG_OPTION_PIC */
@@ -699,7 +733,8 @@ FT_BEGIN_HEADER
           set_sbit_strike_,                             \
           load_strike_metrics_,                         \
           get_metrics_,                                 \
-          get_name_ )                                   \
+          get_name_,                                    \
+          get_name_id_ )                                \
   void                                                  \
   FT_Init_Class_ ## class_( FT_Library       library,   \
                             SFNT_Interface*  clazz )    \
@@ -736,6 +771,7 @@ FT_BEGIN_HEADER
     clazz->load_strike_metrics = load_strike_metrics_;  \
     clazz->get_metrics         = get_metrics_;          \
     clazz->get_name            = get_name_;             \
+    clazz->get_name_id         = get_name_id_;          \
   }
 
 #endif /* FT_CONFIG_OPTION_PIC */
index 494c011..b2e35d4 100644 (file)
@@ -5,7 +5,7 @@
 /*    Basic Type1/Type2 type definitions and interface (specification      */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 4110d50..c0758e2 100644 (file)
@@ -5,7 +5,7 @@
 /*    Basic SFNT/TrueType type definitions and interface (specification    */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -243,7 +243,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    TT_NameEntryRec                                                    */
+  /*    TT_NameRec                                                         */
   /*                                                                       */
   /* <Description>                                                         */
   /*    A structure modeling TrueType name records.  Name records are used */
@@ -267,7 +267,7 @@ FT_BEGIN_HEADER
   /*    string       :: A pointer to the string's bytes.  Note that these  */
   /*                    are usually UTF-16 encoded characters.             */
   /*                                                                       */
-  typedef struct  TT_NameEntryRec_
+  typedef struct  TT_NameRec_
   {
     FT_UShort  platformID;
     FT_UShort  encodingID;
@@ -279,9 +279,39 @@ FT_BEGIN_HEADER
     /* this last field is not defined in the spec */
     /* but used by the FreeType engine            */
 
-    FT_Byte*   string;
+    FT_Byte*  string;
 
-  } TT_NameEntryRec, *TT_NameEntry;
+  } TT_NameRec, *TT_Name;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_LangTagRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure modeling language tag records in SFNT `name' tables,   */
+  /*    introduced in OpenType version 1.6.                                */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    stringLength :: The length of the string in bytes.                 */
+  /*                                                                       */
+  /*    stringOffset :: The offset to the string in the `name' table.      */
+  /*                                                                       */
+  /*    string       :: A pointer to the string's bytes.  Note that these  */
+  /*                    are UTF-16BE encoded characters.                   */
+  /*                                                                       */
+  typedef struct TT_LangTagRec_
+  {
+    FT_UShort  stringLength;
+    FT_ULong   stringOffset;
+
+    /* this last field is not defined in the spec */
+    /* but used by the FreeType engine            */
+
+    FT_Byte*  string;
+
+  } TT_LangTagRec, *TT_LangTag;
 
 
   /*************************************************************************/
@@ -293,24 +323,30 @@ FT_BEGIN_HEADER
   /*    A structure modeling the TrueType name table.                      */
   /*                                                                       */
   /* <Fields>                                                              */
-  /*    format         :: The format of the name table.                    */
+  /*    format            :: The format of the name table.                 */
+  /*                                                                       */
+  /*    numNameRecords    :: The number of names in table.                 */
   /*                                                                       */
-  /*    numNameRecords :: The number of names in table.                    */
+  /*    storageOffset     :: The offset of the name table in the `name'    */
+  /*                         TrueType table.                               */
   /*                                                                       */
-  /*    storageOffset  :: The offset of the name table in the `name'       */
-  /*                      TrueType table.                                  */
+  /*    names             :: An array of name records.                     */
   /*                                                                       */
-  /*    names          :: An array of name records.                        */
+  /*    numLangTagRecords :: The number of language tags in table.         */
   /*                                                                       */
-  /*    stream         :: the file's input stream.                         */
+  /*    langTags          :: An array of language tag records.             */
+  /*                                                                       */
+  /*    stream            :: The file's input stream.                      */
   /*                                                                       */
   typedef struct  TT_NameTableRec_
   {
-    FT_UShort         format;
-    FT_UInt           numNameRecords;
-    FT_UInt           storageOffset;
-    TT_NameEntryRec*  names;
-    FT_Stream         stream;
+    FT_UShort       format;
+    FT_UInt         numNameRecords;
+    FT_UInt         storageOffset;
+    TT_NameRec*     names;
+    FT_UInt         numLangTagRecords;
+    TT_LangTagRec*  langTags;
+    FT_Stream       stream;
 
   } TT_NameTableRec, *TT_NameTable;
 
@@ -1060,6 +1096,34 @@ FT_BEGIN_HEADER
   } TT_SbitTableType;
 
 
+  /* OpenType 1.8 brings new tables for variation font support;  */
+  /* to make the old MM and GX fonts still work we need to check */
+  /* the presence (and validity) of the functionality provided   */
+  /* by those tables.  The following flag macros are for the     */
+  /* field `variation_support'.                                  */
+  /*                                                             */
+  /* Note that `fvar' gets checked immediately at font loading,  */
+  /* while the other features are only loaded if MM support is   */
+  /* actually requested.                                         */
+
+  /* FVAR */
+#define TT_FACE_FLAG_VAR_FVAR  ( 1 << 0 )
+
+  /* HVAR */
+#define TT_FACE_FLAG_VAR_HADVANCE  ( 1 << 1 )
+#define TT_FACE_FLAG_VAR_LSB       ( 1 << 2 )
+#define TT_FACE_FLAG_VAR_RSB       ( 1 << 3 )
+
+  /* VVAR */
+#define TT_FACE_FLAG_VAR_VADVANCE  ( 1 << 4 )
+#define TT_FACE_FLAG_VAR_TSB       ( 1 << 5 )
+#define TT_FACE_FLAG_VAR_BSB       ( 1 << 6 )
+#define TT_FACE_FLAG_VAR_VORG      ( 1 << 7 )
+
+  /* MVAR */
+#define TT_FACE_FLAG_VAR_MVAR  ( 1 << 8 )
+
+
   /*************************************************************************/
   /*                                                                       */
   /*                         TrueType Face Type                            */
@@ -1161,6 +1225,11 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    psnames              :: A pointer to the PostScript names service. */
   /*                                                                       */
+  /*    mm                   :: A pointer to the Multiple Masters service. */
+  /*                                                                       */
+  /*    var                  :: A pointer to the Metrics Variations        */
+  /*                            service.                                   */
+  /*                                                                       */
   /*    hdmx                 :: The face's horizontal device metrics       */
   /*                            (`hdmx' table).  This table is optional in */
   /*                            TrueType/OpenType fonts.                   */
@@ -1182,18 +1251,6 @@ FT_BEGIN_HEADER
   /*                            file  `ttconfig.h' for comments on the     */
   /*                            TT_CONFIG_OPTION_POSTSCRIPT_NAMES option.  */
   /*                                                                       */
-  /*    num_locations        :: The number of glyph locations in this      */
-  /*                            TrueType file.  This should be             */
-  /*                            identical to the number of glyphs.         */
-  /*                            Ignored for Type 2 fonts.                  */
-  /*                                                                       */
-  /*    glyph_locations      :: An array of longs.  These are offsets to   */
-  /*                            glyph data within the `glyf' table.        */
-  /*                            Ignored for Type 2 font faces.             */
-  /*                                                                       */
-  /*    glyf_len             :: The length of the `glyf' table.  Needed    */
-  /*                            for malformed `loca' tables.               */
-  /*                                                                       */
   /*    font_program_size    :: Size in bytecodes of the face's font       */
   /*                            program.  0 if none defined.  Ignored for  */
   /*                            Type 2 fonts.                              */
@@ -1219,20 +1276,22 @@ FT_BEGIN_HEADER
   /*                            units.  Comes from the `cvt ' table.       */
   /*                            Ignored for Type 2 fonts.                  */
   /*                                                                       */
-  /*    num_kern_pairs       :: The number of kerning pairs present in the */
-  /*                            font file.  The engine only loads the      */
-  /*                            first horizontal format 0 kern table it    */
-  /*                            finds in the font file.  Ignored for       */
-  /*                            Type 2 fonts.                              */
-  /*                                                                       */
-  /*    kern_table_index     :: The index of the kerning table in the font */
-  /*                            kerning directory.  Ignored for Type 2     */
-  /*                            fonts.                                     */
-  /*                                                                       */
   /*    interpreter          :: A pointer to the TrueType bytecode         */
   /*                            interpreters field is also used to hook    */
   /*                            the debugger in `ttdebug'.                 */
   /*                                                                       */
+  /*    extra                :: Reserved for third-party font drivers.     */
+  /*                                                                       */
+  /*    postscript_name      :: The PS name of the font.  Used by the      */
+  /*                            postscript name service.                   */
+  /*                                                                       */
+  /*    glyf_len             :: The length of the `glyf' table.  Needed    */
+  /*                            for malformed `loca' tables.               */
+  /*                                                                       */
+  /*    glyf_offset          :: The file offset of the `glyf' table.       */
+  /*                                                                       */
+  /*    is_cff2              :: Set if the font format is CFF2.            */
+  /*                                                                       */
   /*    doblend              :: A boolean which is set if the font should  */
   /*                            be blended (this is for GX var).           */
   /*                                                                       */
@@ -1240,10 +1299,98 @@ FT_BEGIN_HEADER
   /*                            variation tables (rather like Multiple     */
   /*                            Master data).                              */
   /*                                                                       */
-  /*    extra                :: Reserved for third-party font drivers.     */
+  /*    is_default_instance  :: Set if the glyph outlines can be used      */
+  /*                            unmodified (i.e., without applying glyph   */
+  /*                            variation deltas).                         */
   /*                                                                       */
-  /*    postscript_name      :: The PS name of the font.  Used by the      */
-  /*                            postscript name service.                   */
+  /*    variation_support    :: Flags that indicate which OpenType         */
+  /*                            functionality related to font variation    */
+  /*                            support is present, valid, and usable.     */
+  /*                            For example, TT_FACE_FLAG_VAR_FVAR is only */
+  /*                            set if we have at least one design axis.   */
+  /*                                                                       */
+  /*    var_postscript_prefix ::                                           */
+  /*                            The PostScript name prefix needed for      */
+  /*                            constructing a variation font instance's   */
+  /*                            PS name .                                  */
+  /*                                                                       */
+  /*    var_postscript_prefix_len ::                                       */
+  /*                            The length of the `var_postscript_prefix'  */
+  /*                            string.                                    */
+  /*                                                                       */
+  /*    horz_metrics_size    :: The size of the `hmtx' table.              */
+  /*                                                                       */
+  /*    vert_metrics_size    :: The size of the `vmtx' table.              */
+  /*                                                                       */
+  /*    num_locations        :: The number of glyph locations in this      */
+  /*                            TrueType file.  This should be             */
+  /*                            identical to the number of glyphs.         */
+  /*                            Ignored for Type 2 fonts.                  */
+  /*                                                                       */
+  /*    glyph_locations      :: An array of longs.  These are offsets to   */
+  /*                            glyph data within the `glyf' table.        */
+  /*                            Ignored for Type 2 font faces.             */
+  /*                                                                       */
+  /*    hdmx_table           :: A pointer to the `hdmx' table.             */
+  /*                                                                       */
+  /*    hdmx_table_size      :: The size of the `hdmx' table.              */
+  /*                                                                       */
+  /*    hdmx_record_count    :: The number of hdmx records.                */
+  /*                                                                       */
+  /*    hdmx_record_size     :: The size of a single hdmx record.          */
+  /*                                                                       */
+  /*    hdmx_record_sizes    :: An array holding the ppem sizes available  */
+  /*                            in the `hdmx' table.                       */
+  /*                                                                       */
+  /*    sbit_table           :: A pointer to the font's embedded bitmap    */
+  /*                            location table.                            */
+  /*                                                                       */
+  /*    sbit_table_size      :: The size of `sbit_table'.                  */
+  /*                                                                       */
+  /*    sbit_table_type      :: The sbit table type (CBLC, sbix, etc.).    */
+  /*                                                                       */
+  /*    sbit_num_strikes     :: The number of sbit strikes exposed by      */
+  /*                            FreeType's API, omitting invalid strikes.  */
+  /*                                                                       */
+  /*    sbit_strike_map      :: A mapping between the strike indices       */
+  /*                            exposed by the API and the indices used in */
+  /*                            the font's sbit table.                     */
+  /*                                                                       */
+  /*    kern_table           :: A pointer to the `kern' table.             */
+  /*                                                                       */
+  /*    kern_table_size      :: The size of the `kern' table.              */
+  /*                                                                       */
+  /*    num_kern_tables      :: The number of supported kern subtables     */
+  /*                            (up to 32; FreeType recognizes only        */
+  /*                            horizontal ones with format 0).            */
+  /*                                                                       */
+  /*    kern_avail_bits      :: The availability status of kern subtables; */
+  /*                            if bit n is set, table n is available.     */
+  /*                                                                       */
+  /*    kern_order_bits      :: The sortedness status of kern subtables;   */
+  /*                            if bit n is set, table n is sorted.        */
+  /*                                                                       */
+  /*    bdf                  :: Data related to an SFNT font's `bdf'       */
+  /*                            table; see `tttypes.h'.                    */
+  /*                                                                       */
+  /*    horz_metrics_offset  :: The file offset of the `hmtx' table.       */
+  /*                                                                       */
+  /*    vert_metrics_offset  :: The file offset of the `vmtx' table.       */
+  /*                                                                       */
+  /*    sph_found_func_flags :: Flags identifying special bytecode         */
+  /*                            functions (used by the v38 implementation  */
+  /*                            of the bytecode interpreter).              */
+  /*                                                                       */
+  /*    sph_compatibility_mode ::                                          */
+  /*                            This flag is set if we are in ClearType    */
+  /*                            backward compatibility mode (used by the   */
+  /*                            v38 implementation of the bytecode         */
+  /*                            interpreter).                              */
+  /*                                                                       */
+  /*    ebdt_start           :: The file offset of the sbit data table     */
+  /*                            (CBDT, bdat, etc.).                        */
+  /*                                                                       */
+  /*    ebdt_size            :: The size of the sbit data table.           */
   /*                                                                       */
   typedef struct  TT_FaceRec_
   {
@@ -1288,6 +1435,16 @@ FT_BEGIN_HEADER
     /* handle glyph names <-> unicode & Mac values                   */
     void*                 psnames;
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    /* a typeless pointer to the FT_Service_MultiMasters table used to */
+    /* handle variation fonts                                          */
+    void*                 mm;
+
+    /* a typeless pointer to the FT_Service_MetricsVariationsRec table */
+    /* used to handle the HVAR, VVAR, and MVAR OpenType tables         */
+    void*                 var;
+#endif
+
 
     /***********************************************************************/
     /*                                                                     */
@@ -1311,7 +1468,7 @@ FT_BEGIN_HEADER
 
     /***********************************************************************/
     /*                                                                     */
-    /* TrueType-specific fields (ignored by the OTF-Type2 driver)          */
+    /* TrueType-specific fields (ignored by the CFF driver)                */
     /*                                                                     */
     /***********************************************************************/
 
@@ -1344,18 +1501,25 @@ FT_BEGIN_HEADER
     const char*           postscript_name;
 
     FT_ULong              glyf_len;
+    FT_ULong              glyf_offset;    /* since 2.7.1 */
+
+    FT_Bool               is_cff2;        /* since 2.7.1 */
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
     FT_Bool               doblend;
     GX_Blend              blend;
+
+    FT_Bool               is_default_instance;   /* since 2.7.1 */
+    FT_UInt32             variation_support;     /* since 2.7.1 */
+
+    const char*           var_postscript_prefix;     /* since 2.7.2 */
+    FT_UInt               var_postscript_prefix_len; /* since 2.7.2 */
+
 #endif
 
     /* since version 2.2 */
 
-    FT_Byte*              horz_metrics;
     FT_ULong              horz_metrics_size;
-
-    FT_Byte*              vert_metrics;
     FT_ULong              vert_metrics_size;
 
     FT_ULong              num_locations; /* in broken TTF, gid > 0xFFFF */
@@ -1371,6 +1535,7 @@ FT_BEGIN_HEADER
     FT_ULong              sbit_table_size;
     TT_SbitTableType      sbit_table_type;
     FT_UInt               sbit_num_strikes;
+    FT_UInt*              sbit_strike_map;
 
     FT_Byte*              kern_table;
     FT_ULong              kern_table_size;
@@ -1393,6 +1558,12 @@ FT_BEGIN_HEADER
     FT_Bool               sph_compatibility_mode;
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
 
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+    /* since 2.7 */
+    FT_ULong              ebdt_start;  /* either `CBDT', `EBDT', or `bdat' */
+    FT_ULong              ebdt_size;
+#endif
+
   } TT_FaceRec;
 
 
@@ -1485,8 +1656,6 @@ FT_BEGIN_HEADER
     FT_Vector        pp1;
     FT_Vector        pp2;
 
-    FT_ULong         glyf_offset;
-
     /* the zone where we load our glyphs */
     TT_GlyphZoneRec  base;
     TT_GlyphZoneRec  zone;
index e272324..3f6b36e 100644 (file)
@@ -5,7 +5,7 @@
 /*    Basic Type 1/Type 2 tables definitions and interface (specification  */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -291,7 +291,7 @@ FT_BEGIN_HEADER
 
   } PS_DesignMapRec, *PS_DesignMap;
 
-  /* backwards-compatible definition */
+  /* backward compatible definition */
   typedef PS_DesignMapRec  T1_DesignMap;
 
 
@@ -326,7 +326,7 @@ FT_BEGIN_HEADER
   } PS_BlendRec, *PS_Blend;
 
 
-  /* backwards-compatible definition */
+  /* backward compatible definition */
   typedef PS_BlendRec  T1_Blend;
 
 
index ce707f1..494d677 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType name ID definitions (specification only).                   */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -36,7 +36,7 @@ FT_BEGIN_HEADER
   /*************************************************************************/
   /*                                                                       */
   /* Possible values for the `platform' identifier code in the name        */
-  /* records of the TTF `name' table.                                      */
+  /* records of an SFNT `name' table.                                      */
   /*                                                                       */
   /*************************************************************************/
 
@@ -119,14 +119,19 @@ FT_BEGIN_HEADER
    *   TT_APPLE_ID_VARIANT_SELECTOR ::
    *     From Adobe, not Apple.  Not a normal cmap.  Specifies variations
    *     on a real cmap.
+   *
+   *   TT_APPLE_ID_FULL_UNICODE ::
+   *     Used for fallback fonts that provide complete Unicode coverage with
+   *     a type~13 cmap.
    */
 
-#define TT_APPLE_ID_DEFAULT           0 /* Unicode 1.0 */
-#define TT_APPLE_ID_UNICODE_1_1       1 /* specify Hangul at U+34xx */
-#define TT_APPLE_ID_ISO_10646         2 /* deprecated */
-#define TT_APPLE_ID_UNICODE_2_0       3 /* or later */
+#define TT_APPLE_ID_DEFAULT           0 /* Unicode 1.0                   */
+#define TT_APPLE_ID_UNICODE_1_1       1 /* specify Hangul at U+34xx      */
+#define TT_APPLE_ID_ISO_10646         2 /* deprecated                    */
+#define TT_APPLE_ID_UNICODE_2_0       3 /* or later                      */
 #define TT_APPLE_ID_UNICODE_32        4 /* 2.0 or later, full repertoire */
-#define TT_APPLE_ID_VARIANT_SELECTOR  5 /* variation selector data */
+#define TT_APPLE_ID_VARIANT_SELECTOR  5 /* variation selector data       */
+#define TT_APPLE_ID_FULL_UNICODE      6 /* used with type 13 cmaps       */
 
 
   /***********************************************************************
@@ -137,42 +142,6 @@ FT_BEGIN_HEADER
    * @description:
    *   A list of valid values for the `encoding_id' for
    *   @TT_PLATFORM_MACINTOSH charmaps and name entries.
-   *
-   * @values:
-   *   TT_MAC_ID_ROMAN ::
-   *   TT_MAC_ID_JAPANESE ::
-   *   TT_MAC_ID_TRADITIONAL_CHINESE ::
-   *   TT_MAC_ID_KOREAN ::
-   *   TT_MAC_ID_ARABIC ::
-   *   TT_MAC_ID_HEBREW ::
-   *   TT_MAC_ID_GREEK ::
-   *   TT_MAC_ID_RUSSIAN ::
-   *   TT_MAC_ID_RSYMBOL ::
-   *   TT_MAC_ID_DEVANAGARI ::
-   *   TT_MAC_ID_GURMUKHI ::
-   *   TT_MAC_ID_GUJARATI ::
-   *   TT_MAC_ID_ORIYA ::
-   *   TT_MAC_ID_BENGALI ::
-   *   TT_MAC_ID_TAMIL ::
-   *   TT_MAC_ID_TELUGU ::
-   *   TT_MAC_ID_KANNADA ::
-   *   TT_MAC_ID_MALAYALAM ::
-   *   TT_MAC_ID_SINHALESE ::
-   *   TT_MAC_ID_BURMESE ::
-   *   TT_MAC_ID_KHMER ::
-   *   TT_MAC_ID_THAI ::
-   *   TT_MAC_ID_LAOTIAN ::
-   *   TT_MAC_ID_GEORGIAN ::
-   *   TT_MAC_ID_ARMENIAN ::
-   *   TT_MAC_ID_MALDIVIAN ::
-   *   TT_MAC_ID_SIMPLIFIED_CHINESE ::
-   *   TT_MAC_ID_TIBETAN ::
-   *   TT_MAC_ID_MONGOLIAN ::
-   *   TT_MAC_ID_GEEZ ::
-   *   TT_MAC_ID_SLAVIC ::
-   *   TT_MAC_ID_VIETNAMESE ::
-   *   TT_MAC_ID_SINDHI ::
-   *   TT_MAC_ID_UNINTERP ::
    */
 
 #define TT_MAC_ID_ROMAN                 0
@@ -247,44 +216,47 @@ FT_BEGIN_HEADER
    *
    * @values:
    *   TT_MS_ID_SYMBOL_CS ::
-   *     Corresponds to Microsoft symbol encoding. See
-   *     @FT_ENCODING_MS_SYMBOL.
+   *     Microsoft symbol encoding.  See @FT_ENCODING_MS_SYMBOL.
    *
    *   TT_MS_ID_UNICODE_CS ::
-   *     Corresponds to a Microsoft WGL4 charmap, matching Unicode.  See
+   *     Microsoft WGL4 charmap, matching Unicode.  See
    *     @FT_ENCODING_UNICODE.
    *
    *   TT_MS_ID_SJIS ::
-   *     Corresponds to SJIS Japanese encoding.  See @FT_ENCODING_SJIS.
+   *     Shift JIS Japanese encoding.  See @FT_ENCODING_SJIS.
    *
-   *   TT_MS_ID_GB2312 ::
-   *     Corresponds to Simplified Chinese as used in Mainland China.  See
-   *     @FT_ENCODING_GB2312.
+   *   TT_MS_ID_PRC ::
+   *     Chinese encodings as used in the People's Republic of China (PRC).
+   *     This means the encodings GB~2312 and its supersets GBK and
+   *     GB~18030.  See @FT_ENCODING_PRC.
    *
    *   TT_MS_ID_BIG_5 ::
-   *     Corresponds to Traditional Chinese as used in Taiwan and Hong Kong.
-   *     See @FT_ENCODING_BIG5.
+   *     Traditional Chinese as used in Taiwan and Hong Kong.  See
+   *     @FT_ENCODING_BIG5.
    *
    *   TT_MS_ID_WANSUNG ::
-   *     Corresponds to Korean Wansung encoding.  See @FT_ENCODING_WANSUNG.
+   *     Korean Extended Wansung encoding.  See @FT_ENCODING_WANSUNG.
    *
    *   TT_MS_ID_JOHAB ::
-   *     Corresponds to Johab encoding.  See @FT_ENCODING_JOHAB.
+   *     Korean Johab encoding.  See @FT_ENCODING_JOHAB.
    *
    *   TT_MS_ID_UCS_4 ::
-   *     Corresponds to UCS-4 or UTF-32 charmaps.  This has been added to
-   *     the OpenType specification version 1.4 (mid-2001.)
+   *     UCS-4 or UTF-32 charmaps.  This has been added to the OpenType
+   *     specification version 1.4 (mid-2001).
    */
 
 #define TT_MS_ID_SYMBOL_CS    0
 #define TT_MS_ID_UNICODE_CS   1
 #define TT_MS_ID_SJIS         2
-#define TT_MS_ID_GB2312       3
+#define TT_MS_ID_PRC          3
 #define TT_MS_ID_BIG_5        4
 #define TT_MS_ID_WANSUNG      5
 #define TT_MS_ID_JOHAB        6
 #define TT_MS_ID_UCS_4       10
 
+  /* this value is deprecated */
+#define TT_MS_ID_GB2312  TT_MS_ID_PRC
+
 
   /***********************************************************************
    *
@@ -312,17 +284,22 @@ FT_BEGIN_HEADER
 #define TT_ADOBE_ID_LATIN_1   3
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* Possible values of the language identifier field in the name records  */
-  /* of the TTF `name' table if the `platform' identifier code is          */
-  /* TT_PLATFORM_MACINTOSH.  These values are also used as return values   */
-  /* for function @FT_Get_CMap_Language_ID.                                */
-  /*                                                                       */
-  /* The canonical source for the Apple assigned Language ID's is at       */
-  /*                                                                       */
-  /*   https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html */
-  /*                                                                       */
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_MAC_LANGID_XXX
+   *
+   * @description:
+   *   Possible values of the language identifier field in the name records
+   *   of the SFNT `name' table if the `platform' identifier code is
+   *   @TT_PLATFORM_MACINTOSH.  These values are also used as return values
+   *   for function @FT_Get_CMap_Language_ID.
+   *
+   *   The canonical source for Apple's IDs is
+   *
+   *     https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html
+   */
+
 #define TT_MAC_LANGID_ENGLISH                       0
 #define TT_MAC_LANGID_FRENCH                        1
 #define TT_MAC_LANGID_GERMAN                        2
@@ -433,15 +410,6 @@ FT_BEGIN_HEADER
 #define TT_MAC_LANGID_JAVANESE                    138
 #define TT_MAC_LANGID_SUNDANESE                   139
 
-
-#if 0  /* these seem to be errors that have been dropped */
-
-#define TT_MAC_LANGID_SCOTTISH_GAELIC             140
-#define TT_MAC_LANGID_IRISH_GAELIC                141
-
-#endif
-
-
   /* The following codes are new as of 2000-03-10 */
 #define TT_MAC_LANGID_GALICIAN                    140
 #define TT_MAC_LANGID_AFRIKAANS                   141
@@ -456,18 +424,30 @@ FT_BEGIN_HEADER
 #define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT    150
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* Possible values of the language identifier field in the name records  */
-  /* of the TTF `name' table if the `platform' identifier code is          */
-  /* TT_PLATFORM_MICROSOFT.                                                */
-  /*                                                                       */
-  /* The canonical source for the MS assigned LCIDs is                     */
-  /*                                                                       */
-  /*   http://www.microsoft.com/globaldev/reference/lcid-all.mspx          */
-  /*                                                                       */
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_MS_LANGID_XXX
+   *
+   * @description:
+   *   Possible values of the language identifier field in the name records
+   *   of the SFNT `name' table if the `platform' identifier code is
+   *   @TT_PLATFORM_MICROSOFT.  These values are also used as return values
+   *   for function @FT_Get_CMap_Language_ID.
+   *
+   *   The canonical source for Microsoft's IDs is
+   *
+   *     http://www.microsoft.com/globaldev/reference/lcid-all.mspx ,
+   *
+   *   however, we only provide macros for language identifiers present in
+   *   the OpenType specification: Microsoft has abandoned the concept of
+   *   LCIDs (language code identifiers), and format~1 of the `name' table
+   *   provides a better mechanism for languages not covered here.
+   *
+   *   More legacy values not listed in the reference can be found in the
+   *   @FT_TRUETYPE_IDS_H header file.
+   */
 
-#define TT_MS_LANGID_ARABIC_GENERAL                    0x0001
 #define TT_MS_LANGID_ARABIC_SAUDI_ARABIA               0x0401
 #define TT_MS_LANGID_ARABIC_IRAQ                       0x0801
 #define TT_MS_LANGID_ARABIC_EGYPT                      0x0C01
@@ -485,39 +465,20 @@ FT_BEGIN_HEADER
 #define TT_MS_LANGID_ARABIC_BAHRAIN                    0x3C01
 #define TT_MS_LANGID_ARABIC_QATAR                      0x4001
 #define TT_MS_LANGID_BULGARIAN_BULGARIA                0x0402
-#define TT_MS_LANGID_CATALAN_SPAIN                     0x0403
-#define TT_MS_LANGID_CHINESE_GENERAL                   0x0004
+#define TT_MS_LANGID_CATALAN_CATALAN                   0x0403
 #define TT_MS_LANGID_CHINESE_TAIWAN                    0x0404
 #define TT_MS_LANGID_CHINESE_PRC                       0x0804
 #define TT_MS_LANGID_CHINESE_HONG_KONG                 0x0C04
 #define TT_MS_LANGID_CHINESE_SINGAPORE                 0x1004
-
-#if 1  /* this looks like the correct value */
-#define TT_MS_LANGID_CHINESE_MACAU                     0x1404
-#else  /* but beware, Microsoft may change its mind...
-          the most recent Word reference has the following: */
-#define TT_MS_LANGID_CHINESE_MACAU  TT_MS_LANGID_CHINESE_HONG_KONG
-#endif
-
-#if 0  /* used only with .NET `cultures'; commented out */
-#define TT_MS_LANGID_CHINESE_TRADITIONAL               0x7C04
-#endif
-
+#define TT_MS_LANGID_CHINESE_MACAO                     0x1404
 #define TT_MS_LANGID_CZECH_CZECH_REPUBLIC              0x0405
 #define TT_MS_LANGID_DANISH_DENMARK                    0x0406
 #define TT_MS_LANGID_GERMAN_GERMANY                    0x0407
 #define TT_MS_LANGID_GERMAN_SWITZERLAND                0x0807
 #define TT_MS_LANGID_GERMAN_AUSTRIA                    0x0C07
 #define TT_MS_LANGID_GERMAN_LUXEMBOURG                 0x1007
-#define TT_MS_LANGID_GERMAN_LIECHTENSTEI               0x1407
+#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN              0x1407
 #define TT_MS_LANGID_GREEK_GREECE                      0x0408
-
-  /* don't ask what this one means... It is commented out currently. */
-#if 0
-#define TT_MS_LANGID_GREEK_GREECE2                     0x2008
-#endif
-
-#define TT_MS_LANGID_ENGLISH_GENERAL                   0x0009
 #define TT_MS_LANGID_ENGLISH_UNITED_STATES             0x0409
 #define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM            0x0809
 #define TT_MS_LANGID_ENGLISH_AUSTRALIA                 0x0C09
@@ -531,14 +492,12 @@ FT_BEGIN_HEADER
 #define TT_MS_LANGID_ENGLISH_TRINIDAD                  0x2C09
 #define TT_MS_LANGID_ENGLISH_ZIMBABWE                  0x3009
 #define TT_MS_LANGID_ENGLISH_PHILIPPINES               0x3409
-#define TT_MS_LANGID_ENGLISH_INDONESIA                 0x3809
-#define TT_MS_LANGID_ENGLISH_HONG_KONG                 0x3C09
 #define TT_MS_LANGID_ENGLISH_INDIA                     0x4009
 #define TT_MS_LANGID_ENGLISH_MALAYSIA                  0x4409
 #define TT_MS_LANGID_ENGLISH_SINGAPORE                 0x4809
 #define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT    0x040A
 #define TT_MS_LANGID_SPANISH_MEXICO                    0x080A
-#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT  0x0C0A
+#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT         0x0C0A
 #define TT_MS_LANGID_SPANISH_GUATEMALA                 0x100A
 #define TT_MS_LANGID_SPANISH_COSTA_RICA                0x140A
 #define TT_MS_LANGID_SPANISH_PANAMA                    0x180A
@@ -557,9 +516,6 @@ FT_BEGIN_HEADER
 #define TT_MS_LANGID_SPANISH_NICARAGUA                 0x4C0A
 #define TT_MS_LANGID_SPANISH_PUERTO_RICO               0x500A
 #define TT_MS_LANGID_SPANISH_UNITED_STATES             0x540A
-  /* The following ID blatantly violate MS specs by using a */
-  /* sublanguage > 0x1F.                                    */
-#define TT_MS_LANGID_SPANISH_LATIN_AMERICA             0xE40AU
 #define TT_MS_LANGID_FINNISH_FINLAND                   0x040B
 #define TT_MS_LANGID_FRENCH_FRANCE                     0x040C
 #define TT_MS_LANGID_FRENCH_BELGIUM                    0x080C
@@ -567,27 +523,13 @@ FT_BEGIN_HEADER
 #define TT_MS_LANGID_FRENCH_SWITZERLAND                0x100C
 #define TT_MS_LANGID_FRENCH_LUXEMBOURG                 0x140C
 #define TT_MS_LANGID_FRENCH_MONACO                     0x180C
-#define TT_MS_LANGID_FRENCH_WEST_INDIES                0x1C0C
-#define TT_MS_LANGID_FRENCH_REUNION                    0x200C
-#define TT_MS_LANGID_FRENCH_CONGO                      0x240C
-  /* which was formerly: */
-#define TT_MS_LANGID_FRENCH_ZAIRE  TT_MS_LANGID_FRENCH_CONGO
-#define TT_MS_LANGID_FRENCH_SENEGAL                    0x280C
-#define TT_MS_LANGID_FRENCH_CAMEROON                   0x2C0C
-#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE              0x300C
-#define TT_MS_LANGID_FRENCH_MALI                       0x340C
-#define TT_MS_LANGID_FRENCH_MOROCCO                    0x380C
-#define TT_MS_LANGID_FRENCH_HAITI                      0x3C0C
-  /* and another violation of the spec (see 0xE40AU) */
-#define TT_MS_LANGID_FRENCH_NORTH_AFRICA               0xE40CU
 #define TT_MS_LANGID_HEBREW_ISRAEL                     0x040D
 #define TT_MS_LANGID_HUNGARIAN_HUNGARY                 0x040E
 #define TT_MS_LANGID_ICELANDIC_ICELAND                 0x040F
 #define TT_MS_LANGID_ITALIAN_ITALY                     0x0410
 #define TT_MS_LANGID_ITALIAN_SWITZERLAND               0x0810
 #define TT_MS_LANGID_JAPANESE_JAPAN                    0x0411
-#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA     0x0412
-#define TT_MS_LANGID_KOREAN_JOHAB_KOREA                0x0812
+#define TT_MS_LANGID_KOREAN_KOREA                      0x0412
 #define TT_MS_LANGID_DUTCH_NETHERLANDS                 0x0413
 #define TT_MS_LANGID_DUTCH_BELGIUM                     0x0813
 #define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL           0x0414
@@ -595,26 +537,17 @@ FT_BEGIN_HEADER
 #define TT_MS_LANGID_POLISH_POLAND                     0x0415
 #define TT_MS_LANGID_PORTUGUESE_BRAZIL                 0x0416
 #define TT_MS_LANGID_PORTUGUESE_PORTUGAL               0x0816
-#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND        0x0417
+#define TT_MS_LANGID_ROMANSH_SWITZERLAND               0x0417
 #define TT_MS_LANGID_ROMANIAN_ROMANIA                  0x0418
-#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA                0x0818
 #define TT_MS_LANGID_RUSSIAN_RUSSIA                    0x0419
-#define TT_MS_LANGID_RUSSIAN_MOLDAVIA                  0x0819
 #define TT_MS_LANGID_CROATIAN_CROATIA                  0x041A
 #define TT_MS_LANGID_SERBIAN_SERBIA_LATIN              0x081A
 #define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC           0x0C1A
-
-#if 0  /* this used to be this value, but it looks like we were wrong */
-#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x101A
-#else  /* current sources say */
 #define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA       0x101A
 #define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA        0x141A
-       /* and XPsp2 Platform SDK added (2004-07-26) */
-       /* Names are shortened to be significant within 40 chars. */
 #define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN         0x181A
-#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x181A
-#endif
-
+#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC      0x1C1A
+#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC      0x201A
 #define TT_MS_LANGID_SLOVAK_SLOVAKIA                   0x041B
 #define TT_MS_LANGID_ALBANIAN_ALBANIA                  0x041C
 #define TT_MS_LANGID_SWEDISH_SWEDEN                    0x041D
@@ -622,36 +555,30 @@ FT_BEGIN_HEADER
 #define TT_MS_LANGID_THAI_THAILAND                     0x041E
 #define TT_MS_LANGID_TURKISH_TURKEY                    0x041F
 #define TT_MS_LANGID_URDU_PAKISTAN                     0x0420
-#define TT_MS_LANGID_URDU_INDIA                        0x0820
 #define TT_MS_LANGID_INDONESIAN_INDONESIA              0x0421
 #define TT_MS_LANGID_UKRAINIAN_UKRAINE                 0x0422
 #define TT_MS_LANGID_BELARUSIAN_BELARUS                0x0423
-#define TT_MS_LANGID_SLOVENE_SLOVENIA                  0x0424
+#define TT_MS_LANGID_SLOVENIAN_SLOVENIA                0x0424
 #define TT_MS_LANGID_ESTONIAN_ESTONIA                  0x0425
 #define TT_MS_LANGID_LATVIAN_LATVIA                    0x0426
 #define TT_MS_LANGID_LITHUANIAN_LITHUANIA              0x0427
-#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA      0x0827
 #define TT_MS_LANGID_TAJIK_TAJIKISTAN                  0x0428
-#define TT_MS_LANGID_FARSI_IRAN                        0x0429
 #define TT_MS_LANGID_VIETNAMESE_VIET_NAM               0x042A
 #define TT_MS_LANGID_ARMENIAN_ARMENIA                  0x042B
 #define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN            0x042C
 #define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC         0x082C
-#define TT_MS_LANGID_BASQUE_SPAIN                      0x042D
-#define TT_MS_LANGID_SORBIAN_GERMANY                   0x042E
+#define TT_MS_LANGID_BASQUE_BASQUE                     0x042D
+#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY             0x042E
+#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY             0x082E
 #define TT_MS_LANGID_MACEDONIAN_MACEDONIA              0x042F
-#define TT_MS_LANGID_SUTU_SOUTH_AFRICA                 0x0430
-#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA               0x0431
-#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA               0x0432
-#define TT_MS_LANGID_VENDA_SOUTH_AFRICA                0x0433
-#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA                0x0434
-#define TT_MS_LANGID_ZULU_SOUTH_AFRICA                 0x0435
+#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA             0x0432
+#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA             0x0434
+#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA              0x0435
 #define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA            0x0436
 #define TT_MS_LANGID_GEORGIAN_GEORGIA                  0x0437
 #define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS           0x0438
 #define TT_MS_LANGID_HINDI_INDIA                       0x0439
 #define TT_MS_LANGID_MALTESE_MALTA                     0x043A
-  /* Added by XPsp2 Platform SDK (2004-07-26) */
 #define TT_MS_LANGID_SAMI_NORTHERN_NORWAY              0x043B
 #define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN              0x083B
 #define TT_MS_LANGID_SAMI_NORTHERN_FINLAND             0x0C3B
@@ -661,37 +588,21 @@ FT_BEGIN_HEADER
 #define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN              0x1C3B
 #define TT_MS_LANGID_SAMI_SKOLT_FINLAND                0x203B
 #define TT_MS_LANGID_SAMI_INARI_FINLAND                0x243B
-  /* ... and we also keep our old identifier... */
-#define TT_MS_LANGID_SAAMI_LAPONIA                     0x043B
-
-#if 0 /* this seems to be a previous inversion */
-#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043C
-#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083C
-#else
-#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083C
-#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043C
-#endif
-
-#define TT_MS_LANGID_YIDDISH_GERMANY                   0x043D
+#define TT_MS_LANGID_IRISH_IRELAND                     0x083C
 #define TT_MS_LANGID_MALAY_MALAYSIA                    0x043E
 #define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM           0x083E
-#define TT_MS_LANGID_KAZAK_KAZAKSTAN                   0x043F
-#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440
-  /* alias declared in Windows 2000 */
-#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
-          TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN
-
-#define TT_MS_LANGID_SWAHILI_KENYA                     0x0441
+#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN                 0x043F
+#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/   0x0440
+#define TT_MS_LANGID_KISWAHILI_KENYA                   0x0441
 #define TT_MS_LANGID_TURKMEN_TURKMENISTAN              0x0442
 #define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN            0x0443
 #define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC         0x0843
-#define TT_MS_LANGID_TATAR_TATARSTAN                   0x0444
+#define TT_MS_LANGID_TATAR_RUSSIA                      0x0444
 #define TT_MS_LANGID_BENGALI_INDIA                     0x0445
 #define TT_MS_LANGID_BENGALI_BANGLADESH                0x0845
 #define TT_MS_LANGID_PUNJABI_INDIA                     0x0446
-#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN           0x0846
 #define TT_MS_LANGID_GUJARATI_INDIA                    0x0447
-#define TT_MS_LANGID_ORIYA_INDIA                       0x0448
+#define TT_MS_LANGID_ODIA_INDIA                        0x0448
 #define TT_MS_LANGID_TAMIL_INDIA                       0x0449
 #define TT_MS_LANGID_TELUGU_INDIA                      0x044A
 #define TT_MS_LANGID_KANNADA_INDIA                     0x044B
@@ -700,142 +611,241 @@ FT_BEGIN_HEADER
 #define TT_MS_LANGID_MARATHI_INDIA                     0x044E
 #define TT_MS_LANGID_SANSKRIT_INDIA                    0x044F
 #define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450
-#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN      0x0850
-#define TT_MS_LANGID_TIBETAN_CHINA                     0x0451
-  /* Don't use the next constant!  It has            */
-  /*   (1) the wrong spelling (Dzonghka)             */
-  /*   (2) Microsoft doesn't officially define it -- */
-  /*       at least it is not in the List of Local   */
-  /*       ID Values.                                */
-  /*   (3) Dzongkha is not the same language as      */
-  /*       Tibetan, so merging it is wrong anyway.   */
-  /*                                                 */
-  /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW.    */
-#define TT_MS_LANGID_DZONGHKA_BHUTAN                   0x0851
-
-#if 0
-  /* the following used to be defined */
-#define TT_MS_LANGID_TIBETAN_BHUTAN                    0x0451
-  /* ... but it was changed; */
-#else
-  /* So we will continue to #define it, but with the correct value */
-#define TT_MS_LANGID_TIBETAN_BHUTAN   TT_MS_LANGID_DZONGHKA_BHUTAN
-#endif
-
-#define TT_MS_LANGID_WELSH_WALES                       0x0452
+#define TT_MS_LANGID_MONGOLIAN_PRC                     0x0850
+#define TT_MS_LANGID_TIBETAN_PRC                       0x0451
+#define TT_MS_LANGID_WELSH_UNITED_KINGDOM              0x0452
 #define TT_MS_LANGID_KHMER_CAMBODIA                    0x0453
 #define TT_MS_LANGID_LAO_LAOS                          0x0454
-#define TT_MS_LANGID_BURMESE_MYANMAR                   0x0455
-#define TT_MS_LANGID_GALICIAN_SPAIN                    0x0456
+#define TT_MS_LANGID_GALICIAN_GALICIAN                 0x0456
 #define TT_MS_LANGID_KONKANI_INDIA                     0x0457
-#define TT_MS_LANGID_MANIPURI_INDIA  /* Bengali */     0x0458
-#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */         0x0459
-#define TT_MS_LANGID_SINDHI_PAKISTAN                   0x0859
-  /* Missing a LCID for Sindhi in Devanagari script */
 #define TT_MS_LANGID_SYRIAC_SYRIA                      0x045A
-#define TT_MS_LANGID_SINHALESE_SRI_LANKA               0x045B
-#define TT_MS_LANGID_CHEROKEE_UNITED_STATES            0x045C
+#define TT_MS_LANGID_SINHALA_SRI_LANKA                 0x045B
 #define TT_MS_LANGID_INUKTITUT_CANADA                  0x045D
+#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN            0x085D
 #define TT_MS_LANGID_AMHARIC_ETHIOPIA                  0x045E
-#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */    0x045F
-#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN           0x085F
-  /* Missing a LCID for Tifinagh script */
-#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */    0x0460
-  /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */
-  /* script is yet unclear... might be Arabic, Nagari or Sharada */
-#define TT_MS_LANGID_KASHMIRI_SASIA                    0x0860
-  /* ... and aliased (by MS) for compatibility reasons. */
-#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA
+#define TT_MS_LANGID_TAMAZIGHT_ALGERIA                 0x085F
 #define TT_MS_LANGID_NEPALI_NEPAL                      0x0461
-#define TT_MS_LANGID_NEPALI_INDIA                      0x0861
 #define TT_MS_LANGID_FRISIAN_NETHERLANDS               0x0462
 #define TT_MS_LANGID_PASHTO_AFGHANISTAN                0x0463
 #define TT_MS_LANGID_FILIPINO_PHILIPPINES              0x0464
 #define TT_MS_LANGID_DHIVEHI_MALDIVES                  0x0465
-  /* alias declared in Windows 2000 */
-#define TT_MS_LANGID_DIVEHI_MALDIVES  TT_MS_LANGID_DHIVEHI_MALDIVES
-#define TT_MS_LANGID_EDO_NIGERIA                       0x0466
-#define TT_MS_LANGID_FULFULDE_NIGERIA                  0x0467
 #define TT_MS_LANGID_HAUSA_NIGERIA                     0x0468
-#define TT_MS_LANGID_IBIBIO_NIGERIA                    0x0469
 #define TT_MS_LANGID_YORUBA_NIGERIA                    0x046A
 #define TT_MS_LANGID_QUECHUA_BOLIVIA                   0x046B
 #define TT_MS_LANGID_QUECHUA_ECUADOR                   0x086B
 #define TT_MS_LANGID_QUECHUA_PERU                      0x0C6B
-#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA               0x046C
-  /* Also spelled by XPsp2 Platform SDK (2004-07-26) */
-#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \
-          TT_MS_LANGID_SEPEDI_SOUTH_AFRICA
-  /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */
+#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA     0x046C
+#define TT_MS_LANGID_BASHKIR_RUSSIA                    0x046D
+#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG          0x046E
+#define TT_MS_LANGID_GREENLANDIC_GREENLAND             0x046F
 #define TT_MS_LANGID_IGBO_NIGERIA                      0x0470
+#define TT_MS_LANGID_YI_PRC                            0x0478
+#define TT_MS_LANGID_MAPUDUNGUN_CHILE                  0x047A
+#define TT_MS_LANGID_MOHAWK_MOHAWK                     0x047C
+#define TT_MS_LANGID_BRETON_FRANCE                     0x047E
+#define TT_MS_LANGID_UIGHUR_PRC                        0x0480
+#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481
+#define TT_MS_LANGID_OCCITAN_FRANCE                    0x0482
+#define TT_MS_LANGID_CORSICAN_FRANCE                   0x0483
+#define TT_MS_LANGID_ALSATIAN_FRANCE                   0x0484
+#define TT_MS_LANGID_YAKUT_RUSSIA                      0x0485
+#define TT_MS_LANGID_KICHE_GUATEMALA                   0x0486
+#define TT_MS_LANGID_KINYARWANDA_RWANDA                0x0487
+#define TT_MS_LANGID_WOLOF_SENEGAL                     0x0488
+#define TT_MS_LANGID_DARI_AFGHANISTAN                  0x048C
+
+  /* */
+
+
+  /* legacy macro definitions not present in OpenType 1.8.1 */
+#define TT_MS_LANGID_ARABIC_GENERAL                    0x0001
+#define TT_MS_LANGID_CATALAN_SPAIN \
+          TT_MS_LANGID_CATALAN_CATALAN
+#define TT_MS_LANGID_CHINESE_GENERAL                   0x0004
+#define TT_MS_LANGID_CHINESE_MACAU \
+          TT_MS_LANGID_CHINESE_MACAO
+#define TT_MS_LANGID_GERMAN_LIECHTENSTEI \
+          TT_MS_LANGID_GERMAN_LIECHTENSTEIN
+#define TT_MS_LANGID_ENGLISH_GENERAL                   0x0009
+#define TT_MS_LANGID_ENGLISH_INDONESIA                 0x3809
+#define TT_MS_LANGID_ENGLISH_HONG_KONG                 0x3C09
+#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT \
+          TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT
+#define TT_MS_LANGID_SPANISH_LATIN_AMERICA             0xE40AU
+#define TT_MS_LANGID_FRENCH_WEST_INDIES                0x1C0C
+#define TT_MS_LANGID_FRENCH_REUNION                    0x200C
+#define TT_MS_LANGID_FRENCH_CONGO                      0x240C
+  /* which was formerly: */
+#define TT_MS_LANGID_FRENCH_ZAIRE \
+          TT_MS_LANGID_FRENCH_CONGO
+#define TT_MS_LANGID_FRENCH_SENEGAL                    0x280C
+#define TT_MS_LANGID_FRENCH_CAMEROON                   0x2C0C
+#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE              0x300C
+#define TT_MS_LANGID_FRENCH_MALI                       0x340C
+#define TT_MS_LANGID_FRENCH_MOROCCO                    0x380C
+#define TT_MS_LANGID_FRENCH_HAITI                      0x3C0C
+#define TT_MS_LANGID_FRENCH_NORTH_AFRICA               0xE40CU
+#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA \
+          TT_MS_LANGID_KOREAN_KOREA
+#define TT_MS_LANGID_KOREAN_JOHAB_KOREA                0x0812
+#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND \
+          TT_MS_LANGID_ROMANSH_SWITZERLAND
+#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA                0x0818
+#define TT_MS_LANGID_RUSSIAN_MOLDAVIA                  0x0819
+#define TT_MS_LANGID_URDU_INDIA                        0x0820
+#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA      0x0827
+#define TT_MS_LANGID_SLOVENE_SLOVENIA \
+          TT_MS_LANGID_SLOVENIAN_SLOVENIA
+#define TT_MS_LANGID_FARSI_IRAN                        0x0429
+#define TT_MS_LANGID_BASQUE_SPAIN \
+          TT_MS_LANGID_BASQUE_BASQUE
+#define TT_MS_LANGID_SORBIAN_GERMANY \
+          TT_MS_LANGID_UPPER_SORBIAN_GERMANY
+#define TT_MS_LANGID_SUTU_SOUTH_AFRICA                 0x0430
+#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA               0x0431
+#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA \
+          TT_MS_LANGID_SETSWANA_SOUTH_AFRICA
+#define TT_MS_LANGID_VENDA_SOUTH_AFRICA                0x0433
+#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA \
+          TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA
+#define TT_MS_LANGID_ZULU_SOUTH_AFRICA \
+          TT_MS_LANGID_ISIZULU_SOUTH_AFRICA
+#define TT_MS_LANGID_SAAMI_LAPONIA                     0x043B
+  /* the next two values are incorrectly inverted */
+#define TT_MS_LANGID_IRISH_GAELIC_IRELAND              0x043C
+#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM    0x083C
+#define TT_MS_LANGID_YIDDISH_GERMANY                   0x043D
+#define TT_MS_LANGID_KAZAK_KAZAKSTAN \
+          TT_MS_LANGID_KAZAKH_KAZAKHSTAN
+#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \
+          TT_MS_LANGID_KYRGYZ_KYRGYZSTAN
+#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN \
+          TT_MS_LANGID_KYRGYZ_KYRGYZSTAN
+#define TT_MS_LANGID_SWAHILI_KENYA \
+          TT_MS_LANGID_KISWAHILI_KENYA
+#define TT_MS_LANGID_TATAR_TATARSTAN \
+          TT_MS_LANGID_TATAR_RUSSIA
+#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN           0x0846
+#define TT_MS_LANGID_ORIYA_INDIA \
+          TT_MS_LANGID_ODIA_INDIA
+#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN \
+          TT_MS_LANGID_MONGOLIAN_PRC
+#define TT_MS_LANGID_TIBETAN_CHINA \
+          TT_MS_LANGID_TIBETAN_PRC
+#define TT_MS_LANGID_DZONGHKA_BHUTAN                   0x0851
+#define TT_MS_LANGID_TIBETAN_BHUTAN \
+          TT_MS_LANGID_DZONGHKA_BHUTAN
+#define TT_MS_LANGID_WELSH_WALES \
+          TT_MS_LANGID_WELSH_UNITED_KINGDOM
+#define TT_MS_LANGID_BURMESE_MYANMAR                   0x0455
+#define TT_MS_LANGID_GALICIAN_SPAIN \
+          TT_MS_LANGID_GALICIAN_GALICIAN
+#define TT_MS_LANGID_MANIPURI_INDIA  /* Bengali */     0x0458
+#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */         0x0459
+#define TT_MS_LANGID_SINDHI_PAKISTAN                   0x0859
+#define TT_MS_LANGID_SINHALESE_SRI_LANKA \
+          TT_MS_LANGID_SINHALA_SRI_LANKA
+#define TT_MS_LANGID_CHEROKEE_UNITED_STATES            0x045C
+#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */    0x045F
+#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN \
+          TT_MS_LANGID_TAMAZIGHT_ALGERIA
+#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */    0x0460
+#define TT_MS_LANGID_KASHMIRI_SASIA                    0x0860
+#define TT_MS_LANGID_KASHMIRI_INDIA \
+          TT_MS_LANGID_KASHMIRI_SASIA
+#define TT_MS_LANGID_NEPALI_INDIA                      0x0861
+#define TT_MS_LANGID_DIVEHI_MALDIVES \
+          TT_MS_LANGID_DHIVEHI_MALDIVES
+#define TT_MS_LANGID_EDO_NIGERIA                       0x0466
+#define TT_MS_LANGID_FULFULDE_NIGERIA                  0x0467
+#define TT_MS_LANGID_IBIBIO_NIGERIA                    0x0469
+#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA \
+          TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA
+#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \
+          TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA
 #define TT_MS_LANGID_KANURI_NIGERIA                    0x0471
 #define TT_MS_LANGID_OROMO_ETHIOPIA                    0x0472
 #define TT_MS_LANGID_TIGRIGNA_ETHIOPIA                 0x0473
 #define TT_MS_LANGID_TIGRIGNA_ERYTHREA                 0x0873
-  /* also spelled in the `Passport SDK' list as: */
-#define TT_MS_LANGID_TIGRIGNA_ERYTREA  TT_MS_LANGID_TIGRIGNA_ERYTHREA
+#define TT_MS_LANGID_TIGRIGNA_ERYTREA \
+          TT_MS_LANGID_TIGRIGNA_ERYTHREA
 #define TT_MS_LANGID_GUARANI_PARAGUAY                  0x0474
 #define TT_MS_LANGID_HAWAIIAN_UNITED_STATES            0x0475
 #define TT_MS_LANGID_LATIN                             0x0476
 #define TT_MS_LANGID_SOMALI_SOMALIA                    0x0477
-  /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */
-  /*       not written (but OTOH the peculiar writing system is worth     */
-  /*       studying).                                                     */
-#define TT_MS_LANGID_YI_CHINA                          0x0478
+#define TT_MS_LANGID_YI_CHINA \
+          TT_MS_LANGID_YI_PRC
 #define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES   0x0479
-  /* language codes from 0x047A to 0x047F are (still) unknown. */
-#define TT_MS_LANGID_UIGHUR_CHINA                      0x0480
-#define TT_MS_LANGID_MAORI_NEW_ZEALAND                 0x0481
+#define TT_MS_LANGID_UIGHUR_CHINA \
+          TT_MS_LANGID_UIGHUR_PRC
 
-#if 0  /* not deemed useful for fonts */
-#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE            0x04FF
-#endif
 
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_NAME_ID_XXX
+   *
+   * @description:
+   *   Possible values of the `name' identifier field in the name records of
+   *   an SFNT `name' table.  These values are platform independent.
+   */
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* Possible values of the `name' identifier field in the name records of */
-  /* the TTF `name' table.  These values are platform independent.         */
-  /*                                                                       */
-#define TT_NAME_ID_COPYRIGHT            0
-#define TT_NAME_ID_FONT_FAMILY          1
-#define TT_NAME_ID_FONT_SUBFAMILY       2
-#define TT_NAME_ID_UNIQUE_ID            3
-#define TT_NAME_ID_FULL_NAME            4
-#define TT_NAME_ID_VERSION_STRING       5
-#define TT_NAME_ID_PS_NAME              6
-#define TT_NAME_ID_TRADEMARK            7
+#define TT_NAME_ID_COPYRIGHT              0
+#define TT_NAME_ID_FONT_FAMILY            1
+#define TT_NAME_ID_FONT_SUBFAMILY         2
+#define TT_NAME_ID_UNIQUE_ID              3
+#define TT_NAME_ID_FULL_NAME              4
+#define TT_NAME_ID_VERSION_STRING         5
+#define TT_NAME_ID_PS_NAME                6
+#define TT_NAME_ID_TRADEMARK              7
 
   /* the following values are from the OpenType spec */
-#define TT_NAME_ID_MANUFACTURER         8
-#define TT_NAME_ID_DESIGNER             9
-#define TT_NAME_ID_DESCRIPTION          10
-#define TT_NAME_ID_VENDOR_URL           11
-#define TT_NAME_ID_DESIGNER_URL         12
-#define TT_NAME_ID_LICENSE              13
-#define TT_NAME_ID_LICENSE_URL          14
+#define TT_NAME_ID_MANUFACTURER           8
+#define TT_NAME_ID_DESIGNER               9
+#define TT_NAME_ID_DESCRIPTION            10
+#define TT_NAME_ID_VENDOR_URL             11
+#define TT_NAME_ID_DESIGNER_URL           12
+#define TT_NAME_ID_LICENSE                13
+#define TT_NAME_ID_LICENSE_URL            14
   /* number 15 is reserved */
-#define TT_NAME_ID_PREFERRED_FAMILY     16
-#define TT_NAME_ID_PREFERRED_SUBFAMILY  17
-#define TT_NAME_ID_MAC_FULL_NAME        18
+#define TT_NAME_ID_TYPOGRAPHIC_FAMILY     16
+#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY  17
+#define TT_NAME_ID_MAC_FULL_NAME          18
 
   /* The following code is new as of 2000-01-21 */
-#define TT_NAME_ID_SAMPLE_TEXT          19
+#define TT_NAME_ID_SAMPLE_TEXT            19
 
   /* This is new in OpenType 1.3 */
-#define TT_NAME_ID_CID_FINDFONT_NAME    20
+#define TT_NAME_ID_CID_FINDFONT_NAME      20
 
   /* This is new in OpenType 1.5 */
-#define TT_NAME_ID_WWS_FAMILY           21
-#define TT_NAME_ID_WWS_SUBFAMILY        22
+#define TT_NAME_ID_WWS_FAMILY             21
+#define TT_NAME_ID_WWS_SUBFAMILY          22
 
+  /* This is new in OpenType 1.7 */
+#define TT_NAME_ID_LIGHT_BACKGROUND       23
+#define TT_NAME_ID_DARK_BACKGROUND        24
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table.     */
-  /*                                                                       */
-  /* Updated 08-Nov-2008.                                                  */
-  /*                                                                       */
+  /* This is new in OpenType 1.8 */
+#define TT_NAME_ID_VARIATIONS_PREFIX      25
+
+  /* these two values are deprecated */
+#define TT_NAME_ID_PREFERRED_FAMILY     TT_NAME_ID_TYPOGRAPHIC_FAMILY
+#define TT_NAME_ID_PREFERRED_SUBFAMILY  TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
+
+
+  /***********************************************************************
+   *
+   * @enum:
+   *   TT_UCR_XXX
+   *
+   * @description:
+   *   Possible bit mask values for the `ulUnicodeRangeX' fields in an SFNT
+   *   `OS/2' table.
+   */
+
+  /* ulUnicodeRange1 */
+  /* --------------- */
 
   /* Bit  0   Basic Latin */
 #define TT_UCR_BASIC_LATIN                     (1L <<  0) /* U+0020-U+007E */
@@ -857,7 +867,7 @@ FT_BEGIN_HEADER
                                                           /* U+A700-U+A71F */
   /* Bit  6   Combining Diacritical Marks            */
   /*          Combining Diacritical Marks Supplement */
-#define TT_UCR_COMBINING_DIACRITICS            (1L <<  6) /* U+0300-U+036F */
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS     (1L <<  6) /* U+0300-U+036F */
                                                           /* U+1DC0-U+1DFF */
   /* Bit  7   Greek and Coptic */
 #define TT_UCR_GREEK                           (1L <<  7) /* U+0370-U+03FF */
@@ -925,12 +935,17 @@ FT_BEGIN_HEADER
   /*          Supplemental Punctuation */
 #define TT_UCR_GENERAL_PUNCTUATION             (1L << 31) /* U+2000-U+206F */
                                                           /* U+2E00-U+2E7F */
+
+  /* ulUnicodeRange2 */
+  /* --------------- */
+
   /* Bit 32   Superscripts And Subscripts */
 #define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS         (1L <<  0) /* U+2070-U+209F */
   /* Bit 33   Currency Symbols */
 #define TT_UCR_CURRENCY_SYMBOLS                (1L <<  1) /* U+20A0-U+20CF */
   /* Bit 34   Combining Diacritical Marks For Symbols */
-#define TT_UCR_COMBINING_DIACRITICS_SYMB       (1L <<  2) /* U+20D0-U+20FF */
+#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
+                                               (1L <<  2) /* U+20D0-U+20FF */
   /* Bit 35   Letterlike Symbols */
 #define TT_UCR_LETTERLIKE_SYMBOLS              (1L <<  3) /* U+2100-U+214F */
   /* Bit 36   Number Forms */
@@ -996,13 +1011,13 @@ FT_BEGIN_HEADER
   /* Bit 57   High Surrogates              */
   /*          High Private Use Surrogates  */
   /*          Low Surrogates               */
-  /*                                       */
+
   /* According to OpenType specs v.1.3+,   */
   /* setting bit 57 implies that there is  */
   /* at least one codepoint beyond the     */
   /* Basic Multilingual Plane that is      */
   /* supported by this font.  So it really */
-  /* means >= U+10000                      */
+  /* means >= U+10000.                     */
 #define TT_UCR_SURROGATES                      (1L << 25) /* U+D800-U+DB7F */
                                                           /* U+DB80-U+DBFF */
                                                           /* U+DC00-U+DFFF */
@@ -1034,7 +1049,11 @@ FT_BEGIN_HEADER
   /* Bit 62   Alphabetic Presentation Forms */
 #define TT_UCR_ALPHABETIC_PRESENTATION_FORMS   (1L << 30) /* U+FB00-U+FB4F */
   /* Bit 63   Arabic Presentation Forms-A */
-#define TT_UCR_ARABIC_PRESENTATIONS_A          (1L << 31) /* U+FB50-U+FDFF */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_A     (1L << 31) /* U+FB50-U+FDFF */
+
+  /* ulUnicodeRange3 */
+  /* --------------- */
+
   /* Bit 64   Combining Half Marks */
 #define TT_UCR_COMBINING_HALF_MARKS            (1L <<  0) /* U+FE20-U+FE2F */
   /* Bit 65   Vertical forms          */
@@ -1044,7 +1063,7 @@ FT_BEGIN_HEADER
   /* Bit 66   Small Form Variants */
 #define TT_UCR_SMALL_FORM_VARIANTS             (1L <<  2) /* U+FE50-U+FE6F */
   /* Bit 67   Arabic Presentation Forms-B */
-#define TT_UCR_ARABIC_PRESENTATIONS_B          (1L <<  3) /* U+FE70-U+FEFE */
+#define TT_UCR_ARABIC_PRESENTATION_FORMS_B     (1L <<  3) /* U+FE70-U+FEFE */
   /* Bit 68   Halfwidth and Fullwidth Forms */
 #define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS       (1L <<  4) /* U+FF00-U+FFEF */
   /* Bit 69   Specials */
@@ -1123,6 +1142,10 @@ FT_BEGIN_HEADER
 #define TT_UCR_TAI_LE                          (1L << 30) /* U+1950-U+197F */
   /* Bit 95   New Tai Lue */
 #define TT_UCR_NEW_TAI_LUE                     (1L << 31) /* U+1980-U+19DF */
+
+  /* ulUnicodeRange4 */
+  /* --------------- */
+
   /* Bit 96   Buginese */
 #define TT_UCR_BUGINESE                        (1L <<  0) /* U+1A00-U+1A1F */
   /* Bit 97   Glagolitic */
@@ -1191,42 +1214,18 @@ FT_BEGIN_HEADER
                                                           /*U+1F000-U+1F02F*/
   /* Bit 123-127 Reserved for process-internal usage */
 
+  /* */
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* Some compilers have a very limited length of identifiers.             */
-  /*                                                                       */
-#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ )
-#define HAVE_LIMIT_ON_IDENTS
-#endif
-
-
-#ifndef HAVE_LIMIT_ON_IDENTS
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Here some alias #defines in order to be clearer.                      */
-  /*                                                                       */
-  /* These are not always #defined to stay within the 31~character limit,  */
-  /* which some compilers have.                                            */
-  /*                                                                       */
-  /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern  */
-  /* Borland compilers (read: from BC++ 3.1 on) can increase this limit.   */
-  /* If you get a warning with such a compiler, use the -i40 switch.       */
-  /*                                                                       */
-#define TT_UCR_ARABIC_PRESENTATION_FORMS_A      \
-         TT_UCR_ARABIC_PRESENTATIONS_A
-#define TT_UCR_ARABIC_PRESENTATION_FORMS_B      \
-         TT_UCR_ARABIC_PRESENTATIONS_B
-
-#define TT_UCR_COMBINING_DIACRITICAL_MARKS      \
-         TT_UCR_COMBINING_DIACRITICS
-#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \
-         TT_UCR_COMBINING_DIACRITICS_SYMB
-
+  /* for backward compatibility with older FreeType versions */
+#define TT_UCR_ARABIC_PRESENTATION_A         \
+          TT_UCR_ARABIC_PRESENTATION_FORMS_A
+#define TT_UCR_ARABIC_PRESENTATION_B         \
+          TT_UCR_ARABIC_PRESENTATION_FORMS_B
 
-#endif /* !HAVE_LIMIT_ON_IDENTS */
+#define TT_UCR_COMBINING_DIACRITICS          \
+          TT_UCR_COMBINING_DIACRITICAL_MARKS
+#define TT_UCR_COMBINING_DIACRITICS_SYMB          \
+          TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB
 
 
 FT_END_HEADER
index 1c075dc..5831204 100644 (file)
@@ -5,7 +5,7 @@
 /*    Basic SFNT/TrueType tables definitions and interface                 */
 /*    (specification only).                                                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -45,8 +45,9 @@ FT_BEGIN_HEADER
   /*    TrueType specific table types and functions.                       */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    This section contains the definition of TrueType-specific tables   */
-  /*    as well as some routines used to access and process them.          */
+  /*    This section contains definitions of some basic tables specific to */
+  /*    TrueType and OpenType as well as some routines used to access and  */
+  /*    process them.                                                      */
   /*                                                                       */
   /* <Order>                                                               */
   /*    TT_Header                                                          */
@@ -76,8 +77,8 @@ FT_BEGIN_HEADER
   /*    TT_Header                                                          */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model a TrueType font header table.  All       */
-  /*    fields follow the TrueType specification.                          */
+  /*    A structure to model a TrueType font header table.  All fields     */
+  /*    follow the OpenType specification.                                 */
   /*                                                                       */
   typedef struct  TT_Header_
   {
@@ -114,9 +115,9 @@ FT_BEGIN_HEADER
   /*    TT_HoriHeader                                                      */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model a TrueType horizontal header, the `hhea' */
+  /*    A structure to model a TrueType horizontal header, the `hhea'      */
   /*    table, as well as the corresponding horizontal metrics table,      */
-  /*    i.e., the `hmtx' table.                                            */
+  /*    `hmtx'.                                                            */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    Version                :: The table version.                       */
@@ -131,7 +132,7 @@ FT_BEGIN_HEADER
   /*                              glyphs found in the font (maybe ASCII).  */
   /*                                                                       */
   /*                              You should use the `sTypoAscender' field */
-  /*                              of the OS/2 table instead if you want    */
+  /*                              of the `OS/2' table instead if you want  */
   /*                              the correct one.                         */
   /*                                                                       */
   /*    Descender              :: The font's descender, i.e., the distance */
@@ -145,7 +146,7 @@ FT_BEGIN_HEADER
   /*                              glyphs found in the font (maybe ASCII).  */
   /*                                                                       */
   /*                              You should use the `sTypoDescender'      */
-  /*                              field of the OS/2 table instead if you   */
+  /*                              field of the `OS/2' table instead if you */
   /*                              want the correct one.                    */
   /*                                                                       */
   /*    Line_Gap               :: The font's line gap, i.e., the distance  */
@@ -175,6 +176,8 @@ FT_BEGIN_HEADER
   /*    caret_Slope_Run        :: The run coefficient of the cursor's      */
   /*                              slope.                                   */
   /*                                                                       */
+  /*    caret_Offset           :: The cursor's offset for slanted fonts.   */
+  /*                                                                       */
   /*    Reserved               :: 8~reserved bytes.                        */
   /*                                                                       */
   /*    metric_Data_Format     :: Always~0.                                */
@@ -188,13 +191,10 @@ FT_BEGIN_HEADER
   /*    short_metrics          :: A pointer into the `hmtx' table.         */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
-  /*               be identical except for the names of their fields,      */
-  /*               which are different.                                    */
-  /*                                                                       */
-  /*               This ensures that a single function in the `ttload'     */
-  /*               module is able to read both the horizontal and vertical */
-  /*               headers.                                                */
+  /*    For an OpenType variation font, the values of the following fields */
+  /*    can change after a call to @FT_Set_Var_Design_Coordinates (and     */
+  /*    friends) if the font contains an `MVAR' table: `caret_Slope_Rise', */
+  /*    `caret_Slope_Run', and `caret_Offset'.                             */
   /*                                                                       */
   typedef struct  TT_HoriHeader_
   {
@@ -217,9 +217,9 @@ FT_BEGIN_HEADER
     FT_Short   metric_Data_Format;
     FT_UShort  number_Of_HMetrics;
 
-    /* The following fields are not defined by the TrueType specification */
+    /* The following fields are not defined by the OpenType specification */
     /* but they are used to connect the metrics header to the relevant    */
-    /* `HMTX' table.                                                      */
+    /* `hmtx' table.                                                      */
 
     void*      long_metrics;
     void*      short_metrics;
@@ -234,8 +234,8 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Description>                                                         */
   /*    A structure used to model a TrueType vertical header, the `vhea'   */
-  /*    table, as well as the corresponding vertical metrics table, i.e.,  */
-  /*    the `vmtx' table.                                                  */
+  /*    table, as well as the corresponding vertical metrics table,        */
+  /*    `vmtx'.                                                            */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    Version                 :: The table version.                      */
@@ -251,8 +251,8 @@ FT_BEGIN_HEADER
   /*                               ASCII).                                 */
   /*                                                                       */
   /*                               You should use the `sTypoAscender'      */
-  /*                               field of the OS/2 table instead if you  */
-  /*                               want the correct one.                   */
+  /*                               field of the `OS/2' table instead if    */
+  /*                               you want the correct one.               */
   /*                                                                       */
   /*    Descender               :: The font's descender, i.e., the         */
   /*                               distance from the baseline to the       */
@@ -266,8 +266,8 @@ FT_BEGIN_HEADER
   /*                               ASCII).                                 */
   /*                                                                       */
   /*                               You should use the `sTypoDescender'     */
-  /*                               field of the OS/2 table instead if you  */
-  /*                               want the correct one.                   */
+  /*                               field of the `OS/2' table instead if    */
+  /*                               you want the correct one.               */
   /*                                                                       */
   /*    Line_Gap                :: The font's line gap, i.e., the distance */
   /*                               to add to the ascender and descender to */
@@ -297,30 +297,26 @@ FT_BEGIN_HEADER
   /*                               slope.                                  */
   /*                                                                       */
   /*    caret_Offset            :: The cursor's offset for slanted fonts.  */
-  /*                               This value is `reserved' in vmtx        */
-  /*                               version 1.0.                            */
   /*                                                                       */
   /*    Reserved                :: 8~reserved bytes.                       */
   /*                                                                       */
   /*    metric_Data_Format      :: Always~0.                               */
   /*                                                                       */
-  /*    number_Of_HMetrics      :: Number of VMetrics entries in the       */
+  /*    number_Of_VMetrics      :: Number of VMetrics entries in the       */
   /*                               `vmtx' table -- this value can be       */
   /*                               smaller than the total number of glyphs */
   /*                               in the font.                            */
   /*                                                                       */
-  /*    long_metrics           :: A pointer into the `vmtx' table.         */
+  /*    long_metrics            :: A pointer into the `vmtx' table.        */
   /*                                                                       */
-  /*    short_metrics          :: A pointer into the `vmtx' table.         */
+  /*    short_metrics           :: A pointer into the `vmtx' table.        */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
-  /*               be identical except for the names of their fields,      */
-  /*               which are different.                                    */
-  /*                                                                       */
-  /*               This ensures that a single function in the `ttload'     */
-  /*               module is able to read both the horizontal and vertical */
-  /*               headers.                                                */
+  /*    For an OpenType variation font, the values of the following fields */
+  /*    can change after a call to @FT_Set_Var_Design_Coordinates (and     */
+  /*    friends) if the font contains an `MVAR' table: `Ascender',         */
+  /*    `Descender', `Line_Gap', `caret_Slope_Rise', `caret_Slope_Run',    */
+  /*    and `caret_Offset'.                                                */
   /*                                                                       */
   typedef struct  TT_VertHeader_
   {
@@ -331,9 +327,9 @@ FT_BEGIN_HEADER
 
     FT_UShort  advance_Height_Max;      /* advance height maximum */
 
-    FT_Short   min_Top_Side_Bearing;    /* minimum left-sb or top-sb       */
-    FT_Short   min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb   */
-    FT_Short   yMax_Extent;             /* xmax or ymax extents            */
+    FT_Short   min_Top_Side_Bearing;    /* minimum top-sb          */
+    FT_Short   min_Bottom_Side_Bearing; /* minimum bottom-sb       */
+    FT_Short   yMax_Extent;             /* ymax extents            */
     FT_Short   caret_Slope_Rise;
     FT_Short   caret_Slope_Run;
     FT_Short   caret_Offset;
@@ -343,9 +339,9 @@ FT_BEGIN_HEADER
     FT_Short   metric_Data_Format;
     FT_UShort  number_Of_VMetrics;
 
-    /* The following fields are not defined by the TrueType specification */
-    /* but they're used to connect the metrics header to the relevant     */
-    /* `HMTX' or `VMTX' table.                                            */
+    /* The following fields are not defined by the OpenType specification */
+    /* but they are used to connect the metrics header to the relevant    */
+    /* `vmtx' table.                                                      */
 
     void*      long_metrics;
     void*      short_metrics;
@@ -359,12 +355,28 @@ FT_BEGIN_HEADER
   /*    TT_OS2                                                             */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model a TrueType OS/2 table.  All fields       */
-  /*    comply to the OpenType specification.                              */
+  /*    A structure to model a TrueType `OS/2' table.  All fields comply   */
+  /*    to the OpenType specification.                                     */
+  /*                                                                       */
+  /*    Note that we now support old Mac fonts that do not include an      */
+  /*    `OS/2' table.  In this case, the `version' field is always set to  */
+  /*    0xFFFF.                                                            */
   /*                                                                       */
-  /*    Note that we now support old Mac fonts that do not include an OS/2 */
-  /*    table.  In this case, the `version' field is always set to 0xFFFF. */
+  /* <Note>                                                                */
+  /*    For an OpenType variation font, the values of the following fields */
+  /*    can change after a call to @FT_Set_Var_Design_Coordinates (and     */
+  /*    friends) if the font contains an `MVAR' table: `sCapHeight',       */
+  /*    `sTypoAscender', `sTypoDescender', `sTypoLineGap', `sxHeight',     */
+  /*    `usWinAscent', `usWinDescent', `yStrikeoutPosition',               */
+  /*    `yStrikeoutSize', `ySubscriptXOffset', `ySubScriptXSize',          */
+  /*    `ySubscriptYOffset', `ySubscriptYSize', `ySuperscriptXOffset',     */
+  /*    `ySuperscriptXSize', `ySuperscriptYOffset', and                    */
+  /*    `ySuperscriptYSize'.                                               */
+  /*                                                                       */
+  /*    Possible values for bits in the `ulUnicodeRangeX' fields are given */
+  /*    by the @TT_UCR_XXX macros.                                         */
   /*                                                                       */
+
   typedef struct  TT_OS2_
   {
     FT_UShort  version;                /* 0x0001 - more or 0xFFFF */
@@ -429,10 +441,16 @@ FT_BEGIN_HEADER
   /*    TT_Postscript                                                      */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model a TrueType PostScript table.  All fields */
-  /*    comply to the TrueType specification.  This structure does not     */
-  /*    reference the PostScript glyph names, which can be nevertheless    */
-  /*    accessed with the `ttpost' module.                                 */
+  /*    A structure to model a TrueType `post' table.  All fields comply   */
+  /*    to the OpenType specification.  This structure does not reference  */
+  /*    a font's PostScript glyph names; use @FT_Get_Glyph_Name to         */
+  /*    retrieve them.                                                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    For an OpenType variation font, the values of the following fields */
+  /*    can change after a call to @FT_Set_Var_Design_Coordinates (and     */
+  /*    friends) if the font contains an `MVAR' table: `underlinePosition' */
+  /*    and `underlineThickness'.                                          */
   /*                                                                       */
   typedef struct  TT_Postscript_
   {
@@ -446,8 +464,8 @@ FT_BEGIN_HEADER
     FT_ULong  minMemType1;
     FT_ULong  maxMemType1;
 
-    /* Glyph names follow in the file, but we don't   */
-    /* load them by default.  See the ttpost.c file.  */
+    /* Glyph names follow in the `post' table, but we don't */
+    /* load them by default.                                */
 
   } TT_Postscript;
 
@@ -458,8 +476,8 @@ FT_BEGIN_HEADER
   /*    TT_PCLT                                                            */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model a TrueType PCLT table.  All fields       */
-  /*    comply to the TrueType specification.                              */
+  /*    A structure to model a TrueType `PCLT' table.  All fields comply   */
+  /*    to the OpenType specification.                                     */
   /*                                                                       */
   typedef struct  TT_PCLT_
   {
@@ -488,9 +506,9 @@ FT_BEGIN_HEADER
   /*    TT_MaxProfile                                                      */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    The maximum profile is a table containing many max values, which   */
-  /*    can be used to pre-allocate arrays.  This ensures that no memory   */
-  /*    allocation occurs during a glyph load.                             */
+  /*    The maximum profile (`maxp') table contains many max values, which */
+  /*    can be used to pre-allocate arrays for speeding up glyph loading   */
+  /*    and hinting.                                                       */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    version               :: The version number.                       */
@@ -500,21 +518,19 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    maxPoints             :: The maximum number of points in a         */
   /*                             non-composite TrueType glyph.  See also   */
-  /*                             the structure element                     */
   /*                             `maxCompositePoints'.                     */
   /*                                                                       */
   /*    maxContours           :: The maximum number of contours in a       */
   /*                             non-composite TrueType glyph.  See also   */
-  /*                             the structure element                     */
   /*                             `maxCompositeContours'.                   */
   /*                                                                       */
   /*    maxCompositePoints    :: The maximum number of points in a         */
-  /*                             composite TrueType glyph.  See also the   */
-  /*                             structure element `maxPoints'.            */
+  /*                             composite TrueType glyph.  See also       */
+  /*                             `maxPoints'.                              */
   /*                                                                       */
   /*    maxCompositeContours  :: The maximum number of contours in a       */
-  /*                             composite TrueType glyph.  See also the   */
-  /*                             structure element `maxContours'.          */
+  /*                             composite TrueType glyph.  See also       */
+  /*                             `maxContours'.                            */
   /*                                                                       */
   /*    maxZones              :: The maximum number of zones used for      */
   /*                             glyph hinting.                            */
@@ -575,8 +591,9 @@ FT_BEGIN_HEADER
   /*    FT_Sfnt_Tag                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    An enumeration used to specify the index of an SFNT table.         */
-  /*    Used in the @FT_Get_Sfnt_Table API function.                       */
+  /*    An enumeration to specify indices of SFNT tables loaded and parsed */
+  /*    by FreeType during initialization of an SFNT font.  Used in the    */
+  /*    @FT_Get_Sfnt_Table API function.                                   */
   /*                                                                       */
   /* <Values>                                                              */
   /*    FT_SFNT_HEAD :: To access the font's @TT_Header structure.         */
@@ -624,7 +641,7 @@ FT_BEGIN_HEADER
   /*    FT_Get_Sfnt_Table                                                  */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Return a pointer to a given SFNT table within a face.              */
+  /*    Return a pointer to a given SFNT table stored within a face.       */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face :: A handle to the source.                                    */
@@ -632,7 +649,7 @@ FT_BEGIN_HEADER
   /*    tag  :: The index of the SFNT table.                               */
   /*                                                                       */
   /* <Return>                                                              */
-  /*    A type-less pointer to the table.  This will be~0 in case of       */
+  /*    A type-less pointer to the table.  This will be NULL in case of    */
   /*    error, or if the corresponding table was not found *OR* loaded     */
   /*    from the file.                                                     */
   /*                                                                       */
@@ -661,70 +678,70 @@ FT_BEGIN_HEADER
                      FT_Sfnt_Tag  tag );
 
 
- /**************************************************************************
-  *
-  * @function:
-  *   FT_Load_Sfnt_Table
-  *
-  * @description:
-  *   Load any font table into client memory.
-  *
-  * @input:
-  *   face ::
-  *     A handle to the source face.
-  *
-  *   tag ::
-  *     The four-byte tag of the table to load.  Use the value~0 if you want
-  *     to access the whole font file.  Otherwise, you can use one of the
-  *     definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
-  *     one with @FT_MAKE_TAG.
-  *
-  *   offset ::
-  *     The starting offset in the table (or file if tag == 0).
-  *
-  * @output:
-  *   buffer ::
-  *     The target buffer address.  The client must ensure that the memory
-  *     array is big enough to hold the data.
-  *
-  * @inout:
-  *   length ::
-  *     If the `length' parameter is NULL, then try to load the whole table.
-  *     Return an error code if it fails.
-  *
-  *     Else, if `*length' is~0, exit immediately while returning the
-  *     table's (or file) full size in it.
-  *
-  *     Else the number of bytes to read from the table or file, from the
-  *     starting offset.
-  *
-  * @return:
-  *   FreeType error code.  0~means success.
-  *
-  * @note:
-  *   If you need to determine the table's length you should first call this
-  *   function with `*length' set to~0, as in the following example:
-  *
-  *     {
-  *       FT_ULong  length = 0;
-  *
-  *
-  *       error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
-  *       if ( error ) { ... table does not exist ... }
-  *
-  *       buffer = malloc( length );
-  *       if ( buffer == NULL ) { ... not enough memory ... }
-  *
-  *       error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
-  *       if ( error ) { ... could not load table ... }
-  *     }
-  *
-  *   Note that structures like @TT_Header or @TT_OS2 can't be used with
-  *   this function; they are limited to @FT_Get_Sfnt_Table.  Reason is that
-  *   those structures depend on the processor architecture, with varying
-  *   size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).
-  *
-  */
 /**************************************************************************
+   *
+   * @function:
+   *   FT_Load_Sfnt_Table
+   *
+   * @description:
+   *   Load any SFNT font table into client memory.
+   *
+   * @input:
+   *   face ::
+   *     A handle to the source face.
+   *
+   *   tag ::
+   *     The four-byte tag of the table to load.  Use value~0 if you want
+   *     to access the whole font file.  Otherwise, you can use one of the
+   *     definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
+   *     one with @FT_MAKE_TAG.
+   *
+   *   offset ::
+   *     The starting offset in the table (or file if tag~==~0).
+   *
+   * @output:
+   *   buffer ::
+   *     The target buffer address.  The client must ensure that the memory
+   *     array is big enough to hold the data.
+   *
+   * @inout:
+   *   length ::
+   *     If the `length' parameter is NULL, try to load the whole table.
+   *     Return an error code if it fails.
+   *
+   *     Else, if `*length' is~0, exit immediately while returning the
+   *     table's (or file) full size in it.
+   *
+   *     Else the number of bytes to read from the table or file, from the
+   *     starting offset.
+   *
+   * @return:
+   *   FreeType error code.  0~means success.
+   *
+   * @note:
+   *   If you need to determine the table's length you should first call this
+   *   function with `*length' set to~0, as in the following example:
+   *
+   *     {
+   *       FT_ULong  length = 0;
+   *
+   *
+   *       error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
+   *       if ( error ) { ... table does not exist ... }
+   *
+   *       buffer = malloc( length );
+   *       if ( buffer == NULL ) { ... not enough memory ... }
+   *
+   *       error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
+   *       if ( error ) { ... could not load table ... }
+   *     }
+   *
+   *   Note that structures like @TT_Header or @TT_OS2 can't be used with
+   *   this function; they are limited to @FT_Get_Sfnt_Table.  Reason is that
+   *   those structures depend on the processor architecture, with varying
+   *   size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian).
+   *
+   */
   FT_EXPORT( FT_Error )
   FT_Load_Sfnt_Table( FT_Face    face,
                       FT_ULong   tag,
@@ -733,41 +750,41 @@ FT_BEGIN_HEADER
                       FT_ULong*  length );
 
 
- /**************************************************************************
-  *
-  * @function:
-  *   FT_Sfnt_Table_Info
-  *
-  * @description:
-  *   Return information on an SFNT table.
-  *
-  * @input:
-  *   face ::
-  *     A handle to the source face.
-  *
-  *   table_index ::
-  *     The index of an SFNT table.  The function returns
-  *     FT_Err_Table_Missing for an invalid value.
-  *
-  * @inout:
-  *   tag ::
-  *     The name tag of the SFNT table.  If the value is NULL, `table_index'
-  *     is ignored, and `length' returns the number of SFNT tables in the
-  *     font.
-  *
-  * @output:
-  *   length ::
-  *     The length of the SFNT table (or the number of SFNT tables, depending
-  *     on `tag').
-  *
-  * @return:
-  *   FreeType error code.  0~means success.
-  *
-  * @note:
-  *   While parsing fonts, FreeType handles SFNT tables with length zero as
-  *   missing.
-  *
-  */
 /**************************************************************************
+   *
+   * @function:
+   *   FT_Sfnt_Table_Info
+   *
+   * @description:
+   *   Return information on an SFNT table.
+   *
+   * @input:
+   *   face ::
+   *     A handle to the source face.
+   *
+   *   table_index ::
+   *     The index of an SFNT table.  The function returns
+   *     FT_Err_Table_Missing for an invalid value.
+   *
+   * @inout:
+   *   tag ::
+   *     The name tag of the SFNT table.  If the value is NULL, `table_index'
+   *     is ignored, and `length' returns the number of SFNT tables in the
+   *     font.
+   *
+   * @output:
+   *   length ::
+   *     The length of the SFNT table (or the number of SFNT tables, depending
+   *     on `tag').
+   *
+   * @return:
+   *   FreeType error code.  0~means success.
+   *
+   * @note:
+   *   While parsing fonts, FreeType handles SFNT tables with length zero as
+   *   missing.
+   *
+   */
   FT_EXPORT( FT_Error )
   FT_Sfnt_Table_Info( FT_Face    face,
                       FT_UInt    table_index,
@@ -781,16 +798,16 @@ FT_BEGIN_HEADER
   /*    FT_Get_CMap_Language_ID                                            */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Return TrueType/sfnt specific cmap language ID.  Definitions of    */
-  /*    language ID values are in `ttnameid.h'.                            */
+  /*    Return cmap language ID as specified in the OpenType standard.     */
+  /*    Definitions of language ID values are in file @FT_TRUETYPE_IDS_H.  */
   /*                                                                       */
   /* <Input>                                                               */
   /*    charmap ::                                                         */
   /*      The target charmap.                                              */
   /*                                                                       */
   /* <Return>                                                              */
-  /*    The language ID of `charmap'.  If `charmap' doesn't belong to a    */
-  /*    TrueType/sfnt face, just return~0 as the default value.            */
+  /*    The language ID of `charmap'.  If `charmap' doesn't belong to an   */
+  /*    SFNT face, just return~0 as the default value.                     */
   /*                                                                       */
   /*    For a format~14 cmap (to access Unicode IVS), the return value is  */
   /*    0xFFFFFFFF.                                                        */
@@ -805,15 +822,15 @@ FT_BEGIN_HEADER
   /*    FT_Get_CMap_Format                                                 */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Return TrueType/sfnt specific cmap format.                         */
+  /*    Return the format of an SFNT `cmap' table.                         */
   /*                                                                       */
   /* <Input>                                                               */
   /*    charmap ::                                                         */
   /*      The target charmap.                                              */
   /*                                                                       */
   /* <Return>                                                              */
-  /*    The format of `charmap'.  If `charmap' doesn't belong to a         */
-  /*    TrueType/sfnt face, return -1.                                     */
+  /*    The format of `charmap'.  If `charmap' doesn't belong to an SFNT   */
+  /*    face, return -1.                                                   */
   /*                                                                       */
   FT_EXPORT( FT_Long )
   FT_Get_CMap_Format( FT_CharMap  charmap );
index f3c9aa5..32eb2fd 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Tags for TrueType and OpenType tables (specification only).          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -43,6 +43,7 @@ FT_BEGIN_HEADER
 #define TTAG_CBDT  FT_MAKE_TAG( 'C', 'B', 'D', 'T' )
 #define TTAG_CBLC  FT_MAKE_TAG( 'C', 'B', 'L', 'C' )
 #define TTAG_CFF   FT_MAKE_TAG( 'C', 'F', 'F', ' ' )
+#define TTAG_CFF2  FT_MAKE_TAG( 'C', 'F', 'F', '2' )
 #define TTAG_CID   FT_MAKE_TAG( 'C', 'I', 'D', ' ' )
 #define TTAG_cmap  FT_MAKE_TAG( 'c', 'm', 'a', 'p' )
 #define TTAG_cvar  FT_MAKE_TAG( 'c', 'v', 'a', 'r' )
@@ -61,6 +62,7 @@ FT_BEGIN_HEADER
 #define TTAG_GPOS  FT_MAKE_TAG( 'G', 'P', 'O', 'S' )
 #define TTAG_GSUB  FT_MAKE_TAG( 'G', 'S', 'U', 'B' )
 #define TTAG_gvar  FT_MAKE_TAG( 'g', 'v', 'a', 'r' )
+#define TTAG_HVAR  FT_MAKE_TAG( 'H', 'V', 'A', 'R' )
 #define TTAG_hdmx  FT_MAKE_TAG( 'h', 'd', 'm', 'x' )
 #define TTAG_head  FT_MAKE_TAG( 'h', 'e', 'a', 'd' )
 #define TTAG_hhea  FT_MAKE_TAG( 'h', 'h', 'e', 'a' )
@@ -79,6 +81,7 @@ FT_BEGIN_HEADER
 #define TTAG_MMSD  FT_MAKE_TAG( 'M', 'M', 'S', 'D' )
 #define TTAG_mort  FT_MAKE_TAG( 'm', 'o', 'r', 't' )
 #define TTAG_morx  FT_MAKE_TAG( 'm', 'o', 'r', 'x' )
+#define TTAG_MVAR  FT_MAKE_TAG( 'M', 'V', 'A', 'R' )
 #define TTAG_name  FT_MAKE_TAG( 'n', 'a', 'm', 'e' )
 #define TTAG_opbd  FT_MAKE_TAG( 'o', 'p', 'b', 'd' )
 #define TTAG_OS2   FT_MAKE_TAG( 'O', 'S', '/', '2' )
@@ -100,6 +103,7 @@ FT_BEGIN_HEADER
 #define TTAG_VDMX  FT_MAKE_TAG( 'V', 'D', 'M', 'X' )
 #define TTAG_vhea  FT_MAKE_TAG( 'v', 'h', 'e', 'a' )
 #define TTAG_vmtx  FT_MAKE_TAG( 'v', 'm', 't', 'x' )
+#define TTAG_VVAR  FT_MAKE_TAG( 'V', 'V', 'A', 'R' )
 #define TTAG_wOFF  FT_MAKE_TAG( 'w', 'O', 'F', 'F' )
 
 
index ca4676b..f5e4170 100644 (file)
@@ -3,9 +3,9 @@
 /*  ttunpat.h                                                              */
 /*                                                                         */
 /*    Definitions for the unpatented TrueType hinting system.              */
-/*    Obsolete, retained for backwards compatibility.                      */
+/*    Obsolete, retained for backward compatibility.                       */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  Written by Graham Asher <graham.asher@btinternet.com>                  */
index c89cb46..e7d808f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType 2 build and setup macros.                                   */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d677565..517111e 100644 (file)
@@ -1,6 +1,6 @@
 # modules.cfg
 #
-# Copyright 2005-2016 by
+# Copyright 2005-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -37,6 +37,7 @@ FONT_MODULES += truetype
 # PostScript Type 1 font driver.
 #
 # This driver needs the `psaux', `pshinter', and `psnames' modules.
+# No FT_CONFIG_OPTION_PIC support.
 FONT_MODULES += type1
 
 # CFF/OpenType font driver.
@@ -47,24 +48,30 @@ FONT_MODULES += cff
 # Type 1 CID-keyed font driver.
 #
 # This driver needs the `psaux', `pshinter', and `psnames' modules.
+# No FT_CONFIG_OPTION_PIC support.
 FONT_MODULES += cid
 
 # PFR/TrueDoc font driver.  See optional extension ftpfr.c below also.
+# No FT_CONFIG_OPTION_PIC support.
 FONT_MODULES += pfr
 
 # PostScript Type 42 font driver.
 #
 # This driver needs the `truetype' and `psaux' modules.
+# No FT_CONFIG_OPTION_PIC support.
 FONT_MODULES += type42
 
 # Windows FONT/FNT font driver.  See optional extension ftwinfnt.c below
 # also.
+# No FT_CONFIG_OPTION_PIC support.
 FONT_MODULES += winfonts
 
 # PCF font driver.
+# No FT_CONFIG_OPTION_PIC support.
 FONT_MODULES += pcf
 
 # BDF font driver.  See optional extension ftbdf.c below also.
+# No FT_CONFIG_OPTION_PIC support.
 FONT_MODULES += bdf
 
 # SFNT files support.  If used without `truetype' or `cff', it supports
@@ -107,33 +114,41 @@ RASTER_MODULES += smooth
 # FreeType's cache sub-system (quite stable but still in beta -- this means
 # that its public API is subject to change if necessary).  See
 # include/freetype/ftcache.h.  Needs ftglyph.c.
+# No FT_CONFIG_OPTION_PIC support.
 AUX_MODULES += cache
 
 # TrueType GX/AAT table validation.  Needs ftgxval.c below.
+#
+# No FT_CONFIG_OPTION_PIC support.
 # AUX_MODULES += gxvalid
 
 # Support for streams compressed with gzip (files with suffix .gz).
 #
 # See include/freetype/ftgzip.h for the API.
+# No FT_CONFIG_OPTION_PIC support.
 AUX_MODULES += gzip
 
 # Support for streams compressed with LZW (files with suffix .Z).
 #
 # See include/freetype/ftlzw.h for the API.
+# No FT_CONFIG_OPTION_PIC support.
 AUX_MODULES += lzw
 
 # Support for streams compressed with bzip2 (files with suffix .bz2).
 #
 # See include/freetype/ftbzip2.h for the API.
+# No FT_CONFIG_OPTION_PIC support.
 AUX_MODULES += bzip2
 
 # OpenType table validation.  Needs ftotval.c below.
 #
+# No FT_CONFIG_OPTION_PIC support.
 # AUX_MODULES += otvalid
 
 # Auxiliary PostScript driver component to share common code.
 #
 # This module depends on `psnames'.
+# No FT_CONFIG_OPTION_PIC support.
 AUX_MODULES += psaux
 
 # Support for PostScript glyph names.
@@ -223,7 +238,7 @@ BASE_EXTENSIONS += ftpfr.c
 # See include/freetype/ftstroke.h for the API.
 BASE_EXTENSIONS += ftstroke.c
 
-# Support for synthetic embolding and slanting of fonts.  Needs ftbitmap.c.
+# Support for synthetic emboldening and slanting of fonts.  Needs ftbitmap.c.
 #
 # See include/freetype/ftsynth.h for the API.
 BASE_EXTENSIONS += ftsynth.c
index ebc0369..c0bc022 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 638b229..9a3dc8a 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/autofit Jamfile
 #
-# Copyright 2003-2016 by
+# Copyright 2003-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index b856e57..ccdae84 100644 (file)
@@ -5,7 +5,7 @@
 /*    Routines used to compute vector angles with limited accuracy         */
 /*    and very high speed.  It also contains sorting routines (body).      */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 95786ed..a00c3a0 100644 (file)
@@ -7,7 +7,7 @@
 /*                                                                         */
 /*    Auto-fitter data for blue strings (body).                            */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   af_blue_strings[] =
   {
     /* */
+    '\xF0', '\x9E', '\xA4', '\x8C', ' ', '\xF0', '\x9E', '\xA4', '\x85', ' ', '\xF0', '\x9E', '\xA4', '\x88', ' ', '\xF0', '\x9E', '\xA4', '\x8F', ' ', '\xF0', '\x9E', '\xA4', '\x94', ' ', '\xF0', '\x9E', '\xA4', '\x9A',  /* 𞤌 𞤅 𞤈 𞤏 𞤔 𞤚 */
+    '\0',
+    '\xF0', '\x9E', '\xA4', '\x82', ' ', '\xF0', '\x9E', '\xA4', '\x96',  /* 𞤂 𞤖 */
+    '\0',
+    '\xF0', '\x9E', '\xA4', '\xAC', ' ', '\xF0', '\x9E', '\xA4', '\xAE', ' ', '\xF0', '\x9E', '\xA4', '\xBB', ' ', '\xF0', '\x9E', '\xA4', '\xBC', ' ', '\xF0', '\x9E', '\xA4', '\xBE',  /* 𞤬 𞤮 𞤻 𞤼 𞤾 */
+    '\0',
+    '\xF0', '\x9E', '\xA4', '\xA4', ' ', '\xF0', '\x9E', '\xA4', '\xA8', ' ', '\xF0', '\x9E', '\xA4', '\xA9', ' ', '\xF0', '\x9E', '\xA4', '\xAD', ' ', '\xF0', '\x9E', '\xA4', '\xB4', ' ', '\xF0', '\x9E', '\xA4', '\xB8', ' ', '\xF0', '\x9E', '\xA4', '\xBA', ' ', '\xF0', '\x9E', '\xA5', '\x80',  /* 𞤤 𞤨 𞤩 𞤭 𞤴 𞤸 𞤺 𞥀 */
+    '\0',
     '\xD8', '\xA7', ' ', '\xD8', '\xA5', ' ', '\xD9', '\x84', ' ', '\xD9', '\x83', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8',  /* ا إ ل ك ط ظ */
     '\0',
     '\xD8', '\xAA', ' ', '\xD8', '\xAB', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', ' ', '\xD9', '\x83',  /* ت ث ط ظ ك */
     '\0',
     '\xD9', '\x80',  /* ـ */
     '\0',
-    '\xD4', '\xB1', ' ', '\xD5', '\x84', ' ', '\xD5', '\x92', ' ', '\xD5', '\x93', ' ', '\xD4', '\xB2', ' ', '\xD4', '\xB3', ' ', '\xD4', '\xB4', ' ', '\xD5', '\x95',  /* Ա Մ Ւ Փ Բ Գ Դ Օ */
+    '\xD4', '\xB1', ' ', '\xD5', '\x84', ' ', '\xD5', '\x92', ' ', '\xD5', '\x8D', ' ', '\xD4', '\xB2', ' ', '\xD4', '\xB3', ' ', '\xD4', '\xB4', ' ', '\xD5', '\x95',  /* Ա Մ Ւ Ս Բ Գ Դ Օ */
     '\0',
-    '\xD5', '\x92', ' ', '\xD5', '\x88', ' ', '\xD5', '\x93', ' ', '\xD5', '\x83', ' ', '\xD5', '\x87', ' ', '\xD5', '\x8D', ' ', '\xD5', '\x8F', ' ', '\xD5', '\x95',  /* Ւ Ո Փ Ճ Շ Ս Տ Օ */
+    '\xD5', '\x92', ' ', '\xD5', '\x88', ' ', '\xD4', '\xB4', ' ', '\xD5', '\x83', ' ', '\xD5', '\x87', ' ', '\xD5', '\x8D', ' ', '\xD5', '\x8F', ' ', '\xD5', '\x95',  /* Ւ Ո Դ Ճ Շ Ս Տ Օ */
     '\0',
-    '\xD5', '\xA5', ' ', '\xD5', '\xA7', ' ', '\xD5', '\xAB', ' ', '\xD5', '\xB4', ' ', '\xD5', '\xBE', ' ', '\xD6', '\x83', ' ', '\xD6', '\x86', ' ', '\xD6', '\x83',  /* ե է ի մ վ փ ֆ փ */
+    '\xD5', '\xA5', ' ', '\xD5', '\xA7', ' ', '\xD5', '\xAB', ' ', '\xD5', '\xB4', ' ', '\xD5', '\xBE', ' ', '\xD6', '\x86', ' ', '\xD5', '\xB3',  /* ե է ի մ վ ֆ ճ */
     '\0',
-    '\xD5', '\xA1', ' ', '\xD5', '\xB5', ' ', '\xD6', '\x82', ' ', '\xD5', '\xBD', ' ', '\xD5', '\xA3', ' ', '\xD5', '\xBB', ' ', '\xD6', '\x80', ' ', '\xD6', '\x85',  /* ա յ ւ ս գ ջ ր օ */
+    '\xD5', '\xA1', ' ', '\xD5', '\xB5', ' ', '\xD6', '\x82', ' ', '\xD5', '\xBD', ' ', '\xD5', '\xA3', ' ', '\xD5', '\xB7', ' ', '\xD6', '\x80', ' ', '\xD6', '\x85',  /* ա յ ւ ս գ շ ր օ */
     '\0',
     '\xD5', '\xB0', ' ', '\xD5', '\xB8', ' ', '\xD5', '\xB3', ' ', '\xD5', '\xA1', ' ', '\xD5', '\xA5', ' ', '\xD5', '\xAE', ' ', '\xD5', '\xBD', ' ', '\xD6', '\x85',  /* հ ո ճ ա ե ծ ս օ */
     '\0',
     '\xD5', '\xA2', ' ', '\xD5', '\xA8', ' ', '\xD5', '\xAB', ' ', '\xD5', '\xAC', ' ', '\xD5', '\xB2', ' ', '\xD5', '\xBA', ' ', '\xD6', '\x83', ' ', '\xD6', '\x81',  /* բ ը ի լ ղ պ փ ց */
     '\0',
+    '\xF0', '\x90', '\xAC', '\x80', ' ', '\xF0', '\x90', '\xAC', '\x81', ' ', '\xF0', '\x90', '\xAC', '\x90', ' ', '\xF0', '\x90', '\xAC', '\x9B',  /* 𐬀 𐬁 𐬐 𐬛 */
+    '\0',
+    '\xF0', '\x90', '\xAC', '\x80', ' ', '\xF0', '\x90', '\xAC', '\x81',  /* 𐬀 𐬁 */
+    '\0',
+    '\xEA', '\x9A', '\xA7', ' ', '\xEA', '\x9A', '\xA8', ' ', '\xEA', '\x9B', '\x9B', ' ', '\xEA', '\x9B', '\x89', ' ', '\xEA', '\x9B', '\x81', ' ', '\xEA', '\x9B', '\x88', ' ', '\xEA', '\x9B', '\xAB', ' ', '\xEA', '\x9B', '\xAF',  /* ꚧ ꚨ ꛛ ꛉ ꛁ ꛈ ꛫ ꛯ */
+    '\0',
+    '\xEA', '\x9A', '\xAD', ' ', '\xEA', '\x9A', '\xB3', ' ', '\xEA', '\x9A', '\xB6', ' ', '\xEA', '\x9B', '\xAC', ' ', '\xEA', '\x9A', '\xA2', ' ', '\xEA', '\x9A', '\xBD', ' ', '\xEA', '\x9B', '\xAF', ' ', '\xEA', '\x9B', '\xB2',  /* ꚭ ꚳ ꚶ ꛬ ꚢ ꚽ ꛯ ꛲ */
+    '\0',
     '\xE0', '\xA6', '\x85', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xAD', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95',  /* অ ড ত ন ব ভ ল ক */
     '\0',
     '\xE0', '\xA6', '\x87', ' ', '\xE0', '\xA6', '\x9F', ' ', '\xE0', '\xA6', '\xA0', ' ', '\xE0', '\xA6', '\xBF', ' ', '\xE0', '\xA7', '\x80', ' ', '\xE0', '\xA7', '\x88', ' ', '\xE0', '\xA7', '\x97',  /* ই ট ঠ ি ী ৈ ৗ */
     '\0',
     '\xE0', '\xA6', '\x93', ' ', '\xE0', '\xA6', '\x8F', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95',  /* ও এ ড ত ন ব ল ক */
     '\0',
+    '\xE1', '\x9D', '\x90', ' ', '\xE1', '\x9D', '\x88',  /* ᝐ ᝈ */
+    '\0',
+    '\xE1', '\x9D', '\x85', ' ', '\xE1', '\x9D', '\x8A', ' ', '\xE1', '\x9D', '\x8E',  /* ᝅ ᝊ ᝎ */
+    '\0',
+    '\xE1', '\x9D', '\x82', ' ', '\xE1', '\x9D', '\x83', ' ', '\xE1', '\x9D', '\x89', ' ', '\xE1', '\x9D', '\x8C',  /* ᝂ ᝃ ᝉ ᝌ */
+    '\0',
+    '\xE1', '\x9D', '\x80', ' ', '\xE1', '\x9D', '\x83', ' ', '\xE1', '\x9D', '\x86', ' ', '\xE1', '\x9D', '\x89', ' ', '\xE1', '\x9D', '\x8B', ' ', '\xE1', '\x9D', '\x8F', ' ', '\xE1', '\x9D', '\x91',  /* ᝀ ᝃ ᝆ ᝉ ᝋ ᝏ ᝑ */
+    '\0',
+    '\xE1', '\x97', '\x9C', ' ', '\xE1', '\x96', '\xB4', ' ', '\xE1', '\x90', '\x81', ' ', '\xE1', '\x92', '\xA3', ' ', '\xE1', '\x91', '\xAB', ' ', '\xE1', '\x91', '\x8E', ' ', '\xE1', '\x94', '\x91', ' ', '\xE1', '\x97', '\xB0',  /* ᗜ ᖴ ᐁ ᒣ ᑫ ᑎ ᔑ ᗰ */
+    '\0',
+    '\xE1', '\x97', '\xB6', ' ', '\xE1', '\x96', '\xB5', ' ', '\xE1', '\x92', '\xA7', ' ', '\xE1', '\x90', '\x83', ' ', '\xE1', '\x91', '\x8C', ' ', '\xE1', '\x92', '\x8D', ' ', '\xE1', '\x94', '\x91', ' ', '\xE1', '\x97', '\xA2',  /* ᗶ ᖵ ᒧ ᐃ ᑌ ᒍ ᔑ ᗢ */
+    '\0',
+    '\xE1', '\x93', '\x93', ' ', '\xE1', '\x93', '\x95', ' ', '\xE1', '\x93', '\x80', ' ', '\xE1', '\x93', '\x82', ' ', '\xE1', '\x93', '\x84', ' ', '\xE1', '\x95', '\x84', ' ', '\xE1', '\x95', '\x86', ' ', '\xE1', '\x98', '\xA3',  /* ᓓ ᓕ ᓀ ᓂ ᓄ ᕄ ᕆ ᘣ */
+    '\0',
+    '\xE1', '\x95', '\x83', ' ', '\xE1', '\x93', '\x82', ' ', '\xE1', '\x93', '\x80', ' ', '\xE1', '\x95', '\x82', ' ', '\xE1', '\x93', '\x97', ' ', '\xE1', '\x93', '\x9A', ' ', '\xE1', '\x95', '\x86', ' ', '\xE1', '\x98', '\xA3',  /* ᕃ ᓂ ᓀ ᕂ ᓗ ᓚ ᕆ ᘣ */
+    '\0',
+    '\xE1', '\x90', '\xAA', ' ', '\xE1', '\x99', '\x86', ' ', '\xE1', '\xA3', '\x98', ' ', '\xE1', '\x90', '\xA2', ' ', '\xE1', '\x92', '\xBE', ' ', '\xE1', '\xA3', '\x97', ' ', '\xE1', '\x94', '\x86',  /* ᐪ ᙆ ᣘ ᐢ ᒾ ᣗ ᔆ */
+    '\0',
+    '\xE1', '\x99', '\x86', ' ', '\xE1', '\x97', '\xAE', ' ', '\xE1', '\x92', '\xBB', ' ', '\xE1', '\x90', '\x9E', ' ', '\xE1', '\x94', '\x86', ' ', '\xE1', '\x92', '\xA1', ' ', '\xE1', '\x92', '\xA2', ' ', '\xE1', '\x93', '\x91',  /* ᙆ ᗮ ᒻ ᐞ ᔆ ᒡ ᒢ ᓑ */
+    '\0',
+    '\xF0', '\x90', '\x8A', '\xA7', ' ', '\xF0', '\x90', '\x8A', '\xAB', ' ', '\xF0', '\x90', '\x8A', '\xAC', ' ', '\xF0', '\x90', '\x8A', '\xAD', ' ', '\xF0', '\x90', '\x8A', '\xB1', ' ', '\xF0', '\x90', '\x8A', '\xBA', ' ', '\xF0', '\x90', '\x8A', '\xBC', ' ', '\xF0', '\x90', '\x8A', '\xBF',  /* 𐊧 𐊫 𐊬 𐊭 𐊱 𐊺 𐊼 𐊿 */
+    '\0',
+    '\xF0', '\x90', '\x8A', '\xA3', ' ', '\xF0', '\x90', '\x8A', '\xA7', ' ', '\xF0', '\x90', '\x8A', '\xB7', ' ', '\xF0', '\x90', '\x8B', '\x80', ' ', '\xF0', '\x90', '\x8A', '\xAB', ' ', '\xF0', '\x90', '\x8A', '\xB8', ' ', '\xF0', '\x90', '\x8B', '\x89',  /* 𐊣 𐊧 𐊷 𐋀 𐊫 𐊸 𐋉 */
+    '\0',
+    '\xF0', '\x91', '\x84', '\x83', ' ', '\xF0', '\x91', '\x84', '\x85', ' ', '\xF0', '\x91', '\x84', '\x89', ' ', '\xF0', '\x91', '\x84', '\x99', ' ', '\xF0', '\x91', '\x84', '\x97',  /* 𑄃 𑄅 𑄉 𑄙 𑄗 */
+    '\0',
+    '\xF0', '\x91', '\x84', '\x85', ' ', '\xF0', '\x91', '\x84', '\x9B', ' ', '\xF0', '\x91', '\x84', '\x9D', ' ', '\xF0', '\x91', '\x84', '\x97', ' ', '\xF0', '\x91', '\x84', '\x93',  /* 𑄅 𑄛 𑄝 𑄗 𑄓 */
+    '\0',
+    '\xF0', '\x91', '\x84', '\x96', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\x98', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\x99', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\xA4', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2', ' ', '\xF0', '\x91', '\x84', '\xA5', '\xF0', '\x91', '\x84', '\xB3', '\xF0', '\x91', '\x84', '\xA2',  /* 𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢 */
+    '\0',
     '\xE1', '\x8F', '\x86', ' ', '\xE1', '\x8E', '\xBB', ' ', '\xE1', '\x8E', '\xAC', ' ', '\xE1', '\x8F', '\x83', ' ', '\xE1', '\x8E', '\xA4', ' ', '\xE1', '\x8F', '\xA3', ' ', '\xE1', '\x8E', '\xA6', ' ', '\xE1', '\x8F', '\x95',  /* Ꮖ Ꮋ Ꭼ Ꮓ Ꭴ Ꮳ Ꭶ Ꮥ */
     '\0',
     '\xEA', '\xAE', '\x92', ' ', '\xEA', '\xAE', '\xA4', ' ', '\xEA', '\xAE', '\xB6', ' ', '\xEA', '\xAD', '\xB4', ' ', '\xEA', '\xAD', '\xBE', ' ', '\xEA', '\xAE', '\x97', ' ', '\xEA', '\xAE', '\x9D', ' ', '\xEA', '\xAE', '\xBF',  /* ꮒ ꮤ ꮶ ꭴ ꭾ ꮗ ꮝ ꮿ */
     '\0',
     '\xE1', '\x8F', '\xB8', ' ', '\xEA', '\xAE', '\x90', ' ', '\xEA', '\xAD', '\xB9', ' ', '\xEA', '\xAD', '\xBB',  /* ᏸ ꮐ ꭹ ꭻ */
     '\0',
+    '\xE2', '\xB2', '\x8C', ' ', '\xE2', '\xB2', '\x8E', ' ', '\xE2', '\xB2', '\xA0', ' ', '\xE2', '\xB3', '\x9E', ' ', '\xE2', '\xB2', '\x9E', ' ', '\xE2', '\xB2', '\x90', ' ', '\xE2', '\xB2', '\xA4', ' ', '\xE2', '\xB3', '\x8A',  /* Ⲍ Ⲏ Ⲡ Ⳟ Ⲟ Ⲑ Ⲥ Ⳋ */
+    '\0',
+    '\xE2', '\xB3', '\x90', ' ', '\xE2', '\xB3', '\x98', ' ', '\xE2', '\xB3', '\x9E', ' ', '\xE2', '\xB2', '\x8E', ' ', '\xE2', '\xB2', '\x9E', ' ', '\xE2', '\xB2', '\x90', ' ', '\xE2', '\xB3', '\x9C', ' ', '\xE2', '\xB2', '\xB0',  /* Ⳑ Ⳙ Ⳟ Ⲏ Ⲟ Ⲑ Ⳝ Ⲱ */
+    '\0',
+    '\xE2', '\xB2', '\x8D', ' ', '\xE2', '\xB2', '\x8F', ' ', '\xE2', '\xB2', '\xA1', ' ', '\xE2', '\xB3', '\x9F', ' ', '\xE2', '\xB2', '\x9F', ' ', '\xE2', '\xB2', '\x91', ' ', '\xE2', '\xB2', '\xA5', ' ', '\xE2', '\xB3', '\x8B',  /* ⲍ ⲏ ⲡ ⳟ ⲟ ⲑ ⲥ ⳋ */
+    '\0',
+    '\xE2', '\xB3', '\x91', ' ', '\xE2', '\xB3', '\x99', ' ', '\xE2', '\xB3', '\x9F', ' ', '\xE2', '\xB2', '\x8F', ' ', '\xE2', '\xB2', '\x9F', ' ', '\xE2', '\xB2', '\x91', ' ', '\xE2', '\xB3', '\x9D', ' ', '\xE2', '\xB3', '\x92',  /* ⳑ ⳙ ⳟ ⲏ ⲟ ⲑ ⳝ Ⳓ */
+    '\0',
+    '\xF0', '\x90', '\xA0', '\x8D', ' ', '\xF0', '\x90', '\xA0', '\x99', ' ', '\xF0', '\x90', '\xA0', '\xB3', ' ', '\xF0', '\x90', '\xA0', '\xB1', ' ', '\xF0', '\x90', '\xA0', '\x85', ' ', '\xF0', '\x90', '\xA0', '\x93', ' ', '\xF0', '\x90', '\xA0', '\xA3', ' ', '\xF0', '\x90', '\xA0', '\xA6',  /* 𐠍 𐠙 𐠳 𐠱 𐠅 𐠓 𐠣 𐠦 */
+    '\0',
+    '\xF0', '\x90', '\xA0', '\x83', ' ', '\xF0', '\x90', '\xA0', '\x8A', ' ', '\xF0', '\x90', '\xA0', '\x9B', ' ', '\xF0', '\x90', '\xA0', '\xA3', ' ', '\xF0', '\x90', '\xA0', '\xB3', ' ', '\xF0', '\x90', '\xA0', '\xB5', ' ', '\xF0', '\x90', '\xA0', '\x90',  /* 𐠃 𐠊 𐠛 𐠣 𐠳 𐠵 𐠐 */
+    '\0',
+    '\xF0', '\x90', '\xA0', '\x88', ' ', '\xF0', '\x90', '\xA0', '\x8F', ' ', '\xF0', '\x90', '\xA0', '\x96',  /* 𐠈 𐠏 𐠖 */
+    '\0',
     '\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\x9F', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD',  /* Б В Е П З О С Э */
     '\0',
     '\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\xA8', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD',  /* Б В Е Ш З О С Э */
     '\0',
     '\xD1', '\x80', ' ', '\xD1', '\x83', ' ', '\xD1', '\x84',  /* р у ф */
     '\0',
+    '\xF0', '\x90', '\x90', '\x82', ' ', '\xF0', '\x90', '\x90', '\x84', ' ', '\xF0', '\x90', '\x90', '\x8B', ' ', '\xF0', '\x90', '\x90', '\x97', ' ', '\xF0', '\x90', '\x90', '\x91',  /* 𐐂 𐐄 𐐋 𐐗 𐐑 */
+    '\0',
+    '\xF0', '\x90', '\x90', '\x80', ' ', '\xF0', '\x90', '\x90', '\x82', ' ', '\xF0', '\x90', '\x90', '\x84', ' ', '\xF0', '\x90', '\x90', '\x97', ' ', '\xF0', '\x90', '\x90', '\x9B',  /* 𐐀 𐐂 𐐄 𐐗 𐐛 */
+    '\0',
+    '\xF0', '\x90', '\x90', '\xAA', ' ', '\xF0', '\x90', '\x90', '\xAC', ' ', '\xF0', '\x90', '\x90', '\xB3', ' ', '\xF0', '\x90', '\x90', '\xBF', ' ', '\xF0', '\x90', '\x90', '\xB9',  /* 𐐪 𐐬 𐐳 𐐿 𐐹 */
+    '\0',
+    '\xF0', '\x90', '\x90', '\xA8', ' ', '\xF0', '\x90', '\x90', '\xAA', ' ', '\xF0', '\x90', '\x90', '\xAC', ' ', '\xF0', '\x90', '\x90', '\xBF', ' ', '\xF0', '\x90', '\x91', '\x83',  /* 𐐨 𐐪 𐐬 𐐿 𐑃 */
+    '\0',
     '\xE0', '\xA4', '\x95', ' ', '\xE0', '\xA4', '\xAE', ' ', '\xE0', '\xA4', '\x85', ' ', '\xE0', '\xA4', '\x86', ' ', '\xE0', '\xA4', '\xA5', ' ', '\xE0', '\xA4', '\xA7', ' ', '\xE0', '\xA4', '\xAD', ' ', '\xE0', '\xA4', '\xB6',  /* क म अ आ थ ध भ श */
     '\0',
     '\xE0', '\xA4', '\x88', ' ', '\xE0', '\xA4', '\x90', ' ', '\xE0', '\xA4', '\x93', ' ', '\xE0', '\xA4', '\x94', ' ', '\xE0', '\xA4', '\xBF', ' ', '\xE0', '\xA5', '\x80', ' ', '\xE0', '\xA5', '\x8B', ' ', '\xE0', '\xA5', '\x8C',  /* ई ऐ ओ औ ि ी ो ौ */
     '\0',
     '\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x98', ' ', '\xE2', '\xB4', '\x9D',  /* ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ */
     '\0',
+    '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x94', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\xAB', ' ', '\xE2', '\xB0', '\x8B',  /* Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ */
+    '\0',
+    '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x9E', ' ', '\xE2', '\xB0', '\xA1', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\x94',  /* Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ */
+    '\0',
+    '\xE2', '\xB0', '\xB5', ' ', '\xE2', '\xB1', '\x84', ' ', '\xE2', '\xB1', '\x9A', ' ', '\xE2', '\xB0', '\xB4', ' ', '\xE2', '\xB0', '\xB2', ' ', '\xE2', '\xB0', '\xBA', ' ', '\xE2', '\xB1', '\x9B', ' ', '\xE2', '\xB0', '\xBB',  /* ⰵ ⱄ ⱚ ⰴ ⰲ ⰺ ⱛ ⰻ */
+    '\0',
+    '\xE2', '\xB0', '\xB5', ' ', '\xE2', '\xB0', '\xB4', ' ', '\xE2', '\xB0', '\xB2', ' ', '\xE2', '\xB1', '\x9A', ' ', '\xE2', '\xB1', '\x8E', ' ', '\xE2', '\xB1', '\x91', ' ', '\xE2', '\xB0', '\xBA', ' ', '\xE2', '\xB1', '\x84',  /* ⰵ ⰴ ⰲ ⱚ ⱎ ⱑ ⰺ ⱄ */
+    '\0',
+    '\xF0', '\x90', '\x8C', '\xB2', ' ', '\xF0', '\x90', '\x8C', '\xB6', ' ', '\xF0', '\x90', '\x8D', '\x80', ' ', '\xF0', '\x90', '\x8D', '\x84', ' ', '\xF0', '\x90', '\x8C', '\xB4', ' ', '\xF0', '\x90', '\x8D', '\x83', ' ', '\xF0', '\x90', '\x8D', '\x88', ' ', '\xF0', '\x90', '\x8C', '\xBE',  /* 𐌲 𐌶 𐍀 𐍄 𐌴 𐍃 𐍈 𐌾 */
+    '\0',
+    '\xF0', '\x90', '\x8C', '\xB6', ' ', '\xF0', '\x90', '\x8C', '\xB4', ' ', '\xF0', '\x90', '\x8D', '\x83', ' ', '\xF0', '\x90', '\x8D', '\x88',  /* 𐌶 𐌴 𐍃 𐍈 */
+    '\0',
     '\xCE', '\x93', ' ', '\xCE', '\x92', ' ', '\xCE', '\x95', ' ', '\xCE', '\x96', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', ' ', '\xCE', '\xA9',  /* Γ Β Ε Ζ Θ Ο Ω */
     '\0',
     '\xCE', '\x92', ' ', '\xCE', '\x94', ' ', '\xCE', '\x96', ' ', '\xCE', '\x9E', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F',  /* Β Δ Ζ Ξ Θ Ο */
     '\0',
     '\xE0', '\xB2', '\x85', ' ', '\xE0', '\xB2', '\x89', ' ', '\xE0', '\xB2', '\x8E', ' ', '\xE0', '\xB2', '\xB2', ' ', '\xE0', '\xB3', '\xA6', ' ', '\xE0', '\xB3', '\xA8', ' ', '\xE0', '\xB3', '\xAC', ' ', '\xE0', '\xB3', '\xAD',  /* ಅ ಉ ಎ ಲ ೦ ೨ ೬ ೭ */
     '\0',
+    '\xEA', '\xA4', '\x85', ' ', '\xEA', '\xA4', '\x8F', ' ', '\xEA', '\xA4', '\x81', ' ', '\xEA', '\xA4', '\x8B', ' ', '\xEA', '\xA4', '\x80', ' ', '\xEA', '\xA4', '\x8D',  /* ꤅ ꤏ ꤁ ꤋ ꤀ ꤍ */
+    '\0',
+    '\xEA', '\xA4', '\x88', ' ', '\xEA', '\xA4', '\x98', ' ', '\xEA', '\xA4', '\x80', ' ', '\xEA', '\xA4', '\x8D', ' ', '\xEA', '\xA4', '\xA2',  /* ꤈ ꤘ ꤀ ꤍ ꤢ */
+    '\0',
+    '\xEA', '\xA4', '\x96', ' ', '\xEA', '\xA4', '\xA1',  /* ꤖ ꤡ */
+    '\0',
+    '\xEA', '\xA4', '\x91', ' ', '\xEA', '\xA4', '\x9C', ' ', '\xEA', '\xA4', '\x9E',  /* ꤑ ꤜ ꤞ */
+    '\0',
+    '\xEA', '\xA4', '\x91', '\xEA', '\xA4', '\xAC', ' ', '\xEA', '\xA4', '\x9C', '\xEA', '\xA4', '\xAD', ' ', '\xEA', '\xA4', '\x94', '\xEA', '\xA4', '\xAC',  /* ꤑ꤬ ꤜ꤭ ꤔ꤬ */
+    '\0',
     '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x91', ' ', '\xE1', '\x9E', '\x93', ' ', '\xE1', '\x9E', '\xA7', ' ', '\xE1', '\x9E', '\xA9', ' ', '\xE1', '\x9E', '\xB6',  /* ខ ទ ន ឧ ឩ ា */
     '\0',
     '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x80', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x82', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x90',  /* ក្ក ក្ខ ក្គ ក្ថ */
     '\0',
     'f', ' ', 'i', ' ', 'j', ' ', 'k', ' ', 'd', ' ', 'b', ' ', 'h',  /* f i j k d b h */
     '\0',
-    'x', ' ', 'z', ' ', 'r', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c',  /* x z r o e s c */
+    'u', ' ', 'v', ' ', 'x', ' ', 'z', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c',  /* u v x z o e s c */
+    '\0',
+    'n', ' ', 'r', ' ', 'x', ' ', 'z', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c',  /* n r x z o e s c */
     '\0',
     'p', ' ', 'q', ' ', 'g', ' ', 'j', ' ', 'y',  /* p q g j y */
     '\0',
     '\0',
     '\xE1', '\xB5', '\x96', ' ', '\xCA', '\xB8', ' ', '\xE1', '\xB5', '\x8D',  /* ᵖ ʸ ᵍ */
     '\0',
+    '\xEA', '\x93', '\xA1', ' ', '\xEA', '\x93', '\xA7', ' ', '\xEA', '\x93', '\xB1', ' ', '\xEA', '\x93', '\xB6', ' ', '\xEA', '\x93', '\xA9', ' ', '\xEA', '\x93', '\x9A', ' ', '\xEA', '\x93', '\xB5', ' ', '\xEA', '\x93', '\xB3',  /* ꓡ ꓧ ꓱ ꓶ ꓩ ꓚ ꓵ ꓳ */
+    '\0',
+    '\xEA', '\x93', '\x95', ' ', '\xEA', '\x93', '\x9C', ' ', '\xEA', '\x93', '\x9E', ' ', '\xEA', '\x93', '\xA1', ' ', '\xEA', '\x93', '\x9B', ' ', '\xEA', '\x93', '\xA2', ' ', '\xEA', '\x93', '\xB3', ' ', '\xEA', '\x93', '\xB4',  /* ꓕ ꓜ ꓞ ꓡ ꓛ ꓢ ꓳ ꓴ */
+    '\0',
     '\xE0', '\xB4', '\x92', ' ', '\xE0', '\xB4', '\x9F', ' ', '\xE0', '\xB4', '\xA0', ' ', '\xE0', '\xB4', '\xB1', ' ', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xAA', ' ', '\xE0', '\xB4', '\x9A', '\xE0', '\xB5', '\x8D', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xAA', '\xE0', '\xB5', '\x8D', '\xE0', '\xB4', '\xAA',  /* ഒ ട ഠ റ ച പ ച്ച പ്പ */
     '\0',
     '\xE0', '\xB4', '\x9F', ' ', '\xE0', '\xB4', '\xA0', ' ', '\xE0', '\xB4', '\xA7', ' ', '\xE0', '\xB4', '\xB6', ' ', '\xE0', '\xB4', '\x98', ' ', '\xE0', '\xB4', '\x9A', ' ', '\xE0', '\xB4', '\xA5', ' ', '\xE0', '\xB4', '\xB2',  /* ട ഠ ധ ശ ഘ ച ഥ ല */
     '\0',
     '\xE1', '\x80', '\x89', ' ', '\xE1', '\x80', '\x8A', ' ', '\xE1', '\x80', '\xA5', ' ', '\xE1', '\x80', '\xA9', ' ', '\xE1', '\x80', '\xA8', ' ', '\xE1', '\x81', '\x82', ' ', '\xE1', '\x81', '\x85', ' ', '\xE1', '\x81', '\x89',  /* ဉ ည ဥ ဩ ဨ ၂ ၅ ၉ */
     '\0',
+    '\xDF', '\x90', ' ', '\xDF', '\x89', ' ', '\xDF', '\x92', ' ', '\xDF', '\x9F', ' ', '\xDF', '\x96', ' ', '\xDF', '\x9C', ' ', '\xDF', '\xA0', ' ', '\xDF', '\xA5',  /* ߐ ߉ ߒ ߟ ߖ ߜ ߠ ߥ */
+    '\0',
+    '\xDF', '\x80', ' ', '\xDF', '\x98', ' ', '\xDF', '\xA1', ' ', '\xDF', '\xA0', ' ', '\xDF', '\xA5',  /* ߀ ߘ ߡ ߠ ߥ */
+    '\0',
+    '\xDF', '\x8F', ' ', '\xDF', '\x9B', ' ', '\xDF', '\x8B',  /* ߏ ߛ ߋ */
+    '\0',
+    '\xDF', '\x8E', ' ', '\xDF', '\x8F', ' ', '\xDF', '\x9B', ' ', '\xDF', '\x8B',  /* ߎ ߏ ߛ ߋ */
+    '\0',
+    '\xE1', '\xB1', '\x9B', ' ', '\xE1', '\xB1', '\x9C', ' ', '\xE1', '\xB1', '\x9D', ' ', '\xE1', '\xB1', '\xA1', ' ', '\xE1', '\xB1', '\xA2', ' ', '\xE1', '\xB1', '\xA5',  /* ᱛ ᱜ ᱝ ᱡ ᱢ ᱥ */
+    '\0',
+    '\xF0', '\x90', '\xB0', '\x97', ' ', '\xF0', '\x90', '\xB0', '\x98', ' ', '\xF0', '\x90', '\xB0', '\xA7',  /* 𐰗 𐰘 𐰧 */
+    '\0',
+    '\xF0', '\x90', '\xB0', '\x89', ' ', '\xF0', '\x90', '\xB0', '\x97', ' ', '\xF0', '\x90', '\xB0', '\xA6', ' ', '\xF0', '\x90', '\xB0', '\xA7',  /* 𐰉 𐰗 𐰦 𐰧 */
+    '\0',
+    '\xF0', '\x90', '\x92', '\xBE', ' ', '\xF0', '\x90', '\x93', '\x8D', ' ', '\xF0', '\x90', '\x93', '\x92', ' ', '\xF0', '\x90', '\x93', '\x93', ' ', '\xF0', '\x90', '\x92', '\xBB', ' ', '\xF0', '\x90', '\x93', '\x82', ' ', '\xF0', '\x90', '\x92', '\xB5', ' ', '\xF0', '\x90', '\x93', '\x86',  /* 𐒾 𐓍 𐓒 𐓓 𐒻 𐓂 𐒵 𐓆 */
+    '\0',
+    '\xF0', '\x90', '\x92', '\xB0', ' ', '\xF0', '\x90', '\x93', '\x8D', ' ', '\xF0', '\x90', '\x93', '\x82', ' ', '\xF0', '\x90', '\x92', '\xBF', ' ', '\xF0', '\x90', '\x93', '\x8E', ' ', '\xF0', '\x90', '\x92', '\xB9',  /* 𐒰 𐓍 𐓂 𐒿 𐓎 𐒹 */
+    '\0',
+    '\xF0', '\x90', '\x92', '\xBC', ' ', '\xF0', '\x90', '\x92', '\xBD', ' ', '\xF0', '\x90', '\x92', '\xBE',  /* 𐒼 𐒽 𐒾 */
+    '\0',
+    '\xF0', '\x90', '\x93', '\xB5', ' ', '\xF0', '\x90', '\x93', '\xB6', ' ', '\xF0', '\x90', '\x93', '\xBA', ' ', '\xF0', '\x90', '\x93', '\xBB', ' ', '\xF0', '\x90', '\x93', '\x9D', ' ', '\xF0', '\x90', '\x93', '\xA3', ' ', '\xF0', '\x90', '\x93', '\xAA', ' ', '\xF0', '\x90', '\x93', '\xAE',  /* 𐓵 𐓶 𐓺 𐓻 𐓝 𐓣 𐓪 𐓮 */
+    '\0',
+    '\xF0', '\x90', '\x93', '\x98', ' ', '\xF0', '\x90', '\x93', '\x9A', ' ', '\xF0', '\x90', '\x93', '\xA3', ' ', '\xF0', '\x90', '\x93', '\xB5', ' ', '\xF0', '\x90', '\x93', '\xA1', ' ', '\xF0', '\x90', '\x93', '\xA7', ' ', '\xF0', '\x90', '\x93', '\xAA', ' ', '\xF0', '\x90', '\x93', '\xB6',  /* 𐓘 𐓚 𐓣 𐓵 𐓡 𐓧 𐓪 𐓶 */
+    '\0',
+    '\xF0', '\x90', '\x93', '\xA4', ' ', '\xF0', '\x90', '\x93', '\xA6', ' ', '\xF0', '\x90', '\x93', '\xB8', ' ', '\xF0', '\x90', '\x93', '\xB9', ' ', '\xF0', '\x90', '\x93', '\x9B',  /* 𐓤 𐓦 𐓸 𐓹 𐓛 */
+    '\0',
+    '\xF0', '\x90', '\x93', '\xA4', ' ', '\xF0', '\x90', '\x93', '\xA5', ' ', '\xF0', '\x90', '\x93', '\xA6',  /* 𐓤 𐓥 𐓦 */
+    '\0',
+    '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x89', ' ', '\xF0', '\x90', '\x92', '\x90', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\x98', ' ', '\xF0', '\x90', '\x92', '\x9B', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA3',  /* 𐒆 𐒉 𐒐 𐒒 𐒘 𐒛 𐒠 𐒣 */
+    '\0',
+    '\xF0', '\x90', '\x92', '\x80', ' ', '\xF0', '\x90', '\x92', '\x82', ' ', '\xF0', '\x90', '\x92', '\x86', ' ', '\xF0', '\x90', '\x92', '\x88', ' ', '\xF0', '\x90', '\x92', '\x8A', ' ', '\xF0', '\x90', '\x92', '\x92', ' ', '\xF0', '\x90', '\x92', '\xA0', ' ', '\xF0', '\x90', '\x92', '\xA9',  /* 𐒀 𐒂 𐒆 𐒈 𐒊 𐒒 𐒠 𐒩 */
+    '\0',
+    '\xEA', '\xA2', '\x9C', ' ', '\xEA', '\xA2', '\x9E', ' ', '\xEA', '\xA2', '\xB3', ' ', '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\x96', ' ', '\xEA', '\xA2', '\x92', ' ', '\xEA', '\xA2', '\x9D', ' ', '\xEA', '\xA2', '\x9B',  /* ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ꢝ ꢛ */
+    '\0',
+    '\xEA', '\xA2', '\x82', ' ', '\xEA', '\xA2', '\xA8', ' ', '\xEA', '\xA2', '\xBA', ' ', '\xEA', '\xA2', '\xA4', ' ', '\xEA', '\xA2', '\x8E',  /* ꢂ ꢨ ꢺ ꢤ ꢎ */
+    '\0',
+    '\xF0', '\x90', '\x91', '\x95', ' ', '\xF0', '\x90', '\x91', '\x99',  /* 𐑕 𐑙 */
+    '\0',
+    '\xF0', '\x90', '\x91', '\x94', ' ', '\xF0', '\x90', '\x91', '\x96', ' ', '\xF0', '\x90', '\x91', '\x97', ' ', '\xF0', '\x90', '\x91', '\xB9', ' ', '\xF0', '\x90', '\x91', '\xBB',  /* 𐑔 𐑖 𐑗 𐑹 𐑻 */
+    '\0',
+    '\xF0', '\x90', '\x91', '\x9F', ' ', '\xF0', '\x90', '\x91', '\xA3',  /* 𐑟 𐑣 */
+    '\0',
+    '\xF0', '\x90', '\x91', '\xB1', ' ', '\xF0', '\x90', '\x91', '\xB2', ' ', '\xF0', '\x90', '\x91', '\xB3', ' ', '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xB8', ' ', '\xF0', '\x90', '\x91', '\xBA', ' ', '\xF0', '\x90', '\x91', '\xBC',  /* 𐑱 𐑲 𐑳 𐑴 𐑸 𐑺 𐑼 */
+    '\0',
+    '\xF0', '\x90', '\x91', '\xB4', ' ', '\xF0', '\x90', '\x91', '\xBB', ' ', '\xF0', '\x90', '\x91', '\xB9',  /* 𐑴 𐑻 𐑹 */
+    '\0',
     '\xE0', '\xB6', '\x89', ' ', '\xE0', '\xB6', '\x9A', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\xB4', ' ', '\xE0', '\xB6', '\xBA', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB7', '\x86',  /* ඉ ක ඝ ඳ ප ය ල ෆ */
     '\0',
     '\xE0', '\xB6', '\x91', ' ', '\xE0', '\xB6', '\x94', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xA2', ' ', '\xE0', '\xB6', '\xA7', ' ', '\xE0', '\xB6', '\xAE', ' ', '\xE0', '\xB6', '\xB0', ' ', '\xE0', '\xB6', '\xBB',  /* එ ඔ ඝ ජ ට ථ ධ ර */
     '\0',
     '\xE0', '\xB6', '\xAF', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\x8B', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x96', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xB6', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xAF', '\xE0', '\xB7', '\x94',  /* ද ඳ උ ල තූ තු බු දු */
     '\0',
+    '\xE1', '\xAE', '\x8B', ' ', '\xE1', '\xAE', '\x9E', ' ', '\xE1', '\xAE', '\xAE', ' ', '\xE1', '\xAE', '\xBD', ' ', '\xE1', '\xAE', '\xB0', ' ', '\xE1', '\xAE', '\x88',  /* ᮋ ᮞ ᮮ ᮽ ᮰ ᮈ */
+    '\0',
+    '\xE1', '\xAE', '\x84', ' ', '\xE1', '\xAE', '\x94', ' ', '\xE1', '\xAE', '\x95', ' ', '\xE1', '\xAE', '\x97', ' ', '\xE1', '\xAE', '\xB0', ' ', '\xE1', '\xAE', '\x86', ' ', '\xE1', '\xAE', '\x88', ' ', '\xE1', '\xAE', '\x89',  /* ᮄ ᮔ ᮕ ᮗ ᮰ ᮆ ᮈ ᮉ */
+    '\0',
+    '\xE1', '\xAE', '\xBC', ' ', '\xE1', '\xB3', '\x84',  /* ᮼ ᳄ */
+    '\0',
+    '\xEA', '\xAA', '\x86', ' ', '\xEA', '\xAA', '\x94', ' ', '\xEA', '\xAA', '\x92', ' ', '\xEA', '\xAA', '\x96', ' ', '\xEA', '\xAA', '\xAB',  /* ꪆ ꪔ ꪒ ꪖ ꪫ */
+    '\0',
+    '\xEA', '\xAA', '\x89', ' ', '\xEA', '\xAA', '\xAB', ' ', '\xEA', '\xAA', '\xAE',  /* ꪉ ꪫ ꪮ */
+    '\0',
     '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x92', ' ', '\xE0', '\xAE', '\x93', ' ', '\xE0', '\xAE', '\xB1', ' ', '\xE0', '\xAE', '\x88', ' ', '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9A',  /* உ ஒ ஓ ற ஈ க ங ச */
     '\0',
     '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x9A', ' ', '\xE0', '\xAE', '\xB2', ' ', '\xE0', '\xAE', '\xB6', ' ', '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9F', ' ', '\xE0', '\xAE', '\xAA',  /* க ச ல ஶ உ ங ட ப */
     '\xE0', '\xB8', '\x8D', ' ', '\xE0', '\xB8', '\x90',  /* ญ ฐ */
     '\0',
     '\xE0', '\xB9', '\x90', ' ', '\xE0', '\xB9', '\x91', ' ', '\xE0', '\xB9', '\x93',  /* ๐ ๑ ๓ */
+    '\0',
+    '\xE2', '\xB5', '\x94', ' ', '\xE2', '\xB5', '\x99', ' ', '\xE2', '\xB5', '\x9B', ' ', '\xE2', '\xB5', '\x9E', ' ', '\xE2', '\xB4', '\xB5', ' ', '\xE2', '\xB4', '\xBC', ' ', '\xE2', '\xB4', '\xB9', ' ', '\xE2', '\xB5', '\x8E',  /* ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ */
+    '\0',
+    '\xEA', '\x97', '\x8D', ' ', '\xEA', '\x98', '\x96', ' ', '\xEA', '\x98', '\x99', ' ', '\xEA', '\x98', '\x9C', ' ', '\xEA', '\x96', '\x9C', ' ', '\xEA', '\x96', '\x9D', ' ', '\xEA', '\x94', '\x85', ' ', '\xEA', '\x95', '\xA2',  /* ꗍ ꘖ ꘙ ꘜ ꖜ ꖝ ꔅ ꕢ */
+    '\0',
+    '\xEA', '\x97', '\x8D', ' ', '\xEA', '\x98', '\x96', ' ', '\xEA', '\x98', '\x99', ' ', '\xEA', '\x97', '\x9E', ' ', '\xEA', '\x94', '\x85', ' ', '\xEA', '\x95', '\xA2', ' ', '\xEA', '\x96', '\x9C', ' ', '\xEA', '\x94', '\x86',  /* ꗍ ꘖ ꘙ ꗞ ꔅ ꕢ ꖜ ꔆ */
 #ifdef AF_CONFIG_OPTION_CJK
     '\0',
     '\xE4', '\xBB', '\x96', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\x9C', '\xB0',  /* 他 们 你 來 們 到 和 地 */
   af_blue_stringsets[] =
   {
     /* */
+    { AF_BLUE_STRING_ADLAM_CAPITAL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0                                 },
+    { AF_BLUE_STRING_ADLAM_SMALL_TOP,      AF_BLUE_PROPERTY_LATIN_TOP      |
+                                           AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM,   0                                 },
+    { AF_BLUE_STRING_MAX,                  0                                 },
     { AF_BLUE_STRING_ARABIC_TOP,    AF_BLUE_PROPERTY_LATIN_TOP     },
     { AF_BLUE_STRING_ARABIC_BOTTOM, 0                              },
     { AF_BLUE_STRING_ARABIC_JOIN,   AF_BLUE_PROPERTY_LATIN_NEUTRAL },
     { AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM,    0                                 },
     { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0                                 },
     { AF_BLUE_STRING_MAX,                      0                                 },
+    { AF_BLUE_STRING_AVESTAN_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_AVESTAN_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,            0                          },
+    { AF_BLUE_STRING_BAMUM_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_BAMUM_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,          0                          },
     { AF_BLUE_STRING_BENGALI_TOP,  AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_BENGALI_BASE, AF_BLUE_PROPERTY_LATIN_TOP      |
                                    AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
     { AF_BLUE_STRING_BENGALI_BASE, 0                                 },
     { AF_BLUE_STRING_MAX,          0                                 },
+    { AF_BLUE_STRING_BUHID_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_BUHID_LARGE,  AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_BUHID_SMALL,  AF_BLUE_PROPERTY_LATIN_TOP      |
+                                   AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_BUHID_BOTTOM, 0                                 },
+    { AF_BLUE_STRING_MAX,          0                                 },
+    { AF_BLUE_STRING_CHAKMA_TOP,       AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_CHAKMA_BOTTOM,    0                          },
+    { AF_BLUE_STRING_CHAKMA_DESCENDER, 0                          },
+    { AF_BLUE_STRING_MAX,              0                          },
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP,             AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM,          0                                 },
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP,       AF_BLUE_PROPERTY_LATIN_TOP      |
+                                                         AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM,    0                                 },
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP,        AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM,     0                                 },
+    { AF_BLUE_STRING_MAX,                                0                                 },
+    { AF_BLUE_STRING_CARIAN_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_CARIAN_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,           0                          },
     { AF_BLUE_STRING_CHEROKEE_CAPITAL,         AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_CHEROKEE_CAPITAL,         0                                 },
     { AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_CHEROKEE_SMALL,           0                                 },
     { AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0                                 },
     { AF_BLUE_STRING_MAX,                      0                                 },
+    { AF_BLUE_STRING_COPTIC_CAPITAL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0                                 },
+    { AF_BLUE_STRING_COPTIC_SMALL_TOP,      AF_BLUE_PROPERTY_LATIN_TOP      |
+                                            AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM,   0                                 },
+    { AF_BLUE_STRING_MAX,                   0                                 },
+    { AF_BLUE_STRING_CYPRIOT_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0                          },
+    { AF_BLUE_STRING_CYPRIOT_SMALL,  AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_CYPRIOT_SMALL,  0                          },
+    { AF_BLUE_STRING_MAX,            0                          },
     { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM,  0                                 },
     { AF_BLUE_STRING_CYRILLIC_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
     { AF_BLUE_STRING_DEVANAGARI_BASE,   0                                 },
     { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0                                 },
     { AF_BLUE_STRING_MAX,               0                                 },
+    { AF_BLUE_STRING_DESERET_CAPITAL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0                                 },
+    { AF_BLUE_STRING_DESERET_SMALL_TOP,      AF_BLUE_PROPERTY_LATIN_TOP      |
+                                             AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_DESERET_SMALL_BOTTOM,   0                                 },
+    { AF_BLUE_STRING_MAX,                    0                                 },
     { AF_BLUE_STRING_ETHIOPIC_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0                          },
     { AF_BLUE_STRING_MAX,             0                          },
     { AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0                                 },
     { AF_BLUE_STRING_MAX,                         0                                 },
+    { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0                                 },
+    { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP,      AF_BLUE_PROPERTY_LATIN_TOP      |
+                                                AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM,   0                                 },
+    { AF_BLUE_STRING_MAX,                       0                                 },
+    { AF_BLUE_STRING_GOTHIC_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_GOTHIC_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,           0                          },
     { AF_BLUE_STRING_GREEK_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM,  0                                 },
     { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP,  AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_HEBREW_BOTTOM,    0                             },
     { AF_BLUE_STRING_HEBREW_DESCENDER, 0                             },
     { AF_BLUE_STRING_MAX,              0                             },
+    { AF_BLUE_STRING_KAYAH_LI_TOP,             AF_BLUE_PROPERTY_LATIN_TOP      |
+                                               AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_KAYAH_LI_BOTTOM,          0                                 },
+    { AF_BLUE_STRING_KAYAH_LI_ASCENDER,        AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_KAYAH_LI_DESCENDER,       0                                 },
+    { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0                                 },
+    { AF_BLUE_STRING_MAX,                      0                                 },
     { AF_BLUE_STRING_KANNADA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_KANNADA_BOTTOM, 0                          },
     { AF_BLUE_STRING_MAX,            0                          },
     { AF_BLUE_STRING_LATIN_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM,  0                                 },
     { AF_BLUE_STRING_LATIN_SMALL_F_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
-    { AF_BLUE_STRING_LATIN_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
+    { AF_BLUE_STRING_LATIN_SMALL_TOP,       AF_BLUE_PROPERTY_LATIN_TOP      |
                                             AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
-    { AF_BLUE_STRING_LATIN_SMALL,           0                                 },
+    { AF_BLUE_STRING_LATIN_SMALL_BOTTOM,    0                                 },
     { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0                                 },
     { AF_BLUE_STRING_MAX,                   0                                 },
     { AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_LATIN_SUPS_SMALL,           0                                 },
     { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0                                 },
     { AF_BLUE_STRING_MAX,                        0                                 },
+    { AF_BLUE_STRING_LISU_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_LISU_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,         0                          },
     { AF_BLUE_STRING_MALAYALAM_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_MALAYALAM_BOTTOM, 0                          },
     { AF_BLUE_STRING_MAX,              0                          },
     { AF_BLUE_STRING_MYANMAR_ASCENDER,  AF_BLUE_PROPERTY_LATIN_TOP        },
     { AF_BLUE_STRING_MYANMAR_DESCENDER, 0                                 },
     { AF_BLUE_STRING_MAX,               0                                 },
+    { AF_BLUE_STRING_NKO_TOP,          AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_NKO_BOTTOM,       0                                 },
+    { AF_BLUE_STRING_NKO_SMALL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP      |
+                                       AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0                                 },
+    { AF_BLUE_STRING_MAX,              0                                 },
     { AF_BLUE_STRING_MAX, 0 },
+    { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_OL_CHIKI, 0                          },
+    { AF_BLUE_STRING_MAX,      0                          },
+    { AF_BLUE_STRING_OLD_TURKIC_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,               0                          },
+    { AF_BLUE_STRING_OSAGE_CAPITAL_TOP,       AF_BLUE_PROPERTY_LATIN_TOP       },
+    { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM,    0                                },
+    { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0                                },
+    { AF_BLUE_STRING_OSAGE_SMALL_TOP,         AF_BLUE_PROPERTY_LATIN_TOP     |
+                                              AF_BLUE_PROPERTY_LATIN_X_HEIGHT  },
+    { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM,      0                                },
+    { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER,    AF_BLUE_PROPERTY_LATIN_TOP       },
+    { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER,   0                                },
+    { AF_BLUE_STRING_MAX,                     0                                },
+    { AF_BLUE_STRING_OSMANYA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_OSMANYA_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,            0                          },
+    { AF_BLUE_STRING_SAURASHTRA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,               0                          },
+    { AF_BLUE_STRING_SHAVIAN_TOP,          AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_SHAVIAN_BOTTOM,       0                                 },
+    { AF_BLUE_STRING_SHAVIAN_DESCENDER,    0                                 },
+    { AF_BLUE_STRING_SHAVIAN_SMALL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP      |
+                                           AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0                                 },
+    { AF_BLUE_STRING_MAX,                  0                                 },
     { AF_BLUE_STRING_SINHALA_TOP,       AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_SINHALA_BOTTOM,    0                          },
     { AF_BLUE_STRING_SINHALA_DESCENDER, 0                          },
     { AF_BLUE_STRING_MAX,               0                          },
+    { AF_BLUE_STRING_SUNDANESE_TOP,       AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_SUNDANESE_BOTTOM,    0                          },
+    { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0                          },
+    { AF_BLUE_STRING_MAX,                 0                          },
     { AF_BLUE_STRING_TAMIL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_TAMIL_BOTTOM, 0                          },
     { AF_BLUE_STRING_MAX,          0                          },
+    { AF_BLUE_STRING_TAI_VIET_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,             0                          },
     { AF_BLUE_STRING_TELUGU_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
     { AF_BLUE_STRING_TELUGU_BOTTOM, 0                          },
     { AF_BLUE_STRING_MAX,           0                          },
     { AF_BLUE_STRING_THAI_LARGE_DESCENDER, 0                                 },
     { AF_BLUE_STRING_THAI_DIGIT_TOP,       0                                 },
     { AF_BLUE_STRING_MAX,                  0                                 },
+    { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_TIFINAGH, 0                          },
+    { AF_BLUE_STRING_MAX,      0                          },
+    { AF_BLUE_STRING_VAI_TOP,    AF_BLUE_PROPERTY_LATIN_TOP },
+    { AF_BLUE_STRING_VAI_BOTTOM, 0                          },
+    { AF_BLUE_STRING_MAX,        0                          },
 #ifdef AF_CONFIG_OPTION_CJK
     { AF_BLUE_STRING_CJK_TOP,    AF_BLUE_PROPERTY_CJK_TOP     },
     { AF_BLUE_STRING_CJK_BOTTOM, 0                            },
index 0c3cae8..f9080c5 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter data for blue strings (body).                            */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 0734ec7..454923e 100644 (file)
@@ -2,7 +2,7 @@
 //
 //    Auto-fitter data for blue strings.
 //
-//  Copyright 2013-2016 by
+//  Copyright 2013-2017 by
 //  David Turner, Robert Wilhelm, and Werner Lemberg.
 //
 //  This file is part of the FreeType project, and may only be used,
 
 AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
 
+  AF_BLUE_STRING_ADLAM_CAPITAL_TOP
+    "𞤌 𞤅 𞤈 𞤏 𞤔 𞤚"
+  AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM
+    "𞤂 𞤖"
+  AF_BLUE_STRING_ADLAM_SMALL_TOP
+    "𞤬 𞤮 𞤻 𞤼 𞤾"
+  AF_BLUE_STRING_ADLAM_SMALL_BOTTOM
+    "𞤤 𞤨 𞤩 𞤭 𞤴 𞤸 𞤺 𞥀"
+
   AF_BLUE_STRING_ARABIC_TOP
     "ا إ ل ك ط ظ"
   AF_BLUE_STRING_ARABIC_BOTTOM
@@ -87,18 +96,28 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
     "ـ"
 
   AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP
-    "Ô± Õ\84 Õ\92 Õ\93 Բ Գ Դ Օ"
+    "Ô± Õ\84 Õ\92 Õ\8d Բ Գ Դ Օ"
   AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM
-    "Ւ Ո Փ Ճ Շ Ս Տ Օ"
+    "Ւ Ո Դ Ճ Շ Ս Տ Օ"
   AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER
-    "Õ¥ Õ§ Õ« Õ´ Õ¾ Ö\83 Ö\86 Ö\83"
+    "Õ¥ Õ§ Õ« Õ´ Õ¾ Ö\86 Õ³"
   AF_BLUE_STRING_ARMENIAN_SMALL_TOP
-    "Õ¡ Õµ Ö\82 Õ½ Õ£ Õ» ր օ"
+    "Õ¡ Õµ Ö\82 Õ½ Õ£ Õ· ր օ"
   AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM
     "հ ո ճ ա ե ծ ս օ"
   AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER
     "բ ը ի լ ղ պ փ ց"
 
+  AF_BLUE_STRING_AVESTAN_TOP
+    "𐬀 𐬁 𐬐 𐬛"
+  AF_BLUE_STRING_AVESTAN_BOTTOM
+    "𐬀 𐬁"
+
+  AF_BLUE_STRING_BAMUM_TOP
+    "ꚧ ꚨ ꛛ ꛉ ꛁ ꛈ ꛫ ꛯ"
+  AF_BLUE_STRING_BAMUM_BOTTOM
+    "ꚭ ꚳ ꚶ ꛬ ꚢ ꚽ ꛯ ꛲"
+
   AF_BLUE_STRING_BENGALI_BASE
     "অ ড ত ন ব ভ ল ক"
   AF_BLUE_STRING_BENGALI_TOP
@@ -106,6 +125,40 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_BENGALI_HEAD
     "ও এ ড ত ন ব ল ক"
 
+  AF_BLUE_STRING_BUHID_TOP
+    "ᝐ ᝈ"
+  AF_BLUE_STRING_BUHID_LARGE
+    "ᝅ ᝊ ᝎ"
+  AF_BLUE_STRING_BUHID_SMALL
+    "ᝂ ᝃ ᝉ ᝌ"
+  AF_BLUE_STRING_BUHID_BOTTOM
+    "ᝀ ᝃ ᝆ ᝉ ᝋ ᝏ ᝑ"
+
+  AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP
+    "ᗜ ᖴ ᐁ ᒣ ᑫ ᑎ ᔑ ᗰ"
+  AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM
+    "ᗶ ᖵ ᒧ ᐃ ᑌ ᒍ ᔑ ᗢ"
+  AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP
+    "ᓓ ᓕ ᓀ ᓂ ᓄ ᕄ ᕆ ᘣ"
+  AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM
+    "ᕃ ᓂ ᓀ ᕂ ᓗ ᓚ ᕆ ᘣ"
+  AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP
+    "ᐪ ᙆ ᣘ ᐢ ᒾ ᣗ ᔆ"
+  AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM
+    "ᙆ ᗮ ᒻ ᐞ ᔆ ᒡ ᒢ ᓑ"
+
+  AF_BLUE_STRING_CARIAN_TOP
+    "𐊧 𐊫 𐊬 𐊭 𐊱 𐊺 𐊼 𐊿"
+  AF_BLUE_STRING_CARIAN_BOTTOM
+    "𐊣 𐊧 𐊷 𐋀 𐊫 𐊸 𐋉"
+
+  AF_BLUE_STRING_CHAKMA_TOP
+    "𑄃 𑄅 𑄉 𑄙 𑄗"
+  AF_BLUE_STRING_CHAKMA_BOTTOM
+    "𑄅 𑄛 𑄝 𑄗 𑄓"
+  AF_BLUE_STRING_CHAKMA_DESCENDER
+    "𑄖𑄳𑄢 𑄘𑄳𑄢 𑄙𑄳𑄢 𑄤𑄳𑄢 𑄥𑄳𑄢"
+
   AF_BLUE_STRING_CHEROKEE_CAPITAL
     "Ꮖ Ꮋ Ꭼ Ꮓ Ꭴ Ꮳ Ꭶ Ꮥ"
   AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER
@@ -115,6 +168,22 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER
     "ᏸ ꮐ ꭹ ꭻ"
 
+  AF_BLUE_STRING_COPTIC_CAPITAL_TOP
+    "Ⲍ Ⲏ Ⲡ Ⳟ Ⲟ Ⲑ Ⲥ Ⳋ"
+  AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM
+    "Ⳑ Ⳙ Ⳟ Ⲏ Ⲟ Ⲑ Ⳝ Ⲱ"
+  AF_BLUE_STRING_COPTIC_SMALL_TOP
+    "ⲍ ⲏ ⲡ ⳟ ⲟ ⲑ ⲥ ⳋ"
+  AF_BLUE_STRING_COPTIC_SMALL_BOTTOM
+    "ⳑ ⳙ ⳟ ⲏ ⲟ ⲑ ⳝ Ⳓ"
+
+  AF_BLUE_STRING_CYPRIOT_TOP
+    "𐠍 𐠙 𐠳 𐠱 𐠅 𐠓 𐠣 𐠦"
+  AF_BLUE_STRING_CYPRIOT_BOTTOM
+    "𐠃 𐠊 𐠛 𐠣 𐠳 𐠵 𐠐"
+  AF_BLUE_STRING_CYPRIOT_SMALL
+    "𐠈 𐠏 𐠖"
+
   AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP
     "Б В Е П З О С Э"
   AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM
@@ -124,6 +193,15 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER
     "р у ф"
 
+  AF_BLUE_STRING_DESERET_CAPITAL_TOP
+    "𐐂 𐐄 𐐋 𐐗 𐐑"
+  AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM
+    "𐐀 𐐂 𐐄 𐐗 𐐛"
+  AF_BLUE_STRING_DESERET_SMALL_TOP
+    "𐐪 𐐬 𐐳 𐐿 𐐹"
+  AF_BLUE_STRING_DESERET_SMALL_BOTTOM
+    "𐐨 𐐪 𐐬 𐐿 𐑃"
+
   AF_BLUE_STRING_DEVANAGARI_BASE
     "क म अ आ थ ध भ श"
   AF_BLUE_STRING_DEVANAGARI_TOP
@@ -164,6 +242,20 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER
     "ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ"
 
+  AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP
+    "Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ"
+  AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM
+    "Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ"
+  AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP
+    "ⰵ ⱄ ⱚ ⰴ ⰲ ⰺ ⱛ ⰻ"
+  AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM
+    "ⰵ ⰴ ⰲ ⱚ ⱎ ⱑ ⰺ ⱄ"
+
+  AF_BLUE_STRING_GOTHIC_TOP
+    "𐌲 𐌶 𐍀 𐍄 𐌴 𐍃 𐍈 𐌾"
+  AF_BLUE_STRING_GOTHIC_BOTTOM
+    "𐌶 𐌴 𐍃 𐍈"
+
   AF_BLUE_STRING_GREEK_CAPITAL_TOP
     "Γ Β Ε Ζ Θ Ο Ω"
   AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM
@@ -209,6 +301,17 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_KANNADA_BOTTOM
     "ಅ ಉ ಎ ಲ ೦ ೨ ೬ ೭"
 
+  AF_BLUE_STRING_KAYAH_LI_TOP
+    "꤅ ꤏ ꤁ ꤋ ꤀ ꤍ"
+  AF_BLUE_STRING_KAYAH_LI_BOTTOM
+    "꤈ ꤘ ꤀ ꤍ ꤢ"
+  AF_BLUE_STRING_KAYAH_LI_ASCENDER
+    "ꤖ ꤡ"
+  AF_BLUE_STRING_KAYAH_LI_DESCENDER
+    "ꤑ ꤜ ꤞ"
+  AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER
+    "ꤑ꤬ ꤜ꤭ ꤔ꤬"
+
   AF_BLUE_STRING_KHMER_TOP
     "ខ ទ ន ឧ ឩ ា"
   AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP
@@ -242,8 +345,10 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
     "H E Z L O C U S"
   AF_BLUE_STRING_LATIN_SMALL_F_TOP
     "f i j k d b h"
-  AF_BLUE_STRING_LATIN_SMALL
-    "x z r o e s c"
+  AF_BLUE_STRING_LATIN_SMALL_TOP
+    "u v x z o e s c"
+  AF_BLUE_STRING_LATIN_SMALL_BOTTOM
+    "n r x z o e s c"
   AF_BLUE_STRING_LATIN_SMALL_DESCENDER
     "p q g j y"
 
@@ -272,6 +377,11 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER
     "ᵖ ʸ ᵍ"
 
+  AF_BLUE_STRING_LISU_TOP
+    "ꓡ ꓧ ꓱ ꓶ ꓩ ꓚ ꓵ ꓳ"
+  AF_BLUE_STRING_LISU_BOTTOM
+    "ꓕ ꓜ ꓞ ꓡ ꓛ ꓢ ꓳ ꓴ"
+
   AF_BLUE_STRING_MALAYALAM_TOP
     "ഒ ട ഠ റ ച പ ച്ച പ്പ"
   AF_BLUE_STRING_MALAYALAM_BOTTOM
@@ -286,6 +396,59 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_MYANMAR_DESCENDER
     "ဉ ည ဥ ဩ ဨ ၂ ၅ ၉"
 
+  AF_BLUE_STRING_NKO_TOP
+    "ߐ ߉ ߒ ߟ ߖ ߜ ߠ ߥ"
+  AF_BLUE_STRING_NKO_BOTTOM
+    "߀ ߘ ߡ ߠ ߥ"
+  AF_BLUE_STRING_NKO_SMALL_TOP
+    "ߏ ߛ ߋ"
+  AF_BLUE_STRING_NKO_SMALL_BOTTOM
+    "ߎ ߏ ߛ ߋ"
+
+  AF_BLUE_STRING_OL_CHIKI
+    "ᱛ ᱜ ᱝ ᱡ ᱢ ᱥ"
+
+  AF_BLUE_STRING_OLD_TURKIC_TOP
+    "𐰗 𐰘 𐰧"
+  AF_BLUE_STRING_OLD_TURKIC_BOTTOM
+    "𐰉 𐰗 𐰦 𐰧"
+
+  AF_BLUE_STRING_OSAGE_CAPITAL_TOP
+    "𐒾 𐓍 𐓒 𐓓 𐒻 𐓂 𐒵 𐓆"
+  AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM
+    "𐒰 𐓍 𐓂 𐒿 𐓎 𐒹"
+  AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER
+    "𐒼 𐒽 𐒾"
+  AF_BLUE_STRING_OSAGE_SMALL_TOP
+    "𐓵 𐓶 𐓺 𐓻 𐓝 𐓣 𐓪 𐓮"
+  AF_BLUE_STRING_OSAGE_SMALL_BOTTOM
+    "𐓘 𐓚 𐓣 𐓵 𐓡 𐓧 𐓪 𐓶"
+  AF_BLUE_STRING_OSAGE_SMALL_ASCENDER
+    "𐓤 𐓦 𐓸 𐓹 𐓛"
+  AF_BLUE_STRING_OSAGE_SMALL_DESCENDER
+    "𐓤 𐓥 𐓦"
+
+  AF_BLUE_STRING_OSMANYA_TOP
+    "𐒆 𐒉 𐒐 𐒒 𐒘 𐒛 𐒠 𐒣"
+  AF_BLUE_STRING_OSMANYA_BOTTOM
+    "𐒀 𐒂 𐒆 𐒈 𐒊 𐒒 𐒠 𐒩"
+
+  AF_BLUE_STRING_SAURASHTRA_TOP
+    "ꢜ ꢞ ꢳ ꢂ ꢖ ꢒ ꢝ ꢛ"
+  AF_BLUE_STRING_SAURASHTRA_BOTTOM
+    "ꢂ ꢨ ꢺ ꢤ ꢎ"
+
+  AF_BLUE_STRING_SHAVIAN_TOP
+    "𐑕 𐑙"
+  AF_BLUE_STRING_SHAVIAN_BOTTOM
+    "𐑔 𐑖 𐑗 𐑹 𐑻"
+  AF_BLUE_STRING_SHAVIAN_DESCENDER
+    "𐑟 𐑣"
+  AF_BLUE_STRING_SHAVIAN_SMALL_TOP
+    "𐑱 𐑲 𐑳 𐑴 𐑸 𐑺 𐑼"
+  AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM
+    "𐑴 𐑻 𐑹"
+
   AF_BLUE_STRING_SINHALA_TOP
     "ඉ ක ඝ ඳ ප ය ල ෆ"
   AF_BLUE_STRING_SINHALA_BOTTOM
@@ -293,6 +456,18 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_SINHALA_DESCENDER
     "ද ඳ උ ල තූ තු බු දු"
 
+  AF_BLUE_STRING_SUNDANESE_TOP
+    "ᮋ ᮞ ᮮ ᮽ ᮰ ᮈ"
+  AF_BLUE_STRING_SUNDANESE_BOTTOM
+    "ᮄ ᮔ ᮕ ᮗ ᮰ ᮆ ᮈ ᮉ"
+  AF_BLUE_STRING_SUNDANESE_DESCENDER
+    "ᮼ ᳄"
+
+  AF_BLUE_STRING_TAI_VIET_TOP
+    "ꪆ ꪔ ꪒ ꪖ ꪫ"
+  AF_BLUE_STRING_TAI_VIET_BOTTOM
+    "ꪉ ꪫ ꪮ"
+
   AF_BLUE_STRING_TAMIL_TOP
     "உ ஒ ஓ ற ஈ க ங ச"
   AF_BLUE_STRING_TAMIL_BOTTOM
@@ -318,6 +493,14 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
   AF_BLUE_STRING_THAI_DIGIT_TOP
     "๐ ๑ ๓"
 
+  AF_BLUE_STRING_TIFINAGH
+    "ⵔ ⵙ ⵛ ⵞ ⴵ ⴼ ⴹ ⵎ"
+
+  AF_BLUE_STRING_VAI_TOP
+    "ꗍ ꘖ ꘙ ꘜ ꖜ ꖝ ꔅ ꕢ"
+  AF_BLUE_STRING_VAI_BOTTOM
+    "ꗍ ꘖ ꘙ ꗞ ꔅ ꕢ ꖜ ꔆ"
+
 
 #ifdef AF_CONFIG_OPTION_CJK
 
@@ -483,6 +666,14 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
 
 AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
 
+  AF_BLUE_STRINGSET_ADLM
+    { AF_BLUE_STRING_ADLAM_CAPITAL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM, 0                                 }
+    { AF_BLUE_STRING_ADLAM_SMALL_TOP,      AF_BLUE_PROPERTY_LATIN_TOP      |
+                                           AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_ADLAM_SMALL_BOTTOM,   0                                 }
+    { AF_BLUE_STRING_MAX,                  0                                 }
+
   AF_BLUE_STRINGSET_ARAB
     { AF_BLUE_STRING_ARABIC_TOP,    AF_BLUE_PROPERTY_LATIN_TOP     }
     { AF_BLUE_STRING_ARABIC_BOTTOM, 0                              }
@@ -499,6 +690,16 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER, 0                                 }
     { AF_BLUE_STRING_MAX,                      0                                 }
 
+  AF_BLUE_STRINGSET_AVST
+    { AF_BLUE_STRING_AVESTAN_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_AVESTAN_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,            0                          }
+
+  AF_BLUE_STRINGSET_BAMU
+    { AF_BLUE_STRING_BAMUM_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_BAMUM_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,          0                          }
+
   AF_BLUE_STRINGSET_BENG
     { AF_BLUE_STRING_BENGALI_TOP,  AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP        }
@@ -508,6 +709,35 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_BENGALI_BASE, 0                                 }
     { AF_BLUE_STRING_MAX,          0                                 }
 
+  AF_BLUE_STRINGSET_BUHD
+    { AF_BLUE_STRING_BUHID_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_BUHID_LARGE,  AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_BUHID_SMALL,  AF_BLUE_PROPERTY_LATIN_TOP      |
+                                   AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_BUHID_BOTTOM, 0                                 }
+    { AF_BLUE_STRING_MAX,          0                                 }
+
+  AF_BLUE_STRINGSET_CAKM
+    { AF_BLUE_STRING_CHAKMA_TOP,       AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_CHAKMA_BOTTOM,    0                          }
+    { AF_BLUE_STRING_CHAKMA_DESCENDER, 0                          }
+    { AF_BLUE_STRING_MAX,              0                          }
+
+  AF_BLUE_STRINGSET_CANS
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP,             AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM,          0                                 }
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP,       AF_BLUE_PROPERTY_LATIN_TOP      |
+                                                         AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM,    0                                 }
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP,        AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM,     0                                 }
+    { AF_BLUE_STRING_MAX,                                0                                 }
+
+  AF_BLUE_STRINGSET_CARI
+    { AF_BLUE_STRING_CARIAN_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_CARIAN_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,           0                          }
+
   AF_BLUE_STRINGSET_CHER
     { AF_BLUE_STRING_CHEROKEE_CAPITAL,         AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_CHEROKEE_CAPITAL,         0                                 }
@@ -518,6 +748,21 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER, 0                                 }
     { AF_BLUE_STRING_MAX,                      0                                 }
 
+  AF_BLUE_STRINGSET_COPT
+    { AF_BLUE_STRING_COPTIC_CAPITAL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM, 0                                 }
+    { AF_BLUE_STRING_COPTIC_SMALL_TOP,      AF_BLUE_PROPERTY_LATIN_TOP      |
+                                            AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_COPTIC_SMALL_BOTTOM,   0                                 }
+    { AF_BLUE_STRING_MAX,                   0                                 }
+
+  AF_BLUE_STRINGSET_CPRT
+    { AF_BLUE_STRING_CYPRIOT_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_CYPRIOT_BOTTOM, 0                          }
+    { AF_BLUE_STRING_CYPRIOT_SMALL,  AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_CYPRIOT_SMALL,  0                          }
+    { AF_BLUE_STRING_MAX,            0                          }
+
   AF_BLUE_STRINGSET_CYRL
     { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM,  0                                 }
@@ -537,6 +782,14 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0                                 }
     { AF_BLUE_STRING_MAX,               0                                 }
 
+  AF_BLUE_STRINGSET_DSRT
+    { AF_BLUE_STRING_DESERET_CAPITAL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM, 0                                 }
+    { AF_BLUE_STRING_DESERET_SMALL_TOP,      AF_BLUE_PROPERTY_LATIN_TOP      |
+                                             AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_DESERET_SMALL_BOTTOM,   0                                 }
+    { AF_BLUE_STRING_MAX,                    0                                 }
+
   AF_BLUE_STRINGSET_ETHI
     { AF_BLUE_STRING_ETHIOPIC_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
     { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0                          }
@@ -561,6 +814,19 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER, 0                                 }
     { AF_BLUE_STRING_MAX,                         0                                 }
 
+  AF_BLUE_STRINGSET_GLAG
+    { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM, 0                                 }
+    { AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP,      AF_BLUE_PROPERTY_LATIN_TOP      |
+                                                AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM,   0                                 }
+    { AF_BLUE_STRING_MAX,                       0                                 }
+
+  AF_BLUE_STRINGSET_GOTH
+    { AF_BLUE_STRING_GOTHIC_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_GOTHIC_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,           0                          }
+
   AF_BLUE_STRINGSET_GREK
     { AF_BLUE_STRING_GREEK_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM,  0                                 }
@@ -597,6 +863,15 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_HEBREW_DESCENDER, 0                             }
     { AF_BLUE_STRING_MAX,              0                             }
 
+  AF_BLUE_STRINGSET_KALI
+    { AF_BLUE_STRING_KAYAH_LI_TOP,             AF_BLUE_PROPERTY_LATIN_TOP      |
+                                               AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_KAYAH_LI_BOTTOM,          0                                 }
+    { AF_BLUE_STRING_KAYAH_LI_ASCENDER,        AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_KAYAH_LI_DESCENDER,       0                                 }
+    { AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER, 0                                 }
+    { AF_BLUE_STRING_MAX,                      0                                 }
+
   AF_BLUE_STRINGSET_KNDA
     { AF_BLUE_STRING_KANNADA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
     { AF_BLUE_STRING_KANNADA_BOTTOM, 0                          }
@@ -630,9 +905,9 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_LATIN_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        }
     { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM,  0                                 }
     { AF_BLUE_STRING_LATIN_SMALL_F_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        }
-    { AF_BLUE_STRING_LATIN_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
+    { AF_BLUE_STRING_LATIN_SMALL_TOP,       AF_BLUE_PROPERTY_LATIN_TOP      |
                                             AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
-    { AF_BLUE_STRING_LATIN_SMALL,           0                                 }
+    { AF_BLUE_STRING_LATIN_SMALL_BOTTOM,    0                                 }
     { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0                                 }
     { AF_BLUE_STRING_MAX,                   0                                 }
 
@@ -656,6 +931,11 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0                                 }
     { AF_BLUE_STRING_MAX,                        0                                 }
 
+  AF_BLUE_STRINGSET_LISU
+    { AF_BLUE_STRING_LISU_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_LISU_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,         0                          }
+
   AF_BLUE_STRINGSET_MLYM
     { AF_BLUE_STRING_MALAYALAM_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
     { AF_BLUE_STRING_MALAYALAM_BOTTOM, 0                          }
@@ -669,20 +949,79 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_MYANMAR_DESCENDER, 0                                 }
     { AF_BLUE_STRING_MAX,               0                                 }
 
+  AF_BLUE_STRINGSET_NKOO
+    { AF_BLUE_STRING_NKO_TOP,          AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_NKO_BOTTOM,       0                                 }
+    { AF_BLUE_STRING_NKO_SMALL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP      |
+                                       AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_NKO_SMALL_BOTTOM, 0                                 }
+    { AF_BLUE_STRING_MAX,              0                                 }
+
   AF_BLUE_STRINGSET_NONE
     { AF_BLUE_STRING_MAX, 0 }
 
+  AF_BLUE_STRINGSET_OLCK
+    { AF_BLUE_STRING_OL_CHIKI, AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_OL_CHIKI, 0                          }
+    { AF_BLUE_STRING_MAX,      0                          }
+
+  AF_BLUE_STRINGSET_ORKH
+    { AF_BLUE_STRING_OLD_TURKIC_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_OLD_TURKIC_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,               0                          }
+
+  AF_BLUE_STRINGSET_OSGE
+    { AF_BLUE_STRING_OSAGE_CAPITAL_TOP,       AF_BLUE_PROPERTY_LATIN_TOP       }
+    { AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM,    0                                }
+    { AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER, 0                                }
+    { AF_BLUE_STRING_OSAGE_SMALL_TOP,         AF_BLUE_PROPERTY_LATIN_TOP     |
+                                              AF_BLUE_PROPERTY_LATIN_X_HEIGHT  }
+    { AF_BLUE_STRING_OSAGE_SMALL_BOTTOM,      0                                }
+    { AF_BLUE_STRING_OSAGE_SMALL_ASCENDER,    AF_BLUE_PROPERTY_LATIN_TOP       }
+    { AF_BLUE_STRING_OSAGE_SMALL_DESCENDER,   0                                }
+    { AF_BLUE_STRING_MAX,                     0                                }
+
+  AF_BLUE_STRINGSET_OSMA
+    { AF_BLUE_STRING_OSMANYA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_OSMANYA_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,            0                          }
+
+  AF_BLUE_STRINGSET_SAUR
+    { AF_BLUE_STRING_SAURASHTRA_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_SAURASHTRA_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,               0                          }
+
+  AF_BLUE_STRINGSET_SHAW
+    { AF_BLUE_STRING_SHAVIAN_TOP,          AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_SHAVIAN_BOTTOM,       0                                 }
+    { AF_BLUE_STRING_SHAVIAN_DESCENDER,    0                                 }
+    { AF_BLUE_STRING_SHAVIAN_SMALL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP      |
+                                           AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM, 0                                 }
+    { AF_BLUE_STRING_MAX,                  0                                 }
+
   AF_BLUE_STRINGSET_SINH
     { AF_BLUE_STRING_SINHALA_TOP,       AF_BLUE_PROPERTY_LATIN_TOP }
     { AF_BLUE_STRING_SINHALA_BOTTOM,    0                          }
     { AF_BLUE_STRING_SINHALA_DESCENDER, 0                          }
     { AF_BLUE_STRING_MAX,               0                          }
 
+  AF_BLUE_STRINGSET_SUND
+    { AF_BLUE_STRING_SUNDANESE_TOP,       AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_SUNDANESE_BOTTOM,    0                          }
+    { AF_BLUE_STRING_SUNDANESE_DESCENDER, 0                          }
+    { AF_BLUE_STRING_MAX,                 0                          }
+
   AF_BLUE_STRINGSET_TAML
     { AF_BLUE_STRING_TAMIL_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
     { AF_BLUE_STRING_TAMIL_BOTTOM, 0                          }
     { AF_BLUE_STRING_MAX,          0                          }
 
+  AF_BLUE_STRINGSET_TAVT
+    { AF_BLUE_STRING_TAI_VIET_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_TAI_VIET_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,             0                          }
+
   AF_BLUE_STRINGSET_TELU
     { AF_BLUE_STRING_TELUGU_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
     { AF_BLUE_STRING_TELUGU_BOTTOM, 0                          }
@@ -699,6 +1038,15 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
     { AF_BLUE_STRING_THAI_DIGIT_TOP,       0                                 }
     { AF_BLUE_STRING_MAX,                  0                                 }
 
+  AF_BLUE_STRINGSET_TFNG
+    { AF_BLUE_STRING_TIFINAGH, AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_TIFINAGH, 0                          }
+    { AF_BLUE_STRING_MAX,      0                          }
+
+  AF_BLUE_STRINGSET_VAII
+    { AF_BLUE_STRING_VAI_TOP,    AF_BLUE_PROPERTY_LATIN_TOP }
+    { AF_BLUE_STRING_VAI_BOTTOM, 0                          }
+    { AF_BLUE_STRING_MAX,        0                          }
 
 #ifdef AF_CONFIG_OPTION_CJK
 
index 41f838e..e227dbf 100644 (file)
@@ -7,7 +7,7 @@
 /*                                                                         */
 /*    Auto-fitter data for blue strings (specification).                   */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -77,110 +77,189 @@ FT_BEGIN_HEADER
 
   typedef enum  AF_Blue_String_
   {
-    AF_BLUE_STRING_ARABIC_TOP = 0,
-    AF_BLUE_STRING_ARABIC_BOTTOM = 18,
-    AF_BLUE_STRING_ARABIC_JOIN = 33,
-    AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP = 36,
-    AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM = 60,
-    AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER = 84,
-    AF_BLUE_STRING_ARMENIAN_SMALL_TOP = 108,
-    AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM = 132,
-    AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER = 156,
-    AF_BLUE_STRING_BENGALI_BASE = 180,
-    AF_BLUE_STRING_BENGALI_TOP = 212,
-    AF_BLUE_STRING_BENGALI_HEAD = 240,
-    AF_BLUE_STRING_CHEROKEE_CAPITAL = 272,
-    AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER = 304,
-    AF_BLUE_STRING_CHEROKEE_SMALL = 336,
-    AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER = 368,
-    AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 384,
-    AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 408,
-    AF_BLUE_STRING_CYRILLIC_SMALL = 432,
-    AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 456,
-    AF_BLUE_STRING_DEVANAGARI_BASE = 465,
-    AF_BLUE_STRING_DEVANAGARI_TOP = 497,
-    AF_BLUE_STRING_DEVANAGARI_HEAD = 529,
-    AF_BLUE_STRING_DEVANAGARI_BOTTOM = 561,
-    AF_BLUE_STRING_ETHIOPIC_TOP = 569,
-    AF_BLUE_STRING_ETHIOPIC_BOTTOM = 601,
-    AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP = 633,
-    AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM = 665,
-    AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER = 697,
-    AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER = 729,
-    AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP = 761,
-    AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM = 793,
-    AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP = 825,
-    AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 857,
-    AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 889,
-    AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 921,
-    AF_BLUE_STRING_GREEK_CAPITAL_TOP = 953,
-    AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 974,
-    AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 992,
-    AF_BLUE_STRING_GREEK_SMALL = 1010,
-    AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 1034,
-    AF_BLUE_STRING_GUJARATI_TOP = 1058,
-    AF_BLUE_STRING_GUJARATI_BOTTOM = 1090,
-    AF_BLUE_STRING_GUJARATI_ASCENDER = 1122,
-    AF_BLUE_STRING_GUJARATI_DESCENDER = 1172,
-    AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 1205,
-    AF_BLUE_STRING_GURMUKHI_BASE = 1225,
-    AF_BLUE_STRING_GURMUKHI_HEAD = 1257,
-    AF_BLUE_STRING_GURMUKHI_TOP = 1289,
-    AF_BLUE_STRING_GURMUKHI_BOTTOM = 1321,
-    AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 1353,
-    AF_BLUE_STRING_HEBREW_TOP = 1373,
-    AF_BLUE_STRING_HEBREW_BOTTOM = 1397,
-    AF_BLUE_STRING_HEBREW_DESCENDER = 1415,
-    AF_BLUE_STRING_KANNADA_TOP = 1430,
-    AF_BLUE_STRING_KANNADA_BOTTOM = 1474,
-    AF_BLUE_STRING_KHMER_TOP = 1506,
-    AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 1530,
-    AF_BLUE_STRING_KHMER_BOTTOM = 1570,
-    AF_BLUE_STRING_KHMER_DESCENDER = 1602,
-    AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 1636,
-    AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 1723,
-    AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 1731,
-    AF_BLUE_STRING_LAO_TOP = 1739,
-    AF_BLUE_STRING_LAO_BOTTOM = 1771,
-    AF_BLUE_STRING_LAO_ASCENDER = 1803,
-    AF_BLUE_STRING_LAO_LARGE_ASCENDER = 1819,
-    AF_BLUE_STRING_LAO_DESCENDER = 1831,
-    AF_BLUE_STRING_LATIN_CAPITAL_TOP = 1855,
-    AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 1871,
-    AF_BLUE_STRING_LATIN_SMALL_F_TOP = 1887,
-    AF_BLUE_STRING_LATIN_SMALL = 1901,
-    AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 1915,
-    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 1925,
-    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 1945,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 1965,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL = 1985,
-    AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 2021,
-    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 2041,
-    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 2072,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 2101,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL = 2127,
-    AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 2152,
-    AF_BLUE_STRING_MALAYALAM_TOP = 2163,
-    AF_BLUE_STRING_MALAYALAM_BOTTOM = 2207,
-    AF_BLUE_STRING_MYANMAR_TOP = 2239,
-    AF_BLUE_STRING_MYANMAR_BOTTOM = 2271,
-    AF_BLUE_STRING_MYANMAR_ASCENDER = 2303,
-    AF_BLUE_STRING_MYANMAR_DESCENDER = 2331,
-    AF_BLUE_STRING_SINHALA_TOP = 2363,
-    AF_BLUE_STRING_SINHALA_BOTTOM = 2395,
-    AF_BLUE_STRING_SINHALA_DESCENDER = 2427,
-    AF_BLUE_STRING_TAMIL_TOP = 2471,
-    AF_BLUE_STRING_TAMIL_BOTTOM = 2503,
-    AF_BLUE_STRING_TELUGU_TOP = 2535,
-    AF_BLUE_STRING_TELUGU_BOTTOM = 2563,
-    AF_BLUE_STRING_THAI_TOP = 2591,
-    AF_BLUE_STRING_THAI_BOTTOM = 2615,
-    AF_BLUE_STRING_THAI_ASCENDER = 2643,
-    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 2655,
-    AF_BLUE_STRING_THAI_DESCENDER = 2667,
-    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 2683,
-    AF_BLUE_STRING_THAI_DIGIT_TOP = 2691,
-    af_blue_1_1 = 2702,
+    AF_BLUE_STRING_ADLAM_CAPITAL_TOP = 0,
+    AF_BLUE_STRING_ADLAM_CAPITAL_BOTTOM = 30,
+    AF_BLUE_STRING_ADLAM_SMALL_TOP = 40,
+    AF_BLUE_STRING_ADLAM_SMALL_BOTTOM = 65,
+    AF_BLUE_STRING_ARABIC_TOP = 105,
+    AF_BLUE_STRING_ARABIC_BOTTOM = 123,
+    AF_BLUE_STRING_ARABIC_JOIN = 138,
+    AF_BLUE_STRING_ARMENIAN_CAPITAL_TOP = 141,
+    AF_BLUE_STRING_ARMENIAN_CAPITAL_BOTTOM = 165,
+    AF_BLUE_STRING_ARMENIAN_SMALL_ASCENDER = 189,
+    AF_BLUE_STRING_ARMENIAN_SMALL_TOP = 210,
+    AF_BLUE_STRING_ARMENIAN_SMALL_BOTTOM = 234,
+    AF_BLUE_STRING_ARMENIAN_SMALL_DESCENDER = 258,
+    AF_BLUE_STRING_AVESTAN_TOP = 282,
+    AF_BLUE_STRING_AVESTAN_BOTTOM = 302,
+    AF_BLUE_STRING_BAMUM_TOP = 312,
+    AF_BLUE_STRING_BAMUM_BOTTOM = 344,
+    AF_BLUE_STRING_BENGALI_BASE = 376,
+    AF_BLUE_STRING_BENGALI_TOP = 408,
+    AF_BLUE_STRING_BENGALI_HEAD = 436,
+    AF_BLUE_STRING_BUHID_TOP = 468,
+    AF_BLUE_STRING_BUHID_LARGE = 476,
+    AF_BLUE_STRING_BUHID_SMALL = 488,
+    AF_BLUE_STRING_BUHID_BOTTOM = 504,
+    AF_BLUE_STRING_CANADIAN_SYLLABICS_TOP = 532,
+    AF_BLUE_STRING_CANADIAN_SYLLABICS_BOTTOM = 564,
+    AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_TOP = 596,
+    AF_BLUE_STRING_CANADIAN_SYLLABICS_SMALL_BOTTOM = 628,
+    AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_TOP = 660,
+    AF_BLUE_STRING_CANADIAN_SYLLABICS_SUPS_BOTTOM = 688,
+    AF_BLUE_STRING_CARIAN_TOP = 720,
+    AF_BLUE_STRING_CARIAN_BOTTOM = 760,
+    AF_BLUE_STRING_CHAKMA_TOP = 795,
+    AF_BLUE_STRING_CHAKMA_BOTTOM = 820,
+    AF_BLUE_STRING_CHAKMA_DESCENDER = 845,
+    AF_BLUE_STRING_CHEROKEE_CAPITAL = 910,
+    AF_BLUE_STRING_CHEROKEE_SMALL_ASCENDER = 942,
+    AF_BLUE_STRING_CHEROKEE_SMALL = 974,
+    AF_BLUE_STRING_CHEROKEE_SMALL_DESCENDER = 1006,
+    AF_BLUE_STRING_COPTIC_CAPITAL_TOP = 1022,
+    AF_BLUE_STRING_COPTIC_CAPITAL_BOTTOM = 1054,
+    AF_BLUE_STRING_COPTIC_SMALL_TOP = 1086,
+    AF_BLUE_STRING_COPTIC_SMALL_BOTTOM = 1118,
+    AF_BLUE_STRING_CYPRIOT_TOP = 1150,
+    AF_BLUE_STRING_CYPRIOT_BOTTOM = 1190,
+    AF_BLUE_STRING_CYPRIOT_SMALL = 1225,
+    AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 1240,
+    AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 1264,
+    AF_BLUE_STRING_CYRILLIC_SMALL = 1288,
+    AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 1312,
+    AF_BLUE_STRING_DESERET_CAPITAL_TOP = 1321,
+    AF_BLUE_STRING_DESERET_CAPITAL_BOTTOM = 1346,
+    AF_BLUE_STRING_DESERET_SMALL_TOP = 1371,
+    AF_BLUE_STRING_DESERET_SMALL_BOTTOM = 1396,
+    AF_BLUE_STRING_DEVANAGARI_BASE = 1421,
+    AF_BLUE_STRING_DEVANAGARI_TOP = 1453,
+    AF_BLUE_STRING_DEVANAGARI_HEAD = 1485,
+    AF_BLUE_STRING_DEVANAGARI_BOTTOM = 1517,
+    AF_BLUE_STRING_ETHIOPIC_TOP = 1525,
+    AF_BLUE_STRING_ETHIOPIC_BOTTOM = 1557,
+    AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP = 1589,
+    AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM = 1621,
+    AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER = 1653,
+    AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER = 1685,
+    AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP = 1717,
+    AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM = 1749,
+    AF_BLUE_STRING_GEORGIAN_NUSKHURI_TOP = 1781,
+    AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 1813,
+    AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 1845,
+    AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 1877,
+    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1909,
+    AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 1941,
+    AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 1973,
+    AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2005,
+    AF_BLUE_STRING_GOTHIC_TOP = 2037,
+    AF_BLUE_STRING_GOTHIC_BOTTOM = 2077,
+    AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2097,
+    AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2118,
+    AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2136,
+    AF_BLUE_STRING_GREEK_SMALL = 2154,
+    AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2178,
+    AF_BLUE_STRING_GUJARATI_TOP = 2202,
+    AF_BLUE_STRING_GUJARATI_BOTTOM = 2234,
+    AF_BLUE_STRING_GUJARATI_ASCENDER = 2266,
+    AF_BLUE_STRING_GUJARATI_DESCENDER = 2316,
+    AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2349,
+    AF_BLUE_STRING_GURMUKHI_BASE = 2369,
+    AF_BLUE_STRING_GURMUKHI_HEAD = 2401,
+    AF_BLUE_STRING_GURMUKHI_TOP = 2433,
+    AF_BLUE_STRING_GURMUKHI_BOTTOM = 2465,
+    AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2497,
+    AF_BLUE_STRING_HEBREW_TOP = 2517,
+    AF_BLUE_STRING_HEBREW_BOTTOM = 2541,
+    AF_BLUE_STRING_HEBREW_DESCENDER = 2559,
+    AF_BLUE_STRING_KANNADA_TOP = 2574,
+    AF_BLUE_STRING_KANNADA_BOTTOM = 2618,
+    AF_BLUE_STRING_KAYAH_LI_TOP = 2650,
+    AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2674,
+    AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2694,
+    AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2702,
+    AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2714,
+    AF_BLUE_STRING_KHMER_TOP = 2735,
+    AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2759,
+    AF_BLUE_STRING_KHMER_BOTTOM = 2799,
+    AF_BLUE_STRING_KHMER_DESCENDER = 2831,
+    AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2865,
+    AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 2952,
+    AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 2960,
+    AF_BLUE_STRING_LAO_TOP = 2968,
+    AF_BLUE_STRING_LAO_BOTTOM = 3000,
+    AF_BLUE_STRING_LAO_ASCENDER = 3032,
+    AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3048,
+    AF_BLUE_STRING_LAO_DESCENDER = 3060,
+    AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3084,
+    AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3100,
+    AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3116,
+    AF_BLUE_STRING_LATIN_SMALL_TOP = 3130,
+    AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3146,
+    AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3162,
+    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3172,
+    AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3192,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3212,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL = 3232,
+    AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3268,
+    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3288,
+    AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3319,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3348,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL = 3374,
+    AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3399,
+    AF_BLUE_STRING_LISU_TOP = 3410,
+    AF_BLUE_STRING_LISU_BOTTOM = 3442,
+    AF_BLUE_STRING_MALAYALAM_TOP = 3474,
+    AF_BLUE_STRING_MALAYALAM_BOTTOM = 3518,
+    AF_BLUE_STRING_MYANMAR_TOP = 3550,
+    AF_BLUE_STRING_MYANMAR_BOTTOM = 3582,
+    AF_BLUE_STRING_MYANMAR_ASCENDER = 3614,
+    AF_BLUE_STRING_MYANMAR_DESCENDER = 3642,
+    AF_BLUE_STRING_NKO_TOP = 3674,
+    AF_BLUE_STRING_NKO_BOTTOM = 3698,
+    AF_BLUE_STRING_NKO_SMALL_TOP = 3713,
+    AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3722,
+    AF_BLUE_STRING_OL_CHIKI = 3734,
+    AF_BLUE_STRING_OLD_TURKIC_TOP = 3758,
+    AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3773,
+    AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3793,
+    AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3833,
+    AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3863,
+    AF_BLUE_STRING_OSAGE_SMALL_TOP = 3878,
+    AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3918,
+    AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 3958,
+    AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 3983,
+    AF_BLUE_STRING_OSMANYA_TOP = 3998,
+    AF_BLUE_STRING_OSMANYA_BOTTOM = 4038,
+    AF_BLUE_STRING_SAURASHTRA_TOP = 4078,
+    AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4110,
+    AF_BLUE_STRING_SHAVIAN_TOP = 4130,
+    AF_BLUE_STRING_SHAVIAN_BOTTOM = 4140,
+    AF_BLUE_STRING_SHAVIAN_DESCENDER = 4165,
+    AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4175,
+    AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4210,
+    AF_BLUE_STRING_SINHALA_TOP = 4225,
+    AF_BLUE_STRING_SINHALA_BOTTOM = 4257,
+    AF_BLUE_STRING_SINHALA_DESCENDER = 4289,
+    AF_BLUE_STRING_SUNDANESE_TOP = 4333,
+    AF_BLUE_STRING_SUNDANESE_BOTTOM = 4357,
+    AF_BLUE_STRING_SUNDANESE_DESCENDER = 4389,
+    AF_BLUE_STRING_TAI_VIET_TOP = 4397,
+    AF_BLUE_STRING_TAI_VIET_BOTTOM = 4417,
+    AF_BLUE_STRING_TAMIL_TOP = 4429,
+    AF_BLUE_STRING_TAMIL_BOTTOM = 4461,
+    AF_BLUE_STRING_TELUGU_TOP = 4493,
+    AF_BLUE_STRING_TELUGU_BOTTOM = 4521,
+    AF_BLUE_STRING_THAI_TOP = 4549,
+    AF_BLUE_STRING_THAI_BOTTOM = 4573,
+    AF_BLUE_STRING_THAI_ASCENDER = 4601,
+    AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4613,
+    AF_BLUE_STRING_THAI_DESCENDER = 4625,
+    AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4641,
+    AF_BLUE_STRING_THAI_DIGIT_TOP = 4649,
+    AF_BLUE_STRING_TIFINAGH = 4661,
+    AF_BLUE_STRING_VAI_TOP = 4693,
+    AF_BLUE_STRING_VAI_BOTTOM = 4725,
+    af_blue_1_1 = 4756,
 #ifdef AF_CONFIG_OPTION_CJK
     AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
     AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
@@ -239,34 +318,59 @@ FT_BEGIN_HEADER
 
   typedef enum  AF_Blue_Stringset_
   {
-    AF_BLUE_STRINGSET_ARAB = 0,
-    AF_BLUE_STRINGSET_ARMN = 4,
-    AF_BLUE_STRINGSET_BENG = 11,
-    AF_BLUE_STRINGSET_CHER = 16,
-    AF_BLUE_STRINGSET_CYRL = 23,
-    AF_BLUE_STRINGSET_DEVA = 29,
-    AF_BLUE_STRINGSET_ETHI = 35,
-    AF_BLUE_STRINGSET_GEOR = 38,
-    AF_BLUE_STRINGSET_GEOK = 43,
-    AF_BLUE_STRINGSET_GREK = 50,
-    AF_BLUE_STRINGSET_GUJR = 57,
-    AF_BLUE_STRINGSET_GURU = 63,
-    AF_BLUE_STRINGSET_HEBR = 69,
-    AF_BLUE_STRINGSET_KNDA = 73,
-    AF_BLUE_STRINGSET_KHMR = 76,
-    AF_BLUE_STRINGSET_KHMS = 82,
-    AF_BLUE_STRINGSET_LAO = 85,
-    AF_BLUE_STRINGSET_LATN = 91,
-    AF_BLUE_STRINGSET_LATB = 98,
-    AF_BLUE_STRINGSET_LATP = 105,
-    AF_BLUE_STRINGSET_MLYM = 112,
-    AF_BLUE_STRINGSET_MYMR = 115,
-    AF_BLUE_STRINGSET_NONE = 120,
-    AF_BLUE_STRINGSET_SINH = 121,
-    AF_BLUE_STRINGSET_TAML = 125,
-    AF_BLUE_STRINGSET_TELU = 128,
-    AF_BLUE_STRINGSET_THAI = 131,
-    af_blue_2_1 = 139,
+    AF_BLUE_STRINGSET_ADLM = 0,
+    AF_BLUE_STRINGSET_ARAB = 5,
+    AF_BLUE_STRINGSET_ARMN = 9,
+    AF_BLUE_STRINGSET_AVST = 16,
+    AF_BLUE_STRINGSET_BAMU = 19,
+    AF_BLUE_STRINGSET_BENG = 22,
+    AF_BLUE_STRINGSET_BUHD = 27,
+    AF_BLUE_STRINGSET_CAKM = 32,
+    AF_BLUE_STRINGSET_CANS = 36,
+    AF_BLUE_STRINGSET_CARI = 43,
+    AF_BLUE_STRINGSET_CHER = 46,
+    AF_BLUE_STRINGSET_COPT = 53,
+    AF_BLUE_STRINGSET_CPRT = 58,
+    AF_BLUE_STRINGSET_CYRL = 63,
+    AF_BLUE_STRINGSET_DEVA = 69,
+    AF_BLUE_STRINGSET_DSRT = 75,
+    AF_BLUE_STRINGSET_ETHI = 80,
+    AF_BLUE_STRINGSET_GEOR = 83,
+    AF_BLUE_STRINGSET_GEOK = 88,
+    AF_BLUE_STRINGSET_GLAG = 95,
+    AF_BLUE_STRINGSET_GOTH = 100,
+    AF_BLUE_STRINGSET_GREK = 103,
+    AF_BLUE_STRINGSET_GUJR = 110,
+    AF_BLUE_STRINGSET_GURU = 116,
+    AF_BLUE_STRINGSET_HEBR = 122,
+    AF_BLUE_STRINGSET_KALI = 126,
+    AF_BLUE_STRINGSET_KNDA = 132,
+    AF_BLUE_STRINGSET_KHMR = 135,
+    AF_BLUE_STRINGSET_KHMS = 141,
+    AF_BLUE_STRINGSET_LAO = 144,
+    AF_BLUE_STRINGSET_LATN = 150,
+    AF_BLUE_STRINGSET_LATB = 157,
+    AF_BLUE_STRINGSET_LATP = 164,
+    AF_BLUE_STRINGSET_LISU = 171,
+    AF_BLUE_STRINGSET_MLYM = 174,
+    AF_BLUE_STRINGSET_MYMR = 177,
+    AF_BLUE_STRINGSET_NKOO = 182,
+    AF_BLUE_STRINGSET_NONE = 187,
+    AF_BLUE_STRINGSET_OLCK = 188,
+    AF_BLUE_STRINGSET_ORKH = 191,
+    AF_BLUE_STRINGSET_OSGE = 194,
+    AF_BLUE_STRINGSET_OSMA = 202,
+    AF_BLUE_STRINGSET_SAUR = 205,
+    AF_BLUE_STRINGSET_SHAW = 208,
+    AF_BLUE_STRINGSET_SINH = 214,
+    AF_BLUE_STRINGSET_SUND = 218,
+    AF_BLUE_STRINGSET_TAML = 222,
+    AF_BLUE_STRINGSET_TAVT = 225,
+    AF_BLUE_STRINGSET_TELU = 228,
+    AF_BLUE_STRINGSET_THAI = 231,
+    AF_BLUE_STRINGSET_TFNG = 239,
+    AF_BLUE_STRINGSET_VAII = 242,
+    af_blue_2_1 = 245,
 #ifdef AF_CONFIG_OPTION_CJK
     AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
     af_blue_2_1_1 = af_blue_2_1 + 2,
index dd44e77..268bcbc 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter data for blue strings (specification).                   */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 4823c1d..61e29cd 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter hinting routines for CJK writing system (body).          */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #include "afglobal.h"
 #include "afpic.h"
 #include "aflatin.h"
+#include "afcjk.h"
 
 
 #ifdef AF_CONFIG_OPTION_CJK
 
 #undef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
 
-#include "afcjk.h"
 #include "aferrors.h"
 
 
                                FT_Face        face )
   {
     FT_Bool   started = 0, same_width = 1;
-    FT_Fixed  advance, old_advance = 0;
+    FT_Fixed  advance = 0, old_advance = 0;
 
     void*  shaper_buf;
 
       other_flags |= AF_LATIN_HINTS_VERT_SNAP;
 
     /*
-     *  We adjust stems to full pixels only if we don't use the `light' mode.
+     *  We adjust stems to full pixels unless in `light' or `lcd' mode.
      */
-    if ( mode != FT_RENDER_MODE_LIGHT )
+    if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
       other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
 
     if ( mode == FT_RENDER_MODE_MONO )
 
     sizeof ( AF_CJKMetricsRec ),
 
-    (AF_WritingSystem_InitMetricsFunc) af_cjk_metrics_init,
-    (AF_WritingSystem_ScaleMetricsFunc)af_cjk_metrics_scale,
-    (AF_WritingSystem_DoneMetricsFunc) NULL,
-    (AF_WritingSystem_GetStdWidthsFunc)af_cjk_get_standard_widths,
+    (AF_WritingSystem_InitMetricsFunc) af_cjk_metrics_init,        /* style_metrics_init    */
+    (AF_WritingSystem_ScaleMetricsFunc)af_cjk_metrics_scale,       /* style_metrics_scale   */
+    (AF_WritingSystem_DoneMetricsFunc) NULL,                       /* style_metrics_done    */
+    (AF_WritingSystem_GetStdWidthsFunc)af_cjk_get_standard_widths, /* style_metrics_getstdw */
 
-    (AF_WritingSystem_InitHintsFunc)   af_cjk_hints_init,
-    (AF_WritingSystem_ApplyHintsFunc)  af_cjk_hints_apply
+    (AF_WritingSystem_InitHintsFunc)   af_cjk_hints_init,          /* style_hints_init      */
+    (AF_WritingSystem_ApplyHintsFunc)  af_cjk_hints_apply          /* style_hints_apply     */
   )
 
 
 
     sizeof ( AF_CJKMetricsRec ),
 
-    (AF_WritingSystem_InitMetricsFunc) NULL,
-    (AF_WritingSystem_ScaleMetricsFunc)NULL,
-    (AF_WritingSystem_DoneMetricsFunc) NULL,
-    (AF_WritingSystem_GetStdWidthsFunc)NULL,
+    (AF_WritingSystem_InitMetricsFunc) NULL, /* style_metrics_init    */
+    (AF_WritingSystem_ScaleMetricsFunc)NULL, /* style_metrics_scale   */
+    (AF_WritingSystem_DoneMetricsFunc) NULL, /* style_metrics_done    */
+    (AF_WritingSystem_GetStdWidthsFunc)NULL, /* style_metrics_getstdw */
 
-    (AF_WritingSystem_InitHintsFunc)   NULL,
-    (AF_WritingSystem_ApplyHintsFunc)  NULL
+    (AF_WritingSystem_InitHintsFunc)   NULL, /* style_hints_init      */
+    (AF_WritingSystem_ApplyHintsFunc)  NULL  /* style_hints_apply     */
   )
 
 
index 40d1184..84f892f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter hinting routines for CJK writing system (specification). */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 1c39a70..1b18c66 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter coverages (specification only).                          */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f3960c8..61c32db 100644 (file)
@@ -5,7 +5,7 @@
 /*    Auto-fitter dummy routines to be used if no hinting should be        */
 /*    performed (body).                                                    */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
     sizeof ( AF_StyleMetricsRec ),
 
-    (AF_WritingSystem_InitMetricsFunc) NULL,
-    (AF_WritingSystem_ScaleMetricsFunc)NULL,
-    (AF_WritingSystem_DoneMetricsFunc) NULL,
-    (AF_WritingSystem_GetStdWidthsFunc)NULL,
+    (AF_WritingSystem_InitMetricsFunc) NULL,                /* style_metrics_init    */
+    (AF_WritingSystem_ScaleMetricsFunc)NULL,                /* style_metrics_scale   */
+    (AF_WritingSystem_DoneMetricsFunc) NULL,                /* style_metrics_done    */
+    (AF_WritingSystem_GetStdWidthsFunc)NULL,                /* style_metrics_getstdw */
 
-    (AF_WritingSystem_InitHintsFunc)   af_dummy_hints_init,
-    (AF_WritingSystem_ApplyHintsFunc)  af_dummy_hints_apply
+    (AF_WritingSystem_InitHintsFunc)   af_dummy_hints_init, /* style_hints_init      */
+    (AF_WritingSystem_ApplyHintsFunc)  af_dummy_hints_apply /* style_hints_apply     */
   )
 
 
index 7e58d1a..ebaa7d7 100644 (file)
@@ -5,7 +5,7 @@
 /*    Auto-fitter dummy routines to be used if no hinting should be        */
 /*    performed (specification).                                           */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 53c01f6..dde182f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Autofitter error codes (specification only).                         */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index ac6dcaf..85bef00 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter routines to compute global hinting values (body).        */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
       AF_Script_UniRange  range;
 
 
-      if ( script_class->script_uni_ranges == NULL )
+      if ( !script_class->script_uni_ranges )
         continue;
 
       /*
 
 #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
       hb_font_destroy( globals->hb_font );
-      globals->hb_font = NULL;
-
       hb_buffer_destroy( globals->hb_buf );
-      globals->hb_buf = NULL;
 #endif
 
-      globals->glyph_count               = 0;
-      globals->stem_darkening_for_ppem   = 0;
-      globals->darken_x                  = 0;
-      globals->darken_y                  = 0;
-      globals->standard_vertical_width   = 0;
-      globals->standard_horizontal_width = 0;
-      globals->scale_down_factor         = 0;
-      /* no need to free this one! */
-      globals->glyph_styles              = NULL;
-      globals->face                      = NULL;
-
+      /* no need to free `globals->glyph_styles'; */
+      /* it is part of the `globals' array        */
       FT_FREE( globals );
     }
   }
                              [style_class->writing_system];
 
     metrics = globals->metrics[style];
-    if ( metrics == NULL )
+    if ( !metrics )
     {
       /* create the global metrics object if necessary */
       FT_Memory  memory = globals->face->memory;
index ce6b9e8..de6142e 100644 (file)
@@ -5,7 +5,7 @@
 /*    Auto-fitter routines to compute global hinting values                */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 6c3d032..f1ff0ba 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter hinting routines (body).                                 */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -45,7 +45,7 @@
 
     if ( axis->num_segments < AF_SEGMENTS_EMBEDDED )
     {
-      if ( axis->segments == NULL )
+      if ( !axis->segments )
       {
         axis->segments     = axis->embedded.segments;
         axis->max_segments = AF_SEGMENTS_EMBEDDED;
 
     if ( axis->num_edges < AF_EDGES_EMBEDDED )
     {
-      if ( axis->edges == NULL )
+      if ( !axis->edges )
       {
         axis->edges     = axis->embedded.edges;
         axis->max_edges = AF_EDGES_EMBEDDED;
                 dimension == AF_DIMENSION_HORZ ? "vertical"
                                                : "horizontal" ));
       if ( axis->num_segments )
-        AF_DUMP(( "  index   pos    dir   from   to"
-                  "   link  serif  edge"
+        AF_DUMP(( "  index   pos   delta   dir   from   to "
+                  "  link  serif  edge"
                   "  height  extra     flags\n" ));
       else
         AF_DUMP(( "  (none)\n" ));
 
       for ( seg = segments; seg < limit; seg++ )
-        AF_DUMP(( "  %5d  %5.2g  %5s  %4d  %4d"
+        AF_DUMP(( "  %5d  %5d  %5d  %5s  %4d  %4d"
                   "  %4s  %5s  %4s"
                   "  %6d  %5d  %11s\n",
                   AF_INDEX_NUM( seg, segments ),
-                  dimension == AF_DIMENSION_HORZ
-                               ? (int)seg->first->ox / 64.0
-                               : (int)seg->first->oy / 64.0,
+                  seg->pos,
+                  seg->delta,
                   af_dir_str( (AF_Direction)seg->dir ),
                   AF_INDEX_NUM( seg->first, points ),
                   AF_INDEX_NUM( seg->last, points ),
        *  note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
        *        since they have a constant X coordinate.
        */
-      AF_DUMP(( "Table of %s edges:\n",
-                dimension == AF_DIMENSION_HORZ ? "vertical"
-                                               : "horizontal" ));
+      if ( dimension == AF_DIMENSION_HORZ )
+        AF_DUMP(( "Table of %s edges (1px=%.2fu, 10u=%.2fpx):\n",
+                  "vertical",
+                  65536.0 * 64.0 / hints->x_scale,
+                  10.0 * hints->x_scale / 65536.0 / 64.0 ));
+      else
+        AF_DUMP(( "Table of %s edges (1px=%.2fu, 10u=%.2fpx):\n",
+                  "horizontal",
+                  65536.0 * 64.0 / hints->y_scale,
+                  10.0 * hints->y_scale / 65536.0 / 64.0 ));
+
       if ( axis->num_edges )
-        AF_DUMP(( "  index   pos    dir   link  serif"
-                  "  blue  opos    pos      flags\n" ));
+        AF_DUMP(( "  index    pos     dir   link  serif"
+                  "  blue    opos     pos       flags\n" ));
       else
         AF_DUMP(( "  (none)\n" ));
 
       for ( edge = edges; edge < limit; edge++ )
-        AF_DUMP(( "  %5d  %5.2g  %5s  %4s  %5s"
-                  "    %c   %5.2f  %5.2f  %11s\n",
+        AF_DUMP(( "  %5d  %7.2f  %5s  %4s  %5s"
+                  "    %c   %7.2f  %7.2f  %11s\n",
                   AF_INDEX_NUM( edge, edges ),
                   (int)edge->opos / 64.0,
                   af_dir_str( (AF_Direction)edge->dir ),
 
     if ( new_max <= AF_CONTOURS_EMBEDDED )
     {
-      if ( hints->contours == NULL )
+      if ( !hints->contours )
       {
         hints->contours     = hints->embedded.contours;
         hints->max_contours = AF_CONTOURS_EMBEDDED;
 
     if ( new_max <= AF_POINTS_EMBEDDED )
     {
-      if ( hints->points == NULL )
+      if ( !hints->points )
       {
         hints->points     = hints->embedded.points;
         hints->max_points = AF_POINTS_EMBEDDED;
         AF_Point  point, first, last;
 
 
-        if ( edge == NULL )
+        if ( !edge )
           continue;
 
         first = seg->first;
         AF_Point  point, first, last;
 
 
-        if ( edge == NULL )
+        if ( !edge )
           continue;
 
         first = seg->first;
index 5142e6e..16638b1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter hinting routines (specification).                        */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -260,6 +260,7 @@ FT_BEGIN_HEADER
     FT_Byte     flags;       /* edge/segment flags for this segment */
     FT_Char     dir;         /* segment direction                   */
     FT_Short    pos;         /* position of segment                 */
+    FT_Short    delta;       /* deviation from segment position     */
     FT_Short    min_coord;   /* minimum coordinate of segment       */
     FT_Short    max_coord;   /* maximum coordinate of segment       */
     FT_Short    height;      /* the hinted segment height           */
index 097a2b2..23be46e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter hinting routines for Indic writing system (body).        */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.    */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 #include "aftypes.h"
 #include "aflatin.h"
+#include "afcjk.h"
 
 
 #ifdef AF_CONFIG_OPTION_INDIC
 
 #include "afindic.h"
 #include "aferrors.h"
-#include "afcjk.h"
 
 
 #ifdef AF_CONFIG_OPTION_USE_WARPER
 
     sizeof ( AF_CJKMetricsRec ),
 
-    (AF_WritingSystem_InitMetricsFunc) af_indic_metrics_init,
-    (AF_WritingSystem_ScaleMetricsFunc)af_indic_metrics_scale,
-    (AF_WritingSystem_DoneMetricsFunc) NULL,
-    (AF_WritingSystem_GetStdWidthsFunc)af_indic_get_standard_widths,
+    (AF_WritingSystem_InitMetricsFunc) af_indic_metrics_init,        /* style_metrics_init    */
+    (AF_WritingSystem_ScaleMetricsFunc)af_indic_metrics_scale,       /* style_metrics_scale   */
+    (AF_WritingSystem_DoneMetricsFunc) NULL,                         /* style_metrics_done    */
+    (AF_WritingSystem_GetStdWidthsFunc)af_indic_get_standard_widths, /* style_metrics_getstdw */
 
-    (AF_WritingSystem_InitHintsFunc)   af_indic_hints_init,
-    (AF_WritingSystem_ApplyHintsFunc)  af_indic_hints_apply
+    (AF_WritingSystem_InitHintsFunc)   af_indic_hints_init,          /* style_hints_init      */
+    (AF_WritingSystem_ApplyHintsFunc)  af_indic_hints_apply          /* style_hints_apply     */
   )
 
 
 
     sizeof ( AF_CJKMetricsRec ),
 
-    (AF_WritingSystem_InitMetricsFunc) NULL,
-    (AF_WritingSystem_ScaleMetricsFunc)NULL,
-    (AF_WritingSystem_DoneMetricsFunc) NULL,
-    (AF_WritingSystem_GetStdWidthsFunc)NULL,
+    (AF_WritingSystem_InitMetricsFunc) NULL, /* style_metrics_init    */
+    (AF_WritingSystem_ScaleMetricsFunc)NULL, /* style_metrics_scale   */
+    (AF_WritingSystem_DoneMetricsFunc) NULL, /* style_metrics_done    */
+    (AF_WritingSystem_GetStdWidthsFunc)NULL, /* style_metrics_getstdw */
 
-    (AF_WritingSystem_InitHintsFunc)   NULL,
-    (AF_WritingSystem_ApplyHintsFunc)  NULL
+    (AF_WritingSystem_InitHintsFunc)   NULL, /* style_hints_init      */
+    (AF_WritingSystem_ApplyHintsFunc)  NULL  /* style_hints_apply     */
   )
 
 
index 0772e07..ec9e263 100644 (file)
@@ -5,7 +5,7 @@
 /*    Auto-fitter hinting routines for Indic writing system                */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>.    */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 7ccf3f6..11fa523 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter hinting routines for latin writing system (body).        */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   }
 
 
+  static void
+  af_latin_sort_blue( FT_UInt        count,
+                      AF_LatinBlue*  table )
+  {
+    FT_UInt       i, j;
+    AF_LatinBlue  swap;
+
+
+    /* we sort from bottom to top */
+    for ( i = 1; i < count; i++ )
+    {
+      for ( j = i; j > 0; j-- )
+      {
+        FT_Pos  a, b;
+
+
+        if ( table[j - 1]->flags & ( AF_LATIN_BLUE_TOP     |
+                                     AF_LATIN_BLUE_SUB_TOP ) )
+          a = table[j - 1]->ref.org;
+        else
+          a = table[j - 1]->shoot.org;
+
+        if ( table[j]->flags & ( AF_LATIN_BLUE_TOP     |
+                                 AF_LATIN_BLUE_SUB_TOP ) )
+          b = table[j]->ref.org;
+        else
+          b = table[j]->shoot.org;
+
+        if ( b >= a )
+          break;
+
+        swap         = table[j];
+        table[j]     = table[j - 1];
+        table[j - 1] = swap;
+      }
+    }
+  }
+
+
   /* Find all blue zones.  Flat segments give the reference points, */
   /* round segments the overshoot positions.                        */
 
 
     af_shaper_buf_destroy( face, shaper_buf );
 
+    /* we finally check whether blue zones are ordered; */
+    /* `ref' and `shoot' values of two blue zones must not overlap */
+    if ( axis->blue_count )
+    {
+      FT_UInt       i;
+      AF_LatinBlue  blue_sorted[AF_BLUE_STRINGSET_MAX_LEN + 2];
+
+
+      for ( i = 0; i < axis->blue_count; i++ )
+        blue_sorted[i] = &axis->blues[i];
+
+      /* sort bottoms of blue zones... */
+      af_latin_sort_blue( axis->blue_count, blue_sorted );
+
+      /* ...and adjust top values if necessary */
+      for ( i = 0; i < axis->blue_count - 1; i++ )
+      {
+        FT_Pos*  a;
+        FT_Pos*  b;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+        FT_Bool  a_is_top = 0;
+#endif
+
+
+        if ( blue_sorted[i]->flags & ( AF_LATIN_BLUE_TOP     |
+                                       AF_LATIN_BLUE_SUB_TOP ) )
+        {
+          a = &blue_sorted[i]->shoot.org;
+#ifdef FT_DEBUG_LEVEL_TRACE
+          a_is_top = 1;
+#endif
+        }
+        else
+          a = &blue_sorted[i]->ref.org;
+
+        if ( blue_sorted[i + 1]->flags & ( AF_LATIN_BLUE_TOP     |
+                                           AF_LATIN_BLUE_SUB_TOP ) )
+          b = &blue_sorted[i + 1]->shoot.org;
+        else
+          b = &blue_sorted[i + 1]->ref.org;
+
+        if ( *a > *b )
+        {
+          *a = *b;
+          FT_TRACE5(( "blue zone overlap:"
+                      " adjusting %s %d to %ld\n",
+                      a_is_top ? "overshoot" : "reference",
+                      blue_sorted[i] - axis->blues,
+                      *a ));
+        }
+      }
+    }
+
     FT_TRACE5(( "\n" ));
 
     return;
                                  FT_Face          face )
   {
     FT_Bool   started = 0, same_width = 1;
-    FT_Fixed  advance, old_advance = 0;
+    FT_Fixed  advance = 0, old_advance = 0;
 
     void*  shaper_buf;
 
         FT_UInt  ppem;
 
 
-        scaled    = FT_MulFix( blue->shoot.org, scaler->y_scale );
+        scaled    = FT_MulFix( blue->shoot.org, scale );
         ppem      = metrics->root.scaler.face->size->metrics.x_ppem;
         limit     = metrics->root.globals->increase_x_height;
         threshold = 40;
 
             if ( dist == 0 )
             {
-              scale = new_scale;
-
               FT_TRACE5((
                 "af_latin_metrics_scale_dim:"
                 " x height alignment (style `%s'):\n"
                 "                           "
-                " vertical scaling changed from %.4f to %.4f (by %d%%)\n"
+                " vertical scaling changed from %.5f to %.5f (by %d%%)\n"
                 "\n",
                 af_style_names[metrics->root.style_class->style],
-                axis->org_scale / 65536.0,
                 scale / 65536.0,
+                new_scale / 65536.0,
                 ( fitted - scaled ) * 100 / scaled ));
+
+              scale = new_scale;
             }
 #ifdef FT_DEBUG_LEVEL_TRACE
             else
               /* points are different: we are just leaving an edge, thus */
               /* record a new segment                                    */
 
-              segment->last = point;
-              segment->pos  = (FT_Short)( ( min_pos + max_pos ) >> 1 );
+              segment->last  = point;
+              segment->pos   = (FT_Short)( ( min_pos + max_pos ) >> 1 );
+              segment->delta = (FT_Short)( ( max_pos - min_pos ) >> 1 );
 
               /* a segment is round if either its first or last point */
               /* is a control point, and the length of the on points  */
     FT_Memory     memory = hints->memory;
     AF_LatinAxis  laxis  = &((AF_LatinMetrics)hints->metrics)->axis[dim];
 
+#ifdef FT_CONFIG_OPTION_PIC
+    AF_FaceGlobals  globals = hints->metrics->globals;
+#endif
+
     AF_StyleClass   style_class  = hints->metrics->style_class;
     AF_ScriptClass  script_class = AF_SCRIPT_CLASSES_GET
                                      [style_class->script];
     FT_Fixed      scale;
     FT_Pos        edge_distance_threshold;
     FT_Pos        segment_length_threshold;
+    FT_Pos        segment_width_threshold;
 
 
     axis->num_edges = 0;
      *  corresponding threshold in font units.
      */
     if ( dim == AF_DIMENSION_HORZ )
-        segment_length_threshold = FT_DivFix( 64, hints->y_scale );
+      segment_length_threshold = FT_DivFix( 64, hints->y_scale );
     else
-        segment_length_threshold = 0;
+      segment_length_threshold = 0;
+
+    /*
+     *  Similarly, we ignore segments that have a width delta
+     *  larger than 0.5px (i.e., a width larger than 1px).
+     */
+    segment_width_threshold = FT_DivFix( 32, scale );
 
     /*********************************************************************/
     /*                                                                   */
       FT_Int   ee;
 
 
-      /* ignore too short segments and, in this loop, */
-      /* one-point segments without a direction       */
+      /* ignore too short segments, too wide ones, and, in this loop, */
+      /* one-point segments without a direction                       */
       if ( seg->height < segment_length_threshold ||
+           seg->delta > segment_width_threshold   ||
            seg->dir == AF_DIR_NONE                )
         continue;
 
                                 seg->serif->edge         &&
                                 seg->serif->edge != edge );
 
-          if ( ( seg->link && seg->link->edge != NULL ) || is_serif )
+          if ( ( seg->link && seg->link->edge ) || is_serif )
           {
             AF_Edge     edge2;
             AF_Segment  seg2;
       other_flags |= AF_LATIN_HINTS_VERT_SNAP;
 
     /*
-     *  We adjust stems to full pixels only if we don't use the `light' mode.
+     *  We adjust stems to full pixels unless in `light' or `lcd' mode.
      */
-    if ( mode != FT_RENDER_MODE_LIGHT )
+    if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
       other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
 
     if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_MONO;
 
     /*
-     *  In `light' hinting mode we disable horizontal hinting completely.
+     *  In `light' or `lcd' mode we disable horizontal hinting completely.
      *  We also do it if the face is italic.
      *
      *  However, if warping is enabled (which only works in `light' hinting
      *  mode), advance widths get adjusted, too.
      */
-    if ( mode == FT_RENDER_MODE_LIGHT                      ||
-         ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
+    if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD ||
+         ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0          )
       scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL;
 
 #ifdef AF_CONFIG_OPTION_USE_WARPER
     AF_Edge       anchor     = NULL;
     FT_Int        has_serifs = 0;
 
+#ifdef FT_CONFIG_OPTION_PIC
+    AF_FaceGlobals  globals = hints->metrics->globals;
+#endif
+
     AF_StyleClass   style_class  = hints->metrics->style_class;
     AF_ScriptClass  script_class = AF_SCRIPT_CLASSES_GET
                                      [style_class->script];
 
     sizeof ( AF_LatinMetricsRec ),
 
-    (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init,
-    (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale,
-    (AF_WritingSystem_DoneMetricsFunc) NULL,
-    (AF_WritingSystem_GetStdWidthsFunc)af_latin_get_standard_widths,
+    (AF_WritingSystem_InitMetricsFunc) af_latin_metrics_init,        /* style_metrics_init    */
+    (AF_WritingSystem_ScaleMetricsFunc)af_latin_metrics_scale,       /* style_metrics_scale   */
+    (AF_WritingSystem_DoneMetricsFunc) NULL,                         /* style_metrics_done    */
+    (AF_WritingSystem_GetStdWidthsFunc)af_latin_get_standard_widths, /* style_metrics_getstdw */
 
-    (AF_WritingSystem_InitHintsFunc)   af_latin_hints_init,
-    (AF_WritingSystem_ApplyHintsFunc)  af_latin_hints_apply
+    (AF_WritingSystem_InitHintsFunc)   af_latin_hints_init,          /* style_hints_init      */
+    (AF_WritingSystem_ApplyHintsFunc)  af_latin_hints_apply          /* style_hints_apply     */
   )
 
 
index fe6bbd8..d80e125 100644 (file)
@@ -5,7 +5,7 @@
 /*    Auto-fitter hinting routines for latin writing system                */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 5db4a41..0607278 100644 (file)
@@ -9,7 +9,7 @@
 /*                                                                         */
 /*    Auto-fitter hinting routines for latin writing system (body).        */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -23,6 +23,9 @@
 
 #include FT_ADVANCES_H
 
+
+#ifdef FT_OPTION_AUTOFIT2
+
 #include "afglobal.h"
 #include "aflatin.h"
 #include "aflatin2.h"
                                 seg->serif->edge         &&
                                 seg->serif->edge != edge );
 
-          if ( ( seg->link && seg->link->edge != NULL ) || is_serif )
+          if ( ( seg->link && seg->link->edge ) || is_serif )
           {
             AF_Edge     edge2;
             AF_Segment  seg2;
       other_flags |= AF_LATIN_HINTS_VERT_SNAP;
 
     /*
-     *  We adjust stems to full pixels only if we don't use the `light' mode.
+     *  We adjust stems to full pixels unless in `light' or `lcd' mode.
      */
-    if ( mode != FT_RENDER_MODE_LIGHT )
+    if ( mode != FT_RENDER_MODE_LIGHT && mode != FT_RENDER_MODE_LCD )
       other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
 
     if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_MONO;
 
     /*
-     *  In `light' hinting mode we disable horizontal hinting completely.
+     *  In `light' or `lcd' mode we disable horizontal hinting completely.
      *  We also do it if the face is italic.
      */
-    if ( mode == FT_RENDER_MODE_LIGHT                      ||
-         ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
+    if ( mode == FT_RENDER_MODE_LIGHT || mode == FT_RENDER_MODE_LCD ||
+         ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0          )
       scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL;
 
 #ifdef AF_CONFIG_OPTION_USE_WARPER
 
     sizeof ( AF_LatinMetricsRec ),
 
-    (AF_WritingSystem_InitMetricsFunc) af_latin2_metrics_init,
-    (AF_WritingSystem_ScaleMetricsFunc)af_latin2_metrics_scale,
-    (AF_WritingSystem_DoneMetricsFunc) NULL,
-    (AF_WritingSystem_GetStdWidthsFunc)af_latin2_get_standard_widths,
+    (AF_WritingSystem_InitMetricsFunc) af_latin2_metrics_init,        /* style_metrics_init    */
+    (AF_WritingSystem_ScaleMetricsFunc)af_latin2_metrics_scale,       /* style_metrics_scale   */
+    (AF_WritingSystem_DoneMetricsFunc) NULL,                          /* style_metrics_done    */
+    (AF_WritingSystem_GetStdWidthsFunc)af_latin2_get_standard_widths, /* style_metrics_getstdw */
 
-    (AF_WritingSystem_InitHintsFunc)   af_latin2_hints_init,
-    (AF_WritingSystem_ApplyHintsFunc)  af_latin2_hints_apply
+    (AF_WritingSystem_InitHintsFunc)   af_latin2_hints_init,          /* style_hints_init      */
+    (AF_WritingSystem_ApplyHintsFunc)  af_latin2_hints_apply          /* style_hints_apply     */
   )
 
+#else /* !FT_OPTION_AUTOFIT2 */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _af_latin2_dummy;
+
+#endif /* !FT_OPTION_AUTOFIT2 */
+
 
 /* END */
index f83f704..2d0b154 100644 (file)
@@ -10,7 +10,7 @@
 /*    Auto-fitter hinting routines for latin writing system                */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 26bba06..78c4368 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter glyph loading routines (body).                           */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -51,7 +51,7 @@
     loader->face    = face;
     loader->globals = (AF_FaceGlobals)face->autohint.data;
 
-    if ( loader->globals == NULL )
+    if ( !loader->globals )
     {
       error = af_face_globals_new( face, &loader->globals, module );
       if ( !error )
           ( (FT_Fixed)( (f) * 65536.0 + 0.5 ) )
 
 
-  /* Do the main work of `af_loader_load_glyph'.  Note that we never   */
-  /* have to deal with composite glyphs as those get loaded into       */
-  /* FT_GLYPH_FORMAT_OUTLINE by the recursed `FT_Load_Glyph' function. */
-  /* In the rare cases where FT_LOAD_NO_RECURSE is set, it implies     */
-  /* FT_LOAD_NO_SCALE and as such the auto-hinter is never called.     */
-
   static FT_Error
-  af_loader_load_g( AF_Loader  loader,
-                    AF_Scaler  scaler,
-                    FT_UInt    glyph_index,
-                    FT_Int32   load_flags )
+  af_loader_embolden_glyph_in_slot( AF_Loader        loader,
+                                    FT_Face          face,
+                                    AF_StyleMetrics  style_metrics )
   {
-    AF_Module  module = loader->globals->module;
+    FT_Error  error = FT_Err_Ok;
 
-    FT_Error          error;
-    FT_Face           face     = loader->face;
-    AF_StyleMetrics   metrics  = loader->metrics;
-    AF_GlyphHints     hints    = loader->hints;
-    FT_GlyphSlot      slot     = face->glyph;
-    FT_Slot_Internal  internal = slot->internal;
-    FT_GlyphLoader    gloader  = internal->loader;
-    FT_Int32          flags;
+    FT_GlyphSlot           slot    = face->glyph;
+    AF_FaceGlobals         globals = loader->globals;
+    AF_WritingSystemClass  writing_system_class;
 
+    FT_Size_Metrics*  size_metrics = &face->size->internal->autohint_metrics;
 
-    flags = load_flags | FT_LOAD_LINEAR_DESIGN;
-    error = FT_Load_Glyph( face, glyph_index, flags );
-    if ( error )
+    FT_Pos  stdVW = 0;
+    FT_Pos  stdHW = 0;
+
+    FT_Bool  size_changed = size_metrics->x_ppem !=
+                              globals->stem_darkening_for_ppem;
+
+    FT_Fixed  em_size  = af_intToFixed( face->units_per_EM );
+    FT_Fixed  em_ratio = FT_DivFix( af_intToFixed( 1000 ), em_size );
+
+    FT_Matrix  scale_down_matrix = { 0x10000L, 0, 0, 0x10000L };
+
+
+    /* Skip stem darkening for broken fonts. */
+    if ( !face->units_per_EM )
+    {
+      error = FT_ERR( Corrupted_Font_Header );
       goto Exit;
+    }
 
     /*
-     * Apply stem darkening (emboldening) here before hints are applied to
-     * the outline.  Glyphs are scaled down proportionally to the
-     * emboldening so that curve points don't fall outside their precomputed
-     * blue zones.
-     *
-     * Any emboldening done by the font driver (e.g., the CFF driver)
-     * doesn't reach here because the autohinter loads the unprocessed
-     * glyphs in font units for analysis (functions `af_*_metrics_init_*')
-     * and then above to prepare it for the rasterizers by itself,
-     * independently of the font driver.  So emboldening must be done here,
-     * within the autohinter.
-     *
-     * All glyphs to be autohinted pass through here one by one.  The
-     * standard widths can therefore change from one glyph to the next,
-     * depending on what script a glyph is assigned to (each script has its
-     * own set of standard widths and other metrics).  The darkening amount
-     * must therefore be recomputed for each size and
-     * `standard_{vertical,horizontal}_width' change.
+     *  We depend on the writing system (script analyzers) to supply
+     *  standard widths for the script of the glyph we are looking at.  If
+     *  it can't deliver, stem darkening is disabled.
      */
-    if ( !module->no_stem_darkening )
+    writing_system_class =
+      AF_WRITING_SYSTEM_CLASSES_GET[style_metrics->style_class->writing_system];
+
+    if ( writing_system_class->style_metrics_getstdw )
+      writing_system_class->style_metrics_getstdw( style_metrics,
+                                                   &stdHW,
+                                                   &stdVW );
+    else
     {
-      AF_FaceGlobals         globals = loader->globals;
-      AF_WritingSystemClass  writing_system_class;
+      error = FT_ERR( Unimplemented_Feature );
+      goto Exit;
+    }
 
-      FT_Pos  stdVW = 0;
-      FT_Pos  stdHW = 0;
+    if ( size_changed                                               ||
+         ( stdVW > 0 && stdVW != globals->standard_vertical_width ) )
+    {
+      FT_Fixed  darken_by_font_units_x, darken_x;
 
-      FT_Bool  size_changed = face->size->metrics.x_ppem
-                                != globals->stem_darkening_for_ppem;
 
-      FT_Fixed  em_size  = af_intToFixed( face->units_per_EM );
-      FT_Fixed  em_ratio = FT_DivFix( af_intToFixed( 1000 ), em_size );
+      darken_by_font_units_x =
+        af_intToFixed( af_loader_compute_darkening( loader,
+                                                    face,
+                                                    stdVW ) );
+      darken_x = FT_DivFix( FT_MulFix( darken_by_font_units_x,
+                                       size_metrics->x_scale ),
+                            em_ratio );
 
-      FT_Matrix  scale_down_matrix = { 0x10000L, 0, 0, 0x10000L };
+      globals->standard_vertical_width = stdVW;
+      globals->stem_darkening_for_ppem = size_metrics->x_ppem;
+      globals->darken_x                = af_fixedToInt( darken_x );
+    }
 
+    if ( size_changed                                                 ||
+         ( stdHW > 0 && stdHW != globals->standard_horizontal_width ) )
+    {
+      FT_Fixed  darken_by_font_units_y, darken_y;
+
+
+      darken_by_font_units_y =
+        af_intToFixed( af_loader_compute_darkening( loader,
+                                                    face,
+                                                    stdHW ) );
+      darken_y = FT_DivFix( FT_MulFix( darken_by_font_units_y,
+                                       size_metrics->y_scale ),
+                            em_ratio );
 
-      /* Skip stem darkening for broken fonts. */
-      if ( !face->units_per_EM )
-        goto After_Emboldening;
+      globals->standard_horizontal_width = stdHW;
+      globals->stem_darkening_for_ppem   = size_metrics->x_ppem;
+      globals->darken_y                  = af_fixedToInt( darken_y );
 
       /*
-       * We depend on the writing system (script analyzers) to supply
-       * standard widths for the script of the glyph we are looking at.  If
-       * it can't deliver, stem darkening is effectively disabled.
+       *  Scale outlines down on the Y-axis to keep them inside their blue
+       *  zones.  The stronger the emboldening, the stronger the downscaling
+       *  (plus heuristical padding to prevent outlines still falling out
+       *  their zones due to rounding).
+       *
+       *  Reason: `FT_Outline_Embolden' works by shifting the rightmost
+       *  points of stems farther to the right, and topmost points farther
+       *  up.  This positions points on the Y-axis outside their
+       *  pre-computed blue zones and leads to distortion when applying the
+       *  hints in the code further below.  Code outside this emboldening
+       *  block doesn't know we are presenting it with modified outlines the
+       *  analyzer didn't see!
+       *
+       *  An unfortunate side effect of downscaling is that the emboldening
+       *  effect is slightly decreased.  The loss becomes more pronounced
+       *  versus the CFF driver at smaller sizes, e.g., at 9ppem and below.
        */
-      writing_system_class =
-        AF_WRITING_SYSTEM_CLASSES_GET[metrics->style_class->writing_system];
+      globals->scale_down_factor =
+        FT_DivFix( em_size - ( darken_by_font_units_y + af_intToFixed( 8 ) ),
+                   em_size );
+    }
 
-      if ( writing_system_class->style_metrics_getstdw )
-        writing_system_class->style_metrics_getstdw( metrics,
-                                                     &stdHW,
-                                                     &stdVW );
-      else
-        goto After_Emboldening;
+    FT_Outline_EmboldenXY( &slot->outline,
+                           globals->darken_x,
+                           globals->darken_y );
 
+    scale_down_matrix.yy = globals->scale_down_factor;
+    FT_Outline_Transform( &slot->outline, &scale_down_matrix );
 
-      if ( size_changed                                               ||
-           ( stdVW > 0 && stdVW != globals->standard_vertical_width ) )
-      {
-        FT_Fixed  darken_by_font_units_x, darken_x;
+  Exit:
+    return error;
+  }
 
 
-        darken_by_font_units_x =
-          af_intToFixed( af_loader_compute_darkening( loader,
-                                                      face,
-                                                      stdVW ) );
-        darken_x = FT_DivFix( FT_MulFix( darken_by_font_units_x,
-                                         face->size->metrics.x_scale ),
-                              em_ratio );
+  /* Load the glyph at index into the current slot of a face and hint it. */
 
-        globals->standard_vertical_width = stdVW;
-        globals->stem_darkening_for_ppem = face->size->metrics.x_ppem;
-        globals->darken_x                = af_fixedToInt( darken_x );
-      }
+  FT_LOCAL_DEF( FT_Error )
+  af_loader_load_glyph( AF_Loader  loader,
+                        AF_Module  module,
+                        FT_Face    face,
+                        FT_UInt    glyph_index,
+                        FT_Int32   load_flags )
+  {
+    FT_Error  error;
+
+    FT_Size           size          = face->size;
+    FT_Size_Internal  size_internal = size->internal;
+    FT_GlyphSlot      slot          = face->glyph;
+    FT_Slot_Internal  slot_internal = slot->internal;
+    FT_GlyphLoader    gloader       = slot_internal->loader;
+
+    AF_GlyphHints          hints         = loader->hints;
+    AF_ScalerRec           scaler;
+    AF_StyleMetrics        style_metrics;
+    FT_UInt                style_options = AF_STYLE_NONE_DFLT;
+    AF_StyleClass          style_class;
+    AF_WritingSystemClass  writing_system_class;
 
-      if ( size_changed                                                 ||
-           ( stdHW > 0 && stdHW != globals->standard_horizontal_width ) )
+#ifdef FT_CONFIG_OPTION_PIC
+    AF_FaceGlobals  globals = loader->globals;
+#endif
+
+
+    if ( !size )
+      return FT_THROW( Invalid_Size_Handle );
+
+    FT_ZERO( &scaler );
+
+    if ( !size_internal->autohint_metrics.x_scale                          ||
+         size_internal->autohint_mode != FT_LOAD_TARGET_MODE( load_flags ) )
+    {
+      /* switching between hinting modes usually means different scaling */
+      /* values; this later on enforces recomputation of everything      */
+      /* related to the current size                                     */
+
+      size_internal->autohint_mode    = FT_LOAD_TARGET_MODE( load_flags );
+      size_internal->autohint_metrics = size->metrics;
+
+#ifdef AF_CONFIG_OPTION_TT_SIZE_METRICS
       {
-        FT_Fixed  darken_by_font_units_y, darken_y;
-
-
-        darken_by_font_units_y =
-          af_intToFixed( af_loader_compute_darkening( loader,
-                                                      face,
-                                                      stdHW ) );
-        darken_y = FT_DivFix( FT_MulFix( darken_by_font_units_y,
-                                         face->size->metrics.y_scale ),
-                              em_ratio );
-
-        globals->standard_horizontal_width = stdHW;
-        globals->stem_darkening_for_ppem   = face->size->metrics.x_ppem;
-        globals->darken_y                  = af_fixedToInt( darken_y );
-
-        /*
-         * Scale outlines down on the Y-axis to keep them inside their blue
-         * zones.  The stronger the emboldening, the stronger the
-         * downscaling (plus heuristical padding to prevent outlines still
-         * falling out their zones due to rounding).
-         *
-         * Reason: `FT_Outline_Embolden' works by shifting the rightmost
-         * points of stems farther to the right, and topmost points farther
-         * up.  This positions points on the Y-axis outside their
-         * pre-computed blue zones and leads to distortion when applying the
-         * hints in the code further below.  Code outside this emboldening
-         * block doesn't know we are presenting it with modified outlines
-         * the analyzer didn't see!
-         *
-         * An unfortunate side effect of downscaling is that the emboldening
-         * effect is slightly decreased.  The loss becomes more pronounced
-         * versus the CFF driver at smaller sizes, e.g., at 9ppem and below.
-         */
-        globals->scale_down_factor =
-          FT_DivFix( em_size - ( darken_by_font_units_y + af_intToFixed( 8 ) ),
-                     em_size );
+        FT_Size_Metrics*  size_metrics = &size_internal->autohint_metrics;
+
+
+        /* set metrics to integer values and adjust scaling accordingly; */
+        /* this is the same setup as with TrueType fonts, cf. function   */
+        /* `tt_size_reset' in file `ttobjs.c'                            */
+        size_metrics->ascender  = FT_PIX_ROUND(
+                                    FT_MulFix( face->ascender,
+                                               size_metrics->y_scale ) );
+        size_metrics->descender = FT_PIX_ROUND(
+                                    FT_MulFix( face->descender,
+                                               size_metrics->y_scale ) );
+        size_metrics->height    = FT_PIX_ROUND(
+                                    FT_MulFix( face->height,
+                                               size_metrics->y_scale ) );
+
+        size_metrics->x_scale     = FT_DivFix( size_metrics->x_ppem << 6,
+                                               face->units_per_EM );
+        size_metrics->y_scale     = FT_DivFix( size_metrics->y_ppem << 6,
+                                               face->units_per_EM );
+        size_metrics->max_advance = FT_PIX_ROUND(
+                                      FT_MulFix( face->max_advance_width,
+                                                 size_metrics->x_scale ) );
       }
+#endif /* AF_CONFIG_OPTION_TT_SIZE_METRICS */
+    }
+
+    /*
+     *  TODO: This code currently doesn't support fractional advance widths,
+     *  i.e., placing hinted glyphs at anything other than integer
+     *  x-positions.  This is only relevant for the warper code, which
+     *  scales and shifts glyphs to optimize blackness of stems (hinting on
+     *  the x-axis by nature places things on pixel integers, hinting on the
+     *  y-axis only, i.e., LIGHT mode, doesn't touch the x-axis).  The delta
+     *  values of the scaler would need to be adjusted.
+     */
+    scaler.face    = face;
+    scaler.x_scale = size_internal->autohint_metrics.x_scale;
+    scaler.x_delta = 0;
+    scaler.y_scale = size_internal->autohint_metrics.y_scale;
+    scaler.y_delta = 0;
+
+    scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
+    scaler.flags       = 0;
+
+    /* note that the fallback style can't be changed anymore */
+    /* after the first call of `af_loader_load_glyph'        */
+    error = af_loader_reset( loader, module, face );
+    if ( error )
+      goto Exit;
+
+#ifdef FT_OPTION_AUTOFIT2
+    /* XXX: undocumented hook to activate the latin2 writing system. */
+    if ( load_flags & ( 1UL << 20 ) )
+      style_options = AF_STYLE_LTN2_DFLT;
+#endif
+
+    /*
+     *  Glyphs (really code points) are assigned to scripts.  Script
+     *  analysis is done lazily: For each glyph that passes through here,
+     *  the corresponding script analyzer is called, but returns immediately
+     *  if it has been run already.
+     */
+    error = af_face_globals_get_metrics( loader->globals, glyph_index,
+                                         style_options, &style_metrics );
+    if ( error )
+      goto Exit;
+
+    style_class          = style_metrics->style_class;
+    writing_system_class =
+      AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];
 
-      FT_Outline_EmboldenXY( &slot->outline,
-                             globals->darken_x,
-                             globals->darken_y );
+    loader->metrics = style_metrics;
 
-      scale_down_matrix.yy = globals->scale_down_factor;
-      FT_Outline_Transform( &slot->outline, &scale_down_matrix );
+    if ( writing_system_class->style_metrics_scale )
+      writing_system_class->style_metrics_scale( style_metrics, &scaler );
+    else
+      style_metrics->scaler = scaler;
+
+    if ( writing_system_class->style_hints_init )
+    {
+      error = writing_system_class->style_hints_init( hints,
+                                                      style_metrics );
+      if ( error )
+        goto Exit;
     }
 
-  After_Emboldening:
-    loader->transformed = internal->glyph_transformed;
+    /*
+     *  Do the main work of `af_loader_load_glyph'.  Note that we never have
+     *  to deal with composite glyphs as those get loaded into
+     *  FT_GLYPH_FORMAT_OUTLINE by the recursed `FT_Load_Glyph' function.
+     *  In the rare cases where FT_LOAD_NO_RECURSE is set, it implies
+     *  FT_LOAD_NO_SCALE and as such the auto-hinter is never called.
+     */
+    load_flags |=  FT_LOAD_NO_SCALE         |
+                   FT_LOAD_IGNORE_TRANSFORM |
+                   FT_LOAD_LINEAR_DESIGN;
+    load_flags &= ~FT_LOAD_RENDER;
+
+    error = FT_Load_Glyph( face, glyph_index, load_flags );
+    if ( error )
+      goto Exit;
+
+    /*
+     *  Apply stem darkening (emboldening) here before hints are applied to
+     *  the outline.  Glyphs are scaled down proportionally to the
+     *  emboldening so that curve points don't fall outside their
+     *  precomputed blue zones.
+     *
+     *  Any emboldening done by the font driver (e.g., the CFF driver)
+     *  doesn't reach here because the autohinter loads the unprocessed
+     *  glyphs in font units for analysis (functions `af_*_metrics_init_*')
+     *  and then above to prepare it for the rasterizers by itself,
+     *  independently of the font driver.  So emboldening must be done here,
+     *  within the autohinter.
+     *
+     *  All glyphs to be autohinted pass through here one by one.  The
+     *  standard widths can therefore change from one glyph to the next,
+     *  depending on what script a glyph is assigned to (each script has its
+     *  own set of standard widths and other metrics).  The darkening amount
+     *  must therefore be recomputed for each size and
+     *  `standard_{vertical,horizontal}_width' change.
+     *
+     *  Ignore errors and carry on without emboldening.
+     *
+     */
+
+    /* stem darkening only works well in `light' mode */
+    if ( scaler.render_mode == FT_RENDER_MODE_LIGHT    &&
+         ( !face->internal->no_stem_darkening        ||
+           ( face->internal->no_stem_darkening < 0 &&
+             !module->no_stem_darkening            ) ) )
+      af_loader_embolden_glyph_in_slot( loader, face, style_metrics );
+
+    loader->transformed = slot_internal->glyph_transformed;
     if ( loader->transformed )
     {
       FT_Matrix  inverse;
 
 
-      loader->trans_matrix = internal->glyph_matrix;
-      loader->trans_delta  = internal->glyph_delta;
+      loader->trans_matrix = slot_internal->glyph_matrix;
+      loader->trans_delta  = slot_internal->glyph_delta;
 
       inverse = loader->trans_matrix;
       if ( !FT_Matrix_Invert( &inverse ) )
                               loader->trans_delta.x,
                               loader->trans_delta.y );
 
-      /* compute original horizontal phantom points (and ignore */
-      /* vertical ones)                                         */
+      /* compute original horizontal phantom points */
+      /* (and ignore vertical ones)                 */
       loader->pp1.x = hints->x_delta;
       loader->pp1.y = hints->y_delta;
       loader->pp2.x = FT_MulFix( slot->metrics.horiAdvance,
       if ( slot->outline.n_points == 0 )
         goto Hint_Metrics;
 
-      /* now load the slot image into the auto-outline and run the */
-      /* automatic hinting process                                 */
-      {
-#ifdef FT_CONFIG_OPTION_PIC
-        AF_FaceGlobals         globals = loader->globals;
-#endif
-        AF_StyleClass          style_class = metrics->style_class;
-        AF_WritingSystemClass  writing_system_class =
-          AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];
-
-
-        if ( writing_system_class->style_hints_apply )
-          writing_system_class->style_hints_apply( glyph_index,
-                                                   hints,
-                                                   &gloader->base.outline,
-                                                   metrics );
-      }
+      /* now load the slot image into the auto-outline */
+      /* and run the automatic hinting process         */
+      if ( writing_system_class->style_hints_apply )
+        writing_system_class->style_hints_apply( glyph_index,
+                                                 hints,
+                                                 &gloader->base.outline,
+                                                 style_metrics );
 
       /* we now need to adjust the metrics according to the change in */
       /* width/positioning that occurred during the hinting process   */
-      if ( scaler->render_mode != FT_RENDER_MODE_LIGHT )
+      if ( scaler.render_mode != FT_RENDER_MODE_LIGHT )
       {
-        FT_Pos        old_rsb, old_lsb, new_lsb;
-        FT_Pos        pp1x_uh, pp2x_uh;
+        FT_Pos  old_rsb, old_lsb, new_lsb;
+        FT_Pos  pp1x_uh, pp2x_uh;
+
         AF_AxisHints  axis  = &hints->axis[AF_DIMENSION_HORZ];
         AF_Edge       edge1 = axis->edges;         /* leftmost edge  */
         AF_Edge       edge2 = edge1 +
         if ( axis->num_edges > 1 && AF_HINTS_DO_ADVANCE( hints ) )
         {
           old_rsb = loader->pp2.x - edge2->opos;
-          old_lsb = edge1->opos;
+          /* loader->pp1.x is always zero at this point of time */
+          old_lsb = edge1->opos /* - loader->pp1.x */;
           new_lsb = edge1->pos;
 
           /* remember unhinted values to later account */
           /* for rounding errors                       */
-
           pp1x_uh = new_lsb    - old_lsb;
           pp2x_uh = edge2->pos + old_rsb;
 
           slot->rsb_delta = loader->pp2.x - pp2x;
         }
       }
+      /* `light' mode uses integer advance widths */
+      /* but sets `lsb_delta' and `rsb_delta'     */
       else
       {
         FT_Pos  pp1x = loader->pp1.x;
 
       vvector.x = slot->metrics.vertBearingX - slot->metrics.horiBearingX;
       vvector.y = slot->metrics.vertBearingY - slot->metrics.horiBearingY;
-      vvector.x = FT_MulFix( vvector.x, metrics->scaler.x_scale );
-      vvector.y = FT_MulFix( vvector.y, metrics->scaler.y_scale );
+      vvector.x = FT_MulFix( vvector.x, style_metrics->scaler.x_scale );
+      vvector.y = FT_MulFix( vvector.y, style_metrics->scaler.y_scale );
 
       /* transform the hinted outline if needed */
       if ( loader->transformed )
         FT_Outline_Transform( &gloader->base.outline, &loader->trans_matrix );
         FT_Vector_Transform( &vvector, &loader->trans_matrix );
       }
-#if 1
+
       /* we must translate our final outline by -pp1.x and compute */
       /* the new metrics                                           */
       if ( loader->pp1.x )
         FT_Outline_Translate( &gloader->base.outline, -loader->pp1.x, 0 );
-#endif
+
       FT_Outline_Get_CBox( &gloader->base.outline, &bbox );
 
       bbox.xMin = FT_PIX_FLOOR( bbox.xMin );
       /* for mono-width fonts (like Andale, Courier, etc.) we need */
       /* to keep the original rounded advance width; ditto for     */
       /* digits if all have the same advance width                 */
-#if 0
-      if ( !FT_IS_FIXED_WIDTH( slot->face ) )
-        slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
-      else
-        slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
-                                               x_scale );
-#else
-      if ( scaler->render_mode != FT_RENDER_MODE_LIGHT                      &&
+      if ( scaler.render_mode != FT_RENDER_MODE_LIGHT                       &&
            ( FT_IS_FIXED_WIDTH( slot->face )                              ||
              ( af_face_globals_is_digit( loader->globals, glyph_index ) &&
-               metrics->digits_have_same_width                          ) ) )
+               style_metrics->digits_have_same_width                    ) ) )
       {
-        slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
-                                               metrics->scaler.x_scale );
+        slot->metrics.horiAdvance =
+          FT_MulFix( slot->metrics.horiAdvance,
+                     style_metrics->scaler.x_scale );
 
         /* Set delta values to 0.  Otherwise code that uses them is */
         /* going to ruin the fixed advance width.                   */
         if ( slot->metrics.horiAdvance )
           slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
       }
-#endif
 
       slot->metrics.vertAdvance = FT_MulFix( slot->metrics.vertAdvance,
-                                             metrics->scaler.y_scale );
+                                             style_metrics->scaler.y_scale );
 
       slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
       slot->metrics.vertAdvance = FT_PIX_ROUND( slot->metrics.vertAdvance );
 
-#if 0
-      /* reassign all outline fields except flags to protect them */
-      slot->outline.n_contours = internal->loader->base.outline.n_contours;
-      slot->outline.n_points   = internal->loader->base.outline.n_points;
-      slot->outline.points     = internal->loader->base.outline.points;
-      slot->outline.tags       = internal->loader->base.outline.tags;
-      slot->outline.contours   = internal->loader->base.outline.contours;
-#endif
-
       slot->format  = FT_GLYPH_FORMAT_OUTLINE;
     }
 
   }
 
 
-  /* Load a glyph. */
-
-  FT_LOCAL_DEF( FT_Error )
-  af_loader_load_glyph( AF_Loader  loader,
-                        AF_Module  module,
-                        FT_Face    face,
-                        FT_UInt    gindex,
-                        FT_Int32   load_flags )
-  {
-    FT_Error      error;
-    FT_Size       size   = face->size;
-    AF_ScalerRec  scaler;
-
-
-    if ( !size )
-      return FT_THROW( Invalid_Size_Handle );
-
-    FT_ZERO( &scaler );
-
-    scaler.face    = face;
-    scaler.x_scale = size->metrics.x_scale;
-    scaler.x_delta = 0;  /* XXX: TODO: add support for sub-pixel hinting */
-    scaler.y_scale = size->metrics.y_scale;
-    scaler.y_delta = 0;  /* XXX: TODO: add support for sub-pixel hinting */
-
-    scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
-    scaler.flags       = 0;  /* XXX: fix this */
-
-    error = af_loader_reset( loader, module, face );
-    if ( !error )
-    {
-      AF_StyleMetrics  metrics;
-      FT_UInt          options = AF_STYLE_NONE_DFLT;
-
-
-#ifdef FT_OPTION_AUTOFIT2
-      /* XXX: undocumented hook to activate the latin2 writing system */
-      if ( load_flags & ( 1UL << 20 ) )
-        options = AF_STYLE_LTN2_DFLT;
-#endif
-
-      error = af_face_globals_get_metrics( loader->globals, gindex,
-                                           options, &metrics );
-      if ( !error )
-      {
-#ifdef FT_CONFIG_OPTION_PIC
-        AF_FaceGlobals         globals = loader->globals;
-#endif
-        AF_StyleClass          style_class = metrics->style_class;
-        AF_WritingSystemClass  writing_system_class =
-          AF_WRITING_SYSTEM_CLASSES_GET[style_class->writing_system];
-
-
-        loader->metrics = metrics;
-
-        if ( writing_system_class->style_metrics_scale )
-          writing_system_class->style_metrics_scale( metrics, &scaler );
-        else
-          metrics->scaler = scaler;
-
-        load_flags |=  FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;
-        load_flags &= ~FT_LOAD_RENDER;
-
-        if ( writing_system_class->style_hints_init )
-        {
-          error = writing_system_class->style_hints_init( loader->hints,
-                                                          metrics );
-          if ( error )
-            goto Exit;
-        }
-
-        error = af_loader_load_g( loader, &scaler, gindex, load_flags );
-      }
-    }
-  Exit:
-    return error;
-  }
-
-
   /*
    * Compute amount of font units the face should be emboldened by, in
    * analogy to the CFF driver's `cf2_computeDarkening' function.  See there
index 0062eb9..2578abe 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter glyph loading routines (specification).                  */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 4127382..9d7ba22 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter module implementation (body).                            */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   }
 
 
+#ifdef FT_CONFIG_OPTION_PIC
+
+#undef  AF_SCRIPT_CLASSES_GET
+#define AF_SCRIPT_CLASSES_GET  \
+          ( GET_PIC( ft_module->library )->af_script_classes )
+
+#undef  AF_STYLE_CLASSES_GET
+#define AF_STYLE_CLASSES_GET  \
+          ( GET_PIC( ft_module->library )->af_style_classes )
+
+#endif
+
+
   static FT_Error
   af_property_set( FT_Module    ft_module,
                    const char*  property_name,
-                   const void*  value )
+                   const void*  value,
+                   FT_Bool      value_is_string )
   {
     FT_Error   error  = FT_Err_Ok;
     AF_Module  module = (AF_Module)ft_module;
 
+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+    FT_UNUSED( value_is_string );
+#endif
+
 
     if ( !ft_strcmp( property_name, "fallback-script" ) )
     {
-      FT_UInt*  fallback_script = (FT_UInt*)value;
+      FT_UInt*  fallback_script;
+      FT_UInt   ss;
 
-      FT_UInt  ss;
 
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+        return FT_THROW( Invalid_Argument );
+#endif
+
+      fallback_script = (FT_UInt*)value;
 
       /* We translate the fallback script to a fallback style that uses */
       /* `fallback-script' as its script and `AF_COVERAGE_NONE' as its  */
     }
     else if ( !ft_strcmp( property_name, "default-script" ) )
     {
-      FT_UInt*  default_script = (FT_UInt*)value;
+      FT_UInt*  default_script;
 
 
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+        return FT_THROW( Invalid_Argument );
+#endif
+
+      default_script = (FT_UInt*)value;
+
       module->default_script = *default_script;
 
       return error;
     }
     else if ( !ft_strcmp( property_name, "increase-x-height" ) )
     {
-      FT_Prop_IncreaseXHeight*  prop = (FT_Prop_IncreaseXHeight*)value;
+      FT_Prop_IncreaseXHeight*  prop;
       AF_FaceGlobals            globals;
 
 
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+        return FT_THROW( Invalid_Argument );
+#endif
+
+      prop = (FT_Prop_IncreaseXHeight*)value;
+
       error = af_property_get_face_globals( prop->face, &globals, module );
       if ( !error )
         globals->increase_x_height = prop->limit;
 #ifdef AF_CONFIG_OPTION_USE_WARPER
     else if ( !ft_strcmp( property_name, "warping" ) )
     {
-      FT_Bool*  warping = (FT_Bool*)value;
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+      {
+        const char*  s = (const char*)value;
+        long         w = ft_strtol( s, NULL, 10 );
+
+
+        if ( w == 0 )
+          module->warping = 0;
+        else if ( w == 1 )
+          module->warping = 1;
+        else
+          return FT_THROW( Invalid_Argument );
+      }
+      else
+#endif
+      {
+        FT_Bool*  warping = (FT_Bool*)value;
 
 
-      module->warping = *warping;
+        module->warping = *warping;
+      }
 
       return error;
     }
 #endif /* AF_CONFIG_OPTION_USE_WARPER */
     else if ( !ft_strcmp( property_name, "darkening-parameters" ) )
     {
-      FT_Int*  darken_params = (FT_Int*)value;
+      FT_Int*  darken_params;
+      FT_Int   x1, y1, x2, y2, x3, y3, x4, y4;
+
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      FT_Int   dp[8];
+
+
+      if ( value_is_string )
+      {
+        const char*  s = (const char*)value;
+        char*        ep;
+        int          i;
+
+
+        /* eight comma-separated numbers */
+        for ( i = 0; i < 7; i++ )
+        {
+          dp[i] = (FT_Int)ft_strtol( s, &ep, 10 );
+          if ( *ep != ',' || s == ep )
+            return FT_THROW( Invalid_Argument );
 
-      FT_Int  x1 = darken_params[0];
-      FT_Int  y1 = darken_params[1];
-      FT_Int  x2 = darken_params[2];
-      FT_Int  y2 = darken_params[3];
-      FT_Int  x3 = darken_params[4];
-      FT_Int  y3 = darken_params[5];
-      FT_Int  x4 = darken_params[6];
-      FT_Int  y4 = darken_params[7];
+          s = ep + 1;
+        }
 
+        dp[7] = (FT_Int)ft_strtol( s, &ep, 10 );
+        if ( !( *ep == '\0' || *ep == ' ' ) || s == ep )
+          return FT_THROW( Invalid_Argument );
+
+        darken_params = dp;
+      }
+      else
+#endif
+        darken_params = (FT_Int*)value;
+
+      x1 = darken_params[0];
+      y1 = darken_params[1];
+      x2 = darken_params[2];
+      y2 = darken_params[3];
+      x3 = darken_params[4];
+      y3 = darken_params[5];
+      x4 = darken_params[6];
+      y4 = darken_params[7];
 
       if ( x1 < 0   || x2 < 0   || x3 < 0   || x4 < 0   ||
            y1 < 0   || y2 < 0   || y3 < 0   || y4 < 0   ||
     }
     else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
     {
-      FT_Bool*  no_stem_darkening = (FT_Bool*)value;
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+      {
+        const char*  s   = (const char*)value;
+        long         nsd = ft_strtol( s, NULL, 10 );
 
 
-      module->no_stem_darkening = *no_stem_darkening;
+        if ( !nsd )
+          module->no_stem_darkening = FALSE;
+        else
+          module->no_stem_darkening = TRUE;
+      }
+      else
+#endif
+      {
+        FT_Bool*  no_stem_darkening = (FT_Bool*)value;
+
+
+        module->no_stem_darkening = *no_stem_darkening;
+      }
 
       return error;
     }
 
   FT_DEFINE_SERVICE_PROPERTIESREC(
     af_service_properties,
+
     (FT_Properties_SetFunc)af_property_set,        /* set_property */
     (FT_Properties_GetFunc)af_property_get )       /* get_property */
 
 
   FT_DEFINE_SERVICEDESCREC1(
     af_services,
+
     FT_SERVICE_ID_PROPERTIES, &AF_SERVICE_PROPERTIES_GET )
 
 
     error = af_loader_load_glyph( loader, module, slot->face,
                                   glyph_index, load_flags );
 
-    af_glyph_hints_dump_points( hints, 0 );
-    af_glyph_hints_dump_segments( hints, 0 );
-    af_glyph_hints_dump_edges( hints, 0 );
+#ifdef FT_DEBUG_LEVEL_TRACE
+    if ( ft_trace_levels[FT_COMPONENT] )
+    {
+#endif
+      af_glyph_hints_dump_points( hints, 0 );
+      af_glyph_hints_dump_segments( hints, 0 );
+      af_glyph_hints_dump_edges( hints, 0 );
+#ifdef FT_DEBUG_LEVEL_TRACE
+    }
+#endif
 
     af_loader_done( loader );
 
 
   FT_DEFINE_AUTOHINTER_INTERFACE(
     af_autofitter_interface,
+
     NULL,                                                    /* reset_face */
     NULL,                                              /* get_global_hints */
     NULL,                                             /* done_global_hints */
 
     (const void*)&AF_INTERFACE_GET,
 
-    (FT_Module_Constructor)af_autofitter_init,
-    (FT_Module_Destructor) af_autofitter_done,
-    (FT_Module_Requester)  af_get_interface )
+    (FT_Module_Constructor)af_autofitter_init,  /* module_init   */
+    (FT_Module_Destructor) af_autofitter_done,  /* module_done   */
+    (FT_Module_Requester)  af_get_interface     /* get_interface */
+  )
 
 
 /* END */
index e65db5f..0571d14 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter module implementation (specification).                   */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 3cbd916..3125e03 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for autofit module.  */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 98a45a2..8cd3392 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for autofit module.  */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -69,7 +69,7 @@ FT_BEGIN_HEADER
 
 
 #define GET_PIC( lib )  \
-          ( (AFModulePIC*)((lib)->pic_container.autofit) )
+          ( (AFModulePIC*)( (lib)->pic_container.autofit ) )
 
 #define AF_SERVICES_GET  \
           ( GET_PIC( library )->af_services )
index 732f3d1..7f37eea 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter Unicode script ranges (body).                            */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   /* not be affected by blue zones, regardless of whether this is a       */
   /* spacing or no-spacing glyph                                          */
 
-  /* the `ta_xxxx_nonbase_uniranges' ranges must be strict subsets */
-  /* of the corresponding `ta_xxxx_uniranges' ranges               */
+  /* the `af_xxxx_nonbase_uniranges' ranges must be strict subsets */
+  /* of the corresponding `af_xxxx_uniranges' ranges               */
+
+
+  const AF_Script_UniRangeRec  af_adlm_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x1E900, 0x1E95F ),   /* Adlam */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_adlm_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x1D944, 0x1E94A ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
 
 
   const AF_Script_UniRangeRec  af_arab_uniranges[] =
   };
 
 
+  const AF_Script_UniRangeRec  af_avst_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10B00,  0x10B3F ),  /* Avestan */
+    AF_UNIRANGE_REC(       0,        0 )
+  };
+
+  const AF_Script_UniRangeRec  af_avst_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10B39,  0x10B3F ),
+    AF_UNIRANGE_REC(       0,        0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_bamu_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0xA6A0,   0xA6FF ),   /* Bamum */
+#if 0
+    /* The characters in the Bamum supplement are pictograms, */
+    /* not (directly) related to the syllabic Bamum script    */
+    AF_UNIRANGE_REC( 0x16800, 0x16A3F ),   /* Bamum Supplement */
+#endif
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_bamu_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA6F0,  0xA6F1 ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_beng_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0980,  0x09FF ),  /* Bengali */
   };
 
 
+  const AF_Script_UniRangeRec  af_buhd_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x1740,  0x175F ),   /* Buhid */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_buhd_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x1752,  0x1753 ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_cakm_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x11100, 0x1114F ),   /* Chakma */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_cakm_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x11100, 0x11102 ),
+    AF_UNIRANGE_REC( 0x11127, 0x11134 ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_cans_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x1400,  0x167F ), /* Unified Canadian Aboriginal Syllabics          */
+    AF_UNIRANGE_REC(  0x18B0,  0x18FF ), /* Unified Canadian Aboriginal Syllabics Extended */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_cans_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_cari_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x102A0, 0x102DF ),   /* Carian */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_cari_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_cher_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x13A0,  0x13FF ),  /* Cherokee            */
   };
 
 
+  const AF_Script_UniRangeRec  af_copt_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x2C80,  0x2CFF ),   /* Coptic */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_copt_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x2CEF,  0x2CF1 ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_cprt_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10800, 0x1083F ),   /* Cypriot */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_cprt_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_cyrl_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0400,  0x04FF ),  /* Cyrillic            */
   };
 
 
+  const AF_Script_UniRangeRec  af_dsrt_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10400, 0x1044F ),  /* Deseret */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_dsrt_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_ethi_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x1200,  0x137F ),  /* Ethiopic            */
   };
 
 
+  const AF_Script_UniRangeRec  af_glag_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x2C00,  0x2C5F ),  /* Glagolitic */
+    AF_UNIRANGE_REC( 0x1E000, 0x1E02F ),  /* Glagolitic Supplement */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_glag_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x1E000, 0x1E02F ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_goth_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10330, 0x1034F ),   /* Gothic */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_goth_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_grek_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0370,  0x03FF ),  /* Greek and Coptic */
   };
 
 
+  const AF_Script_UniRangeRec  af_kali_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA900,  0xA92F ),   /* Kayah Li */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_kali_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA926,  0xA92D ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_knda_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0C80,  0x0CFF ),  /* Kannada */
   };
 
 
+  const AF_Script_UniRangeRec  af_lisu_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA4D0,  0xA4FF ),    /* Lisu */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_lisu_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_mlym_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0D00,  0x0D7F ),  /* Malayalam */
 
   const AF_Script_UniRangeRec  af_mymr_uniranges[] =
   {
-    AF_UNIRANGE_REC( 0x1000, 0x109F ),    /* Myanmar            */
-    AF_UNIRANGE_REC( 0xA9E0, 0xA9FF ),    /* Myanmar Extended-B */
-    AF_UNIRANGE_REC( 0xAA60, 0xAA7F ),    /* Myanmar Extended-A */
-    AF_UNIRANGE_REC(      0,      0 )
+    AF_UNIRANGE_REC(  0x1000,  0x109F ),    /* Myanmar            */
+    AF_UNIRANGE_REC(  0xA9E0,  0xA9FF ),    /* Myanmar Extended-B */
+    AF_UNIRANGE_REC(  0xAA60,  0xAA7F ),    /* Myanmar Extended-A */
+    AF_UNIRANGE_REC(       0,       0 )
   };
 
   const AF_Script_UniRangeRec  af_mymr_nonbase_uniranges[] =
   {
-    AF_UNIRANGE_REC( 0x102D, 0x1030 ),
-    AF_UNIRANGE_REC( 0x1032, 0x1037 ),
-    AF_UNIRANGE_REC( 0x103A, 0x103A ),
-    AF_UNIRANGE_REC( 0x103D, 0x103E ),
-    AF_UNIRANGE_REC( 0x1058, 0x1059 ),
-    AF_UNIRANGE_REC( 0x105E, 0x1060 ),
-    AF_UNIRANGE_REC( 0x1071, 0x1074 ),
-    AF_UNIRANGE_REC( 0x1082, 0x1082 ),
-    AF_UNIRANGE_REC( 0x1085, 0x1086 ),
-    AF_UNIRANGE_REC( 0x108D, 0x108D ),
-    AF_UNIRANGE_REC( 0xA9E5, 0xA9E5 ),
-    AF_UNIRANGE_REC( 0xAA7C, 0xAA7C ),
-    AF_UNIRANGE_REC(      0,      0 )
+    AF_UNIRANGE_REC(  0x102D,  0x1030 ),
+    AF_UNIRANGE_REC(  0x1032,  0x1037 ),
+    AF_UNIRANGE_REC(  0x103A,  0x103A ),
+    AF_UNIRANGE_REC(  0x103D,  0x103E ),
+    AF_UNIRANGE_REC(  0x1058,  0x1059 ),
+    AF_UNIRANGE_REC(  0x105E,  0x1060 ),
+    AF_UNIRANGE_REC(  0x1071,  0x1074 ),
+    AF_UNIRANGE_REC(  0x1082,  0x1082 ),
+    AF_UNIRANGE_REC(  0x1085,  0x1086 ),
+    AF_UNIRANGE_REC(  0x108D,  0x108D ),
+    AF_UNIRANGE_REC(  0xA9E5,  0xA9E5 ),
+    AF_UNIRANGE_REC(  0xAA7C,  0xAA7C ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_nkoo_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x07C0,  0x07FF ),    /* N'Ko */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_nkoo_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x07EB,  0x07F5 ),
+    AF_UNIRANGE_REC(       0,       0 )
   };
 
 
   };
 
 
+  const AF_Script_UniRangeRec  af_olck_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x1C50,  0x1C7F ),    /* Ol Chiki */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_olck_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_orkh_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10C00, 0x10C4F ),    /* Old Turkic */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_orkh_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_osge_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x104B0, 0x104FF ),    /* Osage */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_osge_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_osma_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10480, 0x104AF ),   /* Osmanya */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_osma_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_saur_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA880,  0xA8DF ),   /* Saurashtra */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_saur_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA880,  0xA881 ),
+    AF_UNIRANGE_REC(  0xA8B4,  0xA8C5 ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_shaw_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0x10450, 0x1047F ),   /* Shavian */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_shaw_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_sinh_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0D80,  0x0DFF ),  /* Sinhala */
   };
 
 
+  const AF_Script_UniRangeRec  af_sund_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x1B80,  0x1BBF ), /* Sundanese            */
+    AF_UNIRANGE_REC(  0x1CC0,  0x1CCF ), /* Sundanese Supplement */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_sund_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x1B80,  0x1B82 ),
+    AF_UNIRANGE_REC(  0x1BA1,  0x1BAD ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_taml_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0B80,  0x0BFF ),  /* Tamil */
   };
 
 
+  const AF_Script_UniRangeRec  af_tavt_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xAA80,  0xAADF ),   /* Tai Viet */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_tavt_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xAAB0,  0xAAB0 ),
+    AF_UNIRANGE_REC(  0xAAB2,  0xAAB4 ),
+    AF_UNIRANGE_REC(  0xAAB7,  0xAAB8 ),
+    AF_UNIRANGE_REC(  0xAABE,  0xAABF ),
+    AF_UNIRANGE_REC(  0xAAC1,  0xAAC1 ),
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+
   const AF_Script_UniRangeRec  af_telu_uniranges[] =
   {
     AF_UNIRANGE_REC(  0x0C00,  0x0C7F ),  /* Telugu */
   };
 
 
+  const AF_Script_UniRangeRec  af_tfng_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0x2D30,  0x2D7F ),   /* Tifinagh */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_tfng_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
+  const AF_Script_UniRangeRec  af_vaii_uniranges[] =
+  {
+    AF_UNIRANGE_REC(  0xA500,  0xA63F ),   /* Vai */
+    AF_UNIRANGE_REC(       0,       0 )
+  };
+
+  const AF_Script_UniRangeRec  af_vaii_nonbase_uniranges[] =
+  {
+    AF_UNIRANGE_REC( 0, 0 )
+  };
+
+
 #ifdef AF_CONFIG_OPTION_INDIC
 
   const AF_Script_UniRangeRec  af_limb_uniranges[] =
   };
 
 
-  const AF_Script_UniRangeRec  af_sund_uniranges[] =
-  {
-    AF_UNIRANGE_REC(  0x1B80,  0x1BBF ),  /* Sundanese            */
-    AF_UNIRANGE_REC(  0x1CC0,  0x1CCF ),  /* Sundanese Supplement */
-    AF_UNIRANGE_REC(       0,       0 )
-  };
-
-  const AF_Script_UniRangeRec  af_sund_nonbase_uniranges[] =
-  {
-    AF_UNIRANGE_REC(  0x1B80,  0x1B82 ),
-    AF_UNIRANGE_REC(  0x1BA1,  0x1BAD ),
-    AF_UNIRANGE_REC(       0,       0 )
-  };
-
-
   const AF_Script_UniRangeRec  af_sylo_uniranges[] =
   {
     AF_UNIRANGE_REC(  0xA800,  0xA82F ),  /* Syloti Nagri */
index 1a0e4b1..72d9eaa 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter Unicode script ranges (specification).                   */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 33c3012..7547a9e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter scripts (specification only).                            */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   /* use `HB_SCRIPT_INVALID' as the HarfBuzz script name tag for      */
   /* them.                                                            */
 
+  SCRIPT( adlm, ADLM,
+          "Adlam",
+          HB_SCRIPT_ADLAM,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x9E\xA4\x8C \xF0\x9E\xA4\xAE" ) /* 𞤌 𞤮 */
+
   SCRIPT( arab, ARAB,
           "Arabic",
           HB_SCRIPT_ARABIC,
           "Armenian",
           HB_SCRIPT_ARMENIAN,
           HINTING_BOTTOM_TO_TOP,
-          "\xD6\x85 \xD5\x95" ) /* օ Օ */
+          "\xD5\xBD \xD5\x8D" ) /* ս Ս */
+
+  SCRIPT( avst, AVST,
+          "Avestan",
+          HB_SCRIPT_AVESTAN,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\xAC\x9A" ) /* 𐬚 */
+
+  SCRIPT( bamu, BAMU,
+          "Bamum",
+          HB_SCRIPT_BAMUM,
+          HINTING_BOTTOM_TO_TOP,
+          "\xEA\x9B\x81 \xEA\x9B\xAF" ) /* ꛁ ꛯ */
 
   /* there are no simple forms for letters; we thus use two digit shapes */
   SCRIPT( beng, BENG,
           HINTING_TOP_TO_BOTTOM,
           "\xE0\xA7\xA6 \xE0\xA7\xAA" ) /* ০ ৪ */
 
+  SCRIPT( buhd, BUHD,
+          "Buhid",
+          HB_SCRIPT_BUHID,
+          HINTING_BOTTOM_TO_TOP,
+          "\xE1\x9D\x8B \xE1\x9D\x8F" ) /* ᝋ ᝏ */
+
+  SCRIPT( cakm, CAKM,
+          "Chakma",
+          HB_SCRIPT_CHAKMA,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x91\x84\xA4 \xF0\x91\x84\x89 \xF0\x91\x84\x9B" ) /* 𑄤 𑄉 𑄛 */
+
+  SCRIPT( cans, CANS,
+          "Canadian Syllabics",
+          HB_SCRIPT_CANADIAN_SYLLABICS,
+          HINTING_BOTTOM_TO_TOP,
+          "\xE1\x91\x8C \xE1\x93\x9A" ) /* ᑌ ᓚ */
+
+  SCRIPT( cari, CARI,
+          "Carian",
+          HB_SCRIPT_CARIAN,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\x8A\xAB \xF0\x90\x8B\x89" ) /* 𐊫 𐋉 */
+
   SCRIPT( cher, CHER,
           "Cherokee",
           HB_SCRIPT_CHEROKEE,
           HINTING_BOTTOM_TO_TOP,
           "\xE1\x8E\xA4 \xE1\x8F\x85 \xEA\xAE\x95" ) /* Ꭴ Ꮕ ꮕ */
 
+  SCRIPT( copt, COPT,
+          "Coptic",
+          HB_SCRIPT_COPTIC,
+          HINTING_BOTTOM_TO_TOP,
+          "\xE2\xB2\x9E \xE2\xB2\x9F" ) /* Ⲟ ⲟ */
+
+  SCRIPT( cprt, CPRT,
+          "Cypriot",
+          HB_SCRIPT_CYPRIOT,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\xA0\x85 \xF0\x90\xA0\xA3" ) /* 𐠅 𐠣 */
+
   SCRIPT( cyrl, CYRL,
           "Cyrillic",
           HB_SCRIPT_CYRILLIC,
           HINTING_TOP_TO_BOTTOM,
           "\xE0\xA4\xA0 \xE0\xA4\xB5 \xE0\xA4\x9F" ) /* ठ व ट */
 
+  SCRIPT( dsrt, DSRT,
+          "Deseret",
+          HB_SCRIPT_DESERET,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\x90\x84 \xF0\x90\x90\xAC" ) /* 𐐄 𐐬 */
+
   SCRIPT( ethi, ETHI,
           "Ethiopic",
           HB_SCRIPT_ETHIOPIC,
           HINTING_BOTTOM_TO_TOP,
           "\xE1\x82\xB6 \xE1\x82\xB1 \xE2\xB4\x99" ) /* Ⴖ Ⴑ ⴙ */
 
+  SCRIPT( glag, GLAG,
+          "Glagolitic",
+          HB_SCRIPT_GLAGOLITIC,
+          HINTING_BOTTOM_TO_TOP,
+          "\xE2\xB0\x95 \xE2\xB1\x85" ) /* Ⱅ ⱅ */
+
+  SCRIPT( goth, GOTH,
+          "Gothic",
+          HB_SCRIPT_GOTHIC,
+          HINTING_TOP_TO_BOTTOM,
+          "\xF0\x90\x8C\xB4 \xF0\x90\x8C\xBE \xF0\x90\x8D\x83" ) /* 𐌴 𐌾 𐍃 */
+
   SCRIPT( grek, GREK,
           "Greek",
           HB_SCRIPT_GREEK,
           HINTING_BOTTOM_TO_TOP,
           "\xD7\x9D" ) /* ם */
 
+  SCRIPT( kali, KALI,
+          "Kayah Li",
+          HB_SCRIPT_KAYAH_LI,
+          HINTING_BOTTOM_TO_TOP,
+          "\xEA\xA4\x8D \xEA\xA4\x80" ) /* ꤍ ꤀ */
+
   SCRIPT( knda, KNDA,
           "Kannada",
           HB_SCRIPT_KANNADA,
           HINTING_BOTTOM_TO_TOP,
           "\xE1\xB5\x92 \xE1\xB4\xBC \xE2\x81\xB0" ) /* ᵒ ᴼ ⁰ */
 
+  SCRIPT( lisu, LISU,
+          "Lisu",
+          HB_SCRIPT_LISU,
+          HINTING_BOTTOM_TO_TOP,
+          "\xEA\x93\xB3" ) /* ꓳ */
+
   SCRIPT( mlym, MLYM,
           "Malayalam",
           HB_SCRIPT_MALAYALAM,
           HINTING_BOTTOM_TO_TOP,
           "\xE1\x80\x9D \xE1\x80\x84 \xE1\x80\x82" ) /* ဝ င ဂ */
 
+  SCRIPT( nkoo, NKOO,
+          "N'Ko",
+          HB_SCRIPT_NKO,
+          HINTING_BOTTOM_TO_TOP,
+          "\xDF\x8B \xDF\x80" ) /* ߋ ߀ */
+
   SCRIPT( none, NONE,
           "no script",
           HB_SCRIPT_INVALID,
           HINTING_BOTTOM_TO_TOP,
           "" )
 
+  SCRIPT( olck, OLCK,
+          "Ol Chiki",
+          HB_SCRIPT_OL_CHIKI,
+          HINTING_BOTTOM_TO_TOP,
+          "\xE1\xB1\x9B" ) /* ᱛ */
+
+  SCRIPT( orkh, ORKH,
+          "Old Turkic",
+          HB_SCRIPT_OLD_TURKIC,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\xB0\x97" ) /* 𐰗 */
+
+  SCRIPT( osge, OSGE,
+          "Osage",
+          HB_SCRIPT_OSAGE,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\x93\x82 \xF0\x90\x93\xAA" ) /* 𐓂 𐓪 */
+
+  SCRIPT( osma, OSMA,
+          "Osmanya",
+          HB_SCRIPT_OSMANYA,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\x92\x86 \xF0\x90\x92\xA0" ) /* 𐒆 𐒠 */
+
+  SCRIPT( saur, SAUR,
+          "Saurashtra",
+          HB_SCRIPT_SAURASHTRA,
+          HINTING_BOTTOM_TO_TOP,
+          "\xEA\xA2\x9D \xEA\xA3\x90" ) /* ꢝ ꣐ */
+
+  SCRIPT( shaw, SHAW,
+          "Shavian",
+          HB_SCRIPT_SHAVIAN,
+          HINTING_BOTTOM_TO_TOP,
+          "\xF0\x90\x91\xB4" ) /* 𐑴 */
+
   SCRIPT( sinh, SINH,
           "Sinhala",
           HB_SCRIPT_SINHALA,
           HINTING_BOTTOM_TO_TOP,
           "\xE0\xB6\xA7" ) /* ට */
 
+  /* only digit zero has a simple (round) shape in the Sundanese script */
+  SCRIPT( sund, SUND,
+          "Sundanese",
+          HB_SCRIPT_SUNDANESE,
+          HINTING_BOTTOM_TO_TOP,
+          "\xE1\xAE\xB0" ) /* ᮰ */
+
   /* only digit zero has a simple (round) shape in the Tamil script */
   SCRIPT( taml, TAML,
           "Tamil",
           HINTING_BOTTOM_TO_TOP,
           "\xE0\xAF\xA6" ) /* ௦ */
 
+  SCRIPT( tavt, TAVT,
+          "Tai Viet",
+          HB_SCRIPT_TAI_VIET,
+          HINTING_BOTTOM_TO_TOP,
+          "\xEA\xAA\x92 \xEA\xAA\xAB" ) /* ꪒ ꪫ */
+
   /* there are no simple forms for letters; we thus use two digit shapes */
   SCRIPT( telu, TELU,
           "Telugu",
           HINTING_BOTTOM_TO_TOP,
           "\xE0\xB8\xB2 \xE0\xB9\x85 \xE0\xB9\x90" ) /* า ๅ ๐ */
 
+  SCRIPT( tfng, TFNG,
+          "Tifinagh",
+          HB_SCRIPT_TIFINAGH,
+          HINTING_BOTTOM_TO_TOP,
+          "\xE2\xB5\x94" ) /* ⵔ */
+
+  SCRIPT( vaii, VAII,
+          "Vai",
+          HB_SCRIPT_VAI,
+          HINTING_BOTTOM_TO_TOP,
+          "\xEA\x98\x93 \xEA\x96\x9C \xEA\x96\xB4" ) /* ꘓ ꖜ ꖴ */
+
 #ifdef AF_CONFIG_OPTION_INDIC
 
   SCRIPT( limb, LIMB,
           HINTING_BOTTOM_TO_TOP,
           "o" ) /* XXX */
 
-  SCRIPT( sund, SUND,
-          "Sundanese",
-          HB_SCRIPT_SUNDANESE,
-          HINTING_BOTTOM_TO_TOP,
-          "o" ) /* XXX */
-
   SCRIPT( sylo, SYLO,
           "Syloti Nagri",
           HB_SCRIPT_SYLOTI_NAGRI,
index 6d13b65..da92fad 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    HarfBuzz interface for accessing OpenType features (body).           */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 0d41f78..9185d19 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    HarfBuzz interface for accessing OpenType features (specification).  */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e83a95b..a5e13d8 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter styles (specification only).                             */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
                        DEFAULT )
 
 
+  STYLE( adlm_dflt, ADLM_DFLT,
+         "Adlam default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_ADLM,
+         AF_BLUE_STRINGSET_ADLM,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( arab_dflt, ARAB_DFLT,
          "Arabic default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_BLUE_STRINGSET_ARMN,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( avst_dflt, AVST_DFLT,
+         "Avestan default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_AVST,
+         AF_BLUE_STRINGSET_AVST,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( bamu_dflt, BAMU_DFLT,
+         "Bamum default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_BAMU,
+         AF_BLUE_STRINGSET_BAMU,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( beng_dflt, BENG_DFLT,
          "Bengali default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_BLUE_STRINGSET_BENG,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( buhd_dflt, BUHD_DFLT,
+         "Buhid default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_BUHD,
+         AF_BLUE_STRINGSET_BUHD,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( cakm_dflt, CAKM_DFLT,
+         "Chakma default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_CAKM,
+         AF_BLUE_STRINGSET_CAKM,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( cans_dflt, CANS_DFLT,
+         "Canadian Syllabics default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_CANS,
+         AF_BLUE_STRINGSET_CANS,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( cari_dflt, CARI_DFLT,
+         "Carian default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_CARI,
+         AF_BLUE_STRINGSET_CARI,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( cher_dflt, CHER_DFLT,
          "Cherokee default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_BLUE_STRINGSET_CHER,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( copt_dflt, COPT_DFLT,
+         "Coptic default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_COPT,
+         AF_BLUE_STRINGSET_COPT,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( cprt_dflt, CPRT_DFLT,
+         "Cypriot default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_CPRT,
+         AF_BLUE_STRINGSET_CPRT,
+         AF_COVERAGE_DEFAULT )
+
   META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" )
 
   STYLE( deva_dflt, DEVA_DFLT,
          AF_BLUE_STRINGSET_DEVA,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( dsrt_dflt, DSRT_DFLT,
+         "Deseret default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_DSRT,
+         AF_BLUE_STRINGSET_DSRT,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( ethi_dflt, ETHI_DFLT,
          "Ethiopic default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_BLUE_STRINGSET_GEOK,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( glag_dflt, GLAG_DFLT,
+         "Glagolitic default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_GLAG,
+         AF_BLUE_STRINGSET_GLAG,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( goth_dflt, GOTH_DFLT,
+         "Gothic default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_GOTH,
+         AF_BLUE_STRINGSET_GOTH,
+         AF_COVERAGE_DEFAULT )
+
   META_STYLE_LATIN( grek, GREK, "Greek" )
 
   STYLE( gujr_dflt, GUJR_DFLT,
          AF_BLUE_STRINGSET_HEBR,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( kali_dflt, KALI_DFLT,
+         "Kayah Li default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_KALI,
+         AF_BLUE_STRINGSET_KALI,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( knda_dflt, KNDA_DFLT,
          "Kannada default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_COVERAGE_DEFAULT )
 #endif
 
+  STYLE( lisu_dflt, LISU_DFLT,
+         "Lisu default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_LISU,
+         AF_BLUE_STRINGSET_LISU,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( mlym_dflt, MLYM_DFLT,
          "Malayalam default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_BLUE_STRINGSET_MYMR,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( nkoo_dflt, NKOO_DFLT,
+         "N'Ko default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_NKOO,
+         AF_BLUE_STRINGSET_NKOO,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( none_dflt, NONE_DFLT,
          "no style",
          AF_WRITING_SYSTEM_DUMMY,
          AF_BLUE_STRINGSET_NONE,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( olck_dflt, OLCK_DFLT,
+         "Ol Chiki default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_OLCK,
+         AF_BLUE_STRINGSET_OLCK,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( orkh_dflt, ORKH_DFLT,
+         "Old Turkic default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_ORKH,
+         AF_BLUE_STRINGSET_ORKH,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( osge_dflt, OSGE_DFLT,
+         "Osage default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_OSGE,
+         AF_BLUE_STRINGSET_OSGE,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( osma_dflt, OSMA_DFLT,
+         "Osmanya default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_OSMA,
+         AF_BLUE_STRINGSET_OSMA,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( saur_dflt, SAUR_DFLT,
+         "Saurashtra default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_SAUR,
+         AF_BLUE_STRINGSET_SAUR,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( shaw_dflt, SHAW_DFLT,
+         "Shavian default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_SHAW,
+         AF_BLUE_STRINGSET_SHAW,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( sinh_dflt, SINH_DFLT,
          "Sinhala default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_BLUE_STRINGSET_SINH,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( sund_dflt, SUND_DFLT,
+         "Sundanese default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_SUND,
+         AF_BLUE_STRINGSET_SUND,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( taml_dflt, TAML_DFLT,
          "Tamil default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_BLUE_STRINGSET_TAML,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( tavt_dflt, TAVT_DFLT,
+         "Tai Viet default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_TAVT,
+         AF_BLUE_STRINGSET_TAVT,
+         AF_COVERAGE_DEFAULT )
+
   STYLE( telu_dflt, TELU_DFLT,
          "Telugu default style",
          AF_WRITING_SYSTEM_LATIN,
          AF_BLUE_STRINGSET_THAI,
          AF_COVERAGE_DEFAULT )
 
+  STYLE( tfng_dflt, TFNG_DFLT,
+         "Tifinagh default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_TFNG,
+         AF_BLUE_STRINGSET_TFNG,
+         AF_COVERAGE_DEFAULT )
+
+  STYLE( vaii_dflt, VAII_DFLT,
+         "Vai default style",
+         AF_WRITING_SYSTEM_LATIN,
+         AF_SCRIPT_VAII,
+         AF_BLUE_STRINGSET_VAII,
+         AF_COVERAGE_DEFAULT )
+
 #ifdef AF_CONFIG_OPTION_INDIC
 
   /* no blue stringset support for the Indic writing system yet */
 
   STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" )
   STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" )
-  STYLE_DEFAULT_INDIC( sund, SUND, "Sundanese" )
   STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" )
   STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" )
 
index ef62043..718dab7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter types (specification only).                              */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -221,7 +221,7 @@ extern void*  _af_debug_hints;
   (*AF_WritingSystem_InitHintsFunc)( AF_GlyphHints    hints,
                                      AF_StyleMetrics  metrics );
 
-  typedef void
+  typedef FT_Error
   (*AF_WritingSystem_ApplyHintsFunc)( FT_UInt          glyph_index,
                                       AF_GlyphHints    hints,
                                       FT_Outline*      outline,
@@ -575,6 +575,7 @@ extern void*  _af_debug_hints;
           m_init,                                                         \
           m_scale,                                                        \
           m_done,                                                         \
+          m_stdw,                                                         \
           h_init,                                                         \
           h_apply )                                                       \
   FT_LOCAL_DEF( void )                                                    \
index ce1806c..f99aa6d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter warping algorithm (body).                                */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -98,7 +98,6 @@
       if ( xx1min + w < warper->x2min )
         xx1min = warper->x2min - w;
 
-      xx1max = warper->x1max;
       if ( xx1max + w > warper->x2max )
         xx1max = warper->x2max - w;
 
index 6d96f86..2e85cbd 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter warping algorithm (specification).                       */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 842f492..86749a2 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter writing systems (specification only).                    */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index dda9aeb..bbedad7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter module (body).                                           */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
 #include <ft2build.h>
-#include "afpic.c"
+
 #include "afangles.c"
 #include "afblue.c"
+#include "afcjk.c"
+#include "afdummy.c"
 #include "afglobal.c"
 #include "afhints.c"
-
-#include "afranges.c"
-
-#include "afdummy.c"
+#include "afindic.c"
 #include "aflatin.c"
-#ifdef FT_OPTION_AUTOFIT2
 #include "aflatin2.c"
-#endif
-#include "afcjk.c"
-#include "afindic.c"
-
-#include "afshaper.c"
-
 #include "afloader.c"
 #include "afmodule.c"
-
-#ifdef AF_CONFIG_OPTION_USE_WARPER
+#include "afpic.c"
+#include "afranges.c"
+#include "afshaper.c"
 #include "afwarp.c"
-#endif
+
 
 /* END */
index 98f0612..c4e249b 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2003-2016 by
+# Copyright 2003-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 1ef4704..ec4e130 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2003-2016 by
+# Copyright 2003-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index cfc6965..9e9a91b 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/base Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index f2cea90..57fb816 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for base.            */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index a1a75a0..258d4ce 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for base.            */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 9e2ab89..1557607 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Quick computation of advance widths (body).                          */
 /*                                                                         */
-/*  Copyright 2008-2016 by                                                 */
+/*  Copyright 2008-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -36,7 +36,7 @@
     if ( flags & FT_LOAD_NO_SCALE )
       return FT_Err_Ok;
 
-    if ( face->size == NULL )
+    if ( !face->size )
       return FT_THROW( Invalid_Size_Handle );
 
     if ( flags & FT_LOAD_VERTICAL_LAYOUT )
    /*  - unscaled load                                             */
    /*  - unhinted load                                             */
    /*  - light-hinted load                                         */
-   /*  - neither a MM nor a GX font                                */
+   /*  - if a variations font, it must have an `HVAR' or `VVAR'    */
+   /*    table (thus the old MM or GX fonts don't qualify; this    */
+   /*    gets checked by the driver-specific functions)            */
 
-#define LOAD_ADVANCE_FAST_CHECK( face, flags )                          \
-          ( ( flags & ( FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING )    ||   \
-              FT_LOAD_TARGET_MODE( flags ) == FT_RENDER_MODE_LIGHT ) && \
-            !FT_HAS_MULTIPLE_MASTERS( face )                         )
+#define LOAD_ADVANCE_FAST_CHECK( face, flags )                      \
+          ( flags & ( FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING )    || \
+            FT_LOAD_TARGET_MODE( flags ) == FT_RENDER_MODE_LIGHT )
 
 
   /* documentation is in ftadvanc.h */
index b94c3eb..4262d37 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType compatibility functions (body).                         */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -38,7 +38,7 @@
   /*************************************************************************/
   /*************************************************************************/
 
-  /* backwards compatibility API */
+  /* backward compatibility API */
 
   FT_BASE_DEF( void )
   FT_New_Memory_Stream( FT_Library  library,
index ab1af6f..55f7359 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Single object library component (body only).                         */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #include <ft2build.h>
-
 #define  FT_MAKE_OPTION_SINGLE_OBJECT
 
-#include "ftpic.c"
 #include "basepic.c"
 #include "ftadvanc.c"
 #include "ftcalc.c"
 #include "ftdbgmem.c"
 #include "ftgloadr.c"
 #include "fthash.c"
+#include "ftmac.c"
 #include "ftobjs.c"
 #include "ftoutln.c"
+#include "ftpic.c"
 #include "ftrfork.c"
 #include "ftsnames.c"
 #include "ftstream.c"
 #include "fttrigon.c"
 #include "ftutil.c"
 
-#ifdef FT_MACINTOSH
-#include "ftmac.c"
-#endif
 
 /* END */
index 717fdaa..2072284 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType private functions used in base module (specification).  */
 /*                                                                         */
-/*  Copyright 2008-2016 by                                                 */
+/*  Copyright 2008-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya.      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d3e45ff..6e19da6 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType bbox computation (body).                                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used        */
   }
 
 
-  FT_DEFINE_OUTLINE_FUNCS(bbox_interface,
-    (FT_Outline_MoveTo_Func) BBox_Move_To,
-    (FT_Outline_LineTo_Func) BBox_Line_To,
-    (FT_Outline_ConicTo_Func)BBox_Conic_To,
-    (FT_Outline_CubicTo_Func)BBox_Cubic_To,
-    0, 0
+  FT_DEFINE_OUTLINE_FUNCS(
+    bbox_interface,
+
+    (FT_Outline_MoveTo_Func) BBox_Move_To,   /* move_to  */
+    (FT_Outline_LineTo_Func) BBox_Line_To,   /* line_to  */
+    (FT_Outline_ConicTo_Func)BBox_Conic_To,  /* conic_to */
+    (FT_Outline_CubicTo_Func)BBox_Cubic_To,  /* cubic_to */
+    0,                                       /* shift    */
+    0                                        /* delta    */
   )
 
 
     {
       abbox->xMin = abbox->xMax = 0;
       abbox->yMin = abbox->yMax = 0;
+
       return 0;
     }
 
 
     for ( n = 0; n < outline->n_points; n++ )
     {
-      FT_UPDATE_BBOX( vec, cbox);
+      FT_UPDATE_BBOX( vec, cbox );
 
       if ( FT_CURVE_TAG( outline->tags[n] ) == FT_CURVE_TAG_ON )
-        FT_UPDATE_BBOX( vec, bbox);
+        FT_UPDATE_BBOX( vec, bbox );
 
       vec++;
     }
       TBBox_Rec  user;
 
 #ifdef FT_CONFIG_OPTION_PIC
-      FT_Outline_Funcs bbox_interface;
-      Init_Class_bbox_interface(&bbox_interface);
+      FT_Outline_Funcs  bbox_interface;
+
+
+      Init_Class_bbox_interface( &bbox_interface );
 #endif
 
       user.bbox = bbox;
index 4aafc2b..40f0ca2 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for accessing BDF-specific strings (body).              */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 24fead3..88c88c4 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType utility functions for bitmaps (body).                       */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -76,7 +76,7 @@
     source_pitch_sign = source->pitch < 0 ? -1 : 1;
     target_pitch_sign = target->pitch < 0 ? -1 : 1;
 
-    if ( source->buffer == NULL )
+    if ( !source->buffer )
     {
       *target = *source;
       if ( source_pitch_sign != target_pitch_sign )
index 67549d0..f052550 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Arithmetic computations (body).                                      */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
       FT_Add64( &temp, &temp2, &temp );
 
       /* last attempt to ditch long division */
-      a = temp.hi == 0 ? temp.lo / c
-                       : ft_div64by32( temp.hi, temp.lo, c );
+      a = ( temp.hi == 0 ) ? temp.lo / c
+                           : ft_div64by32( temp.hi, temp.lo, c );
     }
 
     a_ = (FT_Long)a;
       ft_multo64( a, b, &temp );
 
       /* last attempt to ditch long division */
-      a = temp.hi == 0 ? temp.lo / c
-                       : ft_div64by32( temp.hi, temp.lo, c );
+      a = ( temp.hi == 0 ) ? temp.lo / c
+                           : ft_div64by32( temp.hi, temp.lo, c );
     }
 
     a_ = (FT_Long)a;
index 251bbd0..398396b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for accessing CID font information.                     */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  Derek Clegg and Michael Toftdal.                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 6ab5072..242246b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Memory debugger (body).                                              */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
                       ft_mem_table_alloc(
                         table,
                         new_size * (FT_Long)sizeof ( FT_MemNode ) );
-      if ( new_buckets == NULL )
+      if ( !new_buckets )
         return;
 
       FT_ARRAY_ZERO( new_buckets, new_size );
 
 
     table = (FT_MemTable)memory->alloc( memory, sizeof ( *table ) );
-    if ( table == NULL )
+    if ( !table )
       goto Exit;
 
     FT_ZERO( table );
     for (;;)
     {
       node = *pnode;
-      if ( node == NULL )
+      if ( !node )
         break;
 
       if ( node->file_name == _ft_debug_file   &&
     }
 
     node = (FT_MemSource)ft_mem_table_alloc( table, sizeof ( *node ) );
-    if ( node == NULL )
+    if ( !node )
       ft_mem_debug_panic(
         "not enough memory to perform memory debugging\n" );
 
 
       /* we need to create a new node in this table */
       node = (FT_MemNode)ft_mem_table_alloc( table, sizeof ( *node ) );
-      if ( node == NULL )
+      if ( !node )
         ft_mem_debug_panic( "not enough memory to run memory tests" );
 
       node->address = address;
     FT_MemTable  table = (FT_MemTable)memory->user;
 
 
-    if ( block == NULL )
+    if ( !block )
       ft_mem_debug_panic( "trying to free NULL in (%s:%ld)",
                           FT_FILENAME( _ft_debug_file ),
                           _ft_debug_lineno );
 
     /* the following is valid according to ANSI C */
 #if 0
-    if ( block == NULL || cur_size == 0 )
+    if ( !block || !cur_size )
       ft_mem_debug_panic( "trying to reallocate NULL in (%s:%ld)",
                           file_name, line_no );
 #endif
       return NULL;
 
     new_block = (FT_Pointer)ft_mem_table_alloc( table, new_size );
-    if ( new_block == NULL )
+    if ( !new_block )
       return NULL;
 
     ft_mem_table_set( table, (FT_Byte*)new_block, new_size, delta );
         memory->free    = ft_mem_debug_free;
 
         p = getenv( "FT2_ALLOC_TOTAL_MAX" );
-        if ( p != NULL )
+        if ( p )
         {
-          FT_Long   total_max = ft_atol( p );
+          FT_Long  total_max = ft_strtol( p, NULL, 10 );
 
 
           if ( total_max > 0 )
         }
 
         p = getenv( "FT2_ALLOC_COUNT_MAX" );
-        if ( p != NULL )
+        if ( p )
         {
-          FT_Long  total_count = ft_atol( p );
+          FT_Long  total_count = ft_strtol( p, NULL, 10 );
 
 
           if ( total_count > 0 )
         }
 
         p = getenv( "FT2_KEEP_ALIVE" );
-        if ( p != NULL )
+        if ( p )
         {
-          FT_Long  keep_alive = ft_atol( p );
+          FT_Long  keep_alive = ft_strtol( p, NULL, 10 );
 
 
           if ( keep_alive > 0 )
index 40925d1..20c6170 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Debugging and logging component (body).                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c6eb319..dcbeba0 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType utility file for font formats (body).                       */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index ae56c8f..cec4fb3 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType utility file to access FSType data (body).                  */
 /*                                                                         */
-/*  Copyright 2008-2016 by                                                 */
+/*  Copyright 2008-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e38e55b..477b725 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Access of TrueType's `gasp' table (body).                            */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c4f0ff7..8134003 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph loader (body).                                    */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c2376dd..9bfb330 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType convenience functions to handle glyphs (body).              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   }
 
 
-  FT_DEFINE_GLYPH(ft_bitmap_glyph_class,
+  FT_DEFINE_GLYPH(
+    ft_bitmap_glyph_class,
+
     sizeof ( FT_BitmapGlyphRec ),
     FT_GLYPH_FORMAT_BITMAP,
 
-    ft_bitmap_glyph_init,
-    ft_bitmap_glyph_done,
-    ft_bitmap_glyph_copy,
-    0,                          /* FT_Glyph_TransformFunc */
-    ft_bitmap_glyph_bbox,
-    0                           /* FT_Glyph_PrepareFunc   */
+    ft_bitmap_glyph_init,    /* FT_Glyph_InitFunc       glyph_init      */
+    ft_bitmap_glyph_done,    /* FT_Glyph_DoneFunc       glyph_done      */
+    ft_bitmap_glyph_copy,    /* FT_Glyph_CopyFunc       glyph_copy      */
+    NULL,                    /* FT_Glyph_TransformFunc  glyph_transform */
+    ft_bitmap_glyph_bbox,    /* FT_Glyph_GetBBoxFunc    glyph_bbox      */
+    NULL                     /* FT_Glyph_PrepareFunc    glyph_prepare   */
   )
 
 
   }
 
 
-  FT_DEFINE_GLYPH( ft_outline_glyph_class,
+  FT_DEFINE_GLYPH(
+    ft_outline_glyph_class,
+
     sizeof ( FT_OutlineGlyphRec ),
     FT_GLYPH_FORMAT_OUTLINE,
 
-    ft_outline_glyph_init,
-    ft_outline_glyph_done,
-    ft_outline_glyph_copy,
-    ft_outline_glyph_transform,
-    ft_outline_glyph_bbox,
-    ft_outline_glyph_prepare
+    ft_outline_glyph_init,      /* FT_Glyph_InitFunc       glyph_init      */
+    ft_outline_glyph_done,      /* FT_Glyph_DoneFunc       glyph_done      */
+    ft_outline_glyph_copy,      /* FT_Glyph_CopyFunc       glyph_copy      */
+    ft_outline_glyph_transform, /* FT_Glyph_TransformFunc  glyph_transform */
+    ft_outline_glyph_bbox,      /* FT_Glyph_GetBBoxFunc    glyph_bbox      */
+    ft_outline_glyph_prepare    /* FT_Glyph_PrepareFunc    glyph_prepare   */
   )
 
 
     /* we render the glyph into a glyph bitmap using a `dummy' glyph slot */
     /* then calling FT_Render_Glyph_Internal()                            */
 
-    FT_MEM_ZERO( &dummy, sizeof ( dummy ) );
-    FT_MEM_ZERO( &dummy_internal, sizeof ( dummy_internal ) );
+    FT_ZERO( &dummy );
+    FT_ZERO( &dummy_internal );
     dummy.internal = &dummy_internal;
     dummy.library  = library;
     dummy.format   = clazz->glyph_format;
index 6667b37..ff24d33 100644 (file)
@@ -2,9 +2,9 @@
 /*                                                                         */
 /*  ftgxval.c                                                              */
 /*                                                                         */
-/*    FreeType API for validating TrueTyepGX/AAT tables (body).            */
+/*    FreeType API for validating TrueTypeGX/AAT tables (body).            */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  Masatake YAMATO, Redhat K.K,                                           */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index c2dd0a7..b3b08fa 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType initialization layer (body).                                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   }
 
 
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+
+#define MAX_LENGTH  128
+
+  /* documentation is in ftmodapi.h */
+
+  FT_EXPORT_DEF( void )
+  FT_Set_Default_Properties( FT_Library  library )
+  {
+    const char*  env;
+    const char*  p;
+    const char*  q;
+
+    char  module_name[MAX_LENGTH + 1];
+    char  property_name[MAX_LENGTH + 1];
+    char  property_value[MAX_LENGTH + 1];
+
+    int  i;
+
+
+    env = ft_getenv( "FREETYPE_PROPERTIES" );
+    if ( !env )
+      return;
+
+    for ( p = env; *p; p++ )
+    {
+      /* skip leading whitespace and separators */
+      if ( *p == ' ' || *p == '\t' )
+        continue;
+
+      /* read module name, followed by `:' */
+      q = p;
+      for ( i = 0; i < MAX_LENGTH; i++ )
+      {
+        if ( !*p || *p == ':' )
+          break;
+        module_name[i] = *p++;
+      }
+      module_name[i] = '\0';
+
+      if ( !*p || *p != ':' || p == q )
+        break;
+
+      /* read property name, followed by `=' */
+      q = ++p;
+      for ( i = 0; i < MAX_LENGTH; i++ )
+      {
+        if ( !*p || *p == '=' )
+          break;
+        property_name[i] = *p++;
+      }
+      property_name[i] = '\0';
+
+      if ( !*p || *p != '=' || p == q )
+        break;
+
+      /* read property value, followed by whitespace (if any) */
+      q = ++p;
+      for ( i = 0; i < MAX_LENGTH; i++ )
+      {
+        if ( !*p || *p == ' ' || *p == '\t' )
+          break;
+        property_value[i] = *p++;
+      }
+      property_value[i] = '\0';
+
+      if ( !( *p == '\0' || *p == ' ' || *p == '\t' ) || p == q )
+        break;
+
+      /* we completely ignore errors */
+      ft_property_string_set( library,
+                              module_name,
+                              property_name,
+                              property_value );
+    }
+  }
+
+#else
+
+  FT_EXPORT_DEF( void )
+  FT_Set_Default_Properties( FT_Library  library )
+  {
+    FT_UNUSED( library );
+  }
+
+#endif
+
+
   /* documentation is in freetype.h */
 
   FT_EXPORT_DEF( FT_Error )
     else
       FT_Add_Default_Modules( *alibrary );
 
+    FT_Set_Default_Properties( *alibrary );
+
     return error;
   }
 
index 8bcbed7..611b39f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for color filtering of subpixel bitmap glyphs (body).   */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #define  USE_LEGACY
 
   /* FIR filter used by the default and light filters */
-  static void
-  _ft_lcd_filter_fir( FT_Bitmap*      bitmap,
-                      FT_Render_Mode  mode,
-                      FT_Library      library )
+  FT_BASE( void )
+  ft_lcd_filter_fir( FT_Bitmap*           bitmap,
+                     FT_Render_Mode       mode,
+                     FT_LcdFiveTapFilter  weights )
   {
-    FT_Byte*  weights = library->lcd_weights;
-    FT_UInt   width   = (FT_UInt)bitmap->width;
-    FT_UInt   height  = (FT_UInt)bitmap->rows;
+    FT_UInt  width   = (FT_UInt)bitmap->width;
+    FT_UInt  height  = (FT_UInt)bitmap->rows;
 
 
     /* horizontal in-place FIR filter */
   static void
   _ft_lcd_filter_legacy( FT_Bitmap*      bitmap,
                          FT_Render_Mode  mode,
-                         FT_Library      library )
+                         FT_Byte*        weights )
   {
     FT_UInt  width  = (FT_UInt)bitmap->width;
     FT_UInt  height = (FT_UInt)bitmap->rows;
       { 65538 * 1/13, 65538 * 1/6, 65538 * 9/13 }
     };
 
-    FT_UNUSED( library );
+    FT_UNUSED( weights );
 
 
     /* horizontal in-place intra-pixel filter */
     if ( !weights )
       return FT_THROW( Invalid_Argument );
 
-    ft_memcpy( library->lcd_weights, weights, 5 );
-    library->lcd_filter_func = _ft_lcd_filter_fir;
+    ft_memcpy( library->lcd_weights, weights, FT_LCD_FILTER_FIVE_TAPS );
+    library->lcd_filter_func = ft_lcd_filter_fir;
     library->lcd_extra       = 2;
 
     return FT_Err_Ok;
   FT_Library_SetLcdFilter( FT_Library    library,
                            FT_LcdFilter  filter )
   {
-    static const FT_Byte  default_filter[5] =
-                            { 0x08, 0x4d, 0x56, 0x4d, 0x08 };
-    static const FT_Byte  light_filter[5] =
-                            { 0x00, 0x55, 0x56, 0x55, 0x00 };
+    static const FT_LcdFiveTapFilter  default_weights =
+                   { 0x08, 0x4d, 0x56, 0x4d, 0x08 };
+    static const FT_LcdFiveTapFilter  light_weights =
+                   { 0x00, 0x55, 0x56, 0x55, 0x00 };
 
 
     if ( !library )
       break;
 
     case FT_LCD_FILTER_DEFAULT:
-      ft_memcpy( library->lcd_weights, default_filter, 5 );
-      library->lcd_filter_func = _ft_lcd_filter_fir;
+      ft_memcpy( library->lcd_weights,
+                 default_weights,
+                 FT_LCD_FILTER_FIVE_TAPS );
+      library->lcd_filter_func = ft_lcd_filter_fir;
       library->lcd_extra       = 2;
       break;
 
     case FT_LCD_FILTER_LIGHT:
-      ft_memcpy( library->lcd_weights, light_filter, 5 );
-      library->lcd_filter_func = _ft_lcd_filter_fir;
+      ft_memcpy( library->lcd_weights,
+                 light_weights,
+                 FT_LCD_FILTER_FIVE_TAPS );
+      library->lcd_filter_func = ft_lcd_filter_fir;
       library->lcd_extra       = 2;
       break;
 
 
 #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
 
+  FT_BASE( void )
+  ft_lcd_filter_fir( FT_Bitmap*           bitmap,
+                     FT_Render_Mode       mode,
+                     FT_LcdFiveTapFilter  weights )
+  {
+    FT_UNUSED( bitmap );
+    FT_UNUSED( mode );
+    FT_UNUSED( weights );
+  }
+
+
   FT_EXPORT_DEF( FT_Error )
   FT_Library_SetLcdFilterWeights( FT_Library      library,
                                   unsigned char  *weights )
index e97fdbf..4b92066 100644 (file)
@@ -8,7 +8,7 @@
 /*  This file is for Mac OS X only; see builds/mac/ftoldmac.c for          */
 /*  classic platforms built by MPW.                                        */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -71,6 +71,9 @@
 #include FT_INTERNAL_STREAM_H
 #include "ftbase.h"
 
+
+#ifdef FT_MACINTOSH
+
   /* This is for Mac OS X.  Without redefinition, OS_INLINE */
   /* expands to `static inline' which doesn't survive the   */
   /* -ansi compilation flag of GCC.                         */
 #endif
 
 
-#ifdef FT_MACINTOSH
-
   /* This function is deprecated because FSSpec is deprecated in Mac OS X  */
   FT_EXPORT_DEF( FT_Error )
   FT_GetFile_From_Mac_Name( const char*  fontName,
     for (;;)
     {
       post_data = Get1Resource( TTAG_POST, res_id++ );
-      if ( post_data == NULL )
+      if ( !post_data )
         break;  /* we are done */
 
       code = (*post_data)[0];
     for (;;)
     {
       post_data = Get1Resource( TTAG_POST, res_id++ );
-      if ( post_data == NULL )
+      if ( !post_data )
         break;  /* we are done */
 
       post_size = (FT_ULong)GetHandleSize( post_data ) - 2;
         if ( last_code != -1 )
         {
           /* we are done adding a chunk, fill in the size field */
-          if ( size_p != NULL )
+          if ( size_p )
           {
             *size_p++ = (FT_Byte)(   pfb_chunk_size         & 0xFF );
             *size_p++ = (FT_Byte)( ( pfb_chunk_size >> 8  ) & 0xFF );
 
 
     sfnt = GetResource( TTAG_sfnt, sfnt_id );
-    if ( sfnt == NULL )
+    if ( !sfnt )
       return FT_THROW( Invalid_Handle );
 
     sfnt_size = (FT_ULong)GetHandleSize( sfnt );
       return FT_THROW( Cannot_Open_Resource );
 
     num_faces_in_res = 0;
-    for ( res_index = 1; ; ++res_index )
+    for ( res_index = 1; ; res_index++ )
     {
       short  num_faces_in_fond;
 
     /* if it works, fine.                                           */
 
     error = FT_New_Face_From_Suitcase( library, pathname, face_index, aface );
-    if ( error == 0 )
-      return error;
+    if ( error )
+    {
+      /* let it fall through to normal loader (.ttf, .otf, etc.); */
+      /* we signal this by returning no error and no FT_Face      */
+      *aface = NULL;
+    }
 
-    /* let it fall through to normal loader (.ttf, .otf, etc.); */
-    /* we signal this by returning no error and no FT_Face      */
-    *aface = NULL;
-    return 0;
+    return FT_Err_Ok;
   }
 
 
     /* try resourcefork based font: LWFN, FFIL */
     error = FT_New_Face_From_Resource( library, (UInt8 *)pathname,
                                        face_index, aface );
-    if ( error != 0 || *aface != NULL )
+    if ( error || *aface )
       return error;
 
     /* let it fall through to normal loader (.ttf, .otf, etc.) */
     args.flags    = FT_OPEN_PATHNAME;
     args.pathname = (char*)pathname;
+
     return FT_Open_Face( library, &args, face_index, aface );
   }
 
       error = FT_THROW( Cannot_Open_Resource );
 
     error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
-    if ( error != 0 || *aface != NULL )
+    if ( error || *aface )
       return error;
 
     /* fallback to datafork font */
 #endif
   }
 
-#endif /* FT_MACINTOSH */
+#else /* !FT_MACINTOSH */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _ft_mac_dummy;
+
+#endif /* !FT_MACINTOSH */
 
 
 /* END */
index 6b759ca..2cb56a3 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Multiple Master font support (body).                                 */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -22,6 +22,7 @@
 #include FT_MULTIPLE_MASTERS_H
 #include FT_INTERNAL_OBJECTS_H
 #include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
 
 
   /*************************************************************************/
   }
 
 
+  static FT_Error
+  ft_face_get_mvar_service( FT_Face                        face,
+                            FT_Service_MetricsVariations  *aservice )
+  {
+    FT_Error  error;
+
+
+    *aservice = NULL;
+
+    if ( !face )
+      return FT_THROW( Invalid_Face_Handle );
+
+    error = FT_ERR( Invalid_Argument );
+
+    if ( FT_HAS_MULTIPLE_MASTERS( face ) )
+    {
+      FT_FACE_LOOKUP_SERVICE( face,
+                              *aservice,
+                              METRICS_VARIATIONS );
+
+      if ( *aservice )
+        error = FT_Err_Ok;
+    }
+
+    return error;
+  }
+
+
   /* documentation is in ftmm.h */
 
   FT_EXPORT_DEF( FT_Error )
         error = service->set_mm_design( face, num_coords, coords );
     }
 
+    /* enforce recomputation of auto-hinting data */
+    if ( !error && face->autohint.finalizer )
+    {
+      face->autohint.finalizer( face->autohint.data );
+      face->autohint.data = NULL;
+    }
+
     return error;
   }
 
                                  FT_UInt    num_coords,
                                  FT_Fixed*  coords )
   {
+    FT_Error                      error;
+    FT_Service_MultiMasters       service_mm   = NULL;
+    FT_Service_MetricsVariations  service_mvar = NULL;
+
+
+    /* check of `face' delayed to `ft_face_get_mm_service' */
+
+    if ( !coords )
+      return FT_THROW( Invalid_Argument );
+
+    error = ft_face_get_mm_service( face, &service_mm );
+    if ( !error )
+    {
+      error = FT_ERR( Invalid_Argument );
+      if ( service_mm->set_var_design )
+        error = service_mm->set_var_design( face, num_coords, coords );
+    }
+
+    if ( !error )
+    {
+      (void)ft_face_get_mvar_service( face, &service_mvar );
+
+      if ( service_mvar && service_mvar->metrics_adjust )
+        service_mvar->metrics_adjust( face );
+    }
+
+    /* enforce recomputation of auto-hinting data */
+    if ( !error && face->autohint.finalizer )
+    {
+      face->autohint.finalizer( face->autohint.data );
+      face->autohint.data = NULL;
+    }
+
+    return error;
+  }
+
+
+  /* documentation is in ftmm.h */
+
+  FT_EXPORT_DEF( FT_Error )
+  FT_Get_Var_Design_Coordinates( FT_Face    face,
+                                 FT_UInt    num_coords,
+                                 FT_Fixed*  coords )
+  {
     FT_Error                 error;
     FT_Service_MultiMasters  service;
 
     if ( !error )
     {
       error = FT_ERR( Invalid_Argument );
-      if ( service->set_var_design )
-        error = service->set_var_design( face, num_coords, coords );
+      if ( service->get_var_design )
+        error = service->get_var_design( face, num_coords, coords );
     }
 
     return error;
                                FT_UInt    num_coords,
                                FT_Fixed*  coords )
   {
+    FT_Error                      error;
+    FT_Service_MultiMasters       service_mm   = NULL;
+    FT_Service_MetricsVariations  service_mvar = NULL;
+
+
+    /* check of `face' delayed to `ft_face_get_mm_service' */
+
+    if ( !coords )
+      return FT_THROW( Invalid_Argument );
+
+    error = ft_face_get_mm_service( face, &service_mm );
+    if ( !error )
+    {
+      error = FT_ERR( Invalid_Argument );
+      if ( service_mm->set_mm_blend )
+        error = service_mm->set_mm_blend( face, num_coords, coords );
+    }
+
+    if ( !error )
+    {
+      (void)ft_face_get_mvar_service( face, &service_mvar );
+
+      if ( service_mvar && service_mvar->metrics_adjust )
+        service_mvar->metrics_adjust( face );
+    }
+
+    /* enforce recomputation of auto-hinting data */
+    if ( !error && face->autohint.finalizer )
+    {
+      face->autohint.finalizer( face->autohint.data );
+      face->autohint.data = NULL;
+    }
+
+    return error;
+  }
+
+
+  /* documentation is in ftmm.h */
+
+  /* This is exactly the same as the previous function.  It exists for */
+  /* orthogonality.                                                    */
+
+  FT_EXPORT_DEF( FT_Error )
+  FT_Set_Var_Blend_Coordinates( FT_Face    face,
+                                FT_UInt    num_coords,
+                                FT_Fixed*  coords )
+  {
+    FT_Error                      error;
+    FT_Service_MultiMasters       service_mm   = NULL;
+    FT_Service_MetricsVariations  service_mvar = NULL;
+
+
+    /* check of `face' delayed to `ft_face_get_mm_service' */
+
+    if ( !coords )
+      return FT_THROW( Invalid_Argument );
+
+    error = ft_face_get_mm_service( face, &service_mm );
+    if ( !error )
+    {
+      error = FT_ERR( Invalid_Argument );
+      if ( service_mm->set_mm_blend )
+        error = service_mm->set_mm_blend( face, num_coords, coords );
+    }
+
+    if ( !error )
+    {
+      (void)ft_face_get_mvar_service( face, &service_mvar );
+
+      if ( service_mvar && service_mvar->metrics_adjust )
+        service_mvar->metrics_adjust( face );
+    }
+
+    /* enforce recomputation of auto-hinting data */
+    if ( !error && face->autohint.finalizer )
+    {
+      face->autohint.finalizer( face->autohint.data );
+      face->autohint.data = NULL;
+    }
+
+    return error;
+  }
+
+
+  /* documentation is in ftmm.h */
+
+  FT_EXPORT_DEF( FT_Error )
+  FT_Get_MM_Blend_Coordinates( FT_Face    face,
+                               FT_UInt    num_coords,
+                               FT_Fixed*  coords )
+  {
     FT_Error                 error;
     FT_Service_MultiMasters  service;
 
     if ( !error )
     {
       error = FT_ERR( Invalid_Argument );
-      if ( service->set_mm_blend )
-         error = service->set_mm_blend( face, num_coords, coords );
+      if ( service->get_mm_blend )
+        error = service->get_mm_blend( face, num_coords, coords );
     }
 
     return error;
   /* orthogonality.                                                    */
 
   FT_EXPORT_DEF( FT_Error )
-  FT_Set_Var_Blend_Coordinates( FT_Face    face,
+  FT_Get_Var_Blend_Coordinates( FT_Face    face,
                                 FT_UInt    num_coords,
                                 FT_Fixed*  coords )
   {
     if ( !error )
     {
       error = FT_ERR( Invalid_Argument );
-      if ( service->set_mm_blend )
-         error = service->set_mm_blend( face, num_coords, coords );
+      if ( service->get_mm_blend )
+        error = service->get_mm_blend( face, num_coords, coords );
     }
 
     return error;
index c2dc618..539116e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType private base classes (body).                            */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -37,6 +37,9 @@
 #include FT_SERVICE_KERNING_H
 #include FT_SERVICE_TRUETYPE_ENGINE_H
 
+#include FT_AUTOHINTER_H
+#include FT_CFF_DRIVER_H
+
 #ifdef FT_CONFIG_OPTION_MAC_FONTS
 #include "ftbase.h"
 #endif
 #define GRID_FIT_METRICS
 
 
+  /* forward declaration */
+  static FT_Error
+  ft_open_face_internal( FT_Library           library,
+                         const FT_Open_Args*  args,
+                         FT_Long              face_index,
+                         FT_Face             *aface,
+                         FT_Bool              test_mac_fonts );
+
+
   FT_BASE_DEF( FT_Pointer )
   ft_service_list_lookup( FT_ServiceDesc  service_descriptors,
                           const char*     service_id )
 
 
   Exit:
-    FT_TRACE4(( "FT_New_GlyphSlot: Return %d\n", error ));
+    FT_TRACE4(( "FT_New_GlyphSlot: Return 0x%x\n", error ));
+
     return error;
   }
 
       load_flags &= ~FT_LOAD_RENDER;
     }
 
+    if ( load_flags & FT_LOAD_BITMAP_METRICS_ONLY )
+      load_flags &= ~FT_LOAD_RENDER;
+
     /*
      * Determine whether we need to auto-hint or not.
      * The general rules are:
         /* check the size of the `fpgm' and `prep' tables, too --    */
         /* the assumption is that there don't exist real TTFs where  */
         /* both `fpgm' and `prep' tables are missing                 */
-        if ( ( mode == FT_RENDER_MODE_LIGHT                   &&
+        if ( ( mode == FT_RENDER_MODE_LIGHT       &&
                !FT_DRIVER_HINTS_LIGHTLY( driver ) )             ||
              ( FT_IS_SFNT( face )                             &&
                ttface->num_locations                          &&
 
     end = first + face->num_charmaps;  /* points after the last one */
 
-    for ( cur = first; cur < end; ++cur )
+    for ( cur = first; cur < end; cur++ )
     {
       if ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE    &&
            cur[0]->encoding_id == TT_APPLE_ID_VARIANT_SELECTOR &&
     }
 #endif
 
+    face->internal->random_seed = -1;
+
     if ( clazz->init_face )
       error = clazz->init_face( *astream,
                                 face,
     args.pathname = (char*)pathname;
     args.stream   = NULL;
 
-    return FT_Open_Face( library, &args, face_index, aface );
+    return ft_open_face_internal( library, &args, face_index, aface, 1 );
   }
 
 #endif
     args.memory_size = file_size;
     args.stream      = NULL;
 
-    return FT_Open_Face( library, &args, face_index, aface );
+    return ft_open_face_internal( library, &args, face_index, aface, 1 );
   }
 
 
 
   /* Finalizer for a memory stream; gets called by FT_Done_Face(). */
   /* It frees the memory it uses.                                  */
-  /* From ftmac.c.                                                 */
+  /* From `ftmac.c'.                                               */
   static void
   memory_stream_close( FT_Stream  stream )
   {
 
 
   /* Create a new memory stream from a buffer and a size. */
-  /* From ftmac.c.                                        */
+  /* From `ftmac.c'.                                      */
   static FT_Error
   new_memory_stream( FT_Library           library,
                      FT_Byte*             base,
       return FT_THROW( Invalid_Argument );
 
     *astream = NULL;
-    memory = library->memory;
+    memory   = library->memory;
     if ( FT_NEW( stream ) )
       goto Exit;
 
 
 
   /* Create a new FT_Face given a buffer and a driver name. */
-  /* from ftmac.c */
+  /* From `ftmac.c'.                                        */
   FT_LOCAL_DEF( FT_Error )
   open_face_from_buffer( FT_Library   library,
                          FT_Byte*     base,
       return error;
     }
 
-    args.flags = FT_OPEN_STREAM;
+    args.flags  = FT_OPEN_STREAM;
     args.stream = stream;
     if ( driver_name )
     {
-      args.flags = args.flags | FT_OPEN_DRIVER;
+      args.flags  = args.flags | FT_OPEN_DRIVER;
       args.driver = FT_Get_Module( library, driver_name );
     }
 
       face_index &= 0x7FFF0000L; /* retain GX data */
 #endif
 
-    error = FT_Open_Face( library, &args, face_index, aface );
+    error = ft_open_face_internal( library, &args, face_index, aface, 0 );
 
-    if ( error == FT_Err_Ok )
+    if ( !error )
       (*aface)->face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;
     else
 #ifdef FT_MACINTOSH
   {
     FT_Error   error  = FT_ERR( Cannot_Open_Resource );
     FT_Memory  memory = library->memory;
+
     FT_Byte*   pfb_data = NULL;
     int        i, type, flags;
     FT_ULong   len;
     /* Find the length of all the POST resources, concatenated.  Assume */
     /* worst case (each resource in its own section).                   */
     pfb_len = 0;
-    for ( i = 0; i < resource_cnt; ++i )
+    for ( i = 0; i < resource_cnt; i++ )
     {
       error = FT_Stream_Seek( stream, (FT_ULong)offsets[i] );
       if ( error )
         goto Exit;
-      if ( FT_READ_ULONG( temp ) )
+      if ( FT_READ_ULONG( temp ) )  /* actually LONG */
         goto Exit;
 
       /* FT2 allocator takes signed long buffer length,
        */
       FT_TRACE4(( "                 POST fragment #%d: length=0x%08x"
                   " total pfb_len=0x%08x\n",
-                  i, temp, pfb_len + temp + 6));
+                  i, temp, pfb_len + temp + 6 ));
+
       if ( FT_MAC_RFORK_MAX_LEN < temp               ||
            FT_MAC_RFORK_MAX_LEN - temp < pfb_len + 6 )
       {
         FT_TRACE2(( "             MacOS resource length cannot exceed"
-                    " 0x%08x\n", FT_MAC_RFORK_MAX_LEN ));
+                    " 0x%08x\n",
+                    FT_MAC_RFORK_MAX_LEN ));
+
         error = FT_THROW( Invalid_Offset );
         goto Exit;
       }
       pfb_len += temp + 6;
     }
 
-    FT_TRACE2(( "             total buffer size to concatenate %d"
-                " POST fragments: 0x%08x\n",
-                 resource_cnt, pfb_len + 2));
-    if ( pfb_len + 2 < 6 ) {
+    FT_TRACE2(( "             total buffer size to concatenate"
+                " %d POST fragments: 0x%08x\n",
+                 resource_cnt, pfb_len + 2 ));
+
+    if ( pfb_len + 2 < 6 )
+    {
       FT_TRACE2(( "             too long fragment length makes"
-                  " pfb_len confused: pfb_len=0x%08x\n", pfb_len ));
+                  " pfb_len confused: pfb_len=0x%08x\n",
+                  pfb_len ));
+
       error = FT_THROW( Array_Too_Large );
       goto Exit;
     }
+
     if ( FT_ALLOC( pfb_data, (FT_Long)pfb_len + 2 ) )
       goto Exit;
 
     pfb_pos     = 6;
     pfb_lenpos  = 2;
 
-    len = 0;
+    len  = 0;
     type = 1;
-    for ( i = 0; i < resource_cnt; ++i )
+
+    for ( i = 0; i < resource_cnt; i++ )
     {
       error = FT_Stream_Seek( stream, (FT_ULong)offsets[i] );
       if ( error )
 
       if ( FT_READ_USHORT( flags ) )
         goto Exit2;
-      FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
-                   i, offsets[i], rlen, flags ));
+
+      FT_TRACE3(( "POST fragment[%d]:"
+                  " offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
+                  i, offsets[i], rlen, flags ));
 
       error = FT_ERR( Array_Too_Large );
-      /* postpone the check of rlen longer than buffer until FT_Stream_Read() */
+
+      /* postpone the check of `rlen longer than buffer' */
+      /* until `FT_Stream_Read'                          */
+
       if ( ( flags >> 8 ) == 0 )        /* Comment, should not be loaded */
       {
-        FT_TRACE3(( "    Skip POST fragment #%d because it is a comment\n", i ));
+        FT_TRACE3(( "    Skip POST fragment #%d because it is a comment\n",
+                    i ));
         continue;
       }
 
-      /* the flags are part of the resource, so rlen >= 2.  */
+      /* the flags are part of the resource, so rlen >= 2,  */
       /* but some fonts declare rlen = 0 for empty fragment */
       if ( rlen > 2 )
         rlen -= 2;
       else
       {
         FT_TRACE3(( "    Write POST fragment #%d header (4-byte) to buffer"
-                    " %p + 0x%08x\n", i, pfb_data, pfb_lenpos ));
+                    " %p + 0x%08x\n",
+                    i, pfb_data, pfb_lenpos ));
+
         if ( pfb_lenpos + 3 > pfb_len + 2 )
           goto Exit2;
+
         pfb_data[pfb_lenpos    ] = (FT_Byte)( len );
         pfb_data[pfb_lenpos + 1] = (FT_Byte)( len >> 8 );
         pfb_data[pfb_lenpos + 2] = (FT_Byte)( len >> 16 );
           break;
 
         FT_TRACE3(( "    Write POST fragment #%d header (6-byte) to buffer"
-                    " %p + 0x%08x\n", i, pfb_data, pfb_pos ));
+                    " %p + 0x%08x\n",
+                    i, pfb_data, pfb_pos ));
+
         if ( pfb_pos + 6 > pfb_len + 2 )
           goto Exit2;
+
         pfb_data[pfb_pos++] = 0x80;
 
         type = flags >> 8;
-        len = rlen;
+        len  = rlen;
 
         pfb_data[pfb_pos++] = (FT_Byte)type;
         pfb_lenpos          = pfb_pos;
         goto Exit2;
 
       FT_TRACE3(( "    Load POST fragment #%d (%d byte) to buffer"
-                  " %p + 0x%08x\n", i, rlen, pfb_data, pfb_pos ));
+                  " %p + 0x%08x\n",
+                  i, rlen, pfb_data, pfb_pos ));
+
       error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen );
       if ( error )
         goto Exit2;
+
       pfb_pos += rlen;
     }
 
     error = FT_ERR( Array_Too_Large );
+
     if ( pfb_pos + 2 > pfb_len + 2 )
       goto Exit2;
     pfb_data[pfb_pos++] = 0x80;
                                   aface );
 
   Exit2:
-    if ( error == FT_ERR( Array_Too_Large ) )
+    if ( FT_ERR_EQ( error, Array_Too_Large ) )
       FT_TRACE2(( "  Abort due to too-short buffer to store"
                   " all POST fragments\n" ));
-    else if ( error == FT_ERR( Invalid_Offset ) )
+    else if ( FT_ERR_EQ( error, Invalid_Offset ) )
       FT_TRACE2(( "  Abort due to invalid offset in a POST fragment\n" ));
+
     if ( error )
       error = FT_ERR( Cannot_Open_Resource );
     FT_FREE( pfb_data );
 
     if ( FT_READ_LONG( rlen ) )
       goto Exit;
-    if ( rlen == -1 )
+    if ( rlen 1 )
       return FT_THROW( Cannot_Open_Resource );
     if ( (FT_ULong)rlen > FT_MAC_RFORK_MAX_LEN )
       return FT_THROW( Invalid_Offset );
   {
     FT_Memory  memory = library->memory;
     FT_Error   error;
-    FT_Long    map_offset, rdara_pos;
+    FT_Long    map_offset, rdata_pos;
     FT_Long    *data_offsets;
     FT_Long    count;
 
 
     error = FT_Raccess_Get_HeaderInfo( library, stream, resource_offset,
-                                       &map_offset, &rdara_pos );
+                                       &map_offset, &rdata_pos );
     if ( error )
       return error;
 
     /* POST resources must be sorted to concatenate properly */
     error = FT_Raccess_Get_DataOffsets( library, stream,
-                                        map_offset, rdara_pos,
+                                        map_offset, rdata_pos,
                                         TTAG_POST, TRUE,
                                         &data_offsets, &count );
     if ( !error )
     /* sfnt resources should not be sorted to preserve the face order by
        QuickDraw API */
     error = FT_Raccess_Get_DataOffsets( library, stream,
-                                        map_offset, rdara_pos,
+                                        map_offset, rdata_pos,
                                         TTAG_sfnt, FALSE,
                                         &data_offsets, &count );
     if ( !error )
     FT_Long        dlen, offset;
 
 
-    if ( NULL == stream )
+    if ( !stream )
       return FT_THROW( Invalid_Stream_Operation );
 
     error = FT_Stream_Seek( stream, 0 );
       {
         FT_TRACE3(( "Skip rule %d: darwin vfs resource fork"
                     " is already checked and"
-                    " no font is found\n", i ));
+                    " no font is found\n",
+                    i ));
         continue;
       }
 
       if ( errors[i] )
       {
-        FT_TRACE3(( "Error[%d] has occurred in rule %d\n", errors[i], i ));
+        FT_TRACE3(( "Error 0x%x has occurred in rule %d\n",
+                    errors[i], i ));
         continue;
       }
 
                 FT_Long              face_index,
                 FT_Face             *aface )
   {
+    return ft_open_face_internal( library, args, face_index, aface, 1 );
+  }
+
+
+  static FT_Error
+  ft_open_face_internal( FT_Library           library,
+                         const FT_Open_Args*  args,
+                         FT_Long              face_index,
+                         FT_Face             *aface,
+                         FT_Bool              test_mac_fonts )
+  {
     FT_Error     error;
     FT_Driver    driver = NULL;
     FT_Memory    memory = NULL;
     FT_Module*   cur;
     FT_Module*   limit;
 
+#ifndef FT_CONFIG_OPTION_MAC_FONTS
+    FT_UNUSED( test_mac_fonts );
+#endif
+
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+    FT_TRACE3(( "FT_Open_Face: " ));
+    if ( face_index < 0 )
+      FT_TRACE3(( "Requesting number of faces and named instances\n"));
+    else
+    {
+      FT_TRACE3(( "Requesting face %ld", face_index & 0xFFFFL ));
+      if ( face_index & 0x7FFF0000L )
+        FT_TRACE3(( ", named instance %ld", face_index >> 16 ));
+      FT_TRACE3(( "\n" ));
+    }
+#endif
 
     /* test for valid `library' delayed to `FT_Stream_New' */
 
             goto Success;
 
 #ifdef FT_CONFIG_OPTION_MAC_FONTS
-          if ( ft_strcmp( cur[0]->clazz->module_name, "truetype" ) == 0 &&
+          if ( test_mac_fonts                                           &&
+               ft_strcmp( cur[0]->clazz->module_name, "truetype" ) == 0 &&
                FT_ERR_EQ( error, Table_Missing )                        )
           {
             /* TrueType but essential tables are missing */
         goto Fail2;
 
 #if !defined( FT_MACINTOSH ) && defined( FT_CONFIG_OPTION_MAC_FONTS )
-      error = load_mac_face( library, stream, face_index, aface, args );
-      if ( !error )
+      if ( test_mac_fonts )
       {
-        /* We don't want to go to Success here.  We've already done that. */
-        /* On the other hand, if we succeeded we still need to close this */
-        /* stream (we opened a different stream which extracted the       */
-        /* interesting information out of this stream here.  That stream  */
-        /* will still be open and the face will point to it).             */
-        FT_Stream_Free( stream, external_stream );
-        return error;
+        error = load_mac_face( library, stream, face_index, aface, args );
+        if ( !error )
+        {
+          /* We don't want to go to Success here.  We've already done   */
+          /* that.  On the other hand, if we succeeded we still need to */
+          /* close this stream (we opened a different stream which      */
+          /* extracted the interesting information out of this stream   */
+          /* here.  That stream will still be open and the face will    */
+          /* point to it).                                              */
+          FT_Stream_Free( stream, external_stream );
+          return error;
+        }
       }
 
       if ( FT_ERR_NEQ( error, Unknown_File_Format ) )
 
 
         if ( bsize->height < 0 )
-          bsize->height = (FT_Short)-bsize->height;
+          bsize->height = -bsize->height;
         if ( bsize->x_ppem < 0 )
-          bsize->x_ppem = (FT_Short)-bsize->x_ppem;
+          bsize->x_ppem = -bsize->x_ppem;
         if ( bsize->y_ppem < 0 )
           bsize->y_ppem = -bsize->y_ppem;
+
+        /* check whether negation actually has worked */
+        if ( bsize->height < 0 || bsize->x_ppem < 0 || bsize->y_ppem < 0 )
+        {
+          FT_TRACE0(( "FT_Open_Face:"
+                      " Invalid bitmap dimensions for strike %d,"
+                      " now disabled\n", i ));
+          bsize->width  = 0;
+          bsize->height = 0;
+          bsize->size   = 0;
+          bsize->x_ppem = 0;
+          bsize->y_ppem = 0;
+        }
       }
     }
 
       internal->transform_delta.y = 0;
 
       internal->refcount = 1;
+
+      internal->no_stem_darkening = -1;
+
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+      ft_memset( internal->lcd_weights, 0, FT_LCD_FILTER_FIVE_TAPS );
+#endif
     }
 
     if ( aface )
       destroy_face( memory, face, driver );
 
   Exit:
-    FT_TRACE4(( "FT_Open_Face: Return %d\n", error ));
+#ifdef FT_DEBUG_LEVEL_TRACE
+    if ( !error && face_index < 0 )
+    {
+      FT_TRACE3(( "FT_Open_Face: The font has %ld face%s\n"
+                  "              and %ld named instance%s for face %ld\n",
+                  face->num_faces,
+                  face->num_faces == 1 ? "" : "s",
+                  face->style_flags >> 16,
+                  ( face->style_flags >> 16 ) == 1 ? "" : "s",
+                  -face_index - 1 ));
+    }
+#endif
+
+    FT_TRACE4(( "FT_Open_Face: Return 0x%x\n", error ));
 
     return error;
   }
     FT_Size          size = NULL;
     FT_ListNode      node = NULL;
 
+    FT_Size_Internal  internal = NULL;
+
 
     if ( !face )
       return FT_THROW( Invalid_Face_Handle );
 
     size->face = face;
 
-    /* for now, do not use any internal fields in size objects */
-    size->internal = NULL;
+    if ( FT_NEW( internal ) )
+      goto Exit;
+
+    size->internal = internal;
 
     if ( clazz->init_size )
       error = clazz->init_size( size );
     w = FT_PIX_ROUND( w );
     h = FT_PIX_ROUND( h );
 
+    if ( !w || !h )
+      return FT_THROW( Invalid_Pixel_Size );
+
     for ( i = 0; i < face->num_fixed_sizes; i++ )
     {
       FT_Bitmap_Size*  bsize = face->available_sizes + i;
       }
     }
 
+    FT_TRACE3(( "FT_Match_Size: no matching bitmap strike\n" ));
+
     return FT_THROW( Invalid_Pixel_Size );
   }
 
          req->type >= FT_SIZE_REQUEST_TYPE_MAX )
       return FT_THROW( Invalid_Argument );
 
+    /* signal the auto-hinter to recompute its size metrics */
+    /* (if requested)                                       */
+    face->size->internal->autohint_metrics.x_scale = 0;
+
     clazz = face->driver->clazz;
 
     if ( clazz->request_size )
     FT_CMap    cmap = NULL;
 
 
-    if ( clazz == NULL || charmap == NULL || charmap->face == NULL )
+    if ( !clazz || !charmap || !charmap->face )
       return FT_THROW( Invalid_Argument );
 
     face   = charmap->face;
 
   /* documentation is in freetype.h */
 
+  FT_EXPORT_DEF( FT_Error )
+  FT_Face_Properties( FT_Face        face,
+                      FT_UInt        num_properties,
+                      FT_Parameter*  properties )
+  {
+    FT_Error  error = FT_Err_Ok;
+
+
+    if ( num_properties > 0 && !properties )
+    {
+      error = FT_THROW( Invalid_Argument );
+      goto Exit;
+    }
+
+    for ( ; num_properties > 0; num_properties-- )
+    {
+      if ( properties->tag == FT_PARAM_TAG_STEM_DARKENING )
+      {
+        if ( properties->data )
+        {
+          if ( *( (FT_Bool*)properties->data ) == TRUE )
+            face->internal->no_stem_darkening = FALSE;
+          else
+            face->internal->no_stem_darkening = TRUE;
+        }
+        else
+        {
+          /* use module default */
+          face->internal->no_stem_darkening = -1;
+        }
+      }
+      else if ( properties->tag == FT_PARAM_TAG_LCD_FILTER_WEIGHTS )
+      {
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+        if ( properties->data )
+          ft_memcpy( face->internal->lcd_weights,
+                     properties->data,
+                     FT_LCD_FILTER_FIVE_TAPS );
+        else
+        {
+          /* Value NULL indicates `no custom weights, use library        */
+          /* defaults', signaled by filling the weight field with zeros. */
+          ft_memset( face->internal->lcd_weights,
+                     0,
+                     FT_LCD_FILTER_FIVE_TAPS );
+        }
+#else
+        error = FT_THROW( Unimplemented_Feature );
+        goto Exit;
+#endif
+      }
+      else if ( properties->tag == FT_PARAM_TAG_RANDOM_SEED )
+      {
+        if ( properties->data )
+        {
+          face->internal->random_seed = *( (FT_Int32*)properties->data );
+          if ( face->internal->random_seed < 0 )
+            face->internal->random_seed = 0;
+        }
+        else
+        {
+          /* use module default */
+          face->internal->random_seed = -1;
+        }
+      }
+      else
+      {
+        error = FT_THROW( Invalid_Argument );
+        goto Exit;
+      }
+
+      if ( error )
+        break;
+
+      properties++;
+    }
+
+  Exit:
+    return error;
+  }
+
+
+  /* documentation is in freetype.h */
+
   FT_EXPORT_DEF( FT_UInt )
   FT_Face_GetCharVariantIndex( FT_Face   face,
                                FT_ULong  charcode,
       FT_CMap     ucmap = FT_CMAP( face->charmap );
 
 
-      if ( charmap != NULL )
+      if ( charmap )
       {
         FT_CMap  vcmap = FT_CMAP( charmap );
 
 
         if ( charcode > 0xFFFFFFFFUL )
         {
-          FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
+          FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
+                      " too large charcode" ));
           FT_TRACE1(( " 0x%x is truncated\n", charcode ));
         }
         if ( variantSelector > 0xFFFFFFFFUL )
         {
-          FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" ));
+          FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
+                      " too large variantSelector" ));
           FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
         }
 
       FT_CharMap  charmap = find_variant_selector_charmap( face );
 
 
-      if ( charmap != NULL )
+      if ( charmap )
       {
         FT_CMap  vcmap = FT_CMAP( charmap );
 
 
         if ( charcode > 0xFFFFFFFFUL )
         {
-          FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
+          FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
+                      " too large charcode" ));
           FT_TRACE1(( " 0x%x is truncated\n", charcode ));
         }
         if ( variantSelector > 0xFFFFFFFFUL )
         {
-          FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" ));
+          FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
+                      " too large variantSelector" ));
           FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
         }
 
       FT_CharMap  charmap = find_variant_selector_charmap( face );
 
 
-      if ( charmap != NULL )
+      if ( charmap )
       {
         FT_CMap    vcmap  = FT_CMAP( charmap );
         FT_Memory  memory = FT_FACE_MEMORY( face );
       FT_CharMap  charmap = find_variant_selector_charmap( face );
 
 
-      if ( charmap != NULL )
+      if ( charmap )
       {
         FT_CMap    vcmap  = FT_CMAP( charmap );
         FT_Memory  memory = FT_FACE_MEMORY( face );
 
         if ( charcode > 0xFFFFFFFFUL )
         {
-          FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
+          FT_TRACE1(( "FT_Face_GetVariantsOfChar: too large charcode" ));
           FT_TRACE1(( " 0x%x is truncated\n", charcode ));
         }
 
       FT_CharMap  charmap = find_variant_selector_charmap( face );
 
 
-      if ( charmap != NULL )
+      if ( charmap )
       {
         FT_CMap    vcmap  = FT_CMAP( charmap );
         FT_Memory  memory = FT_FACE_MEMORY( face );
     if ( face && FT_IS_SFNT( face ) )
     {
       FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );
-      if ( service != NULL )
+      if ( service )
         table = service->get_table( face, tag );
     }
 
       return FT_THROW( Invalid_Face_Handle );
 
     FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );
-    if ( service == NULL )
+    if ( !service )
       return FT_THROW( Unimplemented_Feature );
 
     return service->load_table( face, tag, offset, buffer, length );
       return FT_THROW( Invalid_Face_Handle );
 
     FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );
-    if ( service == NULL )
+    if ( !service )
       return FT_THROW( Unimplemented_Feature );
 
     return service->table_info( face, table_index, tag, &offset, length );
 
     face = charmap->face;
     FT_FACE_FIND_SERVICE( face, service, TT_CMAP );
-    if ( service == NULL )
+    if ( !service )
       return 0;
     if ( service->get_cmap_info( charmap, &cmap_info ))
       return 0;
 
     face = charmap->face;
     FT_FACE_FIND_SERVICE( face, service, TT_CMAP );
-    if ( service == NULL )
+    if ( !service )
       return -1;
     if ( service->get_cmap_info( charmap, &cmap_info ))
       return -1;
     if ( ft_trace_levels[trace_bitmap] >= 3 )
     {
       /* we convert to a single bitmap format for computing the checksum */
-      if ( !error )
+      if ( !error && slot->bitmap.buffer )
       {
         FT_Bitmap  bitmap;
         FT_Error   err;
 
   FT_BASE_DEF( FT_Pointer )
   ft_module_get_service( FT_Module    module,
-                         const char*  service_id )
+                         const char*  service_id,
+                         FT_Bool      global )
   {
     FT_Pointer  result = NULL;
 
       if ( module->clazz->get_interface )
         result = module->clazz->get_interface( module, service_id );
 
-      if ( result == NULL )
+      if ( global && !result )
       {
         /* we didn't find it, look in all other modules then */
         FT_Library  library = module->library;
             if ( cur[0]->clazz->get_interface )
             {
               result = cur[0]->clazz->get_interface( cur[0], service_id );
-              if ( result != NULL )
+              if ( result )
                 break;
             }
           }
                   const FT_String*  module_name,
                   const FT_String*  property_name,
                   void*             value,
-                  FT_Bool           set )
+                  FT_Bool           set,
+                  FT_Bool           value_is_string )
   {
     FT_Module*           cur;
     FT_Module*           limit;
       return FT_THROW( Unimplemented_Feature );
     }
 
-    return set ? service->set_property( cur[0], property_name, value )
-               : service->get_property( cur[0], property_name, value );
+    return set ? service->set_property( cur[0],
+                                        property_name,
+                                        value,
+                                        value_is_string )
+               : service->get_property( cur[0],
+                                        property_name,
+                                        value );
   }
 
 
                            module_name,
                            property_name,
                            (void*)value,
-                           TRUE );
+                           TRUE,
+                           FALSE );
   }
 
 
                            module_name,
                            property_name,
                            value,
+                           FALSE,
                            FALSE );
   }
 
 
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+
+  /* this variant is used for handling the FREETYPE_PROPERTIES */
+  /* environment variable                                      */
+
+  FT_BASE_DEF( FT_Error )
+  ft_property_string_set( FT_Library        library,
+                          const FT_String*  module_name,
+                          const FT_String*  property_name,
+                          FT_String*        value )
+  {
+    return ft_property_do( library,
+                           module_name,
+                           property_name,
+                           (void*)value,
+                           TRUE,
+                           TRUE );
+  }
+
+#endif
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
 
         service = (FT_Service_TrueTypeEngine)
                     ft_module_get_service( module,
-                                           FT_SERVICE_ID_TRUETYPE_ENGINE );
+                                           FT_SERVICE_ID_TRUETYPE_ENGINE,
+                                           0 );
         if ( service )
           result = service->engine_type;
       }
index fe54e02..5fa0986 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for validating OpenType tables (body).                  */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index fc28225..464a066 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType outline management (body).                                  */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     return FT_Err_Ok;
 
   Exit:
-    FT_TRACE5(( "FT_Outline_Decompose: Error %d\n", error ));
+    FT_TRACE5(( "FT_Outline_Decompose: Error 0x%x\n", error ));
     return error;
 
   Invalid_Outline:
index 4861be1..9900f99 100644 (file)
@@ -3,9 +3,9 @@
 /*  ftpatent.c                                                             */
 /*                                                                         */
 /*    FreeType API for checking patented TrueType bytecode instructions    */
-/*    (body).  Obsolete, retained for backwards compatibility.             */
+/*    (body).  Obsolete, retained for backward compatibility.              */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  David Turner.                                                          */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 81faa52..5cc0b70 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for accessing PFR-specific data (body).                 */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 03769db..0f84fdd 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services (body).              */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 4660c97..f7b8137 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Embedded resource forks accessor (body).                             */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  Masatake YAMATO and Redhat K.K.                                        */
 /*                                                                         */
 /*  FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are     */
@@ -56,7 +56,7 @@
   {
     FT_Error       error;
     unsigned char  head[16], head2[16];
-    FT_Long        map_pos, rdata_len;
+    FT_Long        map_pos, map_len, rdata_len;
     int            allzeros, allmatch, i;
     FT_Long        type_list;
 
     if ( error )
       return error;
 
-    error = FT_Stream_Read( stream, (FT_Byte *)head, 16 );
+    error = FT_Stream_Read( stream, (FT_Byte*)head, 16 );
     if ( error )
       return error;
 
     /* ensure positive values */
-    if ( head[0] >= 0x80 || head[4] >= 0x80 || head[8] >= 0x80 )
+    if ( head[0]  >= 0x80 ||
+         head[4]  >= 0x80 ||
+         head[8]  >= 0x80 ||
+         head[12] >= 0x80 )
       return FT_THROW( Unknown_File_Format );
 
     *rdata_pos = ( head[ 0] << 24 ) |
                  ( head[ 9] << 16 ) |
                  ( head[10] <<  8 ) |
                    head[11];
+    map_len    = ( head[12] << 24 ) |
+                 ( head[13] << 16 ) |
+                 ( head[14] <<  8 ) |
+                   head[15];
 
-    /* map_len = head[12] .. head[15] */
-
-    if ( *rdata_pos != map_pos - rdata_len || map_pos == 0 )
+    /* the map must not be empty */
+    if ( !map_pos )
       return FT_THROW( Unknown_File_Format );
 
-    if ( FT_LONG_MAX - rfork_offset < *rdata_pos ||
-         FT_LONG_MAX - rfork_offset < map_pos    )
+    /* check whether rdata and map overlap */
+    if ( *rdata_pos < map_pos )
+    {
+      if ( *rdata_pos > map_pos - rdata_len )
+        return FT_THROW( Unknown_File_Format );
+    }
+    else
+    {
+      if ( map_pos > *rdata_pos - map_len )
+        return FT_THROW( Unknown_File_Format );
+    }
+
+    /* check whether end of rdata or map exceeds stream size */
+    if ( FT_LONG_MAX - rdata_len < *rdata_pos                               ||
+         FT_LONG_MAX - map_len < map_pos                                    ||
+
+         FT_LONG_MAX - ( *rdata_pos + rdata_len ) < rfork_offset            ||
+         FT_LONG_MAX - ( map_pos + map_len ) < rfork_offset                 ||
+
+         (FT_ULong)( rfork_offset + *rdata_pos + rdata_len ) > stream->size ||
+         (FT_ULong)( rfork_offset + map_pos + map_len ) > stream->size      )
       return FT_THROW( Unknown_File_Format );
 
     *rdata_pos += rfork_offset;
 
     allzeros = 1;
     allmatch = 1;
-    for ( i = 0; i < 16; ++i )
+    for ( i = 0; i < 16; i++ )
     {
       if ( head2[i] != 0 )
         allzeros = 0;
 
     /* If we have reached this point then it is probably a mac resource */
     /* file.  Now, does it contain any interesting resources?           */
-    /* Skip handle to next resource map, the file resource number, and  */
-    /* attributes.                                                      */
+
     (void)FT_STREAM_SKIP( 4        /* skip handle to next resource map */
                           + 2      /* skip file resource number */
                           + 2 );   /* skip attributes */
 
-    if ( FT_READ_USHORT( type_list ) )
+    if ( FT_READ_SHORT( type_list ) )
       return error;
-    if ( type_list == -1 )
+    if ( type_list < 0 )
       return FT_THROW( Unknown_File_Format );
 
     error = FT_Stream_Seek( stream, (FT_ULong)( map_pos + type_list ) );
     if ( error )
       return error;
 
-    if ( FT_READ_USHORT( cnt ) )
+    if ( FT_READ_SHORT( cnt ) )
       return error;
     cnt++;
 
-    for ( i = 0; i < cnt; ++i )
+    /* `rpos' is a signed 16bit integer offset to resource records; the    */
+    /* size of a resource record is 12 bytes.  The map header is 28 bytes, */
+    /* and a type list needs 10 bytes or more.  If we assume that the name */
+    /* list is empty and we have only a single entry in the type list,     */
+    /* there can be at most                                                */
+    /*                                                                     */
+    /*   (32768 - 28 - 10) / 12 = 2727                                     */
+    /*                                                                     */
+    /* resources.                                                          */
+    /*                                                                     */
+    /* A type list starts with a two-byte counter, followed by 10-byte     */
+    /* type records.  Assuming that there are no resources, the number of  */
+    /* type records can be at most                                         */
+    /*                                                                     */
+    /*   (32768 - 28 - 2) / 8 = 4079                                       */
+    /*                                                                     */
+    if ( cnt > 4079 )
+      return FT_THROW( Invalid_Table );
+
+    for ( i = 0; i < cnt; i++ )
     {
       if ( FT_READ_LONG( tag_internal ) ||
-           FT_READ_USHORT( subcnt )     ||
-           FT_READ_USHORT( rpos )       )
+           FT_READ_SHORT( subcnt )      ||
+           FT_READ_SHORT( rpos )        )
         return error;
 
       FT_TRACE2(( "Resource tags: %c%c%c%c\n",
         *count = subcnt + 1;
         rpos  += map_offset;
 
+        /* a zero count might be valid in the resource specification, */
+        /* however, it is completely useless to us                    */
+        if ( *count < 1 || *count > 2727 )
+          return FT_THROW( Invalid_Table );
+
         error = FT_Stream_Seek( stream, (FT_ULong)rpos );
         if ( error )
           return error;
         if ( FT_NEW_ARRAY( ref, *count ) )
           return error;
 
-        for ( j = 0; j < *count; ++j )
+        for ( j = 0; j < *count; j++ )
         {
-          if ( FT_READ_USHORT( ref[j].res_id ) )
+          if ( FT_READ_SHORT( ref[j].res_id ) )
             goto Exit;
-          if ( FT_STREAM_SKIP( 2 ) ) /* resource name */
+          if ( FT_STREAM_SKIP( 2 ) )  /* resource name offset */
             goto Exit;
-          if ( FT_READ_LONG( temp ) )
+          if ( FT_READ_LONG( temp ) ) /* attributes (8bit), offset (24bit) */
             goto Exit;
-          if ( FT_STREAM_SKIP( 4 ) ) /* mbz */
+          if ( FT_STREAM_SKIP( 4 ) )  /* mbz */
+            goto Exit;
+
+          if ( ref[j].res_id < 0 || temp < 0 )
+          {
+            error = FT_THROW( Invalid_Table );
             goto Exit;
+          }
 
           ref[j].offset = temp & 0xFFFFFFL;
+
           FT_TRACE3(( "             [%d]:"
                       " resource_id=0x%04x, offset=0x%08x\n",
                       j, ref[j].res_id, ref[j].offset ));
         }
 
-        if (sort_by_res_id)
+        if ( sort_by_res_id )
         {
-          ft_qsort( ref, (size_t)*count, sizeof ( FT_RFork_Ref ),
-                    ( int(*)(const void*, const void*) )
-                    ft_raccess_sort_ref_by_id );
+          ft_qsort( ref,
+                    (size_t)*count,
+                    sizeof ( FT_RFork_Ref ),
+                    ( int(*)(const void*,
+                             const void*) )ft_raccess_sort_ref_by_id );
 
           FT_TRACE3(( "             -- sort resources by their ids --\n" ));
-          for ( j = 0; j < *count; ++ j ) {
+
+          for ( j = 0; j < *count; j++ )
             FT_TRACE3(( "             [%d]:"
                         " resource_id=0x%04x, offset=0x%08x\n",
                         j, ref[j].res_id, ref[j].offset ));
-          }
         }
 
         if ( FT_NEW_ARRAY( offsets_internal, *count ) )
          *      gap between reference IDs are acceptable?
          *      further investigation on Apple implementation is needed.
          */
-        for ( j = 0; j < *count; ++j )
+        for ( j = 0; j < *count; j++ )
           offsets_internal[j] = rdata_pos + ref[j].offset;
 
         *offsets = offsets_internal;
index ce79641..3609450 100644 (file)
@@ -7,7 +7,7 @@
 /*                                                                         */
 /*    This is _not_ used to retrieve glyph names!                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -20,6 +20,8 @@
 
 
 #include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
 #include FT_SFNT_NAMES_H
 #include FT_INTERNAL_TRUETYPE_TYPES_H
 #include FT_INTERNAL_STREAM_H
 
       if ( idx < (FT_UInt)ttface->num_names )
       {
-        TT_NameEntryRec*  entry = ttface->name_table.names + idx;
+        TT_Name  entry = ttface->name_table.names + idx;
 
 
         /* load name on demand */
-        if ( entry->stringLength > 0 && entry->string == NULL )
+        if ( entry->stringLength > 0 && !entry->string )
         {
           FT_Memory  memory = face->memory;
           FT_Stream  stream = face->stream;
   }
 
 
+  /* documentation is in ftsnames.h */
+
+  FT_EXPORT_DEF( FT_Error )
+  FT_Get_Sfnt_LangTag( FT_Face          face,
+                       FT_UInt          langID,
+                       FT_SfntLangTag  *alangTag )
+  {
+    FT_Error  error = FT_ERR( Invalid_Argument );
+
+
+    if ( alangTag && face && FT_IS_SFNT( face ) )
+    {
+      TT_Face  ttface = (TT_Face)face;
+
+
+      if ( ttface->name_table.format != 1 )
+        return FT_THROW( Invalid_Table );
+
+      if ( langID > 0x8000U                                        &&
+           langID - 0x8000U < ttface->name_table.numLangTagRecords )
+      {
+        TT_LangTag  entry = ttface->name_table.langTags +
+                            ( langID - 0x8000U );
+
+
+        /* load name on demand */
+        if ( entry->stringLength > 0 && !entry->string )
+        {
+          FT_Memory  memory = face->memory;
+          FT_Stream  stream = face->stream;
+
+
+          if ( FT_NEW_ARRAY  ( entry->string, entry->stringLength ) ||
+               FT_STREAM_SEEK( entry->stringOffset )                ||
+               FT_STREAM_READ( entry->string, entry->stringLength ) )
+          {
+            FT_FREE( entry->string );
+            entry->stringLength = 0;
+          }
+        }
+
+        alangTag->string     = (FT_Byte*)entry->string;
+        alangTag->string_len = entry->stringLength;
+
+        error = FT_Err_Ok;
+      }
+    }
+
+    return error;
+  }
+
+
 #endif /* TT_CONFIG_OPTION_SFNT_NAMES */
 
 
index bb512a7..a3f8c8b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    I/O stream support (body).                                           */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 4f3c493..d32de0d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType path stroker (body).                                        */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 4b66a33..66dae60 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType synthesizing code for emboldening and slanting (body).      */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
       if ( ( ystr >> 6 ) > FT_INT_MAX || ( ystr >> 6 ) < FT_INT_MIN )
       {
         FT_TRACE1(( "FT_GlyphSlot_Embolden:" ));
-        FT_TRACE1(( "too strong embolding parameter ystr=%d\n", ystr ));
+        FT_TRACE1(( "too strong emboldening parameter ystr=%d\n", ystr ));
         return;
       }
       error = FT_GlyphSlot_Own_Bitmap( slot );
index ac1f01c..324f949 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    ANSI-specific FreeType low-level system interface (body).            */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 7b582c8..7a4d17c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType trigonometric functions (body).                             */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 5c0fce8..4d16a63 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType utility file for PS names support (body).                   */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index fad7d1a..dccc209 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType utility file for memory and list management (body).         */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -74,7 +74,7 @@
     if ( size > 0 )
     {
       block = memory->alloc( memory, size );
-      if ( block == NULL )
+      if ( !block )
         error = FT_THROW( Out_Of_Memory );
     }
     else if ( size < 0 )
     }
     else if ( cur_count == 0 )
     {
-      FT_ASSERT( block == NULL );
+      FT_ASSERT( !block );
 
       block = ft_mem_alloc( memory, new_count*item_size, &error );
     }
 
 
       block2 = memory->realloc( memory, cur_size, new_size, block );
-      if ( block2 == NULL )
+      if ( !block2 )
         error = FT_THROW( Out_Of_Memory );
       else
         block = block2;
index 89e9155..05baa02 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for accessing Windows FNT specific info (body).         */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index aa424c5..2a1e93c 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 2f0147b..f382b51 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/bdf Jamfile
 #
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index f95fb76..e54df66 100644 (file)
@@ -24,9 +24,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 */
 
-#define FT_MAKE_OPTION_SINGLE_OBJECT
 
+#define FT_MAKE_OPTION_SINGLE_OBJECT
 #include <ft2build.h>
+
 #include "bdflib.c"
 #include "bdfdrivr.c"
 
index a381cf6..a2242be 100644 (file)
@@ -276,7 +276,7 @@ THE SOFTWARE.
 
         len = lengths[nn];
 
-        if ( src == NULL )
+        if ( !src )
           continue;
 
         /* separate elements with a space */
@@ -423,7 +423,7 @@ THE SOFTWARE.
       else
         bdfface->family_name = NULL;
 
-      if ( ( error = bdf_interpret_style( face ) ) != 0 )
+      if ( FT_SET_ERROR( bdf_interpret_style( face ) ) )
         goto Exit;
 
       /* the number of glyphs (with one slot for the undefined glyph */
@@ -439,7 +439,7 @@ THE SOFTWARE.
         FT_Short         resolution_x = 0, resolution_y = 0;
 
 
-        FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );
+        FT_ZERO( bsize );
 
         bsize->height = (FT_Short)( font->font_ascent + font->font_descent );
 
@@ -866,10 +866,10 @@ THE SOFTWARE.
       0x10000L,
       0x20000L,
 
-      0,    /* module-specific interface */
+      NULL,    /* module-specific interface */
 
-      0,                        /* FT_Module_Constructor  module_init   */
-      0,                        /* FT_Module_Destructor   module_done   */
+      NULL,                     /* FT_Module_Constructor  module_init   */
+      NULL,                     /* FT_Module_Destructor   module_done   */
       bdf_driver_requester      /* FT_Module_Requester    get_interface */
     },
 
@@ -879,16 +879,16 @@ THE SOFTWARE.
 
     BDF_Face_Init,              /* FT_Face_InitFunc  init_face */
     BDF_Face_Done,              /* FT_Face_DoneFunc  done_face */
-    0,                          /* FT_Size_InitFunc  init_size */
-    0,                          /* FT_Size_DoneFunc  done_size */
-    0,                          /* FT_Slot_InitFunc  init_slot */
-    0,                          /* FT_Slot_DoneFunc  done_slot */
+    NULL,                       /* FT_Size_InitFunc  init_size */
+    NULL,                       /* FT_Size_DoneFunc  done_size */
+    NULL,                       /* FT_Slot_InitFunc  init_slot */
+    NULL,                       /* FT_Slot_DoneFunc  done_slot */
 
     BDF_Glyph_Load,             /* FT_Slot_LoadFunc  load_glyph */
 
-    0,                          /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
-    0,                          /* FT_Face_GetAdvancesFunc  get_advances */
+    NULL,                       /* FT_Face_GetKerningFunc   get_kerning  */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_GetAdvancesFunc  get_advances */
 
     BDF_Size_Request,           /* FT_Size_RequestFunc  request_size */
     BDF_Size_Select             /* FT_Size_SelectFunc   select_size  */
index e1dce95..7fd95a7 100644 (file)
     /* See whether this property type exists yet or not. */
     /* If not, create it.                                */
     propid = ft_hash_str_lookup( name, &(font->proptbl) );
-    if ( propid == NULL )
+    if ( !propid )
     {
       error = bdf_create_property( name, BDF_ATOM, font );
       if ( error )
       }
 
       fp = font->props + font->props_size;
-      FT_MEM_ZERO( fp, sizeof ( bdf_property_t ) );
+      FT_ZERO( fp );
       font->props_size++;
     }
 
         p->font->comments[p->font->comments_len] = 0;
       }
     }
-    else if ( error == FT_Err_Ok )
+    else if ( !error )
       error = FT_THROW( Invalid_File_Format );
 
     *font = p->font;
index 5c28f7e..f369d4a 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/bzip2 Jamfile
 #
-# Copyright 2010-2016 by
+# Copyright 2010-2017 by
 # Joel Klinghed
 #
 # based on `src/lzw/Jamfile'
index 4577a83..7fc71e7 100644 (file)
@@ -8,7 +8,7 @@
 /*  parse compressed PCF fonts, as found with many X11 server              */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2010-2016 by                                                 */
+/*  Copyright 2010-2017 by                                                 */
 /*  Joel Klinghed.                                                         */
 /*                                                                         */
 /*  based on `src/gzip/ftgzip.c'                                           */
     bzstream->next_in  = (char*)zip->buffer;
 
     if ( BZ2_bzDecompressInit( bzstream, 0, 0 ) != BZ_OK ||
-         bzstream->next_in == NULL                       )
+         !bzstream->next_in                              )
       error = FT_THROW( Invalid_File_Format );
 
   Exit:
index 68b1763..f63ddc4 100644 (file)
@@ -2,7 +2,7 @@
 # FreeType 2 BZIP2 support configuration rules
 #
 
-# Copyright 2010-2016 by
+# Copyright 2010-2017 by
 # Joel Klinghed.
 #
 # based on `src/lzw/rules.mk'
index da65510..0880af8 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/cache Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 50941df..8226188 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType Caching sub-system (body only).                         */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "ftcmru.c"
-#include "ftcmanag.c"
+
+#include "ftcbasic.c"
 #include "ftccache.c"
 #include "ftccmap.c"
 #include "ftcglyph.c"
 #include "ftcimage.c"
+#include "ftcmanag.c"
+#include "ftcmru.c"
 #include "ftcsbits.c"
-#include "ftcbasic.c"
+
 
 /* END */
index 8e6de8c..289bd5c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType basic cache interface (body).                           */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   {
     {
       sizeof ( FTC_BasicFamilyRec ),
-      ftc_basic_family_compare,
-      ftc_basic_family_init,
-      0,                        /* FTC_MruNode_ResetFunc */
-      0                         /* FTC_MruNode_DoneFunc  */
+
+      ftc_basic_family_compare, /* FTC_MruNode_CompareFunc  node_compare */
+      ftc_basic_family_init,    /* FTC_MruNode_InitFunc     node_init    */
+      NULL,                     /* FTC_MruNode_ResetFunc    node_reset   */
+      NULL                      /* FTC_MruNode_DoneFunc     node_done    */
     },
-    ftc_basic_family_load_glyph
+
+    ftc_basic_family_load_glyph /* FTC_IFamily_LoadGlyphFunc  family_load_glyph */
   };
 
 
   const FTC_GCacheClassRec  ftc_basic_image_cache_class =
   {
     {
-      ftc_inode_new,
-      ftc_inode_weight,
-      ftc_gnode_compare,
-      ftc_basic_gnode_compare_faceid,
-      ftc_inode_free,
+      ftc_inode_new,                  /* FTC_Node_NewFunc      node_new           */
+      ftc_inode_weight,               /* FTC_Node_WeightFunc   node_weight        */
+      ftc_gnode_compare,              /* FTC_Node_CompareFunc  node_compare       */
+      ftc_basic_gnode_compare_faceid, /* FTC_Node_CompareFunc  node_remove_faceid */
+      ftc_inode_free,                 /* FTC_Node_FreeFunc     node_free          */
 
       sizeof ( FTC_GCacheRec ),
-      ftc_gcache_init,
-      ftc_gcache_done
+      ftc_gcache_init,                /* FTC_Cache_InitFunc    cache_init         */
+      ftc_gcache_done                 /* FTC_Cache_DoneFunc    cache_done         */
     },
+
     (FTC_MruListClass)&ftc_basic_image_family_class
   };
 
   {
     {
       sizeof ( FTC_BasicFamilyRec ),
-      ftc_basic_family_compare,
-      ftc_basic_family_init,
-      0,                            /* FTC_MruNode_ResetFunc */
-      0                             /* FTC_MruNode_DoneFunc  */
+      ftc_basic_family_compare,     /* FTC_MruNode_CompareFunc  node_compare */
+      ftc_basic_family_init,        /* FTC_MruNode_InitFunc     node_init    */
+      NULL,                         /* FTC_MruNode_ResetFunc    node_reset   */
+      NULL                          /* FTC_MruNode_DoneFunc     node_done    */
     },
+
     ftc_basic_family_get_count,
     ftc_basic_family_load_bitmap
   };
   const FTC_GCacheClassRec  ftc_basic_sbit_cache_class =
   {
     {
-      ftc_snode_new,
-      ftc_snode_weight,
-      ftc_snode_compare,
-      ftc_basic_gnode_compare_faceid,
-      ftc_snode_free,
+      ftc_snode_new,                  /* FTC_Node_NewFunc      node_new           */
+      ftc_snode_weight,               /* FTC_Node_WeightFunc   node_weight        */
+      ftc_snode_compare,              /* FTC_Node_CompareFunc  node_compare       */
+      ftc_basic_gnode_compare_faceid, /* FTC_Node_CompareFunc  node_remove_faceid */
+      ftc_snode_free,                 /* FTC_Node_FreeFunc     node_free          */
 
       sizeof ( FTC_GCacheRec ),
-      ftc_gcache_init,
-      ftc_gcache_done
+      ftc_gcache_init,                /* FTC_Cache_InitFunc    cache_init         */
+      ftc_gcache_done                 /* FTC_Cache_DoneFunc    cache_done         */
     },
+
     (FTC_MruListClass)&ftc_basic_sbit_family_class
   };
 
index 3b1a4bc..37dc3ab 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType internal cache interface (body).                        */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
         for (;;)
         {
           node = *pnode;
-          if ( node == NULL )
+          if ( !node )
             break;
 
           if ( node->hash & ( mask + 1 ) )
       FTC_Node  node = *pnode;
 
 
-      if ( node == NULL )
+      if ( !node )
       {
         FT_TRACE0(( "ftc_node_hash_unlink: unknown node\n" ));
         return;
     cache = manager->caches[node->cache_index];
 
 #ifdef FT_DEBUG_ERROR
-    if ( cache == NULL )
+    if ( !cache )
     {
       FT_TRACE0(( "ftc_node_destroy: invalid node handle\n" ));
       return;
     FTC_Node_CompareFunc  compare = cache->clazz.node_compare;
 
 
-    if ( cache == NULL || anode == NULL )
+    if ( !cache || !anode )
       return FT_THROW( Invalid_Argument );
 
     /* Go to the `top' node of the list sharing same masked hash */
     for (;;)
     {
       node = *pnode;
-      if ( node == NULL )
+      if ( !node )
         goto NewNode;
 
       if ( node->hash == hash                           &&
       /* Update pnode by modified linked list */
       while ( *pnode != node )
       {
-        if ( *pnode == NULL )
+        if ( !*pnode )
         {
           FT_ERROR(( "FTC_Cache_Lookup: oops!!!  node missing\n" ));
           goto NewNode;
         FT_Bool   list_changed = FALSE;
 
 
-        if ( node == NULL )
+        if ( !node )
           break;
 
         if ( cache->clazz.node_remove_faceid( node, face_id,
index 1b12959..d3c11ce 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType internal cache interface (specification).                   */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -227,7 +227,7 @@ FT_BEGIN_HEADER
     for (;;)                                                             \
     {                                                                    \
       _node = *_pnode;                                                   \
-      if ( _node == NULL )                                               \
+      if ( !_node )                                                      \
         goto NewNode_;                                                   \
                                                                          \
       if ( _node->hash == _hash                             &&           \
@@ -245,7 +245,7 @@ FT_BEGIN_HEADER
       /* Update _pnode by possibly modified linked list */               \
       while ( *_pnode != _node )                                         \
       {                                                                  \
-        if ( *_pnode == NULL )                                           \
+        if ( !*_pnode )                                                  \
         {                                                                \
           FT_ERROR(( "FTC_CACHE_LOOKUP_CMP: oops!!! node missing\n" ));  \
           goto NewNode_;                                                 \
@@ -325,7 +325,7 @@ FT_BEGIN_HEADER
         break;                                                    \
                                                                   \
       _try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
-      if ( _try_done > 0 && ( list_changed != NULL ) )            \
+      if ( _try_done > 0 && list_changed != NULL )                \
         *(FT_Bool*)( list_changed ) = TRUE;                       \
                                                                   \
       if ( _try_done == 0 )                                       \
index 279e94d..2681e8c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Callback functions of the caching sub-system (specification only).   */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 41a0ce9..2fa8497 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType CharMap cache (body)                                        */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   static
   const FTC_CacheClassRec  ftc_cmap_cache_class =
   {
-    ftc_cmap_node_new,
-    ftc_cmap_node_weight,
-    ftc_cmap_node_compare,
-    ftc_cmap_node_remove_faceid,
-    ftc_cmap_node_free,
+    ftc_cmap_node_new,           /* FTC_Node_NewFunc      node_new           */
+    ftc_cmap_node_weight,        /* FTC_Node_WeightFunc   node_weight        */
+    ftc_cmap_node_compare,       /* FTC_Node_CompareFunc  node_compare       */
+    ftc_cmap_node_remove_faceid, /* FTC_Node_CompareFunc  node_remove_faceid */
+    ftc_cmap_node_free,          /* FTC_Node_FreeFunc     node_free          */
 
     sizeof ( FTC_CacheRec ),
-    ftc_cache_init,
-    ftc_cache_done,
+    ftc_cache_init,              /* FTC_Cache_InitFunc    cache_init         */
+    ftc_cache_done,              /* FTC_Cache_DoneFunc    cache_done         */
   };
 
 
index 1fd7357..84fe52f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Caching sub-system error codes (specification only).                 */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c404681..d2468f2 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Glyph Image (FT_Glyph) cache (body).                        */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index dc7be06..cab58ed 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType abstract glyph cache (specification).                       */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 74040aa..359f818 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Image cache (body).                                         */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 25aa43b..14049af 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Generic Image cache (specification)                         */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 661a32a..edec2b6 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Cache Manager (body).                                       */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   const FTC_MruListClassRec  ftc_size_list_class =
   {
     sizeof ( FTC_SizeNodeRec ),
-    ftc_size_node_compare,
-    ftc_size_node_init,
-    ftc_size_node_reset,
-    ftc_size_node_done
+
+    ftc_size_node_compare,  /* FTC_MruNode_CompareFunc  node_compare */
+    ftc_size_node_init,     /* FTC_MruNode_InitFunc     node_init    */
+    ftc_size_node_reset,    /* FTC_MruNode_ResetFunc    node_reset   */
+    ftc_size_node_done      /* FTC_MruNode_DoneFunc     node_done    */
   };
 
 
   {
     sizeof ( FTC_FaceNodeRec),
 
-    ftc_face_node_compare,
-    ftc_face_node_init,
-    0,                          /* FTC_MruNode_ResetFunc */
-    ftc_face_node_done
+    ftc_face_node_compare,  /* FTC_MruNode_CompareFunc  node_compare */
+    ftc_face_node_init,     /* FTC_MruNode_InitFunc     node_init    */
+    NULL,                   /* FTC_MruNode_ResetFunc    node_reset   */
+    ftc_face_node_done      /* FTC_MruNode_DoneFunc     node_done    */
   };
 
 
                 manager->num_nodes ));
 #endif
 
-    if ( manager->cur_weight < manager->max_weight || first == NULL )
+    if ( manager->cur_weight < manager->max_weight || !first )
       return;
 
     /* go to last node -- it's a circular list */
 
 
     /* try to remove `count' nodes from the list */
-    if ( first == NULL )  /* empty list! */
+    if ( !first )  /* empty list! */
       return 0;
 
     /* go to last node - it's a circular list */
index f2c434a..556842e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Cache Manager (specification).                              */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d107584..e293269 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType MRU support (body).                                         */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -76,7 +76,7 @@
     FTC_MruNode  first = *plist;
 
 
-    FT_ASSERT( first != NULL );
+    FT_ASSERT( first );
 
     if ( first != node )
     {
     FTC_MruNode  prev, next;
 
 
-    FT_ASSERT( first != NULL );
+    FT_ASSERT( first );
 
 #ifdef FT_DEBUG_ERROR
       {
                    FTC_MruNode  *anode )
   {
     FT_Error     error;
-    FTC_MruNode  node = NULL;
+    FTC_MruNode  node   = NULL;
     FT_Memory    memory = list->memory;
 
 
 
 
     node = FTC_MruList_Find( list, key );
-    if ( node == NULL )
+    if ( !node )
       return FTC_MruList_New( list, key, anode );
 
     *anode = node;
 
 
     first = list->nodes;
-    while ( first && ( selection == NULL || selection( first, key ) ) )
+    while ( first && ( !selection || selection( first, key ) ) )
     {
       FTC_MruList_Remove( list, first );
       first = list->nodes;
index ae3c4ce..c4c330d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Simple MRU list-cache (specification).                               */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -108,6 +108,7 @@ FT_BEGIN_HEADER
   typedef struct  FTC_MruListClassRec_
   {
     FT_Offset                node_size;
+
     FTC_MruNode_CompareFunc  node_compare;
     FTC_MruNode_InitFunc     node_init;
     FTC_MruNode_ResetFunc    node_reset;
@@ -115,6 +116,7 @@ FT_BEGIN_HEADER
 
   } FTC_MruListClassRec;
 
+
   typedef struct  FTC_MruListRec_
   {
     FT_UInt              num_nodes;
index d6f1ddc..2f9336d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType sbits manager (body).                                       */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
        *
        */
 
-      if ( sbit->buffer == NULL && sbit->width == 255 )
+      if ( !sbit->buffer && sbit->width == 255 )
       {
         FT_ULong  size;
         FT_Error  error;
index a0600ed..1e15ce9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    A small-bitmap cache (specification).                                */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 827e259..6204689 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2000-2016 by
+# Copyright 2000-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 8067e6b..e6dd05f 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/cff Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 89f3e9f..6796450 100644 (file)
@@ -58,7 +58,7 @@
                      FT_Error*     error,
                      size_t        sizeItem )
   {
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     /* initialize the structure */
     arrstack->memory    = memory;
@@ -78,7 +78,7 @@
     FT_Memory  memory = arrstack->memory;     /* for FT_FREE */
 
 
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     arrstack->allocated = 0;
     arrstack->count     = 0;
@@ -95,7 +95,7 @@
   cf2_arrstack_setNumElements( CF2_ArrStack  arrstack,
                                size_t        numElements )
   {
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     {
       FT_Error   error  = FT_Err_Ok;        /* for FT_REALLOC */
   cf2_arrstack_setCount( CF2_ArrStack  arrstack,
                          size_t        numElements )
   {
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     if ( numElements > arrstack->allocated )
     {
   FT_LOCAL_DEF( void )
   cf2_arrstack_clear( CF2_ArrStack  arrstack )
   {
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     arrstack->count = 0;
   }
   FT_LOCAL_DEF( size_t )
   cf2_arrstack_size( const CF2_ArrStack  arrstack )
   {
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     return arrstack->count;
   }
   FT_LOCAL_DEF( void* )
   cf2_arrstack_getBuffer( const CF2_ArrStack  arrstack )
   {
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     return arrstack->ptr;
   }
     void*  newPtr;
 
 
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     if ( idx >= arrstack->count )
     {
   cf2_arrstack_push( CF2_ArrStack  arrstack,
                      const void*   ptr )
   {
-    FT_ASSERT( arrstack != NULL );
+    FT_ASSERT( arrstack );
 
     if ( arrstack->count == arrstack->allocated )
     {
       }
     }
 
-    FT_ASSERT( ptr != NULL );
+    FT_ASSERT( ptr );
 
     {
       size_t  offset = arrstack->count * arrstack->sizeItem;
index b5595a3..e3dd69f 100644 (file)
@@ -44,7 +44,7 @@
   cf2_setError( FT_Error*  error,
                 FT_Error   value )
   {
-    if ( error && *error == 0 )
+    if ( error && !*error )
       *error = value;
   }
 
index 512edd1..d2c770d 100644 (file)
@@ -66,7 +66,7 @@ FT_BEGIN_HEADER
    * model our error mechanism on a Java-like exception mechanism.
    * When we assign an error code we are thus `throwing' an error.
    *
-   * The perservation of an error code is done by coding convention.
+   * The preservation of an error code is done by coding convention.
    * Upon a function call if the error code is anything other than
    * `FT_Err_Ok', which is guaranteed to be zero, we
    * will return without altering that error.  This will allow the
index 74af377..2e4b503 100644 (file)
@@ -51,8 +51,8 @@ FT_BEGIN_HEADER
 
 #define CF2_FIXED_MAX      ( (CF2_Fixed)0x7FFFFFFFL )
 #define CF2_FIXED_MIN      ( (CF2_Fixed)0x80000000L )
-#define CF2_FIXED_ONE      0x10000L
-#define CF2_FIXED_EPSILON  0x0001
+#define CF2_FIXED_ONE      ( (CF2_Fixed)0x10000L )
+#define CF2_FIXED_EPSILON  ( (CF2_Fixed)0x0001 )
 
   /* in C 89, left and right shift of negative numbers is  */
   /* implementation specific behaviour in the general case */
index 83fd348..a86e361 100644 (file)
   }
 
 
-  /* set up values for the current FontDict and matrix */
+  /* set up values for the current FontDict and matrix; */
+  /* called for each glyph to be rendered               */
 
   /* caller's transform is adjusted for subpixel positioning */
   static void
 
     FT_Bool  needExtraSetup = FALSE;
 
+    CFF_VStoreRec*  vstore;
+    FT_Bool         hasVariations = FALSE;
+
     /* character space units */
     CF2_Fixed  boldenX = font->syntheticEmboldeningAmountX;
     CF2_Fixed  boldenY = font->syntheticEmboldeningAmountY;
     CFF_SubFont  subFont;
     CF2_Fixed    ppem;
 
+    CF2_UInt   lenNormalizedV = 0;
+    FT_Fixed*  normalizedV    = NULL;
+
 
     /* clear previous error */
     font->error = FT_Err_Ok;
       needExtraSetup    = TRUE;
     }
 
+    /* check for variation vectors */
+    vstore        = cf2_getVStore( decoder );
+    hasVariations = ( vstore->dataCount != 0 );
+
+    if ( hasVariations )
+    {
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+      /* check whether Private DICT in this subfont needs to be reparsed */
+      font->error = cf2_getNormalizedVector( decoder,
+                                             &lenNormalizedV,
+                                             &normalizedV );
+      if ( font->error )
+        return;
+
+      if ( cff_blend_check_vector( &subFont->blend,
+                                   subFont->private_dict.vsindex,
+                                   lenNormalizedV,
+                                   normalizedV ) )
+      {
+        /* blend has changed, reparse */
+        cff_load_private_dict( decoder->cff,
+                               subFont,
+                               lenNormalizedV,
+                               normalizedV );
+        needExtraSetup = TRUE;
+      }
+#endif
+
+      /* copy from subfont */
+      font->blend.font = subFont->blend.font;
+
+      /* clear state of charstring blend */
+      font->blend.usedBV = FALSE;
+
+      /* initialize value for charstring */
+      font->vsindex = subFont->private_dict.vsindex;
+
+      /* store vector inputs for blends in charstring */
+      font->lenNDV = lenNormalizedV;
+      font->NDV    = normalizedV;
+    }
+
     /* if ppem has changed, we need to recompute some cached data         */
     /* note: because of CID font matrix concatenation, ppem and transform */
     /*       do not necessarily track.                                    */
 
       /* compute blue zones for this instance */
       cf2_blues_init( &font->blues, font );
-    }
+
+    } /* needExtraSetup */
   }
 
 
index bd05e69..17ecd17 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "cf2ft.h"
 #include "cf2blues.h"
+#include "cffload.h"
 
 
 FT_BEGIN_HEADER
@@ -63,6 +64,7 @@ FT_BEGIN_HEADER
     FT_Memory  memory;
     FT_Error   error;     /* shared error for this instance */
 
+    FT_Bool             isCFF2;
     CF2_RenderingFlags  renderingFlags;
 
     /* variables that depend on Transform:  */
@@ -74,6 +76,12 @@ FT_BEGIN_HEADER
     CF2_Matrix  outerTransform;    /* post hinting; includes rotations */
     CF2_Fixed   ppem;              /* transform-dependent              */
 
+    /* variation data */
+    CFF_BlendRec  blend;            /* cached charstring blend vector  */
+    CF2_UInt      vsindex;          /* current vsindex                 */
+    CF2_UInt      lenNDV;           /* current length NDV or zero      */
+    FT_Fixed*     NDV;              /* ptr to current NDV or NULL      */
+
     CF2_Int  unitsPerEm;
 
     CF2_Fixed  syntheticEmboldeningAmountX;   /* character space units */
index 55f3206..eb8472f 100644 (file)
       FT_Memory  memory = font->memory;
 
 
-      (void)memory;
+      FT_FREE( font->blend.lastNDV );
+      FT_FREE( font->blend.BV );
     }
   }
 
                     FT_Memory    memory,
                     FT_Error*    error )
   {
-    FT_MEM_ZERO( outline, sizeof ( CF2_OutlineRec ) );
+    FT_ZERO( outline );
 
     outline->root.memory = memory;
     outline->root.error  = error;
     font = (CF2_Font)decoder->cff->cf2_instance.data;
 
     /* on first glyph, allocate instance structure */
-    if ( decoder->cff->cf2_instance.data == NULL )
+    if ( !decoder->cff->cf2_instance.data )
     {
       decoder->cff->cf2_instance.finalizer =
         (FT_Generic_Finalizer)cf2_free_instance;
       CFF_Builder*  builder = &decoder->builder;
       CFF_Driver    driver  = (CFF_Driver)FT_FACE_DRIVER( builder->face );
 
+      FT_Bool  no_stem_darkening_driver =
+                 driver->no_stem_darkening;
+      FT_Char  no_stem_darkening_font =
+                 builder->face->root.internal->no_stem_darkening;
+
       /* local error */
       FT_Error       error2 = FT_Err_Ok;
       CF2_BufferRec  buf;
                                &hinted,
                                &scaled );
 
+      /* copy isCFF2 boolean from TT_Face to CF2_Font */
+      font->isCFF2 = builder->face->is_cff2;
+
       font->renderingFlags = 0;
       if ( hinted )
         font->renderingFlags |= CF2_FlagsHinted;
-      if ( scaled && !driver->no_stem_darkening )
+      if ( scaled && ( !no_stem_darkening_font        ||
+                       ( no_stem_darkening_font < 0 &&
+                         !no_stem_darkening_driver  ) ) )
         font->renderingFlags |= CF2_FlagsDarkened;
 
       font->darkenParams[0] = driver->darken_params[0];
   }
 
 
+  /* get pointer to VStore structure */
+  FT_LOCAL_DEF( CFF_VStore )
+  cf2_getVStore( CFF_Decoder*  decoder )
+  {
+    FT_ASSERT( decoder && decoder->cff );
+
+    return &decoder->cff->vstore;
+  }
+
+
+  /* get maxstack value from CFF2 Top DICT */
+  FT_LOCAL_DEF( FT_UInt )
+  cf2_getMaxstack( CFF_Decoder*  decoder )
+  {
+    FT_ASSERT( decoder && decoder->cff );
+
+    return decoder->cff->top_font.font_dict.maxstack;
+  }
+
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+  /* Get normalized design vector for current render request; */
+  /* return pointer and length.                               */
+  /*                                                          */
+  /* Note: Uses FT_Fixed not CF2_Fixed for the vector.        */
+  FT_LOCAL_DEF( FT_Error )
+  cf2_getNormalizedVector( CFF_Decoder*  decoder,
+                           CF2_UInt     *len,
+                           FT_Fixed*    *vec )
+  {
+    FT_ASSERT( decoder && decoder->builder.face );
+    FT_ASSERT( vec && len );
+
+    return cff_get_var_blend( decoder->builder.face, len, NULL, vec, NULL );
+  }
+#endif
+
+
   /* get `y_ppem' from `CFF_Size' */
   FT_LOCAL_DEF( CF2_Fixed )
   cf2_getPpemY( CFF_Decoder*  decoder )
index 8e55e84..b054a6e 100644 (file)
@@ -64,6 +64,18 @@ FT_BEGIN_HEADER
   FT_LOCAL( CFF_SubFont )
   cf2_getSubfont( CFF_Decoder*  decoder );
 
+  FT_LOCAL( CFF_VStore )
+  cf2_getVStore( CFF_Decoder*  decoder );
+
+  FT_LOCAL( FT_UInt )
+  cf2_getMaxstack( CFF_Decoder*  decoder );
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+  FT_LOCAL( FT_Error )
+  cf2_getNormalizedVector( CFF_Decoder*  decoder,
+                           CF2_UInt     *len,
+                           FT_Fixed*    *vec );
+#endif
 
   FT_LOCAL( CF2_Fixed )
   cf2_getPpemY( CFF_Decoder*  decoder );
index bbbe8e3..c8f7dfe 100644 (file)
         /* calculate all four possibilities; moves down are negative */
         CF2_Fixed  downMoveDown = 0 - fracDown;
         CF2_Fixed  upMoveDown   = 0 - fracUp;
-        CF2_Fixed  downMoveUp   = fracDown == 0
+        CF2_Fixed  downMoveUp   = ( fracDown == 0 )
                                     ? 0
                                     : cf2_intToFixed( 1 ) - fracDown;
-        CF2_Fixed  upMoveUp     = fracUp == 0
+        CF2_Fixed  upMoveUp     = ( fracUp == 0 )
                                     ? 0
                                     : cf2_intToFixed( 1 ) - fracUp;
 
index 7d663dd..40bd905 100644 (file)
@@ -47,6 +47,8 @@
 
 #include "cf2error.h"
 
+#include "cffload.h"
+
 
   /*************************************************************************/
   /*                                                                       */
 #define FT_COMPONENT  trace_cf2interp
 
 
-  /* some operators are not implemented yet */
-#define CF2_FIXME  FT_TRACE4(( "cf2_interpT2CharString:"            \
-                               " operator not implemented yet\n" ))
-
-
-
   FT_LOCAL_DEF( void )
   cf2_hintmask_init( CF2_HintMask  hintmask,
                      FT_Error*     error )
     cf2_cmdESC,          /* 12 */
     cf2_cmdRESERVED_13,  /* 13 */
     cf2_cmdENDCHAR,      /* 14 */
-    cf2_cmdRESERVED_15,  /* 15 */
-    cf2_cmdRESERVED_16,  /* 16 */
+    cf2_cmdVSINDEX,      /* 15 */
+    cf2_cmdBLEND,        /* 16 */
     cf2_cmdRESERVED_17,  /* 17 */
     cf2_cmdHSTEMHM,      /* 18 */
     cf2_cmdHINTMASK,     /* 19 */
     cf2_escHFLEX,        /* 34 */
     cf2_escFLEX,         /* 35 */
     cf2_escHFLEX1,       /* 36 */
-    cf2_escFLEX1         /* 37 */
+    cf2_escFLEX1,        /* 37 */
+    cf2_escRESERVED_38   /* 38     & all higher     */
   };
 
 
               FT_Bool         doConditionalLastRead )
   {
     CF2_Fixed  vals[14];
-    CF2_UInt   index;
+    CF2_UInt   idx;
     FT_Bool    isHFlex;
     CF2_Int    top, i, j;
 
 
     vals[0] = *curX;
     vals[1] = *curY;
-    index   = 0;
-    isHFlex = readFromStack[9] == FALSE;
+    idx     = 0;
+    isHFlex = FT_BOOL( readFromStack[9] == FALSE );
     top     = isHFlex ? 9 : 10;
 
     for ( i = 0; i < top; i++ )
     {
       vals[i + 2] = vals[i];
       if ( readFromStack[i] )
-        vals[i + 2] += cf2_stack_getReal( opStack, index++ );
+        vals[i + 2] += cf2_stack_getReal( opStack, idx++ );
     }
 
     if ( isHFlex )
     {
       FT_Bool    lastIsX = (FT_Bool)( cf2_fixedAbs( vals[10] - *curX ) >
                                         cf2_fixedAbs( vals[11] - *curY ) );
-      CF2_Fixed  lastVal = cf2_stack_getReal( opStack, index );
+      CF2_Fixed  lastVal = cf2_stack_getReal( opStack, idx );
 
 
       if ( lastIsX )
     else
     {
       if ( readFromStack[10] )
-        vals[12] = vals[10] + cf2_stack_getReal( opStack, index++ );
+        vals[12] = vals[10] + cf2_stack_getReal( opStack, idx++ );
       else
         vals[12] = *curX;
 
       if ( readFromStack[11] )
-        vals[13] = vals[11] + cf2_stack_getReal( opStack, index );
+        vals[13] = vals[11] + cf2_stack_getReal( opStack, idx );
       else
         vals[13] = *curY;
     }
   }
 
 
+  /* Blend numOperands on the stack,                */
+  /* store results into the first numBlends values, */
+  /* then pop remaining arguments.                  */
+  static void
+  cf2_doBlend( const CFF_Blend  blend,
+               CF2_Stack        opStack,
+               CF2_UInt         numBlends )
+  {
+    CF2_UInt  delta;
+    CF2_UInt  base;
+    CF2_UInt  i, j;
+    CF2_UInt  numOperands = (CF2_UInt)( numBlends * blend->lenBV );
+
+
+    base  = cf2_stack_count( opStack ) - numOperands;
+    delta = base + numBlends;
+
+    for ( i = 0; i < numBlends; i++ )
+    {
+      const CF2_Fixed*  weight = &blend->BV[1];
+
+      /* start with first term */
+      CF2_Fixed  sum = cf2_stack_getReal( opStack, i + base );
+
+
+      for ( j = 1; j < blend->lenBV; j++ )
+        sum += FT_MulFix( *weight++, cf2_stack_getReal( opStack, delta++ ) );
+
+      /* store blended result  */
+      cf2_stack_setReal( opStack, i + base, sum );
+    }
+
+    /* leave only `numBlends' results on stack */
+    cf2_stack_pop( opStack, numOperands - numBlends );
+  }
+
+
   /*
    * `error' is a shared error code used by many objects in this
    * routine.  Before the code continues from an error, it must check and
     CF2_Fixed  hintOriginY = curY;
 
     CF2_Stack  opStack = NULL;
+    FT_UInt    stackSize;
     FT_Byte    op1;                       /* first opcode byte */
 
     CF2_F16Dot16  storage[CF2_STORAGE_SIZE];    /* for `put' and `get' */
     CF2_GlyphPathRec  glyphPath;
 
 
+    FT_ZERO( &storage );
+
     /* initialize the remaining objects */
     cf2_arrstack_init( &subrStack,
                        memory,
      * If one of the above operators occurs without explicitly specifying
      * a width, we assume the default width.
      *
+     * CFF2 charstrings always return the default width (0).
+     *
      */
-    haveWidth = FALSE;
+    haveWidth = font->isCFF2 ? TRUE : FALSE;
     *width    = cf2_getDefaultWidthX( decoder );
 
     /*
-     * Note: at this point, all pointers to resources must be NULL
-     * and all local objects must be initialized.
-     * There must be no branches to exit: above this point.
+     * Note: At this point, all pointers to resources must be NULL
+     *       and all local objects must be initialized.
+     *       There must be no branches to `exit:' above this point.
      *
      */
 
     /* allocate an operand stack */
-    opStack = cf2_stack_init( memory, error );
+    stackSize = font->isCFF2 ? cf2_getMaxstack( decoder )
+                             : CF2_OPERAND_STACK_SIZE;
+    opStack   = cf2_stack_init( memory, error, stackSize );
+
     if ( !opStack )
     {
       lastError = FT_THROW( Out_Of_Memory );
       {
         /* If we've reached the end of the charstring, simulate a */
         /* cf2_cmdRETURN or cf2_cmdENDCHAR.                       */
+        /* We do this for both CFF and CFF2.                      */
         if ( charstringIndex )
           op1 = cf2_cmdRETURN;  /* end of buffer for subroutine */
         else
           op1 = cf2_cmdENDCHAR; /* end of buffer for top level charstring */
       }
       else
+      {
         op1 = (FT_Byte)cf2_buf_readByte( charstring );
 
+        /* Explicit RETURN and ENDCHAR in CFF2 should be ignored. */
+        /* Note: Trace message will report 0 instead of 11 or 14. */
+        if ( ( op1 == cf2_cmdRETURN || op1 == cf2_cmdENDCHAR ) &&
+             font->isCFF2                                      )
+          op1 = cf2_cmdRESERVED_0;
+      }
+
       /* check for errors once per loop */
       if ( *error )
         goto exit;
       case cf2_cmdRESERVED_2:
       case cf2_cmdRESERVED_9:
       case cf2_cmdRESERVED_13:
-      case cf2_cmdRESERVED_15:
-      case cf2_cmdRESERVED_16:
       case cf2_cmdRESERVED_17:
         /* we may get here if we have a prior error */
         FT_TRACE4(( " unknown op (%d)\n", op1 ));
         break;
 
+      case cf2_cmdVSINDEX:
+        FT_TRACE4(( " vsindex\n" ));
+
+        if ( !font->isCFF2 )
+          break;    /* clear stack & ignore */
+
+        if ( font->blend.usedBV )
+        {
+          /* vsindex not allowed after blend */
+          lastError = FT_THROW( Invalid_Glyph_Format );
+          goto exit;
+        }
+
+        {
+          FT_Int  temp = cf2_stack_popInt( opStack );
+
+
+          if ( temp >= 0 )
+            font->vsindex = (FT_UInt)temp;
+        }
+        break;
+
+      case cf2_cmdBLEND:
+        {
+          FT_UInt  numBlends;
+
+
+          FT_TRACE4(( " blend\n" ));
+
+          if ( !font->isCFF2 )
+            break;    /* clear stack & ignore */
+
+          /* do we have a `blend' op in a non-variant font? */
+          if ( !font->blend.font )
+          {
+            lastError = FT_THROW( Invalid_Glyph_Format );
+            goto exit;
+          }
+
+          /* check cached blend vector */
+          if ( cff_blend_check_vector( &font->blend,
+                                       font->vsindex,
+                                       font->lenNDV,
+                                       font->NDV ) )
+          {
+            lastError = cff_blend_build_vector( &font->blend,
+                                                font->vsindex,
+                                                font->lenNDV,
+                                                font->NDV );
+            if ( lastError )
+              goto exit;
+          }
+
+          /* do the blend */
+          numBlends = (FT_UInt)cf2_stack_popInt( opStack );
+          if ( numBlends > stackSize )
+          {
+            lastError = FT_THROW( Invalid_Glyph_Format );
+            goto exit;
+          }
+
+          cf2_doBlend( &font->blend, opStack, numBlends );
+
+          font->blend.usedBV = TRUE;
+        }
+        continue;     /* do not clear the stack */
+
       case cf2_cmdHSTEMHM:
       case cf2_cmdHSTEM:
         FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" ));
 
       case cf2_cmdRLINETO:
         {
-          CF2_UInt  index;
+          CF2_UInt  idx;
           CF2_UInt  count = cf2_stack_count( opStack );
 
 
           FT_TRACE4(( " rlineto\n" ));
 
-          for ( index = 0; index < count; index += 2 )
+          for ( idx = 0; idx < count; idx += 2 )
           {
-            curX += cf2_stack_getReal( opStack, index + 0 );
-            curY += cf2_stack_getReal( opStack, index + 1 );
+            curX += cf2_stack_getReal( opStack, idx + 0 );
+            curY += cf2_stack_getReal( opStack, idx + 1 );
 
             cf2_glyphpath_lineTo( &glyphPath, curX, curY );
           }
       case cf2_cmdHLINETO:
       case cf2_cmdVLINETO:
         {
-          CF2_UInt  index;
+          CF2_UInt  idx;
           CF2_UInt  count = cf2_stack_count( opStack );
 
-          FT_Bool  isX = op1 == cf2_cmdHLINETO;
+          FT_Bool  isX = FT_BOOL( op1 == cf2_cmdHLINETO );
 
 
           FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" ));
 
-          for ( index = 0; index < count; index++ )
+          for ( idx = 0; idx < count; idx++ )
           {
-            CF2_Fixed  v = cf2_stack_getReal( opStack, index );
+            CF2_Fixed  v = cf2_stack_getReal( opStack, idx );
 
 
             if ( isX )
       case cf2_cmdRRCURVETO:
         {
           CF2_UInt  count = cf2_stack_count( opStack );
-          CF2_UInt  index = 0;
+          CF2_UInt  idx   = 0;
 
 
           FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n"
                                                : " rrcurveto\n" ));
 
-          while ( index + 6 <= count )
+          while ( idx + 6 <= count )
           {
-            CF2_Fixed  x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
-            CF2_Fixed  y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;
-            CF2_Fixed  x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;
-            CF2_Fixed  y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;
-            CF2_Fixed  x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
-            CF2_Fixed  y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;
+            CF2_Fixed  x1 = cf2_stack_getReal( opStack, idx + 0 ) + curX;
+            CF2_Fixed  y1 = cf2_stack_getReal( opStack, idx + 1 ) + curY;
+            CF2_Fixed  x2 = cf2_stack_getReal( opStack, idx + 2 ) + x1;
+            CF2_Fixed  y2 = cf2_stack_getReal( opStack, idx + 3 ) + y1;
+            CF2_Fixed  x3 = cf2_stack_getReal( opStack, idx + 4 ) + x2;
+            CF2_Fixed  y3 = cf2_stack_getReal( opStack, idx + 5 ) + y2;
 
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
 
-            curX   = x3;
-            curY   = y3;
-            index += 6;
+            curX  = x3;
+            curY  = y3;
+            idx  += 6;
           }
 
           if ( op1 == cf2_cmdRCURVELINE )
           {
-            curX += cf2_stack_getReal( opStack, index + 0 );
-            curY += cf2_stack_getReal( opStack, index + 1 );
+            curX += cf2_stack_getReal( opStack, idx + 0 );
+            curY += cf2_stack_getReal( opStack, idx + 1 );
 
             cf2_glyphpath_lineTo( &glyphPath, curX, curY );
           }
           FT_Byte  op2 = (FT_Byte)cf2_buf_readByte( charstring );
 
 
+          /* first switch for 2-byte operators handles CFF2      */
+          /* and opcodes that are reserved for both CFF and CFF2 */
           switch ( op2 )
           {
-          case cf2_escDOTSECTION:
-            /* something about `flip type of locking' -- ignore it */
-            FT_TRACE4(( " dotsection\n" ));
+          case cf2_escHFLEX:
+            {
+              static const FT_Bool  readFromStack[12] =
+              {
+                TRUE /* dx1 */, FALSE /* dy1 */,
+                TRUE /* dx2 */, TRUE  /* dy2 */,
+                TRUE /* dx3 */, FALSE /* dy3 */,
+                TRUE /* dx4 */, FALSE /* dy4 */,
+                TRUE /* dx5 */, FALSE /* dy5 */,
+                TRUE /* dx6 */, FALSE /* dy6 */
+              };
 
-            break;
 
-          case cf2_escAND:
-            {
-              CF2_F16Dot16  arg1;
-              CF2_F16Dot16  arg2;
+              FT_TRACE4(( " hflex\n" ));
+
+              cf2_doFlex( opStack,
+                          &curX,
+                          &curY,
+                          &glyphPath,
+                          readFromStack,
+                          FALSE /* doConditionalLastRead */ );
+            }
+            continue;
 
+          case cf2_escFLEX:
+            {
+              static const FT_Bool  readFromStack[12] =
+              {
+                TRUE /* dx1 */, TRUE /* dy1 */,
+                TRUE /* dx2 */, TRUE /* dy2 */,
+                TRUE /* dx3 */, TRUE /* dy3 */,
+                TRUE /* dx4 */, TRUE /* dy4 */,
+                TRUE /* dx5 */, TRUE /* dy5 */,
+                TRUE /* dx6 */, TRUE /* dy6 */
+              };
 
-              FT_TRACE4(( " and\n" ));
 
-              arg2 = cf2_stack_popFixed( opStack );
-              arg1 = cf2_stack_popFixed( opStack );
+              FT_TRACE4(( " flex\n" ));
 
-              cf2_stack_pushInt( opStack, arg1 && arg2 );
+              cf2_doFlex( opStack,
+                          &curX,
+                          &curY,
+                          &glyphPath,
+                          readFromStack,
+                          FALSE /* doConditionalLastRead */ );
             }
-            continue; /* do not clear the stack */
+            break;      /* TODO: why is this not a continue? */
 
-          case cf2_escOR:
+          case cf2_escHFLEX1:
             {
-              CF2_F16Dot16  arg1;
-              CF2_F16Dot16  arg2;
-
+              static const FT_Bool  readFromStack[12] =
+              {
+                TRUE /* dx1 */, TRUE  /* dy1 */,
+                TRUE /* dx2 */, TRUE  /* dy2 */,
+                TRUE /* dx3 */, FALSE /* dy3 */,
+                TRUE /* dx4 */, FALSE /* dy4 */,
+                TRUE /* dx5 */, TRUE  /* dy5 */,
+                TRUE /* dx6 */, FALSE /* dy6 */
+              };
 
-              FT_TRACE4(( " or\n" ));
 
-              arg2 = cf2_stack_popFixed( opStack );
-              arg1 = cf2_stack_popFixed( opStack );
+              FT_TRACE4(( " hflex1\n" ));
 
-              cf2_stack_pushInt( opStack, arg1 || arg2 );
+              cf2_doFlex( opStack,
+                          &curX,
+                          &curY,
+                          &glyphPath,
+                          readFromStack,
+                          FALSE /* doConditionalLastRead */ );
             }
-            continue; /* do not clear the stack */
+            continue;
 
-          case cf2_escNOT:
+          case cf2_escFLEX1:
             {
-              CF2_F16Dot16  arg;
-
+              static const FT_Bool  readFromStack[12] =
+              {
+                TRUE  /* dx1 */, TRUE  /* dy1 */,
+                TRUE  /* dx2 */, TRUE  /* dy2 */,
+                TRUE  /* dx3 */, TRUE  /* dy3 */,
+                TRUE  /* dx4 */, TRUE  /* dy4 */,
+                TRUE  /* dx5 */, TRUE  /* dy5 */,
+                FALSE /* dx6 */, FALSE /* dy6 */
+              };
 
-              FT_TRACE4(( " not\n" ));
 
-              arg = cf2_stack_popFixed( opStack );
+              FT_TRACE4(( " flex1\n" ));
 
-              cf2_stack_pushInt( opStack, !arg );
+              cf2_doFlex( opStack,
+                          &curX,
+                          &curY,
+                          &glyphPath,
+                          readFromStack,
+                          TRUE /* doConditionalLastRead */ );
             }
-            continue; /* do not clear the stack */
+            continue;
+
+          /* these opcodes are reserved in both CFF & CFF2 */
+          case cf2_escRESERVED_1:
+          case cf2_escRESERVED_2:
+          case cf2_escRESERVED_6:
+          case cf2_escRESERVED_7:
+          case cf2_escRESERVED_8:
+          case cf2_escRESERVED_13:
+          case cf2_escRESERVED_16:
+          case cf2_escRESERVED_17:
+          case cf2_escRESERVED_19:
+          case cf2_escRESERVED_25:
+          case cf2_escRESERVED_31:
+          case cf2_escRESERVED_32:
+          case cf2_escRESERVED_33:
+            FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+            break;
 
-          case cf2_escABS:
+          default:
             {
-              CF2_F16Dot16  arg;
+              if ( font->isCFF2 || op2 >= cf2_escRESERVED_38 )
+                FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+              else
+              {
+                /* second switch for 2-byte operators handles just CFF */
+                switch ( op2 )
+                {
 
+                case cf2_escDOTSECTION:
+                  /* something about `flip type of locking' -- ignore it */
+                  FT_TRACE4(( " dotsection\n" ));
 
-              FT_TRACE4(( " abs\n" ));
+                  break;
 
-              arg = cf2_stack_popFixed( opStack );
+                case cf2_escAND:
+                  {
+                    CF2_F16Dot16  arg1;
+                    CF2_F16Dot16  arg2;
 
-              cf2_stack_pushFixed( opStack, FT_ABS( arg ) );
-            }
-            continue; /* do not clear the stack */
 
-          case cf2_escADD:
-            {
-              CF2_F16Dot16  summand1;
-              CF2_F16Dot16  summand2;
+                    FT_TRACE4(( " and\n" ));
 
+                    arg2 = cf2_stack_popFixed( opStack );
+                    arg1 = cf2_stack_popFixed( opStack );
 
-              FT_TRACE4(( " add\n" ));
+                    cf2_stack_pushInt( opStack, arg1 && arg2 );
+                  }
+                  continue; /* do not clear the stack */
 
-              summand2 = cf2_stack_popFixed( opStack );
-              summand1 = cf2_stack_popFixed( opStack );
+                case cf2_escOR:
+                  {
+                    CF2_F16Dot16  arg1;
+                    CF2_F16Dot16  arg2;
 
-              cf2_stack_pushFixed( opStack, summand1 + summand2 );
-            }
-            continue; /* do not clear the stack */
 
-          case cf2_escSUB:
-            {
-              CF2_F16Dot16  minuend;
-              CF2_F16Dot16  subtrahend;
+                    FT_TRACE4(( " or\n" ));
 
+                    arg2 = cf2_stack_popFixed( opStack );
+                    arg1 = cf2_stack_popFixed( opStack );
 
-              FT_TRACE4(( " sub\n" ));
+                    cf2_stack_pushInt( opStack, arg1 || arg2 );
+                  }
+                  continue; /* do not clear the stack */
 
-              subtrahend = cf2_stack_popFixed( opStack );
-              minuend    = cf2_stack_popFixed( opStack );
+                case cf2_escNOT:
+                  {
+                    CF2_F16Dot16  arg;
 
-              cf2_stack_pushFixed( opStack, minuend - subtrahend );
-            }
-            continue; /* do not clear the stack */
 
-          case cf2_escDIV:
-            {
-              CF2_F16Dot16  dividend;
-              CF2_F16Dot16  divisor;
+                    FT_TRACE4(( " not\n" ));
 
+                    arg = cf2_stack_popFixed( opStack );
 
-              FT_TRACE4(( " div\n" ));
+                    cf2_stack_pushInt( opStack, !arg );
+                  }
+                  continue; /* do not clear the stack */
 
-              divisor  = cf2_stack_popFixed( opStack );
-              dividend = cf2_stack_popFixed( opStack );
+                case cf2_escABS:
+                  {
+                    CF2_F16Dot16  arg;
 
-              cf2_stack_pushFixed( opStack, FT_DivFix( dividend, divisor ) );
-            }
-            continue; /* do not clear the stack */
 
-          case cf2_escNEG:
-            {
-              CF2_F16Dot16  arg;
+                    FT_TRACE4(( " abs\n" ));
 
+                    arg = cf2_stack_popFixed( opStack );
 
-              FT_TRACE4(( " neg\n" ));
+                    cf2_stack_pushFixed( opStack, FT_ABS( arg ) );
+                  }
+                  continue; /* do not clear the stack */
 
-              arg = cf2_stack_popFixed( opStack );
+                case cf2_escADD:
+                  {
+                    CF2_F16Dot16  summand1;
+                    CF2_F16Dot16  summand2;
 
-              cf2_stack_pushFixed( opStack, -arg );
-            }
-            continue; /* do not clear the stack */
 
-          case cf2_escEQ:
-            {
-              CF2_F16Dot16  arg1;
-              CF2_F16Dot16  arg2;
+                    FT_TRACE4(( " add\n" ));
 
+                    summand2 = cf2_stack_popFixed( opStack );
+                    summand1 = cf2_stack_popFixed( opStack );
 
-              FT_TRACE4(( " eq\n" ));
+                    cf2_stack_pushFixed( opStack, summand1 + summand2 );
+                  }
+                  continue; /* do not clear the stack */
 
-              arg2 = cf2_stack_popFixed( opStack );
-              arg1 = cf2_stack_popFixed( opStack );
+                case cf2_escSUB:
+                  {
+                    CF2_F16Dot16  minuend;
+                    CF2_F16Dot16  subtrahend;
 
-              cf2_stack_pushInt( opStack, arg1 == arg2 );
-            }
-            continue; /* do not clear the stack */
 
-          case cf2_escDROP:
-            FT_TRACE4(( " drop\n" ));
+                    FT_TRACE4(( " sub\n" ));
 
-            (void)cf2_stack_popFixed( opStack );
-            continue; /* do not clear the stack */
+                    subtrahend = cf2_stack_popFixed( opStack );
+                    minuend    = cf2_stack_popFixed( opStack );
 
-          case cf2_escPUT:
-            {
-              CF2_F16Dot16  val;
-              CF2_Int       idx;
+                    cf2_stack_pushFixed( opStack, minuend - subtrahend );
+                  }
+                  continue; /* do not clear the stack */
 
+                case cf2_escDIV:
+                  {
+                    CF2_F16Dot16  dividend;
+                    CF2_F16Dot16  divisor;
 
-              FT_TRACE4(( " put\n" ));
 
-              idx = cf2_stack_popInt( opStack );
-              val = cf2_stack_popFixed( opStack );
+                    FT_TRACE4(( " div\n" ));
 
-              if ( idx >= 0 && idx < CF2_STORAGE_SIZE )
-                storage[idx] = val;
-            }
-            continue; /* do not clear the stack */
+                    divisor  = cf2_stack_popFixed( opStack );
+                    dividend = cf2_stack_popFixed( opStack );
 
-          case cf2_escGET:
-            {
-              CF2_Int  idx;
+                    cf2_stack_pushFixed( opStack, FT_DivFix( dividend, divisor ) );
+                  }
+                  continue; /* do not clear the stack */
 
+                case cf2_escNEG:
+                  {
+                    CF2_F16Dot16  arg;
 
-              FT_TRACE4(( " get\n" ));
 
-              idx = cf2_stack_popInt( opStack );
+                    FT_TRACE4(( " neg\n" ));
 
-              if ( idx >= 0 && idx < CF2_STORAGE_SIZE )
-                cf2_stack_pushFixed( opStack, storage[idx] );
-            }
-            continue; /* do not clear the stack */
+                    arg = cf2_stack_popFixed( opStack );
 
-          case cf2_escIFELSE:
-            {
-              CF2_F16Dot16  arg1;
-              CF2_F16Dot16  arg2;
-              CF2_F16Dot16  cond1;
-              CF2_F16Dot16  cond2;
+                    cf2_stack_pushFixed( opStack, -arg );
+                  }
+                  continue; /* do not clear the stack */
 
+                case cf2_escEQ:
+                  {
+                    CF2_F16Dot16  arg1;
+                    CF2_F16Dot16  arg2;
 
-              FT_TRACE4(( " ifelse\n" ));
 
-              cond2 = cf2_stack_popFixed( opStack );
-              cond1 = cf2_stack_popFixed( opStack );
-              arg2  = cf2_stack_popFixed( opStack );
-              arg1  = cf2_stack_popFixed( opStack );
+                    FT_TRACE4(( " eq\n" ));
 
-              cf2_stack_pushFixed( opStack, cond1 <= cond2 ? arg1 : arg2 );
-            }
-            continue; /* do not clear the stack */
+                    arg2 = cf2_stack_popFixed( opStack );
+                    arg1 = cf2_stack_popFixed( opStack );
 
-          case cf2_escRANDOM: /* in spec */
-            FT_TRACE4(( " random\n" ));
+                    cf2_stack_pushInt( opStack, arg1 == arg2 );
+                  }
+                  continue; /* do not clear the stack */
 
-            CF2_FIXME;
-            break;
+                case cf2_escDROP:
+                  FT_TRACE4(( " drop\n" ));
 
-          case cf2_escMUL:
-            {
-              CF2_F16Dot16  factor1;
-              CF2_F16Dot16  factor2;
+                  (void)cf2_stack_popFixed( opStack );
+                  continue; /* do not clear the stack */
 
+                case cf2_escPUT:
+                  {
+                    CF2_F16Dot16  val;
+                    CF2_Int       idx;
 
-              FT_TRACE4(( " mul\n" ));
 
-              factor2 = cf2_stack_popFixed( opStack );
-              factor1 = cf2_stack_popFixed( opStack );
+                    FT_TRACE4(( " put\n" ));
 
-              cf2_stack_pushFixed( opStack, FT_MulFix( factor1, factor2 ) );
-            }
-            continue; /* do not clear the stack */
+                    idx = cf2_stack_popInt( opStack );
+                    val = cf2_stack_popFixed( opStack );
 
-          case cf2_escSQRT:
-            {
-              CF2_F16Dot16  arg;
+                    if ( idx >= 0 && idx < CF2_STORAGE_SIZE )
+                      storage[idx] = val;
+                  }
+                  continue; /* do not clear the stack */
 
+                case cf2_escGET:
+                  {
+                    CF2_Int  idx;
 
-              FT_TRACE4(( " sqrt\n" ));
 
-              arg = cf2_stack_popFixed( opStack );
-              if ( arg > 0 )
-              {
-                FT_Fixed  root = arg;
-                FT_Fixed  new_root;
+                    FT_TRACE4(( " get\n" ));
 
+                    idx = cf2_stack_popInt( opStack );
 
-                /* Babylonian method */
-                for (;;)
-                {
-                  new_root = ( root + FT_DivFix( arg, root ) + 1 ) >> 1;
-                  if ( new_root == root )
-                    break;
-                  root = new_root;
-                }
-                arg = new_root;
-              }
-              else
-                arg = 0;
+                    if ( idx >= 0 && idx < CF2_STORAGE_SIZE )
+                      cf2_stack_pushFixed( opStack, storage[idx] );
+                  }
+                  continue; /* do not clear the stack */
 
-              cf2_stack_pushFixed( opStack, arg );
-            }
-            continue; /* do not clear the stack */
+                case cf2_escIFELSE:
+                  {
+                    CF2_F16Dot16  arg1;
+                    CF2_F16Dot16  arg2;
+                    CF2_F16Dot16  cond1;
+                    CF2_F16Dot16  cond2;
 
-          case cf2_escDUP:
-            {
-              CF2_F16Dot16  arg;
 
+                    FT_TRACE4(( " ifelse\n" ));
 
-              FT_TRACE4(( " dup\n" ));
+                    cond2 = cf2_stack_popFixed( opStack );
+                    cond1 = cf2_stack_popFixed( opStack );
+                    arg2  = cf2_stack_popFixed( opStack );
+                    arg1  = cf2_stack_popFixed( opStack );
 
-              arg = cf2_stack_popFixed( opStack );
+                    cf2_stack_pushFixed( opStack, cond1 <= cond2 ? arg1 : arg2 );
+                  }
+                  continue; /* do not clear the stack */
 
-              cf2_stack_pushFixed( opStack, arg );
-              cf2_stack_pushFixed( opStack, arg );
-            }
-            continue; /* do not clear the stack */
+                case cf2_escRANDOM: /* in spec */
+                  {
+                    CF2_F16Dot16  r;
 
-          case cf2_escEXCH:
-            {
-              CF2_F16Dot16  arg1;
-              CF2_F16Dot16  arg2;
 
+                    FT_TRACE4(( " random\n" ));
 
-              FT_TRACE4(( " exch\n" ));
+                    /* only use the lower 16 bits of `random'  */
+                    /* to generate a number in the range (0;1] */
+                    r = (CF2_F16Dot16)
+                          ( ( decoder->current_subfont->random & 0xFFFF ) + 1 );
 
-              arg2 = cf2_stack_popFixed( opStack );
-              arg1 = cf2_stack_popFixed( opStack );
+                    decoder->current_subfont->random =
+                      cff_random( decoder->current_subfont->random );
 
-              cf2_stack_pushFixed( opStack, arg2 );
-              cf2_stack_pushFixed( opStack, arg1 );
-            }
-            continue; /* do not clear the stack */
+                    cf2_stack_pushFixed( opStack, r );
+                  }
+                  continue; /* do not clear the stack */
 
-          case cf2_escINDEX:
-            {
-              CF2_Int   idx;
-              CF2_UInt  size;
+                case cf2_escMUL:
+                  {
+                    CF2_F16Dot16  factor1;
+                    CF2_F16Dot16  factor2;
 
 
-              FT_TRACE4(( " index\n" ));
+                    FT_TRACE4(( " mul\n" ));
 
-              idx  = cf2_stack_popInt( opStack );
-              size = cf2_stack_count( opStack );
+                    factor2 = cf2_stack_popFixed( opStack );
+                    factor1 = cf2_stack_popFixed( opStack );
 
-              if ( size > 0 )
-              {
-                /* for `cf2_stack_getReal', index 0 is bottom of stack */
-                CF2_UInt  gr_idx;
+                    cf2_stack_pushFixed( opStack, FT_MulFix( factor1, factor2 ) );
+                  }
+                  continue; /* do not clear the stack */
 
+                case cf2_escSQRT:
+                  {
+                    CF2_F16Dot16  arg;
 
-                if ( idx < 0 )
-                  gr_idx = size - 1;
-                else if ( (CF2_UInt)idx >= size )
-                  gr_idx = 0;
-                else
-                  gr_idx = size - 1 - (CF2_UInt)idx;
 
-                cf2_stack_pushFixed( opStack,
-                                     cf2_stack_getReal( opStack, gr_idx ) );
-              }
-            }
-            continue; /* do not clear the stack */
+                    FT_TRACE4(( " sqrt\n" ));
 
-          case cf2_escROLL:
-            {
-              CF2_Int  idx;
-              CF2_Int  count;
+                    arg = cf2_stack_popFixed( opStack );
+                    if ( arg > 0 )
+                    {
+                      FT_Fixed  root = arg;
+                      FT_Fixed  new_root;
 
 
-              FT_TRACE4(( " roll\n" ));
+                      /* Babylonian method */
+                      for (;;)
+                      {
+                        new_root = ( root + FT_DivFix( arg, root ) + 1 ) >> 1;
+                        if ( new_root == root )
+                          break;
+                        root = new_root;
+                      }
+                      arg = new_root;
+                    }
+                    else
+                      arg = 0;
 
-              idx   = cf2_stack_popInt( opStack );
-              count = cf2_stack_popInt( opStack );
+                    cf2_stack_pushFixed( opStack, arg );
+                  }
+                  continue; /* do not clear the stack */
 
-              cf2_stack_roll( opStack, count, idx );
-            }
-            continue; /* do not clear the stack */
+                case cf2_escDUP:
+                  {
+                    CF2_F16Dot16  arg;
 
-          case cf2_escHFLEX:
-            {
-              static const FT_Bool  readFromStack[12] =
-              {
-                TRUE /* dx1 */, FALSE /* dy1 */,
-                TRUE /* dx2 */, TRUE  /* dy2 */,
-                TRUE /* dx3 */, FALSE /* dy3 */,
-                TRUE /* dx4 */, FALSE /* dy4 */,
-                TRUE /* dx5 */, FALSE /* dy5 */,
-                TRUE /* dx6 */, FALSE /* dy6 */
-              };
 
+                    FT_TRACE4(( " dup\n" ));
 
-              FT_TRACE4(( " hflex\n" ));
+                    arg = cf2_stack_popFixed( opStack );
 
-              cf2_doFlex( opStack,
-                          &curX,
-                          &curY,
-                          &glyphPath,
-                          readFromStack,
-                          FALSE /* doConditionalLastRead */ );
-            }
-            continue;
+                    cf2_stack_pushFixed( opStack, arg );
+                    cf2_stack_pushFixed( opStack, arg );
+                  }
+                  continue; /* do not clear the stack */
 
-          case cf2_escFLEX:
-            {
-              static const FT_Bool  readFromStack[12] =
-              {
-                TRUE /* dx1 */, TRUE /* dy1 */,
-                TRUE /* dx2 */, TRUE /* dy2 */,
-                TRUE /* dx3 */, TRUE /* dy3 */,
-                TRUE /* dx4 */, TRUE /* dy4 */,
-                TRUE /* dx5 */, TRUE /* dy5 */,
-                TRUE /* dx6 */, TRUE /* dy6 */
-              };
+                case cf2_escEXCH:
+                  {
+                    CF2_F16Dot16  arg1;
+                    CF2_F16Dot16  arg2;
 
 
-              FT_TRACE4(( " flex\n" ));
+                    FT_TRACE4(( " exch\n" ));
 
-              cf2_doFlex( opStack,
-                          &curX,
-                          &curY,
-                          &glyphPath,
-                          readFromStack,
-                          FALSE /* doConditionalLastRead */ );
-            }
-            break;      /* TODO: why is this not a continue? */
+                    arg2 = cf2_stack_popFixed( opStack );
+                    arg1 = cf2_stack_popFixed( opStack );
 
-          case cf2_escHFLEX1:
-            {
-              static const FT_Bool  readFromStack[12] =
-              {
-                TRUE /* dx1 */, TRUE  /* dy1 */,
-                TRUE /* dx2 */, TRUE  /* dy2 */,
-                TRUE /* dx3 */, FALSE /* dy3 */,
-                TRUE /* dx4 */, FALSE /* dy4 */,
-                TRUE /* dx5 */, TRUE  /* dy5 */,
-                TRUE /* dx6 */, FALSE /* dy6 */
-              };
+                    cf2_stack_pushFixed( opStack, arg2 );
+                    cf2_stack_pushFixed( opStack, arg1 );
+                  }
+                  continue; /* do not clear the stack */
 
+                case cf2_escINDEX:
+                  {
+                    CF2_Int   idx;
+                    CF2_UInt  size;
 
-              FT_TRACE4(( " hflex1\n" ));
 
-              cf2_doFlex( opStack,
-                          &curX,
-                          &curY,
-                          &glyphPath,
-                          readFromStack,
-                          FALSE /* doConditionalLastRead */ );
-            }
-            continue;
+                    FT_TRACE4(( " index\n" ));
 
-          case cf2_escFLEX1:
-            {
-              static const FT_Bool  readFromStack[12] =
-              {
-                TRUE  /* dx1 */, TRUE  /* dy1 */,
-                TRUE  /* dx2 */, TRUE  /* dy2 */,
-                TRUE  /* dx3 */, TRUE  /* dy3 */,
-                TRUE  /* dx4 */, TRUE  /* dy4 */,
-                TRUE  /* dx5 */, TRUE  /* dy5 */,
-                FALSE /* dx6 */, FALSE /* dy6 */
-              };
+                    idx  = cf2_stack_popInt( opStack );
+                    size = cf2_stack_count( opStack );
 
+                    if ( size > 0 )
+                    {
+                      /* for `cf2_stack_getReal', index 0 is bottom of stack */
+                      CF2_UInt  gr_idx;
 
-              FT_TRACE4(( " flex1\n" ));
 
-              cf2_doFlex( opStack,
-                          &curX,
-                          &curY,
-                          &glyphPath,
-                          readFromStack,
-                          TRUE /* doConditionalLastRead */ );
-            }
-            continue;
+                      if ( idx < 0 )
+                        gr_idx = size - 1;
+                      else if ( (CF2_UInt)idx >= size )
+                        gr_idx = 0;
+                      else
+                        gr_idx = size - 1 - (CF2_UInt)idx;
 
-          case cf2_escRESERVED_1:
-          case cf2_escRESERVED_2:
-          case cf2_escRESERVED_6:
-          case cf2_escRESERVED_7:
-          case cf2_escRESERVED_8:
-          case cf2_escRESERVED_13:
-          case cf2_escRESERVED_16:
-          case cf2_escRESERVED_17:
-          case cf2_escRESERVED_19:
-          case cf2_escRESERVED_25:
-          case cf2_escRESERVED_31:
-          case cf2_escRESERVED_32:
-          case cf2_escRESERVED_33:
-          default:
-            FT_TRACE4(( " unknown op (12, %d)\n", op2 ));
+                      cf2_stack_pushFixed( opStack,
+                                           cf2_stack_getReal( opStack, gr_idx ) );
+                    }
+                  }
+                  continue; /* do not clear the stack */
 
-          }; /* end of switch statement checking `op2' */
+                case cf2_escROLL:
+                  {
+                    CF2_Int  idx;
+                    CF2_Int  count;
 
+
+                    FT_TRACE4(( " roll\n" ));
+
+                    idx   = cf2_stack_popInt( opStack );
+                    count = cf2_stack_popInt( opStack );
+
+                    cf2_stack_roll( opStack, count, idx );
+                  }
+                  continue; /* do not clear the stack */
+
+                } /* end of 2nd switch checking op2 */
+              }
+            }
+          } /* end of 1st switch checking op2 */
         } /* case cf2_cmdESC */
+
         break;
 
       case cf2_cmdENDCHAR:
         /* close path if still open */
         cf2_glyphpath_closeOpenPath( &glyphPath );
 
-        if ( cf2_stack_count( opStack ) > 1 )
+        /* disable seac for CFF2 (charstring ending with args on stack) */
+        if ( !font->isCFF2 && cf2_stack_count( opStack ) > 1 )
         {
           /* must be either 4 or 5 --                       */
           /* this is a (deprecated) implied `seac' operator */
       case cf2_cmdRLINECURVE:
         {
           CF2_UInt  count = cf2_stack_count( opStack );
-          CF2_UInt  index = 0;
+          CF2_UInt  idx   = 0;
 
 
           FT_TRACE4(( " rlinecurve\n" ));
 
-          while ( index + 6 < count )
+          while ( idx + 6 < count )
           {
-            curX += cf2_stack_getReal( opStack, index + 0 );
-            curY += cf2_stack_getReal( opStack, index + 1 );
+            curX += cf2_stack_getReal( opStack, idx + 0 );
+            curY += cf2_stack_getReal( opStack, idx + 1 );
 
             cf2_glyphpath_lineTo( &glyphPath, curX, curY );
-            index += 2;
+            idx += 2;
           }
 
-          while ( index < count )
+          while ( idx < count )
           {
-            CF2_Fixed  x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
-            CF2_Fixed  y1 = cf2_stack_getReal( opStack, index + 1 ) + curY;
-            CF2_Fixed  x2 = cf2_stack_getReal( opStack, index + 2 ) + x1;
-            CF2_Fixed  y2 = cf2_stack_getReal( opStack, index + 3 ) + y1;
-            CF2_Fixed  x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
-            CF2_Fixed  y3 = cf2_stack_getReal( opStack, index + 5 ) + y2;
+            CF2_Fixed  x1 = cf2_stack_getReal( opStack, idx + 0 ) + curX;
+            CF2_Fixed  y1 = cf2_stack_getReal( opStack, idx + 1 ) + curY;
+            CF2_Fixed  x2 = cf2_stack_getReal( opStack, idx + 2 ) + x1;
+            CF2_Fixed  y2 = cf2_stack_getReal( opStack, idx + 3 ) + y1;
+            CF2_Fixed  x3 = cf2_stack_getReal( opStack, idx + 4 ) + x2;
+            CF2_Fixed  y3 = cf2_stack_getReal( opStack, idx + 5 ) + y2;
 
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
 
-            curX   = x3;
-            curY   = y3;
-            index += 6;
+            curX  = x3;
+            curY  = y3;
+            idx  += 6;
           }
 
           cf2_stack_clear( opStack );
       case cf2_cmdVVCURVETO:
         {
           CF2_UInt  count, count1 = cf2_stack_count( opStack );
-          CF2_UInt  index = 0;
+          CF2_UInt  idx = 0;
 
 
           /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
           /* we enforce it by clearing the second bit           */
           /* (and sorting the stack indexing to suit)           */
-          count  = count1 & ~2U;
-          index += count1 - count;
+          count = count1 & ~2U;
+          idx  += count1 - count;
 
           FT_TRACE4(( " vvcurveto\n" ));
 
-          while ( index < count )
+          while ( idx < count )
           {
             CF2_Fixed  x1, y1, x2, y2, x3, y3;
 
 
-            if ( ( count - index ) & 1 )
+            if ( ( count - idx ) & 1 )
             {
-              x1 = cf2_stack_getReal( opStack, index ) + curX;
+              x1 = cf2_stack_getReal( opStack, idx ) + curX;
 
-              ++index;
+              idx++;
             }
             else
               x1 = curX;
 
-            y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;
-            x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
-            y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
+            y1 = cf2_stack_getReal( opStack, idx + 0 ) + curY;
+            x2 = cf2_stack_getReal( opStack, idx + 1 ) + x1;
+            y2 = cf2_stack_getReal( opStack, idx + 2 ) + y1;
             x3 = x2;
-            y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
+            y3 = cf2_stack_getReal( opStack, idx + 3 ) + y2;
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
 
-            curX   = x3;
-            curY   = y3;
-            index += 4;
+            curX  = x3;
+            curY  = y3;
+            idx  += 4;
           }
 
           cf2_stack_clear( opStack );
       case cf2_cmdHHCURVETO:
         {
           CF2_UInt  count, count1 = cf2_stack_count( opStack );
-          CF2_UInt  index = 0;
+          CF2_UInt  idx = 0;
 
 
           /* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
           /* we enforce it by clearing the second bit           */
           /* (and sorting the stack indexing to suit)           */
-          count  = count1 & ~2U;
-          index += count1 - count;
+          count = count1 & ~2U;
+          idx  += count1 - count;
 
           FT_TRACE4(( " hhcurveto\n" ));
 
-          while ( index < count )
+          while ( idx < count )
           {
             CF2_Fixed  x1, y1, x2, y2, x3, y3;
 
 
-            if ( ( count - index ) & 1 )
+            if ( ( count - idx ) & 1 )
             {
-              y1 = cf2_stack_getReal( opStack, index ) + curY;
+              y1 = cf2_stack_getReal( opStack, idx ) + curY;
 
-              ++index;
+              idx++;
             }
             else
               y1 = curY;
 
-            x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
-            x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
-            y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
-            x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;
+            x1 = cf2_stack_getReal( opStack, idx + 0 ) + curX;
+            x2 = cf2_stack_getReal( opStack, idx + 1 ) + x1;
+            y2 = cf2_stack_getReal( opStack, idx + 2 ) + y1;
+            x3 = cf2_stack_getReal( opStack, idx + 3 ) + x2;
             y3 = y2;
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
 
-            curX   = x3;
-            curY   = y3;
-            index += 4;
+            curX  = x3;
+            curY  = y3;
+            idx  += 4;
           }
 
           cf2_stack_clear( opStack );
       case cf2_cmdHVCURVETO:
         {
           CF2_UInt  count, count1 = cf2_stack_count( opStack );
-          CF2_UInt  index = 0;
+          CF2_UInt  idx = 0;
 
-          FT_Bool  alternate = op1 == cf2_cmdHVCURVETO;
+          FT_Bool  alternate = FT_BOOL( op1 == cf2_cmdHVCURVETO );
 
 
           /* if `cf2_stack_count' isn't of the form 8n, 8n+1, */
           /* 8n+4, or 8n+5, we enforce it by clearing the     */
           /* second bit                                       */
           /* (and sorting the stack indexing to suit)         */
-          count  = count1 & ~2U;
-          index += count1 - count;
+          count = count1 & ~2U;
+          idx  += count1 - count;
 
           FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" ));
 
-          while ( index < count )
+          while ( idx < count )
           {
             CF2_Fixed x1, x2, x3, y1, y2, y3;
 
 
             if ( alternate )
             {
-              x1 = cf2_stack_getReal( opStack, index + 0 ) + curX;
+              x1 = cf2_stack_getReal( opStack, idx + 0 ) + curX;
               y1 = curY;
-              x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
-              y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
-              y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
+              x2 = cf2_stack_getReal( opStack, idx + 1 ) + x1;
+              y2 = cf2_stack_getReal( opStack, idx + 2 ) + y1;
+              y3 = cf2_stack_getReal( opStack, idx + 3 ) + y2;
 
-              if ( count - index == 5 )
+              if ( count - idx == 5 )
               {
-                x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
+                x3 = cf2_stack_getReal( opStack, idx + 4 ) + x2;
 
-                ++index;
+                idx++;
               }
               else
                 x3 = x2;
             else
             {
               x1 = curX;
-              y1 = cf2_stack_getReal( opStack, index + 0 ) + curY;
-              x2 = cf2_stack_getReal( opStack, index + 1 ) + x1;
-              y2 = cf2_stack_getReal( opStack, index + 2 ) + y1;
-              x3 = cf2_stack_getReal( opStack, index + 3 ) + x2;
+              y1 = cf2_stack_getReal( opStack, idx + 0 ) + curY;
+              x2 = cf2_stack_getReal( opStack, idx + 1 ) + x1;
+              y2 = cf2_stack_getReal( opStack, idx + 2 ) + y1;
+              x3 = cf2_stack_getReal( opStack, idx + 3 ) + x2;
 
-              if ( count - index == 5 )
+              if ( count - idx == 5 )
               {
-                y3 = cf2_stack_getReal( opStack, index + 4 ) + y2;
+                y3 = cf2_stack_getReal( opStack, idx + 4 ) + y2;
 
-                ++index;
+                idx++;
               }
               else
                 y3 = y2;
 
             cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
 
-            curX   = x3;
-            curY   = y3;
-            index += 4;
+            curX  = x3;
+            curY  = y3;
+            idx  += 4;
           }
 
           cf2_stack_clear( opStack );
                              ( byte3 <<  8 ) |
                                byte4         );
 
-            FT_TRACE4(( " %.2f", v / 65536.0 ));
+            FT_TRACE4(( " %.5f", v / 65536.0 ));
 
             cf2_stack_pushFixed( opStack, v );
           }
     /* check whether last error seen is also the first one */
     cf2_setError( error, lastError );
 
+    if ( *error )
+      FT_TRACE4(( "charstring error %d\n", *error ));
+
     /* free resources from objects we've used */
     cf2_glyphpath_finalize( &glyphPath );
     cf2_arrstack_finalize( &vStemHintArray );
index 6fafd90..12a026d 100644 (file)
   /* `error').                                               */
   FT_LOCAL_DEF( CF2_Stack )
   cf2_stack_init( FT_Memory  memory,
-                  FT_Error*  e )
+                  FT_Error*  e,
+                  FT_UInt    stackSize )
   {
-    FT_Error  error = FT_Err_Ok;     /* for FT_QNEW */
+    FT_Error  error = FT_Err_Ok;     /* for FT_NEW */
 
     CF2_Stack  stack = NULL;
 
 
-    if ( !FT_QNEW( stack ) )
+    if ( !FT_NEW( stack ) )
     {
-      /* initialize the structure; FT_QNEW zeroes it */
+      /* initialize the structure; FT_NEW zeroes it */
       stack->memory = memory;
       stack->error  = e;
-      stack->top    = &stack->buffer[0]; /* empty stack */
     }
 
+    /* allocate the stack buffer */
+    if ( FT_NEW_ARRAY( stack->buffer, stackSize ) )
+    {
+      FT_FREE( stack );
+      return NULL;
+    }
+
+    stack->stackSize = stackSize;
+    stack->top       = stack->buffer;     /* empty stack */
+
     return stack;
   }
 
@@ -77,6 +87,8 @@
     {
       FT_Memory  memory = stack->memory;
 
+      /* free the buffer */
+      FT_FREE( stack->buffer );
 
       /* free the main structure */
       FT_FREE( stack );
@@ -87,7 +99,7 @@
   FT_LOCAL_DEF( CF2_UInt )
   cf2_stack_count( CF2_Stack  stack )
   {
-    return (CF2_UInt)( stack->top - &stack->buffer[0] );
+    return (CF2_UInt)( stack->top - stack->buffer );
   }
 
 
   cf2_stack_pushInt( CF2_Stack  stack,
                      CF2_Int    val )
   {
-    if ( stack->top == &stack->buffer[CF2_OPERAND_STACK_SIZE] )
+    if ( stack->top == stack->buffer + stack->stackSize )
     {
       CF2_SET_ERROR( stack->error, Stack_Overflow );
       return;     /* stack overflow */
 
     stack->top->u.i  = val;
     stack->top->type = CF2_NumberInt;
-    ++stack->top;
+    stack->top++;
   }
 
 
   cf2_stack_pushFixed( CF2_Stack  stack,
                        CF2_Fixed  val )
   {
-    if ( stack->top == &stack->buffer[CF2_OPERAND_STACK_SIZE] )
+    if ( stack->top == stack->buffer + stack->stackSize )
     {
       CF2_SET_ERROR( stack->error, Stack_Overflow );
       return;     /* stack overflow */
 
     stack->top->u.r  = val;
     stack->top->type = CF2_NumberFixed;
-    ++stack->top;
+    stack->top++;
   }
 
 
   FT_LOCAL_DEF( CF2_Int )
   cf2_stack_popInt( CF2_Stack  stack )
   {
-    if ( stack->top == &stack->buffer[0] )
+    if ( stack->top == stack->buffer )
     {
       CF2_SET_ERROR( stack->error, Stack_Underflow );
       return 0;   /* underflow */
       return 0;   /* type mismatch */
     }
 
-    --stack->top;
+    stack->top--;
 
     return stack->top->u.i;
   }
   FT_LOCAL_DEF( CF2_Fixed )
   cf2_stack_popFixed( CF2_Stack  stack )
   {
-    if ( stack->top == &stack->buffer[0] )
+    if ( stack->top == stack->buffer )
     {
       CF2_SET_ERROR( stack->error, Stack_Underflow );
       return cf2_intToFixed( 0 );    /* underflow */
     }
 
-    --stack->top;
+    stack->top--;
 
     switch ( stack->top->type )
     {
   cf2_stack_getReal( CF2_Stack  stack,
                      CF2_UInt   idx )
   {
-    FT_ASSERT( cf2_stack_count( stack ) <= CF2_OPERAND_STACK_SIZE );
+    FT_ASSERT( cf2_stack_count( stack ) <= stack->stackSize );
 
     if ( idx >= cf2_stack_count( stack ) )
     {
   }
 
 
-  FT_LOCAL( void )
+  /* provide random access to stack */
+  FT_LOCAL_DEF( void )
+  cf2_stack_setReal( CF2_Stack  stack,
+                     CF2_UInt   idx,
+                     CF2_Fixed  val )
+  {
+    if ( idx > cf2_stack_count( stack ) )
+    {
+      CF2_SET_ERROR( stack->error, Stack_Overflow );
+      return;
+    }
+
+    stack->buffer[idx].u.r  = val;
+    stack->buffer[idx].type = CF2_NumberFixed;
+  }
+
+
+  /* discard (pop) num values from stack */
+  FT_LOCAL_DEF( void )
+  cf2_stack_pop( CF2_Stack  stack,
+                 CF2_UInt   num )
+  {
+    if ( num > cf2_stack_count( stack ) )
+    {
+      CF2_SET_ERROR( stack->error, Stack_Underflow );
+      return;
+    }
+    stack->top -= num;
+  }
+
+
+  FT_LOCAL_DEF( void )
   cf2_stack_roll( CF2_Stack  stack,
                   CF2_Int    count,
                   CF2_Int    shift )
   FT_LOCAL_DEF( void )
   cf2_stack_clear( CF2_Stack  stack )
   {
-    stack->top = &stack->buffer[0];
+    stack->top = stack->buffer;
   }
 
 
index e740a7a..ef08eef 100644 (file)
@@ -62,15 +62,17 @@ FT_BEGIN_HEADER
   {
     FT_Memory         memory;
     FT_Error*         error;
-    CF2_StackNumber   buffer[CF2_OPERAND_STACK_SIZE];
+    CF2_StackNumber*  buffer;
     CF2_StackNumber*  top;
+    FT_UInt           stackSize;
 
   } CF2_StackRec, *CF2_Stack;
 
 
   FT_LOCAL( CF2_Stack )
   cf2_stack_init( FT_Memory  memory,
-                  FT_Error*  error );
+                  FT_Error*  error,
+                  FT_UInt    stackSize );
   FT_LOCAL( void )
   cf2_stack_free( CF2_Stack  stack );
 
@@ -92,6 +94,14 @@ FT_BEGIN_HEADER
   FT_LOCAL( CF2_Fixed )
   cf2_stack_getReal( CF2_Stack  stack,
                      CF2_UInt   idx );
+  FT_LOCAL( void )
+  cf2_stack_setReal( CF2_Stack  stack,
+                     CF2_UInt   idx,
+                     CF2_Fixed  val );
+
+  FT_LOCAL( void )
+  cf2_stack_pop( CF2_Stack  stack,
+                 CF2_UInt   num );
 
   FT_LOCAL( void )
   cf2_stack_roll( CF2_Stack  stack,
index 86ca1be..397f6df 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType OpenType driver component (body only).                      */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
 
-#include "cffpic.c"
+#include "cffcmap.c"
 #include "cffdrivr.c"
+#include "cffgload.c"
 #include "cffparse.c"
+#include "cffpic.c"
 #include "cffload.c"
 #include "cffobjs.c"
-#include "cffgload.c"
-#include "cffcmap.c"
 
 #include "cf2arrst.c"
 #include "cf2blues.c"
@@ -38,4 +37,5 @@
 #include "cf2read.c"
 #include "cf2stack.c"
 
+
 /* END */
index 3ef4832..4adce7a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CFF character mapping table (cmap) support (body).                   */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   }
 
 
-  FT_DEFINE_CMAP_CLASS(cff_cmap_encoding_class_rec,
+  FT_DEFINE_CMAP_CLASS(
+    cff_cmap_encoding_class_rec,
+
     sizeof ( CFF_CMapStdRec ),
 
-    (FT_CMap_InitFunc)     cff_cmap_encoding_init,
-    (FT_CMap_DoneFunc)     cff_cmap_encoding_done,
-    (FT_CMap_CharIndexFunc)cff_cmap_encoding_char_index,
-    (FT_CMap_CharNextFunc) cff_cmap_encoding_char_next,
+    (FT_CMap_InitFunc)     cff_cmap_encoding_init,        /* init       */
+    (FT_CMap_DoneFunc)     cff_cmap_encoding_done,        /* done       */
+    (FT_CMap_CharIndexFunc)cff_cmap_encoding_char_index,  /* char_index */
+    (FT_CMap_CharNextFunc) cff_cmap_encoding_char_next,   /* char_next  */
 
-    NULL, NULL, NULL, NULL, NULL
+    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
   )
 
 
   }
 
 
-  FT_DEFINE_CMAP_CLASS(cff_cmap_unicode_class_rec,
+  FT_DEFINE_CMAP_CLASS(
+    cff_cmap_unicode_class_rec,
+
     sizeof ( PS_UnicodesRec ),
 
-    (FT_CMap_InitFunc)     cff_cmap_unicode_init,
-    (FT_CMap_DoneFunc)     cff_cmap_unicode_done,
-    (FT_CMap_CharIndexFunc)cff_cmap_unicode_char_index,
-    (FT_CMap_CharNextFunc) cff_cmap_unicode_char_next,
+    (FT_CMap_InitFunc)     cff_cmap_unicode_init,        /* init       */
+    (FT_CMap_DoneFunc)     cff_cmap_unicode_done,        /* done       */
+    (FT_CMap_CharIndexFunc)cff_cmap_unicode_char_index,  /* char_index */
+    (FT_CMap_CharNextFunc) cff_cmap_unicode_char_next,   /* char_next  */
 
-    NULL, NULL, NULL, NULL, NULL
+    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
   )
 
+
 /* END */
index 23795d5..7792e04 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CFF character mapping table (cmap) support (specification).          */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 950a960..38bfc2c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType font driver implementation (body).                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #include "cffcmap.h"
 #include "cffparse.h"
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
+#endif
+
 #include "cfferrs.h"
 #include "cffpic.h"
 
 
       if ( flags & FT_LOAD_VERTICAL_LAYOUT )
       {
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+        /* no fast retrieval for blended MM fonts without VVAR table */
+        if ( !ttface->is_default_instance                               &&
+             !( ttface->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+          return FT_THROW( Unimplemented_Feature );
+#endif
+
         /* check whether we have data from the `vmtx' table at all; */
         /* otherwise we extract the info from the CFF glyphstrings  */
         /* (instead of synthesizing a global value using the `OS/2' */
       }
       else
       {
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+        /* no fast retrieval for blended MM fonts without HVAR table */
+        if ( !ttface->is_default_instance                               &&
+             !( ttface->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+          return FT_THROW( Unimplemented_Feature );
+#endif
+
         /* check whether we have data from the `hmtx' table at all */
         if ( !ttface->horizontal.number_Of_HMetrics )
           goto Missing_Table;
     FT_Error    error;
 
 
+    /* CFF2 table does not have glyph names; */
+    /* we need to use `post' table method    */
+    if ( font->version_major == 2 )
+    {
+      FT_Library            library     = FT_FACE_LIBRARY( face );
+      FT_Module             sfnt_module = FT_Get_Module( library, "sfnt" );
+      FT_Service_GlyphDict  service     =
+        (FT_Service_GlyphDict)ft_module_get_service(
+                                 sfnt_module,
+                                 FT_SERVICE_ID_GLYPH_DICT,
+                                 0 );
+
+
+      if ( service && service->get_name )
+        return service->get_name( FT_FACE( face ),
+                                  glyph_index,
+                                  buffer,
+                                  buffer_max );
+      else
+      {
+        FT_ERROR(( "cff_get_glyph_name:"
+                   " cannot get glyph name from a CFF2 font\n"
+                   "                   "
+                   " without the `PSNames' module\n" ));
+        error = FT_THROW( Missing_Module );
+        goto Exit;
+      }
+    }
+
     if ( !font->psnames )
     {
       FT_ERROR(( "cff_get_glyph_name:"
     cff     = (CFF_FontRec *)face->extra.data;
     charset = &cff->charset;
 
+    /* CFF2 table does not have glyph names; */
+    /* we need to use `post' table method    */
+    if ( cff->version_major == 2 )
+    {
+      FT_Library            library     = FT_FACE_LIBRARY( face );
+      FT_Module             sfnt_module = FT_Get_Module( library, "sfnt" );
+      FT_Service_GlyphDict  service     =
+        (FT_Service_GlyphDict)ft_module_get_service(
+                                 sfnt_module,
+                                 FT_SERVICE_ID_GLYPH_DICT,
+                                 0 );
+
+
+      if ( service && service->name_index )
+        return service->name_index( FT_FACE( face ), glyph_name );
+      else
+      {
+        FT_ERROR(( "cff_get_name_index:"
+                   " cannot get glyph index from a CFF2 font\n"
+                   "                   "
+                   " without the `PSNames' module\n" ));
+        return 0;
+      }
+    }
+
     FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
     if ( !psnames )
       return 0;
 
   FT_DEFINE_SERVICE_GLYPHDICTREC(
     cff_service_glyph_dict,
+
     (FT_GlyphDict_GetNameFunc)  cff_get_glyph_name,      /* get_name   */
     (FT_GlyphDict_NameIndexFunc)cff_get_name_index       /* name_index */
   )
     FT_Error  error = FT_Err_Ok;
 
 
-    if ( cff && cff->font_info == NULL )
+    if ( cff && !cff->font_info )
     {
-      CFF_FontRecDict  dict   = &cff->top_font.font_dict;
+      CFF_FontRecDict  dict      = &cff->top_font.font_dict;
       PS_FontInfoRec  *font_info = NULL;
-      FT_Memory        memory = face->root.memory;
+      FT_Memory        memory    = face->root.memory;
 
 
       if ( FT_ALLOC( font_info, sizeof ( *font_info ) ) )
 
   FT_DEFINE_SERVICE_PSINFOREC(
     cff_service_ps_info,
+
     (PS_GetFontInfoFunc)   cff_ps_get_font_info,    /* ps_get_font_info    */
     (PS_GetFontExtraFunc)  NULL,                    /* ps_get_font_extra   */
     (PS_HasGlyphNamesFunc) cff_ps_has_glyph_names,  /* ps_has_glyph_names  */
       FT_Service_PsFontName  service     =
         (FT_Service_PsFontName)ft_module_get_service(
                                  sfnt_module,
-                                 FT_SERVICE_ID_POSTSCRIPT_FONT_NAME );
+                                 FT_SERVICE_ID_POSTSCRIPT_FONT_NAME,
+                                 0 );
 
 
       if ( service && service->get_ps_font_name )
 
   FT_DEFINE_SERVICE_PSFONTNAMEREC(
     cff_service_ps_name,
+
     (FT_PsName_GetFunc)cff_get_ps_name      /* get_ps_font_name */
   )
 
     FT_Library  library = FT_FACE_LIBRARY( face );
 
 
-    cmap_info->language = 0;
-    cmap_info->format   = 0;
-
     if ( cmap->clazz != &CFF_CMAP_ENCODING_CLASS_REC_GET &&
          cmap->clazz != &CFF_CMAP_UNICODE_CLASS_REC_GET  )
     {
       FT_Module           sfnt    = FT_Get_Module( library, "sfnt" );
       FT_Service_TTCMaps  service =
         (FT_Service_TTCMaps)ft_module_get_service( sfnt,
-                                                   FT_SERVICE_ID_TT_CMAP );
+                                                   FT_SERVICE_ID_TT_CMAP,
+                                                   0 );
 
 
       if ( service && service->get_cmap_info )
         error = service->get_cmap_info( charmap, cmap_info );
     }
+    else
+      error = FT_THROW( Invalid_CharMap_Format );
 
     return error;
   }
 
   FT_DEFINE_SERVICE_TTCMAPSREC(
     cff_service_get_cmap_info,
+
     (TT_CMap_Info_GetFunc)cff_get_cmap_info    /* get_cmap_info */
   )
 
 
       if ( registry )
       {
-        if ( cff->registry == NULL )
+        if ( !cff->registry )
           cff->registry = cff_index_get_sid_string( cff,
                                                     dict->cid_registry );
         *registry = cff->registry;
 
       if ( ordering )
       {
-        if ( cff->ordering == NULL )
+        if ( !cff->ordering )
           cff->ordering = cff_index_get_sid_string( cff,
                                                     dict->cid_ordering );
         *ordering = cff->ordering;
 
   FT_DEFINE_SERVICE_CIDREC(
     cff_service_cid_info,
+
     (FT_CID_GetRegistryOrderingSupplementFunc)
       cff_get_ros,                             /* get_ros                  */
     (FT_CID_GetIsInternallyCIDKeyedFunc)
   static FT_Error
   cff_property_set( FT_Module    module,         /* CFF_Driver */
                     const char*  property_name,
-                    const void*  value )
+                    const void*  value,
+                    FT_Bool      value_is_string )
   {
     FT_Error    error  = FT_Err_Ok;
     CFF_Driver  driver = (CFF_Driver)module;
 
+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+    FT_UNUSED( value_is_string );
+#endif
+
 
     if ( !ft_strcmp( property_name, "darkening-parameters" ) )
     {
-      FT_Int*  darken_params = (FT_Int*)value;
+      FT_Int*  darken_params;
+      FT_Int   x1, y1, x2, y2, x3, y3, x4, y4;
 
-      FT_Int  x1 = darken_params[0];
-      FT_Int  y1 = darken_params[1];
-      FT_Int  x2 = darken_params[2];
-      FT_Int  y2 = darken_params[3];
-      FT_Int  x3 = darken_params[4];
-      FT_Int  y3 = darken_params[5];
-      FT_Int  x4 = darken_params[6];
-      FT_Int  y4 = darken_params[7];
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      FT_Int   dp[8];
 
 
+      if ( value_is_string )
+      {
+        const char*  s = (const char*)value;
+        char*        ep;
+        int          i;
+
+
+        /* eight comma-separated numbers */
+        for ( i = 0; i < 7; i++ )
+        {
+          dp[i] = (FT_Int)ft_strtol( s, &ep, 10 );
+          if ( *ep != ',' || s == ep )
+            return FT_THROW( Invalid_Argument );
+
+          s = ep + 1;
+        }
+
+        dp[7] = (FT_Int)ft_strtol( s, &ep, 10 );
+        if ( !( *ep == '\0' || *ep == ' ' ) || s == ep )
+          return FT_THROW( Invalid_Argument );
+
+        darken_params = dp;
+      }
+      else
+#endif
+        darken_params = (FT_Int*)value;
+
+      x1 = darken_params[0];
+      y1 = darken_params[1];
+      x2 = darken_params[2];
+      y2 = darken_params[3];
+      x3 = darken_params[4];
+      y3 = darken_params[5];
+      x4 = darken_params[6];
+      y4 = darken_params[7];
+
       if ( x1 < 0   || x2 < 0   || x3 < 0   || x4 < 0   ||
            y1 < 0   || y2 < 0   || y3 < 0   || y4 < 0   ||
            x1 > x2  || x2 > x3  || x3 > x4              ||
     }
     else if ( !ft_strcmp( property_name, "hinting-engine" ) )
     {
-      FT_UInt*  hinting_engine = (FT_UInt*)value;
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+      {
+        const char*  s = (const char*)value;
 
 
-      if ( *hinting_engine == FT_CFF_HINTING_ADOBE
+        if ( !ft_strcmp( s, "adobe" ) )
+          driver->hinting_engine = FT_CFF_HINTING_ADOBE;
 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE
-           || *hinting_engine == FT_CFF_HINTING_FREETYPE
+        else if ( !ft_strcmp( s, "freetype" ) )
+          driver->hinting_engine = FT_CFF_HINTING_FREETYPE;
 #endif
-         )
-        driver->hinting_engine = *hinting_engine;
+        else
+          return FT_THROW( Invalid_Argument );
+      }
       else
-        error = FT_ERR( Unimplemented_Feature );
+#endif
+      {
+        FT_UInt*  hinting_engine = (FT_UInt*)value;
 
-      return error;
+
+        if ( *hinting_engine == FT_CFF_HINTING_ADOBE
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+             || *hinting_engine == FT_CFF_HINTING_FREETYPE
+#endif
+           )
+          driver->hinting_engine = *hinting_engine;
+        else
+          error = FT_ERR( Unimplemented_Feature );
+
+        return error;
+      }
     }
     else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
     {
-      FT_Bool*  no_stem_darkening = (FT_Bool*)value;
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+      {
+        const char*  s   = (const char*)value;
+        long         nsd = ft_strtol( s, NULL, 10 );
+
+
+        if ( !nsd )
+          driver->no_stem_darkening = FALSE;
+        else
+          driver->no_stem_darkening = TRUE;
+      }
+      else
+#endif
+      {
+        FT_Bool*  no_stem_darkening = (FT_Bool*)value;
+
+
+        driver->no_stem_darkening = *no_stem_darkening;
+      }
+
+      return error;
+    }
+    else if ( !ft_strcmp( property_name, "random-seed" ) )
+    {
+      FT_Int32  random_seed;
 
 
-      driver->no_stem_darkening = *no_stem_darkening;
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+      {
+        const char*  s = (const char*)value;
+
+
+        random_seed = (FT_Int32)ft_strtol( s, NULL, 10 );
+      }
+      else
+#endif
+        random_seed = *(FT_Int32*)value;
+
+      if ( random_seed < 0 )
+        random_seed = 0;
+
+      driver->random_seed = random_seed;
 
       return error;
     }
 
   FT_DEFINE_SERVICE_PROPERTIESREC(
     cff_service_properties,
+
     (FT_Properties_SetFunc)cff_property_set,      /* set_property */
     (FT_Properties_GetFunc)cff_property_get )     /* get_property */
 
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+  /*
+   *  MULTIPLE MASTER SERVICE
+   *
+   */
+
+  static FT_Error
+  cff_set_mm_blend( CFF_Face   face,
+                    FT_UInt    num_coords,
+                    FT_Fixed*  coords )
+  {
+    FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+
+    return mm->set_mm_blend( FT_FACE( face ), num_coords, coords );
+  }
+
+
+  static FT_Error
+  cff_get_mm_blend( CFF_Face   face,
+                    FT_UInt    num_coords,
+                    FT_Fixed*  coords )
+  {
+    FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+
+    return mm->get_mm_blend( FT_FACE( face ), num_coords, coords );
+  }
+
+
+  static FT_Error
+  cff_get_mm_var( CFF_Face     face,
+                  FT_MM_Var*  *master )
+  {
+    FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+
+    return mm->get_mm_var( FT_FACE( face ), master );
+  }
+
+
+  static FT_Error
+  cff_set_var_design( CFF_Face   face,
+                      FT_UInt    num_coords,
+                      FT_Fixed*  coords )
+  {
+    FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+
+    return mm->set_var_design( FT_FACE( face ), num_coords, coords );
+  }
+
+
+  static FT_Error
+  cff_get_var_design( CFF_Face   face,
+                      FT_UInt    num_coords,
+                      FT_Fixed*  coords )
+  {
+    FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+
+    return mm->get_var_design( FT_FACE( face ), num_coords, coords );
+  }
+
+
+  FT_DEFINE_SERVICE_MULTIMASTERSREC(
+    cff_service_multi_masters,
+
+    (FT_Get_MM_Func)        NULL,                   /* get_mm         */
+    (FT_Set_MM_Design_Func) NULL,                   /* set_mm_design  */
+    (FT_Set_MM_Blend_Func)  cff_set_mm_blend,       /* set_mm_blend   */
+    (FT_Get_MM_Blend_Func)  cff_get_mm_blend,       /* get_mm_blend   */
+    (FT_Get_MM_Var_Func)    cff_get_mm_var,         /* get_mm_var     */
+    (FT_Set_Var_Design_Func)cff_set_var_design,     /* set_var_design */
+    (FT_Get_Var_Design_Func)cff_get_var_design,     /* get_var_design */
+
+    (FT_Get_Var_Blend_Func) cff_get_var_blend,      /* get_var_blend  */
+    (FT_Done_Blend_Func)    cff_done_blend          /* done_blend     */
+  )
+
+
+  /*
+   *  METRICS VARIATIONS SERVICE
+   *
+   */
+
+  static FT_Error
+  cff_hadvance_adjust( CFF_Face  face,
+                       FT_UInt   gindex,
+                       FT_Int   *avalue )
+  {
+    FT_Service_MetricsVariations  var = (FT_Service_MetricsVariations)face->var;
+
+
+    return var->hadvance_adjust( FT_FACE( face ), gindex, avalue );
+  }
+
+
+  static void
+  cff_metrics_adjust( CFF_Face  face )
+  {
+    FT_Service_MetricsVariations  var = (FT_Service_MetricsVariations)face->var;
+
+
+    var->metrics_adjust( FT_FACE( face ) );
+  }
+
+
+  FT_DEFINE_SERVICE_METRICSVARIATIONSREC(
+    cff_service_metrics_variations,
+
+    (FT_HAdvance_Adjust_Func)cff_hadvance_adjust,    /* hadvance_adjust */
+    (FT_LSB_Adjust_Func)     NULL,                   /* lsb_adjust      */
+    (FT_RSB_Adjust_Func)     NULL,                   /* rsb_adjust      */
+
+    (FT_VAdvance_Adjust_Func)NULL,                   /* vadvance_adjust */
+    (FT_TSB_Adjust_Func)     NULL,                   /* tsb_adjust      */
+    (FT_BSB_Adjust_Func)     NULL,                   /* bsb_adjust      */
+    (FT_VOrg_Adjust_Func)    NULL,                   /* vorg_adjust     */
+
+    (FT_Metrics_Adjust_Func) cff_metrics_adjust      /* metrics_adjust  */
+  )
+#endif
+
+
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
 
-#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
+#if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \
+     defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
+  FT_DEFINE_SERVICEDESCREC9(
+    cff_services,
+
+    FT_SERVICE_ID_FONT_FORMAT,          FT_FONT_FORMAT_CFF,
+    FT_SERVICE_ID_MULTI_MASTERS,        &CFF_SERVICE_MULTI_MASTERS_GET,
+    FT_SERVICE_ID_METRICS_VARIATIONS,   &CFF_SERVICE_METRICS_VAR_GET,
+    FT_SERVICE_ID_POSTSCRIPT_INFO,      &CFF_SERVICE_PS_INFO_GET,
+    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
+    FT_SERVICE_ID_GLYPH_DICT,           &CFF_SERVICE_GLYPH_DICT_GET,
+    FT_SERVICE_ID_TT_CMAP,              &CFF_SERVICE_GET_CMAP_INFO_GET,
+    FT_SERVICE_ID_CID,                  &CFF_SERVICE_CID_INFO_GET,
+    FT_SERVICE_ID_PROPERTIES,           &CFF_SERVICE_PROPERTIES_GET
+  )
+#elif !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES
   FT_DEFINE_SERVICEDESCREC7(
     cff_services,
+
     FT_SERVICE_ID_FONT_FORMAT,          FT_FONT_FORMAT_CFF,
     FT_SERVICE_ID_POSTSCRIPT_INFO,      &CFF_SERVICE_PS_INFO_GET,
     FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
     FT_SERVICE_ID_CID,                  &CFF_SERVICE_CID_INFO_GET,
     FT_SERVICE_ID_PROPERTIES,           &CFF_SERVICE_PROPERTIES_GET
   )
+#elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
+  FT_DEFINE_SERVICEDESCREC8(
+    cff_services,
+
+    FT_SERVICE_ID_FONT_FORMAT,          FT_FONT_FORMAT_CFF,
+    FT_SERVICE_ID_MULTI_MASTERS,        &CFF_SERVICE_MULTI_MASTERS_GET,
+    FT_SERVICE_ID_METRICS_VARIATIONS,   &CFF_SERVICE_METRICS_VAR_GET,
+    FT_SERVICE_ID_POSTSCRIPT_INFO,      &CFF_SERVICE_PS_INFO_GET,
+    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
+    FT_SERVICE_ID_TT_CMAP,              &CFF_SERVICE_GET_CMAP_INFO_GET,
+    FT_SERVICE_ID_CID,                  &CFF_SERVICE_CID_INFO_GET,
+    FT_SERVICE_ID_PROPERTIES,           &CFF_SERVICE_PROPERTIES_GET
+  )
 #else
   FT_DEFINE_SERVICEDESCREC6(
     cff_services,
+
     FT_SERVICE_ID_FONT_FORMAT,          FT_FONT_FORMAT_CFF,
     FT_SERVICE_ID_POSTSCRIPT_INFO,      &CFF_SERVICE_PS_INFO_GET,
     FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
 #endif
 
     result = ft_service_list_lookup( CFF_SERVICES_GET, module_interface );
-    if ( result != NULL )
+    if ( result )
       return result;
 
     /* `driver' is not yet evaluated in non-PIC mode */
       0x10000L,
       0x20000L,
 
-      0,   /* module-specific interface */
+      NULL,   /* module-specific interface */
 
       cff_driver_init,          /* FT_Module_Constructor  module_init   */
       cff_driver_done,          /* FT_Module_Destructor   module_done   */
     cff_glyph_load,             /* FT_Slot_LoadFunc  load_glyph */
 
     cff_get_kerning,            /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
     cff_get_advances,           /* FT_Face_GetAdvancesFunc  get_advances */
 
     cff_size_request,           /* FT_Size_RequestFunc  request_size */
index d7b0598..05381e6 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level OpenType driver interface (specification).                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e7fc6eb..40808c1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CFF error codes (specification only).                                */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 752c18e..9408048 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType Glyph Loader (body).                                        */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
       if ( hinting && size )
       {
-        CFF_Internal  internal = (CFF_Internal)size->root.internal;
+        FT_Size       ftsize   = FT_SIZE( size );
+        CFF_Internal  internal = (CFF_Internal)ftsize->internal->module_data;
 
 
-        builder->hints_globals = (void *)internal->topfont;
-        builder->hints_funcs   = glyph->root.internal->glyph_hints;
+        if ( internal )
+        {
+          builder->hints_globals = (void *)internal->topfont;
+          builder->hints_funcs   = glyph->root.internal->glyph_hints;
+        }
       }
     }
 
 
 
     /* clear everything */
-    FT_MEM_ZERO( decoder, sizeof ( *decoder ) );
+    FT_ZERO( decoder );
 
     /* initialize builder */
     cff_builder_init( &decoder->builder, face, size, slot, hinting );
 
       if ( builder->hints_funcs && size )
       {
-        CFF_Internal  internal = (CFF_Internal)size->root.internal;
+        FT_Size       ftsize   = FT_SIZE( size );
+        CFF_Internal  internal = (CFF_Internal)ftsize->internal->module_data;
 
 
         /* for CFFs without subfonts, this value has already been set */
     decoder->glyph_width   = sub->private_dict.default_width;
     decoder->nominal_width = sub->private_dict.nominal_width;
 
-    decoder->current_subfont = sub;     /* for Adobe's CFF handler */
+    decoder->current_subfont = sub;
 
   Exit:
     return error;
     FT_Byte*           limit;
     CFF_Builder*       builder = &decoder->builder;
     FT_Pos             x, y;
-    FT_Fixed           seed;
     FT_Fixed*          stack;
     FT_Int             charstring_type =
                          decoder->cff->top_font.font_dict.charstring_type;
     decoder->num_hints  = 0;
     decoder->read_width = 1;
 
-    /* compute random seed from stack address of parameter */
-    seed = (FT_Fixed)( ( (FT_Offset)(char*)&seed            ^
-                         (FT_Offset)(char*)&decoder         ^
-                         (FT_Offset)(char*)&charstring_base ) &
-                         FT_ULONG_MAX                         );
-    seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;
-    if ( seed == 0 )
-      seed = 0x7384;
-
     /* initialize the decoder */
     decoder->top  = decoder->stack;
     decoder->zone = decoder->zones;
         if ( !( val & 0xFFFFL ) )
           FT_TRACE4(( " %hd", (FT_Short)( (FT_UInt32)val >> 16 ) ));
         else
-          FT_TRACE4(( " %.2f", val / 65536.0 ));
+          FT_TRACE4(( " %.5f", val / 65536.0 ));
 #endif
 
       }
           break;
 
         case cff_op_random:
-          {
-            FT_Fixed  Rand;
-
+          FT_TRACE4(( " random\n" ));
 
-            FT_TRACE4(( " rand\n" ));
-
-            Rand = seed;
-            if ( Rand >= 0x8000L )
-              Rand++;
+          /* only use the lower 16 bits of `random'  */
+          /* to generate a number in the range (0;1] */
+          args[0] = (FT_Fixed)
+                      ( ( decoder->current_subfont->random & 0xFFFF ) + 1 );
+          args++;
 
-            args[0] = Rand;
-            seed    = FT_MulFix( seed, 0x10000L - seed );
-            if ( seed == 0 )
-              seed += 0x2873;
-            args++;
-          }
+          decoder->current_subfont->random =
+            cff_random( decoder->current_subfont->random );
           break;
 
         case cff_op_mul:
 
         case cff_op_and:
           {
-            FT_Fixed  cond = args[0] && args[1];
+            FT_Fixed  cond = ( args[0] && args[1] );
 
 
             FT_TRACE4(( " and\n" ));
 
         case cff_op_or:
           {
-            FT_Fixed  cond = args[0] || args[1];
+            FT_Fixed  cond = ( args[0] || args[1] );
 
 
             FT_TRACE4(( " or\n" ));
 
         case cff_op_eq:
           {
-            FT_Fixed  cond = args[0] == args[1];
+            FT_Fixed  cond = ( args[0] == args[1] );
 
 
             FT_TRACE4(( " eq\n" ));
       cff_decoder_init( &decoder, face, size, glyph, hinting,
                         FT_LOAD_TARGET_MODE( load_flags ) );
 
+      /* this is for pure CFFs */
       if ( load_flags & FT_LOAD_ADVANCE_ONLY )
         decoder.width_only = TRUE;
 
index b875fbe..0fa93b4 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType Glyph Loader (specification).                               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 3d1bda9..3beaeb1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType and CFF data/program tables loader (body).                  */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #include FT_TRUETYPE_TAGS_H
 #include FT_TYPE1_TABLES_H
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_MULTIPLE_MASTERS_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#endif
+
 #include "cffload.h"
 #include "cffparse.h"
 
 #include "cfferrs.h"
 
 
+#define FT_FIXED_ONE  ( (FT_Fixed)0x10000 )
+
+
 #if 1
 
   static const FT_UShort  cff_isoadobe_charset[229] =
   static FT_Error
   cff_index_init( CFF_Index  idx,
                   FT_Stream  stream,
-                  FT_Bool    load )
+                  FT_Bool    load,
+                  FT_Bool    cff2 )
   {
     FT_Error   error;
     FT_Memory  memory = stream->memory;
-    FT_UShort  count;
+    FT_UInt    count;
 
 
-    FT_MEM_ZERO( idx, sizeof ( *idx ) );
+    FT_ZERO( idx );
 
     idx->stream = stream;
     idx->start  = FT_STREAM_POS();
-    if ( !FT_READ_USHORT( count ) &&
-         count > 0                )
+
+    if ( cff2 )
+    {
+      if ( FT_READ_ULONG( count ) )
+        goto Exit;
+      idx->hdr_size = 5;
+    }
+    else
+    {
+      if ( FT_READ_USHORT( count ) )
+        goto Exit;
+      idx->hdr_size = 3;
+    }
+
+    if ( count > 0 )
     {
       FT_Byte   offsize;
       FT_ULong  size;
       idx->off_size = offsize;
       size          = (FT_ULong)( count + 1 ) * offsize;
 
-      idx->data_offset = idx->start + 3 + size;
+      idx->data_offset = idx->start + idx->hdr_size + size;
 
       if ( FT_STREAM_SKIP( size - offsize ) )
         goto Exit;
         FT_FRAME_RELEASE( idx->bytes );
 
       FT_FREE( idx->offsets );
-      FT_MEM_ZERO( idx, sizeof ( *idx ) );
+      FT_ZERO( idx );
     }
   }
 
     FT_Memory  memory = stream->memory;
 
 
-    if ( idx->count > 0 && idx->offsets == NULL )
+    if ( idx->count > 0 && !idx->offsets )
     {
       FT_Byte    offsize = idx->off_size;
       FT_ULong   data_size;
       data_size = (FT_ULong)( idx->count + 1 ) * offsize;
 
       if ( FT_NEW_ARRAY( idx->offsets, idx->count + 1 ) ||
-           FT_STREAM_SEEK( idx->start + 3 )             ||
+           FT_STREAM_SEEK( idx->start + idx->hdr_size ) ||
            FT_FRAME_ENTER( data_size )                  )
         goto Exit;
 
 
     *table = NULL;
 
-    if ( idx->offsets == NULL )
+    if ( !idx->offsets )
     {
       error = cff_index_load_offsets( idx );
       if ( error )
         FT_ULong  pos = element * idx->off_size;
 
 
-        if ( FT_STREAM_SEEK( idx->start + 3 + pos ) )
+        if ( FT_STREAM_SEEK( idx->start + idx->hdr_size + pos ) )
           goto Exit;
 
         off1 = cff_index_read_offset( idx, &error );
                       FT_UInt   element )
   {
     CFF_Index   idx = &font->name_index;
-    FT_Memory   memory = idx->stream->memory;
+    FT_Memory   memory;
     FT_Byte*    bytes;
     FT_ULong    byte_len;
     FT_Error    error;
     FT_String*  name = 0;
 
 
+    if ( !idx->stream )  /* CFF2 does not include a name index */
+      goto Exit;
+
+    memory = idx->stream->memory;
+
     error = cff_index_access_element( idx, element, &bytes, &byte_len );
     if ( error )
       goto Exit;
 
     if ( !FT_ALLOC( name, byte_len + 1 ) )
     {
-      FT_MEM_COPY( name, bytes, byte_len );
+      if ( byte_len )
+        FT_MEM_COPY( name, bytes, byte_len );
       name[byte_len] = 0;
     }
     cff_index_forget_element( idx, &bytes );
     FT_Byte  fd = 0;
 
 
+    /* if there is no FDSelect, return zero               */
+    /* Note: CFF2 with just one Font Dict has no FDSelect */
+    if ( !fdselect->data )
+      goto Exit;
+
     switch ( fdselect->format )
     {
     case 0:
       ;
     }
 
+  Exit:
     return fd;
   }
 
 
 
   static void
+  cff_vstore_done( CFF_VStoreRec*  vstore,
+                   FT_Memory       memory )
+  {
+    FT_UInt  i;
+
+
+    /* free regionList and axisLists */
+    if ( vstore->varRegionList )
+    {
+      for ( i = 0; i < vstore->regionCount; i++ )
+        FT_FREE( vstore->varRegionList[i].axisList );
+    }
+    FT_FREE( vstore->varRegionList );
+
+    /* free varData and indices */
+    if ( vstore->varData )
+    {
+      for ( i = 0; i < vstore->dataCount; i++ )
+        FT_FREE( vstore->varData[i].regionIndices );
+    }
+    FT_FREE( vstore->varData );
+  }
+
+
+  /* convert 2.14 to Fixed */
+  #define FT_fdot14ToFixed( x )  ( (FT_Fixed)( (FT_ULong)(x) << 2 ) )
+
+
+  static FT_Error
+  cff_vstore_load( CFF_VStoreRec*  vstore,
+                   FT_Stream       stream,
+                   FT_ULong        base_offset,
+                   FT_ULong        offset )
+  {
+    FT_Memory  memory = stream->memory;
+    FT_Error   error  = FT_ERR( Invalid_File_Format );
+
+    FT_ULong*  dataOffsetArray = NULL;
+    FT_UInt    i, j;
+
+
+    /* no offset means no vstore to parse */
+    if ( offset )
+    {
+      FT_UInt   vsOffset;
+      FT_UInt   format;
+      FT_ULong  regionListOffset;
+
+
+      /* we need to parse the table to determine its size; */
+      /* skip table length                                 */
+      if ( FT_STREAM_SEEK( base_offset + offset ) ||
+           FT_STREAM_SKIP( 2 )                    )
+        goto Exit;
+
+      /* actual variation store begins after the length */
+      vsOffset = FT_STREAM_POS();
+
+      /* check the header */
+      if ( FT_READ_USHORT( format ) )
+        goto Exit;
+      if ( format != 1 )
+      {
+        error = FT_THROW( Invalid_File_Format );
+        goto Exit;
+      }
+
+      /* read top level fields */
+      if ( FT_READ_ULONG( regionListOffset )   ||
+           FT_READ_USHORT( vstore->dataCount ) )
+        goto Exit;
+
+      /* make temporary copy of item variation data offsets; */
+      /* we'll parse region list first, then come back       */
+      if ( FT_NEW_ARRAY( dataOffsetArray, vstore->dataCount ) )
+        goto Exit;
+
+      for ( i = 0; i < vstore->dataCount; i++ )
+      {
+        if ( FT_READ_ULONG( dataOffsetArray[i] ) )
+          goto Exit;
+      }
+
+      /* parse regionList and axisLists */
+      if ( FT_STREAM_SEEK( vsOffset + regionListOffset ) ||
+           FT_READ_USHORT( vstore->axisCount )           ||
+           FT_READ_USHORT( vstore->regionCount )         )
+        goto Exit;
+
+      if ( FT_NEW_ARRAY( vstore->varRegionList, vstore->regionCount ) )
+        goto Exit;
+
+      for ( i = 0; i < vstore->regionCount; i++ )
+      {
+        CFF_VarRegion*  region = &vstore->varRegionList[i];
+
+
+        if ( FT_NEW_ARRAY( region->axisList, vstore->axisCount ) )
+          goto Exit;
+
+        for ( j = 0; j < vstore->axisCount; j++ )
+        {
+          CFF_AxisCoords*  axis = &region->axisList[j];
+
+          FT_Int16  start14, peak14, end14;
+
+
+          if ( FT_READ_SHORT( start14 ) ||
+               FT_READ_SHORT( peak14 )  ||
+               FT_READ_SHORT( end14 )   )
+            goto Exit;
+
+          axis->startCoord = FT_fdot14ToFixed( start14 );
+          axis->peakCoord  = FT_fdot14ToFixed( peak14 );
+          axis->endCoord   = FT_fdot14ToFixed( end14 );
+        }
+      }
+
+      /* use dataOffsetArray now to parse varData items */
+      if ( FT_NEW_ARRAY( vstore->varData, vstore->dataCount ) )
+        goto Exit;
+
+      for ( i = 0; i < vstore->dataCount; i++ )
+      {
+        CFF_VarData*  data = &vstore->varData[i];
+
+
+        if ( FT_STREAM_SEEK( vsOffset + dataOffsetArray[i] ) )
+          goto Exit;
+
+        /* ignore `itemCount' and `shortDeltaCount' */
+        /* because CFF2 has no delta sets           */
+        if ( FT_STREAM_SKIP( 4 ) )
+          goto Exit;
+
+        /* Note: just record values; consistency is checked later    */
+        /*       by cff_blend_build_vector when it consumes `vstore' */
+
+        if ( FT_READ_USHORT( data->regionIdxCount ) )
+          goto Exit;
+
+        if ( FT_NEW_ARRAY( data->regionIndices, data->regionIdxCount ) )
+          goto Exit;
+
+        for ( j = 0; j < data->regionIdxCount; j++ )
+        {
+          if ( FT_READ_USHORT( data->regionIndices[j] ) )
+            goto Exit;
+        }
+      }
+    }
+
+    error = FT_Err_Ok;
+
+  Exit:
+    FT_FREE( dataOffsetArray );
+    if ( error )
+      cff_vstore_done( vstore, memory );
+
+    return error;
+  }
+
+
+  /* Clear blend stack (after blend values are consumed). */
+  /*                                                      */
+  /* TODO: Should do this in cff_run_parse, but subFont   */
+  /*       ref is not available there.                    */
+  /*                                                      */
+  /* Allocation is not changed when stack is cleared.     */
+  FT_LOCAL_DEF( void )
+  cff_blend_clear( CFF_SubFont  subFont )
+  {
+    subFont->blend_top  = subFont->blend_stack;
+    subFont->blend_used = 0;
+  }
+
+
+  /* Blend numOperands on the stack,                       */
+  /* store results into the first numBlends values,        */
+  /* then pop remaining arguments.                         */
+  /*                                                       */
+  /* This is comparable to `cf2_doBlend' but               */
+  /* the cffparse stack is different and can't be written. */
+  /* Blended values are written to a different buffer,     */
+  /* using reserved operator 255.                          */
+  /*                                                       */
+  /* Blend calculation is done in 16.16 fixed point.       */
+  FT_LOCAL_DEF( FT_Error )
+  cff_blend_doBlend( CFF_SubFont  subFont,
+                     CFF_Parser   parser,
+                     FT_UInt      numBlends )
+  {
+    FT_UInt  delta;
+    FT_UInt  base;
+    FT_UInt  i, j;
+    FT_UInt  size;
+
+    CFF_Blend  blend = &subFont->blend;
+
+    FT_Memory  memory = subFont->blend.font->memory; /* for FT_REALLOC */
+    FT_Error   error  = FT_Err_Ok;                   /* for FT_REALLOC */
+
+    /* compute expected number of operands for this blend */
+    FT_UInt  numOperands = (FT_UInt)( numBlends * blend->lenBV );
+    FT_UInt  count       = (FT_UInt)( parser->top - 1 - parser->stack );
+
+
+    if ( numOperands > count )
+    {
+      FT_TRACE4(( " cff_blend_doBlend: Stack underflow %d args\n", count ));
+
+      error = FT_THROW( Stack_Underflow );
+      goto Exit;
+    }
+
+    /* check whether we have room for `numBlends' values at `blend_top' */
+    size = 5 * numBlends;           /* add 5 bytes per entry    */
+    if ( subFont->blend_used + size > subFont->blend_alloc )
+    {
+      FT_Byte*  blend_stack_old = subFont->blend_stack;
+      FT_Byte*  blend_top_old   = subFont->blend_top;
+
+
+      /* increase or allocate `blend_stack' and reset `blend_top'; */
+      /* prepare to append `numBlends' values to the buffer        */
+      if ( FT_REALLOC( subFont->blend_stack,
+                       subFont->blend_alloc,
+                       subFont->blend_alloc + size ) )
+        goto Exit;
+
+      subFont->blend_top    = subFont->blend_stack + subFont->blend_used;
+      subFont->blend_alloc += size;
+
+      /* iterate over the parser stack and adjust pointers */
+      /* if the reallocated buffer has a different address */
+      if ( blend_stack_old                         &&
+           subFont->blend_stack != blend_stack_old )
+      {
+        FT_PtrDist  offset = subFont->blend_stack - blend_stack_old;
+        FT_Byte**   p;
+
+
+        for ( p = parser->stack; p < parser->top; p++ )
+        {
+          if ( *p >= blend_stack_old && *p < blend_top_old )
+            *p += offset;
+        }
+      }
+    }
+    subFont->blend_used += size;
+
+    base  = count - numOperands;     /* index of first blend arg */
+    delta = base + numBlends;        /* index of first delta arg */
+
+    for ( i = 0; i < numBlends; i++ )
+    {
+      const FT_Int32*  weight = &blend->BV[1];
+      FT_Int32         sum;
+
+
+      /* convert inputs to 16.16 fixed point */
+      sum = cff_parse_num( parser, &parser->stack[i + base] ) * 65536;
+
+      for ( j = 1; j < blend->lenBV; j++ )
+        sum += FT_MulFix( *weight++,
+                          cff_parse_num( parser,
+                                         &parser->stack[delta++] ) * 65536 );
+
+      /* point parser stack to new value on blend_stack */
+      parser->stack[i + base] = subFont->blend_top;
+
+      /* Push blended result as Type 2 5-byte fixed point number.  This */
+      /* will not conflict with actual DICTs because 255 is a reserved  */
+      /* opcode in both CFF and CFF2 DICTs.  See `cff_parse_num' for    */
+      /* decode of this, which rounds to an integer.                    */
+      *subFont->blend_top++ = 255;
+      *subFont->blend_top++ = ( (FT_UInt32)sum & 0xFF000000U ) >> 24;
+      *subFont->blend_top++ = ( (FT_UInt32)sum & 0x00FF0000U ) >> 16;
+      *subFont->blend_top++ = ( (FT_UInt32)sum & 0x0000FF00U ) >>  8;
+      *subFont->blend_top++ =   (FT_UInt32)sum & 0x000000FFU;
+    }
+
+    /* leave only numBlends results on parser stack */
+    parser->top = &parser->stack[base + numBlends];
+
+  Exit:
+    return error;
+  }
+
+
+  /* Compute a blend vector from variation store index and normalized  */
+  /* vector based on pseudo-code in OpenType Font Variations Overview. */
+  /*                                                                   */
+  /* Note: lenNDV == 0 produces a default blend vector, (1,0,0,...).   */
+  FT_LOCAL_DEF( FT_Error )
+  cff_blend_build_vector( CFF_Blend  blend,
+                          FT_UInt    vsindex,
+                          FT_UInt    lenNDV,
+                          FT_Fixed*  NDV )
+  {
+    FT_Error   error  = FT_Err_Ok;            /* for FT_REALLOC */
+    FT_Memory  memory = blend->font->memory;  /* for FT_REALLOC */
+
+    FT_UInt       len;
+    CFF_VStore    vs;
+    CFF_VarData*  varData;
+    FT_UInt       master;
+
+
+    FT_ASSERT( lenNDV == 0 || NDV );
+
+    blend->builtBV = FALSE;
+
+    vs = &blend->font->vstore;
+
+    /* VStore and fvar must be consistent */
+    if ( lenNDV != 0 && lenNDV != vs->axisCount )
+    {
+      FT_TRACE4(( " cff_blend_build_vector: Axis count mismatch\n" ));
+      error = FT_THROW( Invalid_File_Format );
+      goto Exit;
+    }
+
+    if ( vsindex >= vs->dataCount )
+    {
+      FT_TRACE4(( " cff_blend_build_vector: vsindex out of range\n" ));
+      error = FT_THROW( Invalid_File_Format );
+      goto Exit;
+    }
+
+    /* select the item variation data structure */
+    varData = &vs->varData[vsindex];
+
+    /* prepare buffer for the blend vector */
+    len = varData->regionIdxCount + 1;    /* add 1 for default component */
+    if ( FT_REALLOC( blend->BV,
+                     blend->lenBV * sizeof( *blend->BV ),
+                     len * sizeof( *blend->BV ) ) )
+      goto Exit;
+
+    blend->lenBV = len;
+
+    /* outer loop steps through master designs to be blended */
+    for ( master = 0; master < len; master++ )
+    {
+      FT_UInt         j;
+      FT_UInt         idx;
+      CFF_VarRegion*  varRegion;
+
+
+      /* default factor is always one */
+      if ( master == 0 )
+      {
+        blend->BV[master] = FT_FIXED_ONE;
+        FT_TRACE4(( "   build blend vector len %d\n"
+                    "   [ %f ",
+                    len,
+                    blend->BV[master] / 65536.0 ));
+        continue;
+      }
+
+      /* VStore array does not include default master, so subtract one */
+      idx       = varData->regionIndices[master - 1];
+      varRegion = &vs->varRegionList[idx];
+
+      if ( idx >= vs->regionCount )
+      {
+        FT_TRACE4(( " cff_blend_build_vector:"
+                    " region index out of range\n" ));
+        error = FT_THROW( Invalid_File_Format );
+        goto Exit;
+      }
+
+      /* Note: `lenNDV' could be zero.                              */
+      /*       In that case, build default blend vector (1,0,0...). */
+      if ( !lenNDV )
+      {
+        blend->BV[master] = 0;
+        continue;
+      }
+
+      /* In the normal case, initialize each component to 1 */
+      /* before inner loop.                                 */
+      blend->BV[master] = FT_FIXED_ONE; /* default */
+
+      /* inner loop steps through axes in this region */
+      for ( j = 0; j < lenNDV; j++ )
+      {
+        CFF_AxisCoords*  axis = &varRegion->axisList[j];
+        FT_Fixed         axisScalar;
+
+
+        /* compute the scalar contribution of this axis; */
+        /* ignore invalid ranges                         */
+        if ( axis->startCoord > axis->peakCoord ||
+             axis->peakCoord > axis->endCoord   )
+          axisScalar = FT_FIXED_ONE;
+
+        else if ( axis->startCoord < 0 &&
+                  axis->endCoord > 0   &&
+                  axis->peakCoord != 0 )
+          axisScalar = FT_FIXED_ONE;
+
+        /* peak of 0 means ignore this axis */
+        else if ( axis->peakCoord == 0 )
+          axisScalar = FT_FIXED_ONE;
+
+        /* ignore this region if coords are out of range */
+        else if ( NDV[j] < axis->startCoord ||
+                  NDV[j] > axis->endCoord   )
+          axisScalar = 0;
+
+        /* calculate a proportional factor */
+        else
+        {
+          if ( NDV[j] == axis->peakCoord )
+            axisScalar = FT_FIXED_ONE;
+          else if ( NDV[j] < axis->peakCoord )
+            axisScalar = FT_DivFix( NDV[j] - axis->startCoord,
+                                    axis->peakCoord - axis->startCoord );
+          else
+            axisScalar = FT_DivFix( axis->endCoord - NDV[j],
+                                    axis->endCoord - axis->peakCoord );
+        }
+
+        /* take product of all the axis scalars */
+        blend->BV[master] = FT_MulFix( blend->BV[master], axisScalar );
+      }
+
+      FT_TRACE4(( ", %f ",
+                  blend->BV[master] / 65536.0 ));
+    }
+
+    FT_TRACE4(( "]\n" ));
+
+    /* record the parameters used to build the blend vector */
+    blend->lastVsindex = vsindex;
+
+    if ( lenNDV != 0 )
+    {
+      /* user has set a normalized vector */
+      if ( FT_REALLOC( blend->lastNDV,
+                       blend->lenNDV * sizeof ( *NDV ),
+                       lenNDV * sizeof ( *NDV ) ) )
+        goto Exit;
+
+      FT_MEM_COPY( blend->lastNDV,
+                   NDV,
+                   lenNDV * sizeof ( *NDV ) );
+    }
+
+    blend->lenNDV  = lenNDV;
+    blend->builtBV = TRUE;
+
+  Exit:
+    return error;
+  }
+
+
+  /* `lenNDV' is zero for default vector;           */
+  /* return TRUE if blend vector needs to be built. */
+  FT_LOCAL_DEF( FT_Bool )
+  cff_blend_check_vector( CFF_Blend  blend,
+                          FT_UInt    vsindex,
+                          FT_UInt    lenNDV,
+                          FT_Fixed*  NDV )
+  {
+    if ( !blend->builtBV                             ||
+         blend->lastVsindex != vsindex               ||
+         blend->lenNDV != lenNDV                     ||
+         ( lenNDV                                  &&
+           memcmp( NDV,
+                   blend->lastNDV,
+                   lenNDV * sizeof ( *NDV ) ) != 0 ) )
+    {
+      /* need to build blend vector */
+      return TRUE;
+    }
+
+    return FALSE;
+  }
+
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+  FT_LOCAL_DEF( FT_Error )
+  cff_get_var_blend( CFF_Face     face,
+                     FT_UInt     *num_coords,
+                     FT_Fixed*   *coords,
+                     FT_Fixed*   *normalizedcoords,
+                     FT_MM_Var*  *mm_var )
+  {
+    FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+
+    return mm->get_var_blend( FT_FACE( face ),
+                              num_coords,
+                              coords,
+                              normalizedcoords,
+                              mm_var );
+  }
+
+
+  FT_LOCAL_DEF( void )
+  cff_done_blend( CFF_Face  face )
+  {
+    FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+
+    mm->done_blend( FT_FACE( face ) );
+  }
+
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+
+  static void
   cff_encoding_done( CFF_Encoding  encoding )
   {
     encoding->format = 0;
   }
 
 
+  /* Parse private dictionary; first call is always from `cff_face_init', */
+  /* so NDV has not been set for CFF2 variation.                          */
+  /*                                                                      */
+  /* `cff_slot_load' must call this function each time NDV changes.       */
+  FT_LOCAL_DEF( FT_Error )
+  cff_load_private_dict( CFF_Font     font,
+                         CFF_SubFont  subfont,
+                         FT_UInt      lenNDV,
+                         FT_Fixed*    NDV )
+  {
+    FT_Error         error  = FT_Err_Ok;
+    CFF_ParserRec    parser;
+    CFF_FontRecDict  top    = &subfont->font_dict;
+    CFF_Private      priv   = &subfont->private_dict;
+    FT_Stream        stream = font->stream;
+    FT_UInt          stackSize;
+
+
+    /* store handle needed to access memory, vstore for blend;    */
+    /* we need this for clean-up even if there is no private DICT */
+    subfont->blend.font   = font;
+    subfont->blend.usedBV = FALSE;  /* clear state */
+
+    if ( !top->private_offset || !top->private_size )
+      goto Exit2;       /* no private DICT, do nothing */
+
+    /* set defaults */
+    FT_ZERO( priv );
+
+    priv->blue_shift       = 7;
+    priv->blue_fuzz        = 1;
+    priv->lenIV            = -1;
+    priv->expansion_factor = (FT_Fixed)( 0.06 * 0x10000L );
+    priv->blue_scale       = (FT_Fixed)( 0.039625 * 0x10000L * 1000 );
+
+    /* provide inputs for blend calculations */
+    priv->subfont   = subfont;
+    subfont->lenNDV = lenNDV;
+    subfont->NDV    = NDV;
+
+    /* add 1 for the operator */
+    stackSize = font->cff2 ? font->top_font.font_dict.maxstack + 1
+                           : CFF_MAX_STACK_DEPTH + 1;
+
+    if ( cff_parser_init( &parser,
+                          font->cff2 ? CFF2_CODE_PRIVATE : CFF_CODE_PRIVATE,
+                          priv,
+                          font->library,
+                          stackSize,
+                          top->num_designs,
+                          top->num_axes ) )
+      goto Exit;
+
+    if ( FT_STREAM_SEEK( font->base_offset + top->private_offset ) ||
+         FT_FRAME_ENTER( top->private_size )                       )
+      goto Exit;
+
+    FT_TRACE4(( " private dictionary:\n" ));
+    error = cff_parser_run( &parser,
+                            (FT_Byte*)stream->cursor,
+                            (FT_Byte*)stream->limit );
+    FT_FRAME_EXIT();
+
+    if ( error )
+      goto Exit;
+
+    /* ensure that `num_blue_values' is even */
+    priv->num_blue_values &= ~1;
+
+    /* sanitize `initialRandomSeed' to be a positive value, if necessary;  */
+    /* this is not mandated by the specification but by our implementation */
+    if ( priv->initial_random_seed < 0 )
+      priv->initial_random_seed = -priv->initial_random_seed;
+    else if ( priv->initial_random_seed == 0 )
+      priv->initial_random_seed = 987654321;
+
+  Exit:
+    /* clean up */
+    cff_blend_clear( subfont ); /* clear blend stack */
+    cff_parser_done( &parser ); /* free parser stack */
+
+  Exit2:
+    /* no clean up (parser not initialized) */
+    return error;
+  }
+
+
+  FT_LOCAL_DEF( FT_UInt32 )
+  cff_random( FT_UInt32  r )
+  {
+    /* a 32bit version of the `xorshift' algorithm */
+    r ^= r << 13;
+    r ^= r >> 17;
+    r ^= r << 5;
+
+    return r;
+  }
+
+
+  /* There are 3 ways to call this function, distinguished by code.  */
+  /*                                                                 */
+  /* . CFF_CODE_TOPDICT for either a CFF Top DICT or a CFF Font DICT */
+  /* . CFF2_CODE_TOPDICT for CFF2 Top DICT                           */
+  /* . CFF2_CODE_FONTDICT for CFF2 Font DICT                         */
+
   static FT_Error
-  cff_subfont_load( CFF_SubFont  font,
+  cff_subfont_load( CFF_SubFont  subfont,
                     CFF_Index    idx,
                     FT_UInt      font_index,
                     FT_Stream    stream,
                     FT_ULong     base_offset,
-                    FT_Library   library )
+                    FT_UInt      code,
+                    CFF_Font     font,
+                    CFF_Face     face )
   {
     FT_Error         error;
     CFF_ParserRec    parser;
     FT_Byte*         dict = NULL;
     FT_ULong         dict_len;
-    CFF_FontRecDict  top  = &font->font_dict;
-    CFF_Private      priv = &font->private_dict;
-
-
-    cff_parser_init( &parser,
-                     CFF_CODE_TOPDICT,
-                     &font->font_dict,
-                     library,
-                     0,
-                     0 );
+    CFF_FontRecDict  top  = &subfont->font_dict;
+    CFF_Private      priv = &subfont->private_dict;
+
+    FT_Bool  cff2      = FT_BOOL( code == CFF2_CODE_TOPDICT  ||
+                                  code == CFF2_CODE_FONTDICT );
+    FT_UInt  stackSize = cff2 ? CFF2_DEFAULT_STACK
+                              : CFF_MAX_STACK_DEPTH;
+
+
+    /* Note: We use default stack size for CFF2 Font DICT because        */
+    /*       Top and Font DICTs are not allowed to have blend operators. */
+    error = cff_parser_init( &parser,
+                             code,
+                             &subfont->font_dict,
+                             font->library,
+                             stackSize,
+                             0,
+                             0 );
+    if ( error )
+      goto Exit;
 
     /* set defaults */
-    FT_MEM_ZERO( top, sizeof ( *top ) );
+    FT_ZERO( top );
 
     top->underline_position  = -( 100L << 16 );
     top->underline_thickness = 50L << 16;
     top->cid_ordering        = 0xFFFFU;
     top->cid_font_name       = 0xFFFFU;
 
-    error = cff_index_access_element( idx, font_index, &dict, &dict_len );
+    /* set default stack size */
+    top->maxstack            = cff2 ? CFF2_DEFAULT_STACK : 48;
+
+    if ( idx->count )   /* count is nonzero for a real index */
+      error = cff_index_access_element( idx, font_index, &dict, &dict_len );
+    else
+    {
+      /* CFF2 has a fake top dict index;     */
+      /* simulate `cff_index_access_element' */
+
+      /* Note: macros implicitly use `stream' and set `error' */
+      if ( FT_STREAM_SEEK( idx->data_offset )       ||
+           FT_FRAME_EXTRACT( idx->data_size, dict ) )
+        goto Exit;
+
+      dict_len = idx->data_size;
+    }
+
     if ( !error )
     {
       FT_TRACE4(( " top dictionary:\n" ));
       error = cff_parser_run( &parser, dict, dict + dict_len );
     }
 
-    cff_index_forget_element( idx, &dict );
+    /* clean up regardless of error */
+    if ( idx->count )
+      cff_index_forget_element( idx, &dict );
+    else
+      FT_FRAME_RELEASE( dict );
 
     if ( error )
       goto Exit;
     if ( top->cid_registry != 0xFFFFU )
       goto Exit;
 
-    /* parse the private dictionary, if any */
-    if ( top->private_offset && top->private_size )
+    /* Parse the private dictionary, if any.                   */
+    /*                                                         */
+    /* CFF2 does not have a private dictionary in the Top DICT */
+    /* but may have one in a Font DICT.  We need to parse      */
+    /* the latter here in order to load any local subrs.       */
+    error = cff_load_private_dict( font, subfont, 0, 0 );
+    if ( error )
+      goto Exit;
+
+    if ( !cff2 )
     {
-      /* set defaults */
-      FT_MEM_ZERO( priv, sizeof ( *priv ) );
-
-      priv->blue_shift       = 7;
-      priv->blue_fuzz        = 1;
-      priv->lenIV            = -1;
-      priv->expansion_factor = (FT_Fixed)( 0.06 * 0x10000L );
-      priv->blue_scale       = (FT_Fixed)( 0.039625 * 0x10000L * 1000 );
-
-      cff_parser_init( &parser,
-                       CFF_CODE_PRIVATE,
-                       priv,
-                       library,
-                       top->num_designs,
-                       top->num_axes );
-
-      if ( FT_STREAM_SEEK( base_offset + font->font_dict.private_offset ) ||
-           FT_FRAME_ENTER( font->font_dict.private_size )                 )
-        goto Exit;
+      /*
+       * Initialize the random number generator.
+       *
+       * . If we have a face-specific seed, use it.
+       *   If non-zero, update it to a positive value.
+       *
+       * . Otherwise, use the seed from the CFF driver.
+       *   If non-zero, update it to a positive value.
+       *
+       * . If the random value is zero, use the seed given by the subfont's
+       *   `initialRandomSeed' value.
+       *
+       */
+      if ( face->root.internal->random_seed == -1 )
+      {
+        CFF_Driver  driver = (CFF_Driver)FT_FACE_DRIVER( face );
 
-      FT_TRACE4(( " private dictionary:\n" ));
-      error = cff_parser_run( &parser,
-                              (FT_Byte*)stream->cursor,
-                              (FT_Byte*)stream->limit );
-      FT_FRAME_EXIT();
-      if ( error )
-        goto Exit;
 
-      /* ensure that `num_blue_values' is even */
-      priv->num_blue_values &= ~1;
+        subfont->random = (FT_UInt32)driver->random_seed;
+        if ( driver->random_seed )
+        {
+          do
+          {
+            driver->random_seed =
+              (FT_Int32)cff_random( (FT_UInt32)driver->random_seed );
+
+          } while ( driver->random_seed < 0 );
+        }
+      }
+      else
+      {
+        subfont->random = (FT_UInt32)face->root.internal->random_seed;
+        if ( face->root.internal->random_seed )
+        {
+          do
+          {
+            face->root.internal->random_seed =
+              (FT_Int32)cff_random( (FT_UInt32)face->root.internal->random_seed );
+
+          } while ( face->root.internal->random_seed < 0 );
+        }
+      }
+
+      if ( !subfont->random )
+        subfont->random = (FT_UInt32)priv->initial_random_seed;
     }
 
     /* read the local subrs, if any */
                            priv->local_subrs_offset ) )
         goto Exit;
 
-      error = cff_index_init( &font->local_subrs_index, stream, 1 );
+      error = cff_index_init( &subfont->local_subrs_index, stream, 1, cff2 );
       if ( error )
         goto Exit;
 
-      error = cff_index_get_pointers( &font->local_subrs_index,
-                                      &font->local_subrs, NULL, NULL );
+      error = cff_index_get_pointers( &subfont->local_subrs_index,
+                                      &subfont->local_subrs, NULL, NULL );
       if ( error )
         goto Exit;
     }
 
   Exit:
+    cff_parser_done( &parser ); /* free parser stack */
+
     return error;
   }
 
     {
       cff_index_done( &subfont->local_subrs_index );
       FT_FREE( subfont->local_subrs );
+
+      FT_FREE( subfont->blend.lastNDV );
+      FT_FREE( subfont->blend.BV );
+      FT_FREE( subfont->blend_stack );
     }
   }
 
                  FT_Stream  stream,
                  FT_Int     face_index,
                  CFF_Font   font,
-                 FT_Bool    pure_cff )
+                 CFF_Face   face,
+                 FT_Bool    pure_cff,
+                 FT_Bool    cff2 )
   {
     static const FT_Frame_Field  cff_header_fields[] =
     {
 #undef  FT_STRUCTURE
 #define FT_STRUCTURE  CFF_FontRec
 
-      FT_FRAME_START( 4 ),
+      FT_FRAME_START( 3 ),
         FT_FRAME_BYTE( version_major ),
         FT_FRAME_BYTE( version_minor ),
         FT_FRAME_BYTE( header_size ),
-        FT_FRAME_BYTE( absolute_offsize ),
       FT_FRAME_END
     };
 
     FT_ZERO( font );
     FT_ZERO( &string_index );
 
-    font->stream = stream;
-    font->memory = memory;
-    dict         = &font->top_font.font_dict;
-    base_offset  = FT_STREAM_POS();
+    dict        = &font->top_font.font_dict;
+    base_offset = FT_STREAM_POS();
+
+    font->library     = library;
+    font->stream      = stream;
+    font->memory      = memory;
+    font->cff2        = cff2;
+    font->base_offset = base_offset;
 
     /* read CFF font header */
     if ( FT_STREAM_READ_FIELDS( cff_header_fields, font ) )
       goto Exit;
 
-    /* check format */
-    if ( font->version_major   != 1 ||
-         font->header_size      < 4 ||
-         font->absolute_offsize > 4 )
+    if ( cff2 )
     {
-      FT_TRACE2(( "  not a CFF font header\n" ));
-      error = FT_THROW( Unknown_File_Format );
-      goto Exit;
+      if ( font->version_major != 2 ||
+           font->header_size < 5    )
+      {
+        FT_TRACE2(( "  not a CFF2 font header\n" ));
+        error = FT_THROW( Unknown_File_Format );
+        goto Exit;
+      }
+
+      if ( FT_READ_USHORT( font->top_dict_length ) )
+        goto Exit;
+    }
+    else
+    {
+      FT_Byte  absolute_offset;
+
+
+      if ( FT_READ_BYTE( absolute_offset ) )
+        goto Exit;
+
+      if ( font->version_major != 1 ||
+           font->header_size < 4    ||
+           absolute_offset > 4      )
+      {
+        FT_TRACE2(( "  not a CFF font header\n" ));
+        error = FT_THROW( Unknown_File_Format );
+        goto Exit;
+      }
     }
 
     /* skip the rest of the header */
-    if ( FT_STREAM_SKIP( font->header_size - 4 ) )
+    if ( FT_STREAM_SEEK( base_offset + font->header_size ) )
+    {
+      /* For pure CFFs we have read only four bytes so far.  Contrary to */
+      /* other formats like SFNT those bytes doesn't define a signature; */
+      /* it is thus possible that the font isn't a CFF at all.           */
+      if ( pure_cff )
+      {
+        FT_TRACE2(( "  not a CFF file\n" ));
+        error = FT_THROW( Unknown_File_Format );
+      }
       goto Exit;
+    }
 
-    /* read the name, top dict, string and global subrs index */
-    if ( FT_SET_ERROR( cff_index_init( &font->name_index,
-                                       stream, 0 ) )                       ||
-         FT_SET_ERROR( cff_index_init( &font->font_dict_index,
-                                       stream, 0 ) )                       ||
-         FT_SET_ERROR( cff_index_init( &string_index,
-                                       stream, 1 ) )                       ||
-         FT_SET_ERROR( cff_index_init( &font->global_subrs_index,
-                                       stream, 1 ) )                       ||
-         FT_SET_ERROR( cff_index_get_pointers( &string_index,
-                                               &font->strings,
-                                               &font->string_pool,
-                                               &font->string_pool_size ) ) )
-      goto Exit;
+    if ( cff2 )
+    {
+      /* For CFF2, the top dict data immediately follow the header    */
+      /* and the length is stored in the header `offSize' field;      */
+      /* there is no index for it.                                    */
+      /*                                                              */
+      /* Use the `font_dict_index' to save the current position       */
+      /* and length of data, but leave count at zero as an indicator. */
+      FT_ZERO( &font->font_dict_index );
+
+      font->font_dict_index.data_offset = FT_STREAM_POS();
+      font->font_dict_index.data_size   = font->top_dict_length;
+
+      /* skip the top dict data for now, we will parse it later */
+      if ( FT_STREAM_SKIP( font->top_dict_length ) )
+        goto Exit;
+
+      /* next, read the global subrs index */
+      if ( FT_SET_ERROR( cff_index_init( &font->global_subrs_index,
+                                         stream, 1, cff2 ) ) )
+        goto Exit;
+    }
+    else
+    {
+      /* for CFF, read the name, top dict, string and global subrs index */
+      if ( FT_SET_ERROR( cff_index_init( &font->name_index,
+                                         stream, 0, cff2 ) ) )
+      {
+        if ( pure_cff )
+        {
+          FT_TRACE2(( "  not a CFF file\n" ));
+          error = FT_THROW( Unknown_File_Format );
+        }
+        goto Exit;
+      }
+
+      /* if we have an empty font name,      */
+      /* it must be the only font in the CFF */
+      if ( font->name_index.count > 1                          &&
+           font->name_index.data_size < font->name_index.count )
+      {
+        /* for pure CFFs, we still haven't checked enough bytes */
+        /* to be sure that it is a CFF at all                   */
+        error = pure_cff ? FT_THROW( Unknown_File_Format )
+                         : FT_THROW( Invalid_File_Format );
+        goto Exit;
+      }
+
+      if ( FT_SET_ERROR( cff_index_init( &font->font_dict_index,
+                                         stream, 0, cff2 ) )                 ||
+           FT_SET_ERROR( cff_index_init( &string_index,
+                                         stream, 1, cff2 ) )                 ||
+           FT_SET_ERROR( cff_index_init( &font->global_subrs_index,
+                                         stream, 1, cff2 ) )                 ||
+           FT_SET_ERROR( cff_index_get_pointers( &string_index,
+                                                 &font->strings,
+                                                 &font->string_pool,
+                                                 &font->string_pool_size ) ) )
+        goto Exit;
+
+      /* there must be a Top DICT index entry for each name index entry */
+      if ( font->name_index.count > font->font_dict_index.count )
+      {
+        FT_ERROR(( "cff_font_load:"
+                   " not enough entries in Top DICT index\n" ));
+        error = FT_THROW( Invalid_File_Format );
+        goto Exit;
+      }
+    }
 
     font->num_strings = string_index.count;
 
                               subfont_index,
                               stream,
                               base_offset,
-                              library );
+                              cff2 ? CFF2_CODE_TOPDICT : CFF_CODE_TOPDICT,
+                              font,
+                              face );
     if ( error )
       goto Exit;
 
     if ( FT_STREAM_SEEK( base_offset + dict->charstrings_offset ) )
       goto Exit;
 
-    error = cff_index_init( &font->charstrings_index, stream, 0 );
+    error = cff_index_init( &font->charstrings_index, stream, 0, cff2 );
     if ( error )
       goto Exit;
 
-    /* now, check for a CID font */
-    if ( dict->cid_registry != 0xFFFFU )
+    /* now, check for a CID or CFF2 font */
+    if ( dict->cid_registry != 0xFFFFU ||
+         cff2                          )
     {
       CFF_IndexRec  fd_index;
       CFF_SubFont   sub = NULL;
       FT_UInt       idx;
 
 
+      /* for CFF2, read the Variation Store if available;                 */
+      /* this must follow the Top DICT parse and precede any Private DICT */
+      error = cff_vstore_load( &font->vstore,
+                               stream,
+                               base_offset,
+                               dict->vstore_offset );
+      if ( error )
+        goto Exit;
+
       /* this is a CID-keyed font, we must now allocate a table of */
       /* sub-fonts, then load each of them separately              */
       if ( FT_STREAM_SEEK( base_offset + dict->cid_fd_array_offset ) )
         goto Exit;
 
-      error = cff_index_init( &fd_index, stream, 0 );
+      error = cff_index_init( &fd_index, stream, 0, cff2 );
       if ( error )
         goto Exit;
 
+      /* Font Dicts are not limited to 256 for CFF2. */
+      /* TODO: support this for CFF2                 */
       if ( fd_index.count > CFF_MAX_CID_FONTS )
       {
         FT_TRACE0(( "cff_font_load: FD array too large in CID font\n" ));
       {
         sub = font->subfonts[idx];
         FT_TRACE4(( "parsing subfont %u\n", idx ));
-        error = cff_subfont_load( sub, &fd_index, idx,
-                                  stream, base_offset, library );
+        error = cff_subfont_load( sub,
+                                  &fd_index,
+                                  idx,
+                                  stream,
+                                  base_offset,
+                                  cff2 ? CFF2_CODE_FONTDICT
+                                       : CFF_CODE_TOPDICT,
+                                  font,
+                                  face );
         if ( error )
           goto Fail_CID;
       }
 
-      /* now load the FD Select array */
-      error = CFF_Load_FD_Select( &font->fd_select,
-                                  font->charstrings_index.count,
-                                  stream,
-                                  base_offset + dict->cid_fd_select_offset );
+      /* now load the FD Select array;               */
+      /* CFF2 omits FDSelect if there is only one FD */
+      if ( !cff2 || fd_index.count > 1 )
+        error = CFF_Load_FD_Select( &font->fd_select,
+                                    font->charstrings_index.count,
+                                    stream,
+                                    base_offset + dict->cid_fd_select_offset );
 
     Fail_CID:
       cff_index_done( &fd_index );
       goto Exit;
 
     /* read the Charset and Encoding tables if available */
-    if ( font->num_glyphs > 0 )
+    if ( !cff2 && font->num_glyphs > 0 )
     {
       FT_Bool  invert = FT_BOOL( dict->cid_registry != 0xFFFFU && pure_cff );
 
     cff_index_done( &font->charstrings_index );
 
     /* release font dictionaries, but only if working with */
-    /* a CID keyed CFF font                                */
+    /* a CID keyed CFF font or a CFF2 font                 */
     if ( font->num_subfonts > 0 )
     {
       for ( idx = 0; idx < font->num_subfonts; idx++ )
 
     cff_encoding_done( &font->encoding );
     cff_charset_done( &font->charset, font->stream );
+    cff_vstore_done( &font->vstore, memory );
 
     cff_subfont_done( memory, &font->top_font );
 
index 1dd07ba..c745e81 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType & CFF data/program tables loader (specification).           */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -22,6 +22,8 @@
 
 #include <ft2build.h>
 #include "cfftypes.h"
+#include "cffparse.h"
+#include "cffobjs.h"  /* for CFF_Face */
 
 
 FT_BEGIN_HEADER
@@ -59,21 +61,64 @@ FT_BEGIN_HEADER
                              FT_UInt      cid );
 
 
+  FT_LOCAL( FT_UInt32 )
+  cff_random( FT_UInt32  r );
+
   FT_LOCAL( FT_Error )
-  cff_font_load( FT_Library library,
-                 FT_Stream  stream,
-                 FT_Int     face_index,
-                 CFF_Font   font,
-                 FT_Bool    pure_cff );
+  cff_font_load( FT_Library  library,
+                 FT_Stream   stream,
+                 FT_Int      face_index,
+                 CFF_Font    font,
+                 CFF_Face    face,
+                 FT_Bool     pure_cff,
+                 FT_Bool     cff2 );
 
   FT_LOCAL( void )
   cff_font_done( CFF_Font  font );
 
 
+  FT_LOCAL( FT_Error )
+  cff_load_private_dict( CFF_Font     font,
+                         CFF_SubFont  subfont,
+                         FT_UInt      lenNDV,
+                         FT_Fixed*    NDV );
+
   FT_LOCAL( FT_Byte )
   cff_fd_select_get( CFF_FDSelect  fdselect,
                      FT_UInt       glyph_index );
 
+  FT_LOCAL( FT_Bool )
+  cff_blend_check_vector( CFF_Blend  blend,
+                          FT_UInt    vsindex,
+                          FT_UInt    lenNDV,
+                          FT_Fixed*  NDV );
+
+  FT_LOCAL( FT_Error )
+  cff_blend_build_vector( CFF_Blend  blend,
+                          FT_UInt    vsindex,
+                          FT_UInt    lenNDV,
+                          FT_Fixed*  NDV );
+
+  FT_LOCAL( void )
+  cff_blend_clear( CFF_SubFont  subFont );
+
+  FT_LOCAL( FT_Error )
+  cff_blend_doBlend( CFF_SubFont  subfont,
+                     CFF_Parser   parser,
+                     FT_UInt      numBlends );
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+  FT_LOCAL( FT_Error )
+  cff_get_var_blend( CFF_Face     face,
+                     FT_UInt     *num_coords,
+                     FT_Fixed*   *coords,
+                     FT_Fixed*   *normalizedcoords,
+                     FT_MM_Var*  *mm_var );
+
+  FT_LOCAL( void )
+  cff_done_blend( CFF_Face  face );
+#endif
+
 
 FT_END_HEADER
 
index 0f07696..6161393 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType objects manager (body).                                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #include FT_INTERNAL_SFNT_H
 #include FT_CFF_DRIVER_H
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_MULTIPLE_MASTERS_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#endif
+
 #include "cffobjs.h"
 #include "cffload.h"
 #include "cffcmap.h"
@@ -49,9 +54,6 @@
   /*                                                                       */
   /*                            SIZE FUNCTIONS                             */
   /*                                                                       */
-  /*  Note that we store the global hints in the size's `internal' root    */
-  /*  field.                                                               */
-  /*                                                                       */
   /*************************************************************************/
 
 
   FT_LOCAL_DEF( void )
   cff_size_done( FT_Size  cffsize )        /* CFF_Size */
   {
+    FT_Memory     memory   = cffsize->face->memory;
     CFF_Size      size     = (CFF_Size)cffsize;
     CFF_Face      face     = (CFF_Face)size->root.face;
     CFF_Font      font     = (CFF_Font)face->extra.data;
-    CFF_Internal  internal = (CFF_Internal)cffsize->internal;
+    CFF_Internal  internal = (CFF_Internal)cffsize->internal->module_data;
 
 
     if ( internal )
           funcs->destroy( internal->subfonts[i - 1] );
       }
 
-      /* `internal' is freed by destroy_size (in ftobjs.c) */
+      FT_FREE( internal );
     }
   }
 
     FT_UInt      n, count;
 
 
-    FT_MEM_ZERO( priv, sizeof ( *priv ) );
+    FT_ZERO( priv );
 
     count = priv->num_blue_values = cpriv->num_blue_values;
     for ( n = 0; n < count; n++ )
           goto Exit;
       }
 
-      cffsize->internal = (FT_Size_Internal)(void*)internal;
+      cffsize->internal->module_data = internal;
     }
 
     size->strike_index = 0xFFFFFFFFUL;
     {
       CFF_Face      face     = (CFF_Face)size->face;
       CFF_Font      font     = (CFF_Font)face->extra.data;
-      CFF_Internal  internal = (CFF_Internal)size->internal;
+      CFF_Internal  internal = (CFF_Internal)size->internal->module_data;
 
       FT_Long  top_upm  = (FT_Long)font->top_font.font_dict.units_per_em;
       FT_UInt  i;
     {
       CFF_Face      cffface  = (CFF_Face)size->face;
       CFF_Font      font     = (CFF_Font)cffface->extra.data;
-      CFF_Internal  internal = (CFF_Internal)size->internal;
+      CFF_Internal  internal = (CFF_Internal)size->internal->module_data;
 
       FT_Long  top_upm  = (FT_Long)font->top_font.font_dict.units_per_em;
       FT_UInt  i;
       FT_Int  idx;
 
 
-      for ( idx = 1; idx <= style_name_length; ++idx )
+      for ( idx = 1; idx <= style_name_length; idx++ )
       {
         if ( family_name[family_name_length - idx] !=
              style_name[style_name_length - idx] )
                   family_name[idx] == ' ' ||
                   family_name[idx] == '_' ||
                   family_name[idx] == '+' ) )
-          --idx;
+          idx--;
 
         if ( idx > 0 )
           family_name[idx + 1] = '\0';
     FT_Service_PsCMaps  psnames;
     PSHinter_Service    pshinter;
     FT_Bool             pure_cff    = 1;
+    FT_Bool             cff2        = 0;
     FT_Bool             sfnt_format = 0;
     FT_Library          library     = cffface->driver->root.library;
 
       goto Exit;
 
     /* check whether we have a valid OpenType file */
+    FT_TRACE2(( "  " ));
     error = sfnt->init_face( stream, face, face_index, num_params, params );
     if ( !error )
     {
           goto Exit;
       }
 
-      /* now load the CFF part of the file */
-      error = face->goto_table( face, TTAG_CFF, stream, 0 );
+      /* now load the CFF part of the file; */
+      /* give priority to CFF2              */
+      error = face->goto_table( face, TTAG_CFF2, stream, 0 );
+      if ( !error )
+      {
+        cff2          = 1;
+        face->is_cff2 = cff2;
+      }
+
+      if ( FT_ERR_EQ( error, Table_Missing ) )
+        error = face->goto_table( face, TTAG_CFF, stream, 0 );
+
       if ( error )
         goto Exit;
     }
         goto Exit;
 
       face->extra.data = cff;
-      error = cff_font_load( library, stream, face_index, cff, pure_cff );
+      error = cff_font_load( library,
+                             stream,
+                             face_index,
+                             cff,
+                             face,
+                             pure_cff,
+                             cff2 );
       if ( error )
         goto Exit;
 
       }
 #endif /* FT_DEBUG_LEVEL_TRACE */
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+      {
+        FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+        FT_Int  instance_index = face_index >> 16;
+
+
+        if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
+             mm                                 &&
+             instance_index > 0                 )
+        {
+          FT_MM_Var*  mm_var;
+
+
+          error = mm->get_mm_var( cffface, NULL );
+          if ( error )
+            goto Exit;
+
+          mm->get_var_blend( cffface, NULL, NULL, NULL, &mm_var );
+
+          if ( mm_var->namedstyle )
+          {
+            FT_Var_Named_Style*  named_style;
+            FT_String*           style_name;
+
+
+            /* in `face_index', the instance index starts with value 1 */
+            named_style = mm_var->namedstyle + instance_index - 1;
+            error = sfnt->get_name( face,
+                                    (FT_UShort)named_style->strid,
+                                    &style_name );
+            if ( error )
+              goto Exit;
+
+            /* set style name; if already set, replace it */
+            if ( face->root.style_name )
+              FT_FREE( face->root.style_name );
+            face->root.style_name = style_name;
+
+            /* finally, select the named instance */
+            error = mm->set_var_design( cffface,
+                                        mm_var->num_axis,
+                                        named_style->coords );
+            if ( error )
+              goto Exit;
+          }
+        }
+      }
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
       if ( !dict->has_font_matrix )
         dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;
 
         cffface->style_flags = flags;
       }
 
-
 #ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
       /* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */
       /* has unset this flag because of the 3.0 `post' table.          */
       if ( dict->cid_registry != 0xFFFFU && pure_cff )
         cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;
 
-
       /*******************************************************************/
       /*                                                                 */
       /* Compute char maps.                                              */
         error = FT_Err_Ok;
 
         /* if no Unicode charmap was previously selected, select this one */
-        if ( cffface->charmap == NULL && nn != (FT_UInt)cffface->num_charmaps )
+        if ( !cffface->charmap && nn != (FT_UInt)cffface->num_charmaps )
           cffface->charmap = cffface->charmaps[nn];
 
       Skip_Unicode:
         FT_FREE( face->extra.data );
       }
     }
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    cff_done_blend( face );
+    face->blend = NULL;
+#endif
   }
 
 
   {
     CFF_Driver  driver = (CFF_Driver)module;
 
+    FT_UInt32  seed;
+
 
     /* set default property values, cf. `ftcffdrv.h' */
 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE
     driver->darken_params[6] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4;
     driver->darken_params[7] = CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4;
 
+    /* compute random seed from some memory addresses */
+    seed = (FT_UInt32)( (FT_Offset)(char*)&seed          ^
+                        (FT_Offset)(char*)&module        ^
+                        (FT_Offset)(char*)module->memory );
+    seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 );
+
+    driver->random_seed = (FT_Int32)seed;
+    if ( driver->random_seed < 0 )
+      driver->random_seed = -driver->random_seed;
+    else if ( driver->random_seed == 0 )
+      driver->random_seed = 123456789;
+
     return FT_Err_Ok;
   }
 
index 9dc7753..1dba694 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType objects manager (specification).                            */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -118,10 +118,10 @@ FT_BEGIN_HEADER
   {
     FT_DriverRec  root;
 
-    FT_UInt  hinting_engine;
-    FT_Bool  no_stem_darkening;
-
-    FT_Int  darken_params[8];
+    FT_UInt   hinting_engine;
+    FT_Bool   no_stem_darkening;
+    FT_Int    darken_params[8];
+    FT_Int32  random_seed;
 
   } CFF_DriverRec;
 
index a4f986b..e1511bd 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CFF token stream parser (body)                                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -24,6 +24,7 @@
 #include "cfferrs.h"
 #include "cffpic.h"
 #include "cffgload.h"
+#include "cffload.h"
 
 
   /*************************************************************************/
 #define FT_COMPONENT  trace_cffparse
 
 
-  FT_LOCAL_DEF( void )
+  FT_LOCAL_DEF( FT_Error )
   cff_parser_init( CFF_Parser  parser,
                    FT_UInt     code,
                    void*       object,
                    FT_Library  library,
+                   FT_UInt     stackSize,
                    FT_UShort   num_designs,
                    FT_UShort   num_axes )
   {
-    FT_MEM_ZERO( parser, sizeof ( *parser ) );
+    FT_Memory  memory = library->memory;    /* for FT_NEW_ARRAY */
+    FT_Error   error;                       /* for FT_NEW_ARRAY */
+
+
+    FT_ZERO( parser );
 
+#if 0
     parser->top         = parser->stack;
+#endif
     parser->object_code = code;
     parser->object      = object;
     parser->library     = library;
     parser->num_designs = num_designs;
     parser->num_axes    = num_axes;
+
+    /* allocate the stack buffer */
+    if ( FT_NEW_ARRAY( parser->stack, stackSize ) )
+    {
+      FT_FREE( parser->stack );
+      goto Exit;
+    }
+
+    parser->stackSize = stackSize;
+    parser->top       = parser->stack;    /* empty stack */
+
+  Exit:
+    return error;
+  }
+
+
+  FT_LOCAL_DEF( void )
+  cff_parser_done( CFF_Parser  parser )
+  {
+    FT_Memory  memory = parser->library->memory;    /* for FT_FREE */
+
+
+    FT_FREE( parser->stack );
   }
 
 
 
 
   /* read a number, either integer or real */
-  static FT_Long
-  cff_parse_num( FT_Byte**  d )
+  FT_LOCAL_DEF( FT_Long )
+  cff_parse_num( CFF_Parser  parser,
+                 FT_Byte**   d )
   {
-    return **d == 30 ? ( cff_parse_real( d[0], d[1], 0, NULL ) >> 16 )
-                     :   cff_parse_integer( d[0], d[1] );
+    if ( **d == 30 )
+    {
+      /* binary-coded decimal is truncated to integer */
+      return cff_parse_real( *d, parser->limit, 0, NULL ) >> 16;
+    }
+
+    else if ( **d == 255 )
+    {
+      /* 16.16 fixed point is used internally for CFF2 blend results. */
+      /* Since these are trusted values, a limit check is not needed. */
+
+      /* After the 255, 4 bytes give the number.                 */
+      /* The blend value is converted to integer, with rounding; */
+      /* due to the right-shift we don't need the lowest byte.   */
+#if 0
+      return (FT_Short)(
+               ( ( ( (FT_UInt32)*( d[0] + 1 ) << 24 ) |
+                   ( (FT_UInt32)*( d[0] + 2 ) << 16 ) |
+                   ( (FT_UInt32)*( d[0] + 3 ) <<  8 ) |
+                     (FT_UInt32)*( d[0] + 4 )         ) + 0x8000U ) >> 16 );
+#else
+      return (FT_Short)(
+               ( ( ( (FT_UInt32)*( d[0] + 1 ) << 16 ) |
+                   ( (FT_UInt32)*( d[0] + 2 ) <<  8 ) |
+                     (FT_UInt32)*( d[0] + 3 )         ) + 0x80U ) >> 8 );
+#endif
+    }
+
+    else
+      return cff_parse_integer( *d, parser->limit );
   }
 
 
   /* read a floating point number, either integer or real */
   static FT_Fixed
-  do_fixed( FT_Byte**  d,
-            FT_Long    scaling )
+  do_fixed( CFF_Parser  parser,
+            FT_Byte**   d,
+            FT_Long     scaling )
   {
     if ( **d == 30 )
-      return cff_parse_real( d[0], d[1], scaling, NULL );
+      return cff_parse_real( *d, parser->limit, scaling, NULL );
     else
     {
-      FT_Long  val = cff_parse_integer( d[0], d[1] );
+      FT_Long  val = cff_parse_integer( *d, parser->limit );
 
 
       if ( scaling )
 
   /* read a floating point number, either integer or real */
   static FT_Fixed
-  cff_parse_fixed( FT_Byte**  d )
+  cff_parse_fixed( CFF_Parser  parser,
+                   FT_Byte**   d )
   {
-    return do_fixed( d, 0 );
+    return do_fixed( parser, d, 0 );
   }
 
 
   /* read a floating point number, either integer or real, */
   /* but return `10^scaling' times the number read in      */
   static FT_Fixed
-  cff_parse_fixed_scaled( FT_Byte**  d,
-                          FT_Long    scaling )
+  cff_parse_fixed_scaled( CFF_Parser  parser,
+                          FT_Byte**   d,
+                          FT_Long     scaling )
   {
-    return do_fixed( d, scaling );
+    return do_fixed( parser, d, scaling );
   }
 
 
   /* and return it as precise as possible -- `scaling' returns */
   /* the scaling factor (as a power of 10)                     */
   static FT_Fixed
-  cff_parse_fixed_dynamic( FT_Byte**  d,
-                           FT_Long*   scaling )
+  cff_parse_fixed_dynamic( CFF_Parser  parser,
+                           FT_Byte**   d,
+                           FT_Long*    scaling )
   {
     FT_ASSERT( scaling );
 
     if ( **d == 30 )
-      return cff_parse_real( d[0], d[1], 0, scaling );
+      return cff_parse_real( *d, parser->limit, 0, scaling );
     else
     {
       FT_Long  number;
 
       for ( i = 0; i < 6; i++ )
       {
-        values[i] = cff_parse_fixed_dynamic( data++, &scalings[i] );
+        values[i] = cff_parse_fixed_dynamic( parser, data++, &scalings[i] );
         if ( values[i] )
         {
           if ( scalings[i] > max_scaling )
 
     if ( parser->top >= parser->stack + 4 )
     {
-      bbox->xMin = FT_RoundFix( cff_parse_fixed( data++ ) );
-      bbox->yMin = FT_RoundFix( cff_parse_fixed( data++ ) );
-      bbox->xMax = FT_RoundFix( cff_parse_fixed( data++ ) );
-      bbox->yMax = FT_RoundFix( cff_parse_fixed( data   ) );
+      bbox->xMin = FT_RoundFix( cff_parse_fixed( parser, data++ ) );
+      bbox->yMin = FT_RoundFix( cff_parse_fixed( parser, data++ ) );
+      bbox->xMax = FT_RoundFix( cff_parse_fixed( parser, data++ ) );
+      bbox->yMax = FT_RoundFix( cff_parse_fixed( parser, data   ) );
       error = FT_Err_Ok;
 
       FT_TRACE4(( " [%d %d %d %d]\n",
       FT_Long  tmp;
 
 
-      tmp = cff_parse_num( data++ );
+      tmp = cff_parse_num( parser, data++ );
       if ( tmp < 0 )
       {
         FT_ERROR(( "cff_parse_private_dict: Invalid dictionary size\n" ));
       }
       dict->private_size = (FT_ULong)tmp;
 
-      tmp = cff_parse_num( data );
+      tmp = cff_parse_num( parser, data );
       if ( tmp < 0 )
       {
         FT_ERROR(( "cff_parse_private_dict: Invalid dictionary offset\n" ));
     /* currently, we handle only the first argument */
     if ( parser->top >= parser->stack + 5 )
     {
-      FT_Long  num_designs = cff_parse_num( parser->stack );
+      FT_Long  num_designs = cff_parse_num( parser, parser->stack );
 
 
       if ( num_designs > 16 || num_designs < 2 )
 
     if ( parser->top >= parser->stack + 3 )
     {
-      dict->cid_registry = (FT_UInt)cff_parse_num( data++ );
-      dict->cid_ordering = (FT_UInt)cff_parse_num( data++ );
+      dict->cid_registry = (FT_UInt)cff_parse_num( parser, data++ );
+      dict->cid_ordering = (FT_UInt)cff_parse_num( parser, data++ );
       if ( **data == 30 )
         FT_TRACE1(( "cff_parse_cid_ros: real supplement is rounded\n" ));
-      dict->cid_supplement = cff_parse_num( data );
+      dict->cid_supplement = cff_parse_num( parser, data );
       if ( dict->cid_supplement < 0 )
         FT_TRACE1(( "cff_parse_cid_ros: negative supplement %d is found\n",
                    dict->cid_supplement ));
   }
 
 
+  static FT_Error
+  cff_parse_vsindex( CFF_Parser  parser )
+  {
+    /* vsindex operator can only be used in a Private DICT */
+    CFF_Private  priv = (CFF_Private)parser->object;
+    FT_Byte**    data = parser->stack;
+    CFF_Blend    blend;
+    FT_Error     error;
+
+
+    if ( !priv || !priv->subfont )
+    {
+      error = FT_THROW( Invalid_File_Format );
+      goto Exit;
+    }
+
+    blend = &priv->subfont->blend;
+
+    if ( blend->usedBV )
+    {
+      FT_ERROR(( " cff_parse_vsindex: vsindex not allowed after blend\n" ));
+      error = FT_THROW( Syntax_Error );
+      goto Exit;
+    }
+
+    priv->vsindex = (FT_UInt)cff_parse_num( parser, data++ );
+
+    FT_TRACE4(( " %d\n", priv->vsindex ));
+
+    error = FT_Err_Ok;
+
+  Exit:
+    return error;
+  }
+
+
+  static FT_Error
+  cff_parse_blend( CFF_Parser  parser )
+  {
+    /* blend operator can only be used in a Private DICT */
+    CFF_Private  priv = (CFF_Private)parser->object;
+    CFF_SubFont  subFont;
+    CFF_Blend    blend;
+    FT_UInt      numBlends;
+    FT_Error     error;
+
+
+    if ( !priv || !priv->subfont )
+    {
+      error = FT_THROW( Invalid_File_Format );
+      goto Exit;
+    }
+
+    subFont = priv->subfont;
+    blend   = &subFont->blend;
+
+    if ( cff_blend_check_vector( blend,
+                                 priv->vsindex,
+                                 subFont->lenNDV,
+                                 subFont->NDV ) )
+    {
+      error = cff_blend_build_vector( blend,
+                                      priv->vsindex,
+                                      subFont->lenNDV,
+                                      subFont->NDV );
+      if ( error )
+        goto Exit;
+    }
+
+    numBlends = (FT_UInt)cff_parse_num( parser, parser->top - 1 );
+    if ( numBlends > parser->stackSize )
+    {
+      FT_ERROR(( "cff_parse_blend: Invalid number of blends\n" ));
+      error = FT_THROW( Invalid_File_Format );
+      goto Exit;
+    }
+
+    FT_TRACE4(( "   %d values blended\n", numBlends ));
+
+    error = cff_blend_doBlend( subFont, parser, numBlends );
+
+    blend->usedBV = TRUE;
+
+  Exit:
+    return error;
+  }
+
+
+  /* maxstack operator increases parser and operand stacks for CFF2 */
+  static FT_Error
+  cff_parse_maxstack( CFF_Parser  parser )
+  {
+    /* maxstack operator can only be used in a Top DICT */
+    CFF_FontRecDict  dict  = (CFF_FontRecDict)parser->object;
+    FT_Byte**        data  = parser->stack;
+    FT_Error         error = FT_Err_Ok;
+
+
+    if ( !dict )
+    {
+      error = FT_THROW( Invalid_File_Format );
+      goto Exit;
+    }
+
+    dict->maxstack = (FT_UInt)cff_parse_num( parser, data++ );
+    if ( dict->maxstack > CFF2_MAX_STACK )
+      dict->maxstack = CFF2_MAX_STACK;
+    if ( dict->maxstack < CFF2_DEFAULT_STACK )
+      dict->maxstack = CFF2_DEFAULT_STACK;
+
+    FT_TRACE4(( " %d\n", dict->maxstack ));
+
+  Exit:
+    return error;
+  }
+
+
 #define CFF_FIELD_NUM( code, name, id )             \
           CFF_FIELD( code, name, id, cff_kind_num )
 #define CFF_FIELD_FIXED( code, name, id )             \
 #define CFF_FIELD_BOOL( code, name, id )             \
           CFF_FIELD( code, name, id, cff_kind_bool )
 
-#define CFFCODE_TOPDICT  0x1000
-#define CFFCODE_PRIVATE  0x2000
-
 
 #ifndef FT_CONFIG_OPTION_PIC
 
             0, 0                             \
           },
 
+#define CFF_FIELD_BLEND( code, id ) \
+          {                         \
+            cff_kind_blend,         \
+            code | CFFCODE,         \
+            0, 0,                   \
+            cff_parse_blend,        \
+            0, 0                    \
+          },
+
 #define CFF_FIELD( code, name, id, kind ) \
           {                               \
             kind,                         \
             id                               \
           },
 
+#define CFF_FIELD_BLEND( code, id ) \
+          {                         \
+            cff_kind_blend,         \
+            code | CFFCODE,         \
+            0, 0,                   \
+            cff_parse_blend,        \
+            0, 0,                   \
+            id                      \
+          },
+
 #define CFF_FIELD( code, name, id, kind ) \
           {                               \
             kind,                         \
 #define CFF_FIELD_DELTA( code, name, max, id ) i++;
 #undef CFF_FIELD_CALLBACK
 #define CFF_FIELD_CALLBACK( code, name, id ) i++;
+#undef CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code, id ) i++;
 
 #include "cfftoken.h"
 
           clazz[i].count_offset = FT_FIELD_OFFSET( num_ ## name_ ); \
           i++;
 
+#undef  CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code_, id_ )              \
+          clazz[i].kind         = cff_kind_blend;  \
+          clazz[i].code         = code_ | CFFCODE; \
+          clazz[i].offset       = 0;               \
+          clazz[i].size         = 0;               \
+          clazz[i].reader       = cff_parse_blend; \
+          clazz[i].array_max    = 0;               \
+          clazz[i].count_offset = 0;               \
+          i++;
+
 #include "cfftoken.h"
 
     clazz[i].kind         = 0;
           clazz[i].id           = id_;                              \
           i++;
 
+#undef  CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code_, id_ )              \
+          clazz[i].kind         = cff_kind_blend;  \
+          clazz[i].code         = code_ | CFFCODE; \
+          clazz[i].offset       = 0;               \
+          clazz[i].size         = 0;               \
+          clazz[i].reader       = cff_parse_blend; \
+          clazz[i].array_max    = 0;               \
+          clazz[i].count_offset = 0;               \
+          clazz[i].id           = id_;             \
+          i++;
+
 #include "cfftoken.h"
 
     clazz[i].kind         = 0;
     {
       FT_UInt  v = *p;
 
-
-      if ( v >= 27 && v != 31 )
+      /* Opcode 31 is legacy MM T2 operator, not a number.      */
+      /* Opcode 255 is reserved and should not appear in fonts; */
+      /* it is used internally for CFF2 blends.                 */
+      if ( v >= 27 && v != 31 && v != 255 )
       {
         /* it's a number; we will push its position on the stack */
-        if ( parser->top - parser->stack >= CFF_MAX_STACK_DEPTH )
+        if ( (FT_UInt)( parser->top - parser->stack ) >= parser->stackSize )
           goto Stack_Overflow;
 
         *parser->top++ = p;
         charstring_len = (FT_ULong)( p - charstring_base ) + 1;
 
         /* construct CFF_Decoder object */
-        FT_MEM_ZERO( &decoder, sizeof ( decoder ) );
-        FT_MEM_ZERO( &cff_rec, sizeof ( cff_rec ) );
+        FT_ZERO( &decoder );
+        FT_ZERO( &cff_rec );
 
         cff_rec.top_font.font_dict.num_designs = parser->num_designs;
         cff_rec.top_font.font_dict.num_axes    = parser->num_axes;
           FT_Bool   neg;
 
 
-          if ( parser->top - parser->stack >= CFF_MAX_STACK_DEPTH )
+          if ( (FT_UInt)( parser->top - parser->stack ) >= parser->stackSize )
             goto Stack_Overflow;
 
           *parser->top++ = q;
         /* and look for it in our current list.                            */
 
         FT_UInt                   code;
-        FT_UInt                   num_args = (FT_UInt)
-                                             ( parser->top - parser->stack );
+        FT_UInt                   num_args;
         const CFF_Field_Handler*  field;
 
 
+        if ( (FT_UInt)( parser->top - parser->stack ) >= parser->stackSize )
+          goto Stack_Overflow;
+
+        num_args     = (FT_UInt)( parser->top - parser->stack );
         *parser->top = p;
-        code = v;
+        code         = v;
+
         if ( v == 12 )
         {
           /* two byte operator */
             case cff_kind_bool:
             case cff_kind_string:
             case cff_kind_num:
-              val = cff_parse_num( parser->stack );
+              val = cff_parse_num( parser, parser->stack );
               goto Store_Number;
 
             case cff_kind_fixed:
-              val = cff_parse_fixed( parser->stack );
+              val = cff_parse_fixed( parser, parser->stack );
               goto Store_Number;
 
             case cff_kind_fixed_thousand:
-              val = cff_parse_fixed_scaled( parser->stack, 3 );
+              val = cff_parse_fixed_scaled( parser, parser->stack, 3 );
 
             Store_Number:
               switch ( field->size )
                 val = 0;
                 while ( num_args > 0 )
                 {
-                  val += cff_parse_num( data++ );
+                  val += cff_parse_num( parser, data++ );
                   switch ( field->size )
                   {
                   case (8 / FT_CHAR_BIT):
               }
               break;
 
-            default:  /* callback */
+            default:  /* callback or blend */
               error = field->reader( parser );
               if ( error )
                 goto Exit;
 
       Found:
         /* clear stack */
-        parser->top = parser->stack;
+        /* TODO: could clear blend stack here,       */
+        /*       but we don't have access to subFont */
+        if ( field->kind != cff_kind_blend )
+          parser->top = parser->stack;
       }
       p++;
     }
index a95970e..83d1bba 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CFF token stream parser (specification)                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 FT_BEGIN_HEADER
 
 
+  /* CFF uses constant parser stack size; */
+  /* CFF2 can increase from default 193   */
 #define CFF_MAX_STACK_DEPTH  96
 
-#define CFF_CODE_TOPDICT  0x1000
-#define CFF_CODE_PRIVATE  0x2000
+  /*
+   *  There are plans to remove the `maxstack' operator in a forthcoming
+   *  revision of the CFF2 specification, increasing the (then static) stack
+   *  size to 513.  By making the default stack size equal to the maximum
+   *  stack size, the operator is essentially disabled, which has the
+   *  desired effect in FreeType.
+   */
+#define CFF2_MAX_STACK      513
+#define CFF2_DEFAULT_STACK  513
+
+#define CFF_CODE_TOPDICT    0x1000
+#define CFF_CODE_PRIVATE    0x2000
+#define CFF2_CODE_TOPDICT   0x3000
+#define CFF2_CODE_FONTDICT  0x4000
+#define CFF2_CODE_PRIVATE   0x5000
 
 
   typedef struct  CFF_ParserRec_
@@ -41,8 +56,9 @@ FT_BEGIN_HEADER
     FT_Byte*    limit;
     FT_Byte*    cursor;
 
-    FT_Byte*    stack[CFF_MAX_STACK_DEPTH + 1];
+    FT_Byte**   stack;
     FT_Byte**   top;
+    FT_UInt     stackSize;  /* allocated size */
 
     FT_UInt     object_code;
     void*       object;
@@ -53,14 +69,22 @@ FT_BEGIN_HEADER
   } CFF_ParserRec, *CFF_Parser;
 
 
-  FT_LOCAL( void )
+  FT_LOCAL( FT_Long )
+  cff_parse_num( CFF_Parser  parser,
+                 FT_Byte**   d );
+
+  FT_LOCAL( FT_Error )
   cff_parser_init( CFF_Parser  parser,
                    FT_UInt     code,
                    void*       object,
                    FT_Library  library,
+                   FT_UInt     stackSize,
                    FT_UShort   num_designs,
                    FT_UShort   num_axes );
 
+  FT_LOCAL( void )
+  cff_parser_done( CFF_Parser  parser );
+
   FT_LOCAL( FT_Error )
   cff_parser_run( CFF_Parser  parser,
                   FT_Byte*    start,
@@ -77,6 +101,7 @@ FT_BEGIN_HEADER
     cff_kind_bool,
     cff_kind_delta,
     cff_kind_callback,
+    cff_kind_blend,
 
     cff_kind_max  /* do not remove */
   };
index a0bc34f..4e9ba12 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for cff module.      */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index bed6b35..5db39cd 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for cff module.      */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -32,6 +32,8 @@
 #define CFF_SERVICE_CID_INFO_GET         cff_service_cid_info
 #define CFF_SERVICE_PROPERTIES_GET       cff_service_properties
 #define CFF_SERVICES_GET                 cff_services
+#define CFF_SERVICE_MULTI_MASTERS_GET    cff_service_multi_masters
+#define CFF_SERVICE_METRICS_VAR_GET      cff_service_metrics_variations
 #define CFF_CMAP_ENCODING_CLASS_REC_GET  cff_cmap_encoding_class_rec
 #define CFF_CMAP_UNICODE_CLASS_REC_GET   cff_cmap_unicode_class_rec
 #define CFF_FIELD_HANDLERS_GET           cff_field_handlers
 #include FT_SERVICE_TT_CMAP_H
 #include FT_SERVICE_CID_H
 #include FT_SERVICE_PROPERTIES_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
 
 
 FT_BEGIN_HEADER
 
   typedef struct  CffModulePIC_
   {
-    FT_ServiceDescRec*        cff_services;
-    CFF_Field_Handler*        cff_field_handlers;
-    FT_Service_PsInfoRec      cff_service_ps_info;
-    FT_Service_GlyphDictRec   cff_service_glyph_dict;
-    FT_Service_PsFontNameRec  cff_service_ps_name;
-    FT_Service_TTCMapsRec     cff_service_get_cmap_info;
-    FT_Service_CIDRec         cff_service_cid_info;
-    FT_Service_PropertiesRec  cff_service_properties;
-    FT_CMap_ClassRec          cff_cmap_encoding_class_rec;
-    FT_CMap_ClassRec          cff_cmap_unicode_class_rec;
+    FT_ServiceDescRec*               cff_services;
+    CFF_Field_Handler*               cff_field_handlers;
+    FT_Service_PsInfoRec             cff_service_ps_info;
+    FT_Service_GlyphDictRec          cff_service_glyph_dict;
+    FT_Service_PsFontNameRec         cff_service_ps_name;
+    FT_Service_TTCMapsRec            cff_service_get_cmap_info;
+    FT_Service_CIDRec                cff_service_cid_info;
+    FT_Service_PropertiesRec         cff_service_properties;
+    FT_Service_MultiMastersRec       cff_service_multi_masters;
+    FT_Service_MetricsVariationsRec  cff_service_metrics_variations;
+    FT_CMap_ClassRec                 cff_cmap_encoding_class_rec;
+    FT_CMap_ClassRec                 cff_cmap_unicode_class_rec;
 
   } CffModulePIC;
 
@@ -82,6 +88,10 @@ FT_BEGIN_HEADER
           ( GET_PIC( library )->cff_service_properties )
 #define CFF_SERVICES_GET                       \
           ( GET_PIC( library )->cff_services )
+#define CFF_SERVICE_MULTI_MASTERS_GET                       \
+          ( GET_PIC( library )->cff_service_multi_masters )
+#define CFF_SERVICE_METRICS_VAR_GET                              \
+          ( GET_PIC( library )->cff_service_metrics_variations )
 #define CFF_CMAP_ENCODING_CLASS_REC_GET                       \
           ( GET_PIC( library )->cff_cmap_encoding_class_rec )
 #define CFF_CMAP_UNICODE_CLASS_REC_GET                       \
index 22637c7..3222e93 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CFF token definitions (specification only).                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -20,7 +20,7 @@
 #define FT_STRUCTURE  CFF_FontRecDictRec
 
 #undef  CFFCODE
-#define CFFCODE       CFFCODE_TOPDICT
+#define CFFCODE       CFF_CODE_TOPDICT
 
   CFF_FIELD_STRING  ( 0,     version,             "Version" )
   CFF_FIELD_STRING  ( 1,     notice,              "Notice" )
@@ -78,7 +78,7 @@
 #undef  FT_STRUCTURE
 #define FT_STRUCTURE  CFF_PrivateRec
 #undef  CFFCODE
-#define CFFCODE       CFFCODE_PRIVATE
+#define CFFCODE       CFF_CODE_PRIVATE
 
   CFF_FIELD_DELTA     ( 6,     blue_values, 14,        "BlueValues" )
   CFF_FIELD_DELTA     ( 7,     other_blues, 10,        "OtherBlues" )
   CFF_FIELD_NUM       ( 21,    nominal_width,          "nominalWidthX" )
 
 
+#undef  FT_STRUCTURE
+#define FT_STRUCTURE  CFF_FontRecDictRec
+#undef  CFFCODE
+#define CFFCODE       CFF2_CODE_TOPDICT
+
+  CFF_FIELD_CALLBACK( 0x107, font_matrix,          "FontMatrix" )
+  CFF_FIELD_NUM     ( 17,    charstrings_offset,   "CharStrings" )
+  CFF_FIELD_NUM     ( 0x124, cid_fd_array_offset,  "FDArray" )
+  CFF_FIELD_NUM     ( 0x125, cid_fd_select_offset, "FDSelect" )
+  CFF_FIELD_NUM     ( 24,    vstore_offset,        "vstore" )
+  CFF_FIELD_CALLBACK( 25,    maxstack,             "maxstack" )
+
+
+#undef  FT_STRUCTURE
+#define FT_STRUCTURE  CFF_FontRecDictRec
+#undef  CFFCODE
+#define CFFCODE       CFF2_CODE_FONTDICT
+
+  CFF_FIELD_CALLBACK( 18,    private_dict, "Private" )
+  CFF_FIELD_CALLBACK( 0x107, font_matrix,  "FontMatrix" )
+
+
+#undef  FT_STRUCTURE
+#define FT_STRUCTURE  CFF_PrivateRec
+#undef  CFFCODE
+#define CFFCODE       CFF2_CODE_PRIVATE
+
+  CFF_FIELD_DELTA     ( 6,     blue_values, 14,        "BlueValues" )
+  CFF_FIELD_DELTA     ( 7,     other_blues, 10,        "OtherBlues" )
+  CFF_FIELD_DELTA     ( 8,     family_blues, 14,       "FamilyBlues" )
+  CFF_FIELD_DELTA     ( 9,     family_other_blues, 10, "FamilyOtherBlues" )
+  CFF_FIELD_FIXED_1000( 0x109, blue_scale,             "BlueScale" )
+  CFF_FIELD_NUM       ( 0x10A, blue_shift,             "BlueShift" )
+  CFF_FIELD_NUM       ( 0x10B, blue_fuzz,              "BlueFuzz" )
+  CFF_FIELD_NUM       ( 10,    standard_width,         "StdHW" )
+  CFF_FIELD_NUM       ( 11,    standard_height,        "StdVW" )
+  CFF_FIELD_DELTA     ( 0x10C, snap_widths, 13,        "StemSnapH" )
+  CFF_FIELD_DELTA     ( 0x10D, snap_heights, 13,       "StemSnapV" )
+  CFF_FIELD_NUM       ( 0x111, language_group,         "LanguageGroup" )
+  CFF_FIELD_FIXED     ( 0x112, expansion_factor,       "ExpansionFactor" )
+  CFF_FIELD_CALLBACK  ( 22,    vsindex,                "vsindex" )
+  CFF_FIELD_BLEND     ( 23,                            "blend" )
+  CFF_FIELD_NUM       ( 19,    local_subrs_offset,     "Subrs" )
+
+
 /* END */
index 4426c7e..74f569f 100644 (file)
@@ -5,7 +5,7 @@
 /*    Basic OpenType/CFF type definitions and interface (specification     */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -64,6 +64,7 @@ FT_BEGIN_HEADER
   {
     FT_Stream  stream;
     FT_ULong   start;
+    FT_UInt    hdr_size;
     FT_UInt    count;
     FT_Byte    off_size;
     FT_ULong   data_offset;
@@ -102,6 +103,79 @@ FT_BEGIN_HEADER
   } CFF_CharsetRec, *CFF_Charset;
 
 
+  /* cf. similar fields in file `ttgxvar.h' from the `truetype' module */
+
+  typedef struct  CFF_VarData_
+  {
+#if 0
+    FT_UInt  itemCount;       /* not used; always zero */
+    FT_UInt  shortDeltaCount; /* not used; always zero */
+#endif
+
+    FT_UInt   regionIdxCount; /* number of region indexes           */
+    FT_UInt*  regionIndices;  /* array of `regionIdxCount' indices; */
+                              /* these index `varRegionList'        */
+  } CFF_VarData;
+
+
+  /* contribution of one axis to a region */
+  typedef struct  CFF_AxisCoords_
+  {
+    FT_Fixed  startCoord;
+    FT_Fixed  peakCoord;      /* zero peak means no effect (factor = 1) */
+    FT_Fixed  endCoord;
+
+  } CFF_AxisCoords;
+
+
+  typedef struct  CFF_VarRegion_
+  {
+    CFF_AxisCoords*  axisList;      /* array of axisCount records */
+
+  } CFF_VarRegion;
+
+
+  typedef struct  CFF_VStoreRec_
+  {
+    FT_UInt         dataCount;
+    CFF_VarData*    varData;        /* array of dataCount records      */
+                                    /* vsindex indexes this array      */
+    FT_UShort       axisCount;
+    FT_UInt         regionCount;    /* total number of regions defined */
+    CFF_VarRegion*  varRegionList;
+
+  } CFF_VStoreRec, *CFF_VStore;
+
+
+  /* forward reference */
+  typedef struct CFF_FontRec_*  CFF_Font;
+
+
+  /* This object manages one cached blend vector.                  */
+  /*                                                               */
+  /* There is a BlendRec for Private DICT parsing in each subfont  */
+  /* and a BlendRec for charstrings in CF2_Font instance data.     */
+  /* A cached BV may be used across DICTs or Charstrings if inputs */
+  /* have not changed.                                             */
+  /*                                                               */
+  /* `usedBV' is reset at the start of each parse or charstring.   */
+  /* vsindex cannot be changed after a BV is used.                 */
+  /*                                                               */
+  /* Note: NDV is long (32/64 bit), while BV is 16.16 (FT_Int32).  */
+  typedef struct  CFF_BlendRec_
+  {
+    FT_Bool    builtBV;        /* blendV has been built           */
+    FT_Bool    usedBV;         /* blendV has been used            */
+    CFF_Font   font;           /* top level font struct           */
+    FT_UInt    lastVsindex;    /* last vsindex used               */
+    FT_UInt    lenNDV;         /* normDV length (aka numAxes)     */
+    FT_Fixed*  lastNDV;        /* last NDV used                   */
+    FT_UInt    lenBV;          /* BlendV length (aka numMasters)  */
+    FT_Int32*  BV;             /* current blendV (per DICT/glyph) */
+
+  } CFF_BlendRec, *CFF_Blend;
+
+
   typedef struct  CFF_FontRecDictRec_
   {
     FT_UInt    version;
@@ -151,9 +225,17 @@ FT_BEGIN_HEADER
     FT_UShort  num_designs;
     FT_UShort  num_axes;
 
+    /* fields for CFF2 */
+    FT_ULong   vstore_offset;
+    FT_UInt    maxstack;
+
   } CFF_FontRecDictRec, *CFF_FontRecDict;
 
 
+  /* forward reference */
+  typedef struct CFF_SubFontRec_*  CFF_SubFont;
+
+
   typedef struct  CFF_PrivateRec_
   {
     FT_Byte   num_blue_values;
@@ -186,6 +268,10 @@ FT_BEGIN_HEADER
     FT_Pos    default_width;
     FT_Pos    nominal_width;
 
+    /* fields for CFF2 */
+    FT_UInt      vsindex;
+    CFF_SubFont  subfont;
+
   } CFF_PrivateRec, *CFF_Private;
 
 
@@ -213,10 +299,31 @@ FT_BEGIN_HEADER
     CFF_FontRecDictRec  font_dict;
     CFF_PrivateRec      private_dict;
 
-    CFF_IndexRec        local_subrs_index;
-    FT_Byte**           local_subrs; /* array of pointers into Local Subrs INDEX data */
+    /* fields for CFF2 */
+    CFF_BlendRec  blend;      /* current blend vector       */
+    FT_UInt       lenNDV;     /* current length NDV or zero */
+    FT_Fixed*     NDV;        /* ptr to current NDV or NULL */
+
+    /* `blend_stack' is a writable buffer to hold blend results.          */
+    /* This buffer is to the side of the normal cff parser stack;         */
+    /* `cff_parse_blend' and `cff_blend_doBlend' push blend results here. */
+    /* The normal stack then points to these values instead of the DICT   */
+    /* because all other operators in Private DICT clear the stack.       */
+    /* `blend_stack' could be cleared at each operator other than blend.  */
+    /* Blended values are stored as 5-byte fixed point values.            */
+
+    FT_Byte*  blend_stack;    /* base of stack allocation     */
+    FT_Byte*  blend_top;      /* first empty slot             */
+    FT_UInt   blend_used;     /* number of bytes in use       */
+    FT_UInt   blend_alloc;    /* number of bytes allocated    */
+
+    CFF_IndexRec  local_subrs_index;
+    FT_Byte**     local_subrs; /* array of pointers           */
+                               /* into Local Subrs INDEX data */
 
-  } CFF_SubFontRec, *CFF_SubFont;
+    FT_UInt32  random;
+
+  } CFF_SubFontRec;
 
 
 #define CFF_MAX_CID_FONTS  256
@@ -224,16 +331,20 @@ FT_BEGIN_HEADER
 
   typedef struct  CFF_FontRec_
   {
+    FT_Library       library;
     FT_Stream        stream;
-    FT_Memory        memory;
+    FT_Memory        memory;        /* TODO: take this from stream->memory? */
+    FT_ULong         base_offset;   /* offset to start of CFF */
     FT_UInt          num_faces;
     FT_UInt          num_glyphs;
 
     FT_Byte          version_major;
     FT_Byte          version_minor;
     FT_Byte          header_size;
-    FT_Byte          absolute_offsize;
 
+    FT_UInt          top_dict_length;   /* cff2 only */
+
+    FT_Bool          cff2;
 
     CFF_IndexRec     name_index;
     CFF_IndexRec     top_dict_index;
@@ -280,7 +391,10 @@ FT_BEGIN_HEADER
     /* since version 2.4.12 */
     FT_Generic       cf2_instance;
 
-  } CFF_FontRec, *CFF_Font;
+    /* since version 2.7.1 */
+    CFF_VStoreRec    vstore;        /* parsed vstore structure */
+
+  } CFF_FontRec;
 
 
 FT_END_HEADER
index 1b4781a..2975aee 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 92f68b1..86840bf 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 4b4eea1..8d3ba6a 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/cid Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 1dc98c7..709dc8c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID error codes (specification only).                                */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c7b9559..b96c333 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID-keyed Type1 Glyph Loader (body).                                 */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 62d664b..7f816b5 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType Glyph Loader (specification).                               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d4f1ad1..ff07221 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID-keyed Type1 font loader (body).                                  */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
       FT_Byte*      p;
 
 
+      if ( !num_subrs )
+        continue;
+
       /* reallocate offsets array if needed */
       if ( num_subrs + 1 > max_offsets )
       {
   {
     FT_UNUSED( face );
 
-    FT_MEM_ZERO( loader, sizeof ( *loader ) );
+    FT_ZERO( loader );
   }
 
 
       }
 
       /* we must convert the data section from hexadecimal to binary */
-      if ( FT_ALLOC( face->binary_data, parser->binary_length )         ||
-           cid_hex_to_binary( face->binary_data, parser->binary_length,
-                              parser->data_offset, face )               )
+      if ( FT_ALLOC( face->binary_data, parser->binary_length )    ||
+           FT_SET_ERROR( cid_hex_to_binary( face->binary_data,
+                                            parser->binary_length,
+                                            parser->data_offset,
+                                            face ) )               )
         goto Exit;
 
       FT_Stream_OpenMemory( face->cid_stream,
       CID_FaceDict  dict = cid->font_dicts + n;
 
 
-      if ( dict->sd_bytes < 0 )
+      if ( dict->sd_bytes < 0                        ||
+           ( dict->num_subrs && dict->sd_bytes < 1 ) )
       {
         FT_ERROR(( "cid_parse_dict: Invalid `SDBytes' value\n" ));
         error = FT_THROW( Invalid_File_Format );
index 680f0d8..45a0e6d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID-keyed Type1 font loader (specification).                         */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 2d2600f..ceda8ff 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID objects manager (body).                                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     CID_Size  size = (CID_Size)cidsize;
 
 
-    if ( cidsize->internal )
+    if ( cidsize->internal->module_data )
     {
       PSH_Globals_Funcs  funcs;
 
 
       funcs = cid_size_get_globals_funcs( size );
       if ( funcs )
-        funcs->destroy( (PSH_Globals)cidsize->internal );
+        funcs->destroy( (PSH_Globals)cidsize->internal->module_data );
 
-      cidsize->internal = NULL;
+      cidsize->internal->module_data = NULL;
     }
   }
 
 
       error = funcs->create( cidsize->face->memory, priv, &globals );
       if ( !error )
-        cidsize->internal = (FT_Size_Internal)(void*)globals;
+        cidsize->internal->module_data = globals;
     }
 
     return error;
     funcs = cid_size_get_globals_funcs( (CID_Size)size );
 
     if ( funcs )
-      funcs->set_scale( (PSH_Globals)size->internal,
+      funcs->set_scale( (PSH_Globals)size->internal->module_data,
                         size->metrics.x_scale,
                         size->metrics.y_scale,
                         0, 0 );
index 5dd377a..8bcf886 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID objects manager (specification).                                 */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 73aca2a..007609b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID-keyed Type1 parser (body).                                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -65,7 +65,7 @@
     FT_Byte   *arg1, *arg2;
 
 
-    FT_MEM_ZERO( parser, sizeof ( *parser ) );
+    FT_ZERO( parser );
     psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory );
 
     parser->stream = stream;
                ft_strncmp( (char*)p, STARTDATA, STARTDATA_LEN ) == 0 )
           {
             /* save offset of binary data after `StartData' */
-            offset += (FT_ULong)( p - buffer ) + STARTDATA_LEN;
+            offset += (FT_ULong)( p - buffer ) + STARTDATA_LEN + 1;
             goto Found;
           }
           else if ( p[1] == 's'                                   &&
                     ft_strncmp( (char*)p, SFNTS, SFNTS_LEN ) == 0 )
           {
-            offset += (FT_ULong)( p - buffer ) + SFNTS_LEN;
+            offset += (FT_ULong)( p - buffer ) + SFNTS_LEN + 1;
             goto Found;
           }
         }
     limit = parser->root.limit;
     cur   = parser->root.cursor;
 
-    while ( cur < limit - SFNTS_LEN )
+    while ( cur <= limit - SFNTS_LEN )
     {
       if ( parser->root.error )
       {
       }
 
       if ( cur[0] == 'S'                                           &&
-           cur < limit - STARTDATA_LEN                             &&
+           cur <= limit - STARTDATA_LEN                            &&
            ft_strncmp( (char*)cur, STARTDATA, STARTDATA_LEN ) == 0 )
       {
         if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 )
         {
-          FT_Long  tmp = ft_atol( (const char *)arg2 );
+          FT_Long  tmp = ft_strtol( (const char *)arg2, NULL, 10 );
 
 
           if ( tmp < 0 )
index 7268dc6..20bebb9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID-keyed Type1 parser (specification).                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 64141ab..bb611a9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID driver interface (body).                                         */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
       0x10000L,  /* version 1.0 of driver */
       0x20000L,  /* requires FreeType 2.0 */
 
-      0,    /* module-specific interface */
+      NULL,    /* module-specific interface */
 
       cid_driver_init,          /* FT_Module_Constructor  module_init   */
       cid_driver_done,          /* FT_Module_Destructor   module_done   */
 
     cid_slot_load_glyph,        /* FT_Slot_LoadFunc  load_glyph */
 
-    0,                          /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
-    0,                          /* FT_Face_GetAdvancesFunc  get_advances */
+    NULL,                       /* FT_Face_GetKerningFunc   get_kerning  */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_GetAdvancesFunc  get_advances */
 
     cid_size_request,           /* FT_Size_RequestFunc  request_size */
-    0                           /* FT_Size_SelectFunc   select_size  */
+    NULL                        /* FT_Size_SelectFunc   select_size  */
   };
 
 
index a359a78..76640c5 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level CID driver interface (specification).                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 9c773fd..653cc55 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID token definitions (specification only).                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d9585d7..b30b867 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index f33aab0..fcddd92 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index de3bdf7..93e6f81 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType OpenType driver component (body only).                      */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "cidparse.c"
+
+#include "cidgload.c"
 #include "cidload.c"
 #include "cidobjs.c"
+#include "cidparse.c"
 #include "cidriver.c"
-#include "cidgload.c"
 
 
 /* END */
index 9738677..a120128 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/gxvalid Jamfile
 #
-# Copyright 2005-2016 by
+# Copyright 2005-2017 by
 # suzuki toshiya, Masatake YAMATO and Red Hat K.K.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index d3ac49c..7201459 100644 (file)
@@ -413,7 +413,7 @@ gxvalid: TrueType GX validator
       format  assured for  Windows  and OS/2  support  is only  subtable
       format  0.  The  Microsoft TrueType  specification  also describes
       subtable format  2, but does  not mention which  platforms support
-      it.  Aubtable formats 1, 3,  and higher are documented as reserved
+      it.  Subtable formats 1, 3,  and higher are documented as reserved
       for future use.  Therefore, the classic version can store subtable
       formats 0 and 2, at least.  `ttfdump.exe', a font tool provided by
       Microsoft,  ignores the  subtable format  written in  the subtable
@@ -518,7 +518,7 @@ gxvalid: TrueType GX validator
 
 ------------------------------------------------------------------------
 
-Copyright 2004-2016 by
+Copyright 2004-2017 by
 suzuki toshiya, Masatake YAMATO, Red hat K.K.,
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
index 7fb868c..da48514 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType validator for TrueTypeGX/AAT tables (body only).            */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*                                                                         */
 /***************************************************************************/
 
-#define FT_MAKE_OPTION_SINGLE_OBJECT
 
+#define FT_MAKE_OPTION_SINGLE_OBJECT
 #include <ft2build.h>
 
-#include "gxvfeat.c"
-#include "gxvcommn.c"
 #include "gxvbsln.c"
-#include "gxvtrak.c"
+#include "gxvcommn.c"
+#include "gxvfeat.c"
 #include "gxvjust.c"
+#include "gxvkern.c"
+#include "gxvlcar.c"
+#include "gxvmod.c"
 #include "gxvmort.c"
 #include "gxvmort0.c"
 #include "gxvmort1.c"
 #include "gxvmorx2.c"
 #include "gxvmorx4.c"
 #include "gxvmorx5.c"
-#include "gxvkern.c"
 #include "gxvopbd.c"
 #include "gxvprop.c"
-#include "gxvlcar.c"
-#include "gxvmod.c"
+#include "gxvtrak.c"
 
 
 /* END */
index 7a3ab79..78116ef 100644 (file)
@@ -2,9 +2,9 @@
 /*                                                                         */
 /*  gxvalid.h                                                              */
 /*                                                                         */
-/*    TrueTyeeGX/AAT table validation (specification only).                */
+/*    TrueTypeGX/AAT table validation (specification only).                */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 493b20c..81dff73 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT bsln table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 4b5e415..db0a91e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT common tables validation (body).                      */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
   }
 
 
-  /* ================= Segment Single Format 2 Loolup Table ============== */
+  /* ================= Segment Single Format 2 Lookup Table ============== */
   /*
    * Apple spec says:
    *
       FT_INVALID_FORMAT;
 
     func = fmt_funcs_table[format];
-    if ( func == NULL )
+    if ( !func )
       FT_INVALID_FORMAT;
 
     func( p, limit, gxvalid );
       FT_UShort  i;
 
 
-      ft_memset( nGlyphInClass, 0, 256 );
+      FT_MEM_ZERO( nGlyphInClass, 256 );
 
 
       for ( i = 0; i < nGlyphs; i++ )
         break;
       }
 
-      if ( NULL != gxvalid->statetable.entry_validate_func )
+      if ( gxvalid->statetable.entry_validate_func )
         gxvalid->statetable.entry_validate_func( state,
                                                  flags,
                                                  &glyphOffset,
     if ( stateSize > 0xFF )
       FT_INVALID_DATA;
 
-    if ( gxvalid->statetable.optdata_load_func != NULL )
+    if ( gxvalid->statetable.optdata_load_func )
       gxvalid->statetable.optdata_load_func( p, limit, gxvalid );
 
-    if ( gxvalid->statetable.subtable_setup_func != NULL)
+    if ( gxvalid->statetable.subtable_setup_func )
       setup_func = gxvalid->statetable.subtable_setup_func;
     else
       setup_func = gxv_StateTable_subtable_setup;
         goto Exit;
       }
 
-      if ( NULL != gxvalid->xstatetable.entry_validate_func )
+      if ( gxvalid->xstatetable.entry_validate_func )
         gxvalid->xstatetable.entry_validate_func( state,
                                                   flags,
                                                   &glyphOffset,
 
     GXV_TRACE(( "StateTable Subtables\n" ));
 
-    if ( gxvalid->xstatetable.optdata_load_func != NULL )
+    if ( gxvalid->xstatetable.optdata_load_func )
       gxvalid->xstatetable.optdata_load_func( p, limit, gxvalid );
 
-    if ( gxvalid->xstatetable.subtable_setup_func != NULL )
+    if ( gxvalid->xstatetable.subtable_setup_func )
       setup_func = gxvalid->xstatetable.subtable_setup_func;
     else
       setup_func = gxv_XStateTable_subtable_setup;
index 9470c84..10b1c80 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT common tables validation (specification).             */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 2e53355..80a2b8a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT validation module error codes (specification only).   */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 5bff7c2..2e3ec6f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT feat table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 284bada..8c0e847 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT feat table validation (specification).                */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 667dac3..8cc08cd 100644 (file)
@@ -5,7 +5,7 @@
 /*    Generate feature registry data for gxv `feat' validator.             */
 /*    This program is derived from gxfeatreg.c in gxlayout.                */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  Masatake YAMATO and Redhat K.K.                                        */
 /*                                                                         */
 /*  This file may only be used,                                            */
index 20d29bf..c8cfd83 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT just table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index ee1ab36..9f90373 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT kern table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index d31b641..775d522 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT lcar table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index e589a7f..84e9275 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType's TrueTypeGX/AAT validation module implementation (body).   */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
     0x10000L,
     0x20000L,
 
-    0,              /* module-specific interface */
+    NULL,              /* module-specific interface */
 
-    (FT_Module_Constructor)0,
-    (FT_Module_Destructor) 0,
-    (FT_Module_Requester)  gxvalid_get_service
+    (FT_Module_Constructor)NULL,                /* module_init   */
+    (FT_Module_Destructor) NULL,                /* module_done   */
+    (FT_Module_Requester)  gxvalid_get_service  /* get_interface */
   };
 
 
index 8b82e91..df25e60 100644 (file)
@@ -5,7 +5,7 @@
 /*    FreeType's TrueTypeGX/AAT validation module implementation           */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index b83a2b2..184a631 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT mort table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
         FT_INVALID_FORMAT;
 
       func = fmt_funcs_table[type];
-      if ( func == NULL )
+      if ( !func )
         GXV_TRACE(( "morx type %d is reserved\n", type ));
 
       func( p, p + rest, gxvalid );
index 5fd2282..d0543ad 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT common definition for mort table (specification).     */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index e11f5dd..a75fad7 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT mort table validation                                 */
 /*    body for type0 (Indic Script Rearrangement) subtable.                */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index fd761d0..361ef22 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT mort table validation                                 */
 /*    body for type1 (Contextual Substitution) subtable.                   */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 08455de..c17e51e 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT mort table validation                                 */
 /*    body for type2 (Ligature Substitution) subtable.                     */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 6f7bbb8..041bab3 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT mort table validation                                 */
 /*    body for type4 (Non-Contextual Glyph Substitution) subtable.         */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 54ddbe2..4751ece 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT mort table validation                                 */
 /*    body for type5 (Contextual Glyph Insertion) subtable.                */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index a3abe43..2bb4f3b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT morx table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
@@ -98,7 +98,7 @@
         FT_INVALID_FORMAT;
 
       func = fmt_funcs_table[type];
-      if ( func == NULL )
+      if ( !func )
         GXV_TRACE(( "morx type %d is reserved\n", type ));
 
       func( p, p + rest, gxvalid );
index 9ba25c1..20cec58 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT common definition for morx table (specification).     */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 4abb736..e0a0a92 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT morx table validation                                 */
 /*    body for type0 (Indic Script Rearrangement) subtable.                */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index e581848..9afebdb 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT morx table validation                                 */
 /*    body for type1 (Contextual Substitution) subtable.                   */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 9495cca..3a60cf6 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT morx table validation                                 */
 /*    body for type2 (Ligature Substitution) subtable.                     */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 3b7731b..2955568 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT morx table validation                                 */
 /*    body for "morx" type4 (Non-Contextual Glyph Substitution) subtable.  */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 0e96166..05c1141 100644 (file)
@@ -5,7 +5,7 @@
 /*    TrueTypeGX/AAT morx table validation                                 */
 /*    body for type5 (Contextual Glyph Insertion) subtable.                */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index e3ba082..11580d8 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT opbd table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 61b3aee..7d398b7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT prop table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index 0f07c04..dd49825 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT trak table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                         */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
index b431384..7f87e10 100644 (file)
@@ -2,7 +2,7 @@
 # FreeType 2 gxvalid module definition
 #
 
-# Copyright 2004-2016 by
+# Copyright 2004-2017 by
 # suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
index 424f2a6..10ec08c 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2004-2016 by
+# Copyright 2004-2017 by
 # suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
index ca994c3..170c13a 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/gzip Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 9cab80e..c487786 100644 (file)
@@ -8,7 +8,7 @@
 /*  parse compressed PCF fonts, as found with many X11 server              */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 #else /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */
 
/* In this case, we include our own modified sources of the ZLib    */
/* within the "ftgzip" component.  The modifications were necessary */
/* to #include all files without conflicts, as well as preventing   */
/* the definition of "extern" functions that may cause linking      */
/* conflicts when a program is linked with both FreeType and the    */
/* original ZLib.                                                   */
 /* In this case, we include our own modified sources of the ZLib  */
 /* within the `gzip' component.  The modifications were necessary */
 /* to #include all files without conflicts, as well as preventing */
 /* the definition of `extern' functions that may cause linking    */
 /* conflicts when a program is linked with both FreeType and the  */
 /* original ZLib.                                                 */
 
 #ifndef USE_ZLIB_ZCALLOC
 #define MY_ZCALLOC /* prevent all zcalloc() & zfree() in zutil.c */
 #endif
 
+  /* Note that our `zlib.h' includes `ftzconf.h' instead of `zconf.h'; */
+  /* the main reason is that even a global `zlib.h' includes `zconf.h' */
+  /* with                                                              */
+  /*                                                                   */
+  /*   #include "zconf.h"                                              */
+  /*                                                                   */
+  /* instead of the expected                                           */
+  /*                                                                   */
+  /*   #include <zconf.h>                                              */
+  /*                                                                   */
+  /* so that configuration with `FT_CONFIG_OPTION_SYSTEM_ZLIB' might   */
+  /* include the wrong `zconf.h' file, leading to errors.              */
 #include "zlib.h"
 
 #undef  SLOW
     zstream->next_in  = zip->buffer;
 
     if ( inflateInit2( zstream, -MAX_WBITS ) != Z_OK ||
-         zstream->next_in == NULL                     )
+         !zstream->next_in                           )
       error = FT_THROW( Invalid_File_Format );
 
   Exit:
similarity index 100%
rename from src/gzip/zconf.h
rename to src/gzip/ftzconf.h
index b0c9056..bc7d5fa 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -34,12 +34,13 @@ endif
 
 # gzip support sources
 #
-# All source and header files get loaded by `ftgzip.c' only if SYTEM_ZLIB is
-# not defined (regardless whether we have a `single' or a `multi' build).
+# All source and header files get loaded by `ftgzip.c' only if SYSTEM_ZLIB
+# is not defined (regardless whether we have a `single' or a `multi' build).
 # However, it doesn't harm if we add everything as a dependency
 # unconditionally.
 #
 GZIP_DRV_SRCS := $(GZIP_DIR)/adler32.c  \
+                 $(GZIP_DIR)/ftzconf.h  \
                  $(GZIP_DIR)/infblock.c \
                  $(GZIP_DIR)/infblock.h \
                  $(GZIP_DIR)/infcodes.c \
@@ -50,7 +51,6 @@ GZIP_DRV_SRCS := $(GZIP_DIR)/adler32.c  \
                  $(GZIP_DIR)/inftrees.h \
                  $(GZIP_DIR)/infutil.c  \
                  $(GZIP_DIR)/infutil.h  \
-                 $(GZIP_DIR)/zconf.h    \
                  $(GZIP_DIR)/zlib.h     \
                  $(GZIP_DIR)/zutil.c    \
                  $(GZIP_DIR)/zutil.h
index d361ff4..a4e82c6 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef _ZLIB_H
 #define _ZLIB_H
 
-#include "zconf.h"
+#include "ftzconf.h"
 
 #ifdef __cplusplus
 extern "C" {
index b7ec3b1..8e61f08 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/lzw Jamfile
 #
-# Copyright 2004-2016 by
+# Copyright 2004-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 6f5f897..941f6ce 100644 (file)
@@ -8,7 +8,7 @@
 /*  be used to parse compressed PCF fonts, as found with many X11 server   */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  Albert Chin-A-Young.                                                   */
 /*                                                                         */
 /*  based on code in `src/gzip/ftgzip.c'                                   */
index e17b3c5..486c546 100644 (file)
@@ -8,7 +8,7 @@
 /*  be used to parse compressed PCF fonts, as found with many X11 server   */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  David Turner.                                                          */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     state->buf_total += count;
     state->in_eof     = FT_BOOL( count < state->num_bits );
     state->buf_offset = 0;
-    state->buf_size   = ( state->buf_size << 3 ) - ( state->num_bits - 1 );
+
+    state->buf_size <<= 3;
+    if ( state->buf_size > state->num_bits )
+      state->buf_size -= state->num_bits - 1;
+    else
+      return -1; /* not enough data */
 
     if ( count == 0 )  /* end of file */
       return -1;
     {
       if ( state->free_ent >= state->free_bits )
       {
-        state->num_bits  = ++num_bits;
+        state->num_bits = ++num_bits;
+        if ( num_bits > LZW_MAX_BITS )
+          return -1;
+
         state->free_bits = state->num_bits < state->max_bits
                            ? (FT_UInt)( ( 1UL << num_bits ) - 256 )
                            : state->max_free + 1;
       {
         while ( state->stack_top > 0 )
         {
-          --state->stack_top;
+          state->stack_top--;
 
           if ( buffer )
             buffer[result] = state->stack[state->stack_top];
index 1c38f1a..a108862 100644 (file)
@@ -8,7 +8,7 @@
 /*  be used to parse compressed PCF fonts, as found with many X11 server   */
 /*  distributions.                                                         */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  David Turner.                                                          */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 13e41b9..e7bf68a 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2004-2016 by
+# Copyright 2004-2017 by
 # Albert Chin-A-Young.
 #
 # based on `src/lzw/rules.mk'
index eded89a..a755f2b 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/otvalid Jamfile
 #
-# Copyright 2004-2016 by
+# Copyright 2004-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index b929cdb..5ee1265 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2004-2016 by
+# Copyright 2004-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 932a974..312751a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType validator for OpenType tables (body only).                  */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -15,8 +15,8 @@
 /*                                                                         */
 /***************************************************************************/
 
-#define FT_MAKE_OPTION_SINGLE_OBJECT
 
+#define FT_MAKE_OPTION_SINGLE_OBJECT
 #include <ft2build.h>
 
 #include "otvbase.c"
@@ -28,4 +28,5 @@
 #include "otvmath.c"
 #include "otvmod.c"
 
+
 /* END */
index 93438a0..f2969cc 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType table validation (specification only).                      */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e86e8bb..3adad84 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType BASE table validation (body).                               */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 2e88e10..3407d2a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType common tables validation (body).                            */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -68,7 +68,7 @@
 
         OTV_LIMIT_CHECK( GlyphCount * 2 );        /* GlyphArray */
 
-        for ( i = 0; i < GlyphCount; ++i )
+        for ( i = 0; i < GlyphCount; i++ )
         {
           FT_UInt  gid;
 
index 44e0c63..10a603e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType common tables validation (specification).                   */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e7c8db0..6999039 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType validation module error codes (specification only).         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f19e300..27b9a69 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType GDEF table validation (body).                               */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e904ea5..0fbcc20 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType GPOS table validation (body).                               */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 2c09e64..99b0ad3 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType GPOS table validator (specification).                       */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c2b2856..f9bd8dc 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType GSUB table validation (body).                               */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e19c1c1..57a38f9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType JSTF table validation (body).                               */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 6c785b6..a14d369 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType MATH table validation (body).                               */
 /*                                                                         */
-/*  Copyright 2007-2016 by                                                 */
+/*  Copyright 2007-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  Written by George Williams.                                            */
@@ -60,7 +60,7 @@
     table_size = 2 * ( 56 + 51 );
 
     p += 4 * 2;                 /* First 4 constants have no device tables */
-    for ( i = 0; i < 51; ++i )
+    for ( i = 0; i < 51; i++ )
     {
       p += 2;                                            /* skip the value */
       OTV_OPTIONAL_OFFSET( DeviceTableOffset );
     OTV_SIZE_CHECK( Coverage );
     otv_Coverage_validate( table + Coverage, otvalid, (FT_Int)cnt );
 
-    for ( i = 0; i < cnt; ++i )
+    for ( i = 0; i < cnt; i++ )
     {
       p += 2;                                            /* Skip the value */
       OTV_OPTIONAL_OFFSET( DeviceTableOffset );
     table_size = 4 + 4 * cnt;
 
     /* Heights */
-    for ( i = 0; i < cnt; ++i )
+    for ( i = 0; i < cnt; i++ )
     {
       p += 2;                                            /* Skip the value */
       OTV_OPTIONAL_OFFSET( DeviceTableOffset );
     }
 
     /* One more Kerning value */
-    for ( i = 0; i < cnt + 1; ++i )
+    for ( i = 0; i < cnt + 1; i++ )
     {
       p += 2;                                            /* Skip the value */
       OTV_OPTIONAL_OFFSET( DeviceTableOffset );
     OTV_SIZE_CHECK( Coverage );
     otv_Coverage_validate( table + Coverage, otvalid, (FT_Int)cnt );
 
-    for ( i = 0; i < cnt; ++i )
+    for ( i = 0; i < cnt; i++ )
     {
-      for ( j = 0; j < 4; ++j )
+      for ( j = 0; j < 4; j++ )
       {
         OTV_OPTIONAL_OFFSET( MKRecordOffset );
         OTV_SIZE_CHECK( MKRecordOffset );
     if ( DeviceTableOffset )
       otv_Device_validate( table + DeviceTableOffset, otvalid );
 
-    for ( i = 0; i < pcnt; ++i )
+    for ( i = 0; i < pcnt; i++ )
     {
       FT_UInt  gid;
 
     OTV_LIMIT_CHECK( 4 * vcnt );
     table_size = 4 + 4 * vcnt;
 
-    for ( i = 0; i < vcnt; ++i )
+    for ( i = 0; i < vcnt; i++ )
     {
       FT_UInt  gid;
 
     if ( HCoverage )
       otv_Coverage_validate( table + HCoverage, otvalid, (FT_Int)hcnt );
 
-    for ( i = 0; i < vcnt; ++i )
+    for ( i = 0; i < vcnt; i++ )
     {
       OTV_OPTIONAL_OFFSET( Offset );
       OTV_SIZE_CHECK( Offset );
       otv_MathGlyphConstruction_validate( table + Offset, otvalid );
     }
 
-    for ( i = 0; i < hcnt; ++i )
+    for ( i = 0; i < hcnt; i++ )
     {
       OTV_OPTIONAL_OFFSET( Offset );
       OTV_SIZE_CHECK( Offset );
index 972bd1b..35ffc43 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType's OpenType validation module implementation (body).         */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     0x10000L,
     0x20000L,
 
-    0,              /* module-specific interface */
+    NULL,              /* module-specific interface */
 
-    (FT_Module_Constructor)0,
-    (FT_Module_Destructor) 0,
-    (FT_Module_Requester)  otvalid_get_service
+    (FT_Module_Constructor)NULL,                /* module_init   */
+    (FT_Module_Destructor) NULL,                /* module_done   */
+    (FT_Module_Requester)  otvalid_get_service  /* get_interface */
   };
 
 
index e464030..30d401d 100644 (file)
@@ -5,7 +5,7 @@
 /*    FreeType's OpenType validation module implementation                 */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 077447f..10329a9 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2004-2016 by
+# Copyright 2004-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 9ebe6a2..794f27d 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/pcf Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 11d5b7b..8ffd6e2 100644 (file)
@@ -26,11 +26,11 @@ THE SOFTWARE.
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
-
 #include <ft2build.h>
-#include "pcfutil.c"
-#include "pcfread.c"
+
 #include "pcfdrivr.c"
+#include "pcfread.c"
+#include "pcfutil.c"
+
 
 /* END */
index c726e5e..f0390cb 100644 (file)
@@ -163,6 +163,15 @@ FT_BEGIN_HEADER
   } PCF_FaceRec, *PCF_Face;
 
 
+  typedef struct  PCF_DriverRec_
+  {
+    FT_DriverRec  root;
+
+    FT_Bool  no_long_family_names;
+
+  } PCF_DriverRec, *PCF_Driver;
+
+
   /* macros for pcf font format */
 
 #define LSBFirst  0
index 0996d10..9f4d36d 100644 (file)
@@ -49,6 +49,8 @@ THE SOFTWARE.
 
 #include FT_SERVICE_BDF_H
 #include FT_SERVICE_FONT_FORMAT_H
+#include FT_SERVICE_PROPERTIES_H
+#include FT_PCF_DRIVER_H
 
 
   /*************************************************************************/
@@ -286,6 +288,7 @@ THE SOFTWARE.
 
 
         /* this didn't work, try gzip support! */
+        FT_TRACE2(( "  ... try gzip stream\n" ));
         error2 = FT_Stream_OpenGzip( &face->comp_stream, stream );
         if ( FT_ERR_EQ( error2, Unimplemented_Feature ) )
           goto Fail;
@@ -301,6 +304,7 @@ THE SOFTWARE.
 
 
         /* this didn't work, try LZW support! */
+        FT_TRACE2(( "  ... try LZW stream\n" ));
         error3 = FT_Stream_OpenLZW( &face->comp_stream, stream );
         if ( FT_ERR_EQ( error3, Unimplemented_Feature ) )
           goto Fail;
@@ -316,6 +320,7 @@ THE SOFTWARE.
 
 
         /* this didn't work, try Bzip2 support! */
+        FT_TRACE2(( "  ... try Bzip2 stream\n" ));
         error4 = FT_Stream_OpenBzip2( &face->comp_stream, stream );
         if ( FT_ERR_EQ( error4, Unimplemented_Feature ) )
           goto Fail;
@@ -492,8 +497,6 @@ THE SOFTWARE.
     PCF_Metric  metric;
     FT_ULong    bytes;
 
-    FT_UNUSED( load_flags );
-
 
     FT_TRACE1(( "PCF_Glyph_Load: glyph index %d\n", glyph_index ));
 
@@ -523,11 +526,6 @@ THE SOFTWARE.
     bitmap->num_grays  = 1;
     bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
 
-    FT_TRACE6(( "BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n",
-                  PCF_BIT_ORDER( face->bitmapsFormat ),
-                  PCF_BYTE_ORDER( face->bitmapsFormat ),
-                  PCF_GLYPH_PAD( face->bitmapsFormat ) ));
-
     switch ( PCF_GLYPH_PAD( face->bitmapsFormat ) )
     {
     case 1:
@@ -550,6 +548,24 @@ THE SOFTWARE.
       return FT_THROW( Invalid_File_Format );
     }
 
+    slot->format      = FT_GLYPH_FORMAT_BITMAP;
+    slot->bitmap_left = metric->leftSideBearing;
+    slot->bitmap_top  = metric->ascent;
+
+    slot->metrics.horiAdvance  = (FT_Pos)( metric->characterWidth * 64 );
+    slot->metrics.horiBearingX = (FT_Pos)( metric->leftSideBearing * 64 );
+    slot->metrics.horiBearingY = (FT_Pos)( metric->ascent * 64 );
+    slot->metrics.width        = (FT_Pos)( ( metric->rightSideBearing -
+                                             metric->leftSideBearing ) * 64 );
+    slot->metrics.height       = (FT_Pos)( bitmap->rows * 64 );
+
+    ft_synthesize_vertical_metrics( &slot->metrics,
+                                    ( face->accel.fontAscent +
+                                      face->accel.fontDescent ) * 64 );
+
+    if ( load_flags & FT_LOAD_BITMAP_METRICS_ONLY )
+      goto Exit;
+
     /* XXX: to do: are there cases that need repadding the bitmap? */
     bytes = (FT_ULong)bitmap->pitch * bitmap->rows;
 
@@ -582,21 +598,6 @@ THE SOFTWARE.
       }
     }
 
-    slot->format      = FT_GLYPH_FORMAT_BITMAP;
-    slot->bitmap_left = metric->leftSideBearing;
-    slot->bitmap_top  = metric->ascent;
-
-    slot->metrics.horiAdvance  = (FT_Pos)( metric->characterWidth * 64 );
-    slot->metrics.horiBearingX = (FT_Pos)( metric->leftSideBearing * 64 );
-    slot->metrics.horiBearingY = (FT_Pos)( metric->ascent * 64 );
-    slot->metrics.width        = (FT_Pos)( ( metric->rightSideBearing -
-                                             metric->leftSideBearing ) * 64 );
-    slot->metrics.height       = (FT_Pos)( bitmap->rows * 64 );
-
-    ft_synthesize_vertical_metrics( &slot->metrics,
-                                    ( face->accel.fontAscent +
-                                      face->accel.fontDescent ) * 64 );
-
   Exit:
     return error;
   }
@@ -617,7 +618,7 @@ THE SOFTWARE.
 
 
     prop = pcf_find_property( face, prop_name );
-    if ( prop != NULL )
+    if ( prop )
     {
       if ( prop->isString )
       {
@@ -626,19 +627,23 @@ THE SOFTWARE.
       }
       else
       {
-        if ( prop->value.l > 0x7FFFFFFFL || prop->value.l < ( -1 - 0x7FFFFFFFL ) )
+        if ( prop->value.l > 0x7FFFFFFFL          ||
+             prop->value.l < ( -1 - 0x7FFFFFFFL ) )
         {
-          FT_TRACE1(( "pcf_get_bdf_property: " ));
-          FT_TRACE1(( "too large integer 0x%x is truncated\n" ));
+          FT_TRACE1(( "pcf_get_bdf_property:" ));
+          FT_TRACE1(( " too large integer 0x%x is truncated\n" ));
         }
-        /* Apparently, the PCF driver loads all properties as signed integers!
-         * This really doesn't seem to be a problem, because this is
-         * sufficient for any meaningful values.
+
+        /*
+         *  The PCF driver loads all properties as signed integers.
+         *  This really doesn't seem to be a problem, because this is
+         *  sufficient for any meaningful values.
          */
         aproperty->type      = BDF_PROPERTY_TYPE_INTEGER;
         aproperty->u.integer = (FT_Int32)prop->value.l;
       }
-      return 0;
+
+      return FT_Err_Ok;
     }
 
     return FT_THROW( Invalid_Argument );
@@ -653,7 +658,7 @@ THE SOFTWARE.
     *acharset_encoding = face->charset_encoding;
     *acharset_registry = face->charset_registry;
 
-    return 0;
+    return FT_Err_Ok;
   }
 
 
@@ -664,6 +669,116 @@ THE SOFTWARE.
   };
 
 
+  /*
+   *  PROPERTY SERVICE
+   *
+   */
+  static FT_Error
+  pcf_property_set( FT_Module    module,         /* PCF_Driver */
+                    const char*  property_name,
+                    const void*  value,
+                    FT_Bool      value_is_string )
+  {
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+    FT_Error    error  = FT_Err_Ok;
+    PCF_Driver  driver = (PCF_Driver)module;
+
+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+    FT_UNUSED( value_is_string );
+#endif
+
+
+    if ( !ft_strcmp( property_name, "no-long-family-names" ) )
+    {
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+      {
+        const char*  s   = (const char*)value;
+        long         lfn = ft_strtol( s, NULL, 10 );
+
+
+        if ( lfn == 0 )
+          driver->no_long_family_names = 0;
+        else if ( lfn == 1 )
+          driver->no_long_family_names = 1;
+        else
+          return FT_THROW( Invalid_Argument );
+      }
+      else
+#endif
+      {
+        FT_Bool*  no_long_family_names = (FT_Bool*)value;
+
+
+        driver->no_long_family_names = *no_long_family_names;
+      }
+
+      return error;
+    }
+
+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+    FT_UNUSED( module );
+    FT_UNUSED( value );
+    FT_UNUSED( value_is_string );
+#ifndef FT_DEBUG_LEVEL_TRACE
+    FT_UNUSED( property_name );
+#endif
+
+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+    FT_TRACE0(( "pcf_property_set: missing property `%s'\n",
+                property_name ));
+    return FT_THROW( Missing_Property );
+  }
+
+
+  static FT_Error
+  pcf_property_get( FT_Module    module,         /* PCF_Driver */
+                    const char*  property_name,
+                    const void*  value )
+  {
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+    FT_Error    error  = FT_Err_Ok;
+    PCF_Driver  driver = (PCF_Driver)module;
+
+
+    if ( !ft_strcmp( property_name, "no-long-family-names" ) )
+    {
+      FT_Bool   no_long_family_names = driver->no_long_family_names;
+      FT_Bool*  val                  = (FT_Bool*)value;
+
+
+      *val = no_long_family_names;
+
+      return error;
+    }
+
+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+    FT_UNUSED( module );
+    FT_UNUSED( value );
+#ifndef FT_DEBUG_LEVEL_TRACE
+    FT_UNUSED( property_name );
+#endif
+
+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+    FT_TRACE0(( "pcf_property_get: missing property `%s'\n",
+                property_name ));
+    return FT_THROW( Missing_Property );
+  }
+
+
+  FT_DEFINE_SERVICE_PROPERTIESREC(
+    pcf_service_properties,
+
+    (FT_Properties_SetFunc)pcf_property_set,      /* set_property */
+    (FT_Properties_GetFunc)pcf_property_get )     /* get_property */
+
+
  /*
   *
   *  SERVICE LIST
@@ -674,6 +789,7 @@ THE SOFTWARE.
   {
     { FT_SERVICE_ID_BDF,         &pcf_service_bdf },
     { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PCF },
+    { FT_SERVICE_ID_PROPERTIES,  &pcf_service_properties },
     { NULL, NULL }
   };
 
@@ -688,22 +804,45 @@ THE SOFTWARE.
   }
 
 
+  FT_CALLBACK_DEF( FT_Error )
+  pcf_driver_init( FT_Module  module )      /* PCF_Driver */
+  {
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+    PCF_Driver  driver = (PCF_Driver)module;
+
+
+    driver->no_long_family_names = 0;
+#else
+    FT_UNUSED( module );
+#endif
+
+    return FT_Err_Ok;
+  }
+
+
+  FT_CALLBACK_DEF( void )
+  pcf_driver_done( FT_Module  module )      /* PCF_Driver */
+  {
+    FT_UNUSED( module );
+  }
+
+
   FT_CALLBACK_TABLE_DEF
   const FT_Driver_ClassRec  pcf_driver_class =
   {
     {
       FT_MODULE_FONT_DRIVER        |
       FT_MODULE_DRIVER_NO_OUTLINES,
-      sizeof ( FT_DriverRec ),
 
+      sizeof ( PCF_DriverRec ),
       "pcf",
       0x10000L,
       0x20000L,
 
-      0,    /* module-specific interface */
+      NULL,   /* module-specific interface */
 
-      0,                        /* FT_Module_Constructor  module_init   */
-      0,                        /* FT_Module_Destructor   module_done   */
+      pcf_driver_init,          /* FT_Module_Constructor  module_init   */
+      pcf_driver_done,          /* FT_Module_Destructor   module_done   */
       pcf_driver_requester      /* FT_Module_Requester    get_interface */
     },
 
@@ -713,16 +852,16 @@ THE SOFTWARE.
 
     PCF_Face_Init,              /* FT_Face_InitFunc  init_face */
     PCF_Face_Done,              /* FT_Face_DoneFunc  done_face */
-    0,                          /* FT_Size_InitFunc  init_size */
-    0,                          /* FT_Size_DoneFunc  done_size */
-    0,                          /* FT_Slot_InitFunc  init_slot */
-    0,                          /* FT_Slot_DoneFunc  done_slot */
+    NULL,                       /* FT_Size_InitFunc  init_size */
+    NULL,                       /* FT_Size_DoneFunc  done_size */
+    NULL,                       /* FT_Slot_InitFunc  init_slot */
+    NULL,                       /* FT_Slot_DoneFunc  done_slot */
 
     PCF_Glyph_Load,             /* FT_Slot_LoadFunc  load_glyph */
 
-    0,                          /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
-    0,                          /* FT_Face_GetAdvancesFunc  get_advances */
+    NULL,                       /* FT_Face_GetKerningFunc   get_kerning  */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_GetAdvancesFunc  get_advances */
 
     PCF_Size_Request,           /* FT_Size_RequestFunc  request_size */
     PCF_Size_Select             /* FT_Size_SelectFunc   select_size  */
index a86b45d..3eacf2b 100644 (file)
@@ -50,8 +50,15 @@ THE SOFTWARE.
 #ifdef FT_DEBUG_LEVEL_TRACE
   static const char* const  tableNames[] =
   {
-    "prop", "accl", "mtrcs", "bmps", "imtrcs",
-    "enc", "swidth", "names", "accel"
+    "properties",
+    "accelerators",
+    "metrics",
+    "bitmaps",
+    "ink metrics",
+    "encodings",
+    "swidths",
+    "glyph names",
+    "BDF accelerators"
   };
 #endif
 
@@ -109,17 +116,20 @@ THE SOFTWARE.
     if ( stream->size < 16 )
       return FT_THROW( Invalid_File_Format );
 
-    /* we need 16 bytes per TOC entry */
-    if ( toc->count > stream->size >> 4 )
+    /* we need 16 bytes per TOC entry, */
+    /* and there can be most 9 tables  */
+    if ( toc->count > ( stream->size >> 4 ) ||
+         toc->count > 9                     )
     {
       FT_TRACE0(( "pcf_read_TOC: adjusting number of tables"
                   " (from %d to %d)\n",
-                  toc->count, stream->size >> 4 ));
-      toc->count = stream->size >> 4;
+                  toc->count,
+                  FT_MIN( stream->size >> 4, 9 ) ));
+      toc->count = FT_MIN( stream->size >> 4, 9 );
     }
 
     if ( FT_NEW_ARRAY( face->toc.tables, toc->count ) )
-      return FT_THROW( Out_Of_Memory );
+      return error;
 
     tables = face->toc.tables;
     for ( n = 0; n < toc->count; n++ )
@@ -232,8 +242,8 @@ THE SOFTWARE.
           if ( tables[i].type == (FT_UInt)( 1 << j ) )
             name = tableNames[j];
 
-        FT_TRACE4(( "  %d: type=%s, format=0x%X, "
-                    "size=%ld (0x%lX), offset=%ld (0x%lX)\n",
+        FT_TRACE4(( "  %d: type=%s, format=0x%X,"
+                    " size=%ld (0x%lX), offset=%ld (0x%lX)\n",
                     i, name,
                     tables[i].format,
                     tables[i].size, tables[i].size,
@@ -319,7 +329,7 @@ THE SOFTWARE.
 
 
       /* parsing normal metrics */
-      fields = PCF_BYTE_ORDER( format ) == MSBFirst
+      fields = ( PCF_BYTE_ORDER( format ) == MSBFirst )
                ? pcf_metric_msb_header
                : pcf_metric_header;
 
@@ -343,6 +353,17 @@ THE SOFTWARE.
       metric->attributes       = 0;
     }
 
+    FT_TRACE5(( " width=%d,"
+                " lsb=%d, rsb=%d,"
+                " ascent=%d, descent=%d,"
+                " attributes=%d\n",
+                metric->characterWidth,
+                metric->leftSideBearing,
+                metric->rightSideBearing,
+                metric->ascent,
+                metric->descent,
+                metric->attributes ));
+
   Exit:
     return error;
   }
@@ -461,7 +482,7 @@ THE SOFTWARE.
   {
     PCF_ParseProperty  props      = NULL;
     PCF_Property       properties = NULL;
-    FT_ULong           nprops, i;
+    FT_ULong           nprops, orig_nprops, i;
     FT_ULong           format, size;
     FT_Error           error;
     FT_Memory          memory     = FT_FACE( face )->memory;
@@ -481,32 +502,43 @@ THE SOFTWARE.
     if ( FT_READ_ULONG_LE( format ) )
       goto Bail;
 
-    FT_TRACE4(( "pcf_get_properties:\n" ));
-
-    FT_TRACE4(( "  format = %ld\n", format ));
+    FT_TRACE4(( "pcf_get_properties:\n"
+                "  format: 0x%lX (%s)\n",
+                format,
+                PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB" ));
 
     if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
       goto Bail;
 
     if ( PCF_BYTE_ORDER( format ) == MSBFirst )
-      (void)FT_READ_ULONG( nprops );
+      (void)FT_READ_ULONG( orig_nprops );
     else
-      (void)FT_READ_ULONG_LE( nprops );
+      (void)FT_READ_ULONG_LE( orig_nprops );
     if ( error )
       goto Bail;
 
-    FT_TRACE4(( "  nprop = %d (truncate %d props)\n",
-                (int)nprops, nprops - (FT_ULong)(int)nprops ));
-
-    nprops = (FT_ULong)(int)nprops;
+    FT_TRACE4(( "  number of properties: %ld\n", orig_nprops ));
 
     /* rough estimate */
-    if ( nprops > size / PCF_PROPERTY_SIZE )
+    if ( orig_nprops > size / PCF_PROPERTY_SIZE )
     {
       error = FT_THROW( Invalid_Table );
       goto Bail;
     }
 
+    /* as a heuristic limit to avoid excessive allocation in */
+    /* gzip bombs (i.e., very small, invalid input data that */
+    /* pretends to expand to an insanely large file) we only */
+    /* load the first 256 properties                         */
+    if ( orig_nprops > 256 )
+    {
+      FT_TRACE0(( "pcf_get_properties:"
+                  " only loading first 256 properties\n" ));
+      nprops = 256;
+    }
+    else
+      nprops = orig_nprops;
+
     face->nprops = (int)nprops;
 
     if ( FT_NEW_ARRAY( props, nprops ) )
@@ -526,14 +558,23 @@ THE SOFTWARE.
       }
     }
 
+    /* this skip will only work if we really have an extremely large */
+    /* number of properties; it will fail for fake data, avoiding an */
+    /* unnecessarily large allocation later on                       */
+    if ( FT_STREAM_SKIP( ( orig_nprops - nprops ) * PCF_PROPERTY_SIZE ) )
+    {
+      error = FT_THROW( Invalid_Stream_Skip );
+      goto Bail;
+    }
+
     /* pad the property array                                            */
     /*                                                                   */
     /* clever here - nprops is the same as the number of odd-units read, */
     /* as only isStringProp are odd length   (Keith Packard)             */
     /*                                                                   */
-    if ( nprops & 3 )
+    if ( orig_nprops & 3 )
     {
-      i = 4 - ( nprops & 3 );
+      i = 4 - ( orig_nprops & 3 );
       if ( FT_STREAM_SKIP( i ) )
       {
         error = FT_THROW( Invalid_Stream_Skip );
@@ -548,15 +589,24 @@ THE SOFTWARE.
     if ( error )
       goto Bail;
 
-    FT_TRACE4(( "  string_size = %ld\n", string_size ));
+    FT_TRACE4(( "  string size: %ld\n", string_size ));
 
     /* rough estimate */
-    if ( string_size > size - nprops * PCF_PROPERTY_SIZE )
+    if ( string_size > size - orig_nprops * PCF_PROPERTY_SIZE )
     {
       error = FT_THROW( Invalid_Table );
       goto Bail;
     }
 
+    /* the strings in the `strings' array are PostScript strings, */
+    /* which can have a maximum length of 65536 characters each   */
+    if ( string_size > 16777472 )   /* 256 * (65536 + 1) */
+    {
+      FT_TRACE0(( "pcf_get_properties:"
+                  " loading only 16777472 bytes of strings array\n" ));
+      string_size = 16777472;
+    }
+
     /* allocate one more byte so that we have a final null byte */
     if ( FT_NEW_ARRAY( strings, string_size + 1 ) )
       goto Bail;
@@ -570,6 +620,7 @@ THE SOFTWARE.
 
     face->properties = properties;
 
+    FT_TRACE4(( "\n" ));
     for ( i = 0; i < nprops; i++ )
     {
       FT_Long  name_offset = props[i].name;
@@ -632,7 +683,7 @@ THE SOFTWARE.
     FT_Memory   memory  = FT_FACE( face )->memory;
     FT_ULong    format, size;
     PCF_Metric  metrics = NULL;
-    FT_ULong    nmetrics, i;
+    FT_ULong    nmetrics, orig_nmetrics, i;
 
 
     error = pcf_seek_to_table_type( stream,
@@ -647,6 +698,13 @@ THE SOFTWARE.
     if ( FT_READ_ULONG_LE( format ) )
       goto Bail;
 
+    FT_TRACE4(( "pcf_get_metrics:\n"
+                "  format: 0x%lX (%s, %s)\n",
+                format,
+                PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB",
+                PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) ?
+                  "compressed" : "uncompressed" ));
+
     if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT )     &&
          !PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) )
       return FT_THROW( Invalid_File_Format );
@@ -654,61 +712,70 @@ THE SOFTWARE.
     if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
     {
       if ( PCF_BYTE_ORDER( format ) == MSBFirst )
-        (void)FT_READ_ULONG( nmetrics );
+        (void)FT_READ_ULONG( orig_nmetrics );
       else
-        (void)FT_READ_ULONG_LE( nmetrics );
+        (void)FT_READ_ULONG_LE( orig_nmetrics );
     }
     else
     {
       if ( PCF_BYTE_ORDER( format ) == MSBFirst )
-        (void)FT_READ_USHORT( nmetrics );
+        (void)FT_READ_USHORT( orig_nmetrics );
       else
-        (void)FT_READ_USHORT_LE( nmetrics );
+        (void)FT_READ_USHORT_LE( orig_nmetrics );
     }
     if ( error )
       return FT_THROW( Invalid_File_Format );
 
-    face->nmetrics = nmetrics;
-
-    if ( !nmetrics )
-      return FT_THROW( Invalid_Table );
-
-    FT_TRACE4(( "pcf_get_metrics:\n" ));
-
-    FT_TRACE4(( "  number of metrics: %d\n", nmetrics ));
+    FT_TRACE4(( "  number of metrics: %ld\n", orig_nmetrics ));
 
     /* rough estimate */
     if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
     {
-      if ( nmetrics > size / PCF_METRIC_SIZE )
+      if ( orig_nmetrics > size / PCF_METRIC_SIZE )
         return FT_THROW( Invalid_Table );
     }
     else
     {
-      if ( nmetrics > size / PCF_COMPRESSED_METRIC_SIZE )
+      if ( orig_nmetrics > size / PCF_COMPRESSED_METRIC_SIZE )
         return FT_THROW( Invalid_Table );
     }
 
+    if ( !orig_nmetrics )
+      return FT_THROW( Invalid_Table );
+
+    /* PCF is a format from ancient times; Unicode was in its       */
+    /* infancy, and widely used two-byte character sets for CJK     */
+    /* scripts (Big 5, GB 2312, JIS X 0208, etc.) did have at most  */
+    /* 15000 characters.  Even the more exotic CNS 11643 and CCCII  */
+    /* standards, which were essentially three-byte character sets, */
+    /* provided less then 65536 assigned characters.                */
+    /*                                                              */
+    /* While technically possible to have a larger number of glyphs */
+    /* in PCF files, we thus limit the number to 65536.             */
+    if ( orig_nmetrics > 65536 )
+    {
+      FT_TRACE0(( "pcf_get_metrics:"
+                  " only loading first 65536 metrics\n" ));
+      nmetrics = 65536;
+    }
+    else
+      nmetrics = orig_nmetrics;
+
+    face->nmetrics = nmetrics;
+
     if ( FT_NEW_ARRAY( face->metrics, nmetrics ) )
-      return FT_THROW( Out_Of_Memory );
+      return error;
 
     metrics = face->metrics;
+
+    FT_TRACE4(( "\n" ));
     for ( i = 0; i < nmetrics; i++, metrics++ )
     {
+      FT_TRACE5(( "  idx %ld:", i ));
       error = pcf_get_metric( stream, format, metrics );
 
       metrics->bits = 0;
 
-      FT_TRACE5(( "  idx %d: width=%d, "
-                  "lsb=%d, rsb=%d, ascent=%d, descent=%d, swidth=%d\n",
-                  i,
-                  metrics->characterWidth,
-                  metrics->leftSideBearing,
-                  metrics->rightSideBearing,
-                  metrics->ascent,
-                  metrics->descent,
-                  metrics->attributes ));
-
       if ( error )
         break;
 
@@ -716,7 +783,7 @@ THE SOFTWARE.
       /* compute a glyph's bitmap dimensions, thus setting them to zero in */
       /* case of an error disables this particular glyph only              */
       if ( metrics->rightSideBearing < metrics->leftSideBearing ||
-           metrics->ascent + metrics->descent < 0               )
+           metrics->ascent < -metrics->descent                  )
       {
         metrics->characterWidth   = 0;
         metrics->leftSideBearing  = 0;
@@ -746,7 +813,7 @@ THE SOFTWARE.
     FT_Long*   offsets = NULL;
     FT_Long    bitmapSizes[GLYPHPADOPTIONS];
     FT_ULong   format, size;
-    FT_ULong   nbitmaps, i, sizebitmaps = 0;
+    FT_ULong   nbitmaps, orig_nbitmaps, i, sizebitmaps = 0;
 
 
     error = pcf_seek_to_table_type( stream,
@@ -764,18 +831,40 @@ THE SOFTWARE.
 
     format = FT_GET_ULONG_LE();
     if ( PCF_BYTE_ORDER( format ) == MSBFirst )
-      nbitmaps  = FT_GET_ULONG();
+      orig_nbitmaps = FT_GET_ULONG();
     else
-      nbitmaps  = FT_GET_ULONG_LE();
+      orig_nbitmaps = FT_GET_ULONG_LE();
 
     FT_Stream_ExitFrame( stream );
 
+    FT_TRACE4(( "pcf_get_bitmaps:\n"
+                "  format: 0x%lX\n"
+                "          (%s, %s,\n"
+                "           padding=%d bits, scanning=%d bits)\n",
+                format,
+                PCF_BYTE_ORDER( format ) == MSBFirst
+                  ? "most significant byte first"
+                  : "least significant byte first",
+                PCF_BIT_ORDER( format ) == MSBFirst
+                  ? "most significant bit first"
+                  : "least significant bit first",
+                8 << PCF_GLYPH_PAD_INDEX( format ),
+                8 << PCF_SCAN_UNIT_INDEX( format ) ));
+
     if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
       return FT_THROW( Invalid_File_Format );
 
-    FT_TRACE4(( "pcf_get_bitmaps:\n" ));
+    FT_TRACE4(( "  number of bitmaps: %ld\n", orig_nbitmaps ));
 
-    FT_TRACE4(( "  number of bitmaps: %d\n", nbitmaps ));
+    /* see comment in `pcf_get_metrics' */
+    if ( orig_nbitmaps > 65536 )
+    {
+      FT_TRACE0(( "pcf_get_bitmaps:"
+                  " only loading first 65536 bitmaps\n" ));
+      nbitmaps = 65536;
+    }
+    else
+      nbitmaps = orig_nbitmaps;
 
     if ( nbitmaps != face->nmetrics )
       return FT_THROW( Invalid_File_Format );
@@ -783,6 +872,7 @@ THE SOFTWARE.
     if ( FT_NEW_ARRAY( offsets, nbitmaps ) )
       return error;
 
+    FT_TRACE5(( "\n" ));
     for ( i = 0; i < nbitmaps; i++ )
     {
       if ( PCF_BYTE_ORDER( format ) == MSBFirst )
@@ -790,7 +880,7 @@ THE SOFTWARE.
       else
         (void)FT_READ_LONG_LE( offsets[i] );
 
-      FT_TRACE5(( "  bitmap %d: offset %ld (0x%lX)\n",
+      FT_TRACE5(( "  bitmap %ld: offset %ld (0x%lX)\n",
                   i, offsets[i], offsets[i] ));
     }
     if ( error )
@@ -807,17 +897,19 @@ THE SOFTWARE.
 
       sizebitmaps = (FT_ULong)bitmapSizes[PCF_GLYPH_PAD_INDEX( format )];
 
-      FT_TRACE4(( "  padding %d implies a size of %ld\n",
-                  i, bitmapSizes[i] ));
+      FT_TRACE4(( "  %ld-bit padding implies a size of %ld\n",
+                  8 << i, bitmapSizes[i] ));
     }
 
-    FT_TRACE4(( "  %d bitmaps, padding index %ld\n",
+    FT_TRACE4(( "  %ld bitmaps, using %ld-bit padding\n",
                 nbitmaps,
-                PCF_GLYPH_PAD_INDEX( format ) ));
-    FT_TRACE4(( "  bitmap size = %d\n", sizebitmaps ));
+                8 << PCF_GLYPH_PAD_INDEX( format ) ));
+    FT_TRACE4(( "  bitmap size: %ld\n", sizebitmaps ));
 
     FT_UNUSED( sizebitmaps );       /* only used for debugging */
 
+    /* right now, we only check the bitmap offsets; */
+    /* actual bitmaps are only loaded on demand     */
     for ( i = 0; i < nbitmaps; i++ )
     {
       /* rough estimate */
@@ -825,7 +917,7 @@ THE SOFTWARE.
            ( (FT_ULong)offsets[i] > size ) )
       {
         FT_TRACE0(( "pcf_get_bitmaps:"
-                    " invalid offset to bitmap data of glyph %d\n", i ));
+                    " invalid offset to bitmap data of glyph %ld\n", i ));
       }
       else
         face->metrics[i].bits = stream->pos + (FT_ULong)offsets[i];
@@ -889,10 +981,20 @@ THE SOFTWARE.
 
     FT_Stream_ExitFrame( stream );
 
+    FT_TRACE4(( "pcf_get_encodings:\n"
+                "  format: 0x%lX (%s)\n",
+                format,
+                PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB" ));
+
     if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
       return FT_THROW( Invalid_File_Format );
 
-    /* sanity checks */
+    FT_TRACE4(( "  firstCol 0x%X, lastCol 0x%X\n"
+                "  firstRow 0x%X, lastRow 0x%X\n",
+                firstCol, lastCol,
+                firstRow, lastRow ));
+
+    /* sanity checks; we limit numbers of rows and columns to 256 */
     if ( firstCol < 0       ||
          firstCol > lastCol ||
          lastCol  > 0xFF    ||
@@ -901,21 +1003,18 @@ THE SOFTWARE.
          lastRow  > 0xFF    )
       return FT_THROW( Invalid_Table );
 
-    FT_TRACE4(( "pdf_get_encodings:\n" ));
-
-    FT_TRACE4(( "  firstCol %d, lastCol %d, firstRow %d, lastRow %d\n",
-                firstCol, lastCol, firstRow, lastRow ));
-
     nencoding = (FT_ULong)( lastCol - firstCol + 1 ) *
                 (FT_ULong)( lastRow - firstRow + 1 );
 
     if ( FT_NEW_ARRAY( encoding, nencoding ) )
-      return FT_THROW( Out_Of_Memory );
+      return error;
 
     error = FT_Stream_EnterFrame( stream, 2 * nencoding );
     if ( error )
       goto Bail;
 
+    FT_TRACE5(( "\n" ));
+
     k = 0;
     for ( i = firstRow; i <= lastRow; i++ )
     {
@@ -1024,6 +1123,15 @@ THE SOFTWARE.
     if ( FT_READ_ULONG_LE( format ) )
       goto Bail;
 
+    FT_TRACE4(( "pcf_get_accel%s:\n"
+                "  format: 0x%lX (%s, %s)\n",
+                type == PCF_BDF_ACCELERATORS ? " (getting BDF accelerators)"
+                                             : "",
+                format,
+                PCF_BYTE_ORDER( format ) == MSBFirst ? "MSB" : "LSB",
+                PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) ?
+                  "accelerated" : "not accelerated" ));
+
     if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT )    &&
          !PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) )
       goto Bail;
@@ -1039,12 +1147,29 @@ THE SOFTWARE.
         goto Bail;
     }
 
+    FT_TRACE5(( "  noOverlap=%s, constantMetrics=%s,"
+                " terminalFont=%s, constantWidth=%s\n"
+                "  inkInside=%s, inkMetrics=%s, drawDirection=%s\n"
+                "  fontAscent=%ld, fontDescent=%ld, maxOverlap=%ld\n",
+                accel->noOverlap ? "yes" : "no",
+                accel->constantMetrics ? "yes" : "no",
+                accel->terminalFont ? "yes" : "no",
+                accel->constantWidth ? "yes" : "no",
+                accel->inkInside ? "yes" : "no",
+                accel->inkMetrics ? "yes" : "no",
+                accel->drawDirection ? "RTL" : "LTR",
+                accel->fontAscent,
+                accel->fontDescent,
+                accel->maxOverlap ));
+
+    FT_TRACE5(( "  minbounds:" ));
     error = pcf_get_metric( stream,
                             format & ( ~PCF_FORMAT_MASK ),
                             &(accel->minbounds) );
     if ( error )
       goto Bail;
 
+    FT_TRACE5(( "  maxbounds:" ));
     error = pcf_get_metric( stream,
                             format & ( ~PCF_FORMAT_MASK ),
                             &(accel->maxbounds) );
@@ -1053,12 +1178,14 @@ THE SOFTWARE.
 
     if ( PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) )
     {
+      FT_TRACE5(( "  ink minbounds:" ));
       error = pcf_get_metric( stream,
                               format & ( ~PCF_FORMAT_MASK ),
                               &(accel->ink_minbounds) );
       if ( error )
         goto Bail;
 
+      FT_TRACE5(( "  ink maxbounds:" ));
       error = pcf_get_metric( stream,
                               format & ( ~PCF_FORMAT_MASK ),
                               &(accel->ink_maxbounds) );
@@ -1067,7 +1194,7 @@ THE SOFTWARE.
     }
     else
     {
-      accel->ink_minbounds = accel->minbounds; /* I'm not sure about this */
+      accel->ink_minbounds = accel->minbounds;
       accel->ink_maxbounds = accel->maxbounds;
     }
 
@@ -1156,7 +1283,7 @@ THE SOFTWARE.
 
         len = lengths[nn];
 
-        if ( src == NULL )
+        if ( !src )
           continue;
 
         /* separate elements with a space */
@@ -1260,14 +1387,81 @@ THE SOFTWARE.
       if ( face->accel.constantWidth )
         root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
 
-      if ( ( error = pcf_interpret_style( face ) ) != 0 )
-         goto Exit;
+      if ( FT_SET_ERROR( pcf_interpret_style( face ) ) )
+        goto Exit;
 
       prop = pcf_find_property( face, "FAMILY_NAME" );
       if ( prop && prop->isString )
       {
-        if ( FT_STRDUP( root->family_name, prop->value.atom ) )
-          goto Exit;
+
+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+        PCF_Driver  driver = (PCF_Driver)FT_FACE_DRIVER( face );
+
+
+        if ( !driver->no_long_family_names )
+        {
+          /* Prepend the foundry name plus a space to the family name.     */
+          /* There are many fonts just called `Fixed' which look           */
+          /* completely different, and which have nothing to do with each  */
+          /* other.  When selecting `Fixed' in KDE or Gnome one gets       */
+          /* results that appear rather random, the style changes often if */
+          /* one changes the size and one cannot select some fonts at all. */
+          /*                                                               */
+          /* We also check whether we have `wide' characters; all put      */
+          /* together, we get family names like `Sony Fixed' or `Misc      */
+          /* Fixed Wide'.                                                  */
+
+          PCF_Property  foundry_prop, point_size_prop, average_width_prop;
+
+          int  l    = ft_strlen( prop->value.atom ) + 1;
+          int  wide = 0;
+
+
+          foundry_prop       = pcf_find_property( face, "FOUNDRY" );
+          point_size_prop    = pcf_find_property( face, "POINT_SIZE" );
+          average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
+
+          if ( point_size_prop && average_width_prop )
+          {
+            if ( average_width_prop->value.l >= point_size_prop->value.l )
+            {
+              /* This font is at least square shaped or even wider */
+              wide = 1;
+              l   += ft_strlen( " Wide" );
+            }
+          }
+
+          if ( foundry_prop && foundry_prop->isString )
+          {
+            l += ft_strlen( foundry_prop->value.atom ) + 1;
+
+            if ( FT_NEW_ARRAY( root->family_name, l ) )
+              goto Exit;
+
+            ft_strcpy( root->family_name, foundry_prop->value.atom );
+            ft_strcat( root->family_name, " " );
+            ft_strcat( root->family_name, prop->value.atom );
+          }
+          else
+          {
+            if ( FT_NEW_ARRAY( root->family_name, l ) )
+              goto Exit;
+
+            ft_strcpy( root->family_name, prop->value.atom );
+          }
+
+          if ( wide )
+            ft_strcat( root->family_name, " Wide" );
+        }
+        else
+
+#endif /* PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+        {
+          if ( FT_STRDUP( root->family_name, prop->value.atom ) )
+            goto Exit;
+        }
       }
       else
         root->family_name = NULL;
@@ -1290,7 +1484,7 @@ THE SOFTWARE.
         FT_Short         resolution_x = 0, resolution_y = 0;
 
 
-        FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );
+        FT_ZERO( bsize );
 
         /* for simplicity, we take absolute values of integer properties */
 
index a5b294b..1783171 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/pfr Jamfile
 #
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index bf7808c..7b84da9 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 1a43396..4f31f5d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR driver component.                                       */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*                                                                         */
 /***************************************************************************/
 
-#define FT_MAKE_OPTION_SINGLE_OBJECT
 
+#define FT_MAKE_OPTION_SINGLE_OBJECT
 #include <ft2build.h>
 
-#include "pfrload.c"
-#include "pfrgload.c"
 #include "pfrcmap.c"
-#include "pfrobjs.c"
 #include "pfrdrivr.c"
+#include "pfrgload.c"
+#include "pfrload.c"
+#include "pfrobjs.c"
 #include "pfrsbit.c"
 
+
 /* END */
index a1439c2..1d6b15b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR cmap handling (body).                                   */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   {
     sizeof ( PFR_CMapRec ),
 
-    (FT_CMap_InitFunc)     pfr_cmap_init,
-    (FT_CMap_DoneFunc)     pfr_cmap_done,
-    (FT_CMap_CharIndexFunc)pfr_cmap_char_index,
-    (FT_CMap_CharNextFunc) pfr_cmap_char_next,
+    (FT_CMap_InitFunc)     pfr_cmap_init,        /* init       */
+    (FT_CMap_DoneFunc)     pfr_cmap_done,        /* done       */
+    (FT_CMap_CharIndexFunc)pfr_cmap_char_index,  /* char_index */
+    (FT_CMap_CharNextFunc) pfr_cmap_char_next,   /* char_next  */
 
-    NULL, NULL, NULL, NULL, NULL
+    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
   };
 
 
index 4a8a4d0..957bf65 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR cmap handling (specification).                          */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index b81c15e..195cdb7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR driver interface (body).                                */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
       0x10000L,
       0x20000L,
 
-      0,    /* module-specific interface */
+      NULL,    /* module-specific interface */
 
-      0,                        /* FT_Module_Constructor  module_init   */
-      0,                        /* FT_Module_Destructor   module_done   */
+      NULL,                     /* FT_Module_Constructor  module_init   */
+      NULL,                     /* FT_Module_Destructor   module_done   */
       pfr_get_service           /* FT_Module_Requester    get_interface */
     },
 
 
     pfr_face_init,              /* FT_Face_InitFunc  init_face */
     pfr_face_done,              /* FT_Face_DoneFunc  done_face */
-    0,                          /* FT_Size_InitFunc  init_size */
-    0,                          /* FT_Size_DoneFunc  done_size */
+    NULL,                       /* FT_Size_InitFunc  init_size */
+    NULL,                       /* FT_Size_DoneFunc  done_size */
     pfr_slot_init,              /* FT_Slot_InitFunc  init_slot */
     pfr_slot_done,              /* FT_Slot_DoneFunc  done_slot */
 
     pfr_slot_load,              /* FT_Slot_LoadFunc  load_glyph */
 
     pfr_get_kerning,            /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
-    0,                          /* FT_Face_GetAdvancesFunc  get_advances */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_GetAdvancesFunc  get_advances */
 
-    0,                          /* FT_Size_RequestFunc  request_size */
-    0,                          /* FT_Size_SelectFunc   select_size  */
+    NULL,                       /* FT_Size_RequestFunc  request_size */
+    NULL,                       /* FT_Size_SelectFunc   select_size  */
   };
 
 
index 32b2d9e..b81d560 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level Type PFR driver interface (specification).                */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 9305f8f..ef044e3 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PFR error codes (specification only).                                */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f9cd1f6..93f5fc7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR glyph loader (body).                                    */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 908d437..6612323 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR glyph loader (specification).                           */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e509e70..4f84165 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR loader (body).                                          */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     FT_UInt    len    = (FT_UInt)( limit - p );
 
 
-    if ( phy_font->font_id != NULL )
+    if ( phy_font->font_id )
       goto Exit;
 
     if ( FT_ALLOC( phy_font->font_id, len + 1 ) )
     FT_Memory  memory = phy_font->memory;
 
 
-    if ( phy_font->vertical.stem_snaps != NULL )
+    if ( phy_font->vertical.stem_snaps )
       goto Exit;
 
     PFR_CHECK( 1 );
index 0f7a2bb..f9475ae 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR loader (specification).                                 */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 769a3b6..4b1703f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR object methods (body).                                  */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
        * nothing.
        */
       pfrface->family_name = phy_font->family_name;
-      if ( pfrface->family_name == NULL )
+      if ( !pfrface->family_name )
         pfrface->family_name = phy_font->font_id;
 
       /* note that the style name can be NULL in certain PFR fonts,
     /* try to load an embedded bitmap */
     if ( ( load_flags & ( FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP ) ) == 0 )
     {
-      error = pfr_slot_load_bitmap( slot, size, gindex );
-      if ( error == 0 )
+      error = pfr_slot_load_bitmap(
+                slot,
+                size,
+                gindex,
+                ( load_flags & FT_LOAD_BITMAP_METRICS_ONLY ) != 0 );
+      if ( !error )
         goto Exit;
     }
 
index 335aca8..d6ad656 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR object methods (specification).                         */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 144f50c..54e7d0e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR bitmap loader (body).                                   */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   FT_LOCAL( FT_Error )
   pfr_slot_load_bitmap( PFR_Slot  glyph,
                         PFR_Size  size,
-                        FT_UInt   glyph_index )
+                        FT_UInt   glyph_index,
+                        FT_Bool   metrics_only )
   {
     FT_Error     error;
     PFR_Face     face   = (PFR_Face) glyph->root.face;
         glyph->root.bitmap_left = (FT_Int)xpos;
         glyph->root.bitmap_top  = (FT_Int)( ypos + (FT_Long)ysize );
 
+        if ( metrics_only )
+          goto Exit1;
+
         /* Allocate and read bitmap data */
         {
           FT_ULong  len = (FT_ULong)glyph->root.bitmap.pitch * ysize;
index 94ead28..fc270f5 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR bitmap loader (specification).                          */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -26,7 +26,8 @@ FT_BEGIN_HEADER
   FT_LOCAL( FT_Error )
   pfr_slot_load_bitmap( PFR_Slot  glyph,
                         PFR_Size  size,
-                        FT_UInt   glyph_index );
+                        FT_UInt   glyph_index,
+                        FT_Bool   metrics_only );
 
 FT_END_HEADER
 
index bd6c2cd..c3d542c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PFR data structures (specification only).                   */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 39bb9e9..9940f62 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 9270eec..798b73d 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/psaux Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 9fb0ac0..ff2cc8c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    AFM parser (body).                                                   */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -20,6 +20,8 @@
 #include FT_INTERNAL_DEBUG_H
 #include FT_INTERNAL_POSTSCRIPT_AUX_H
 
+#ifndef T1_CONFIG_OPTION_NO_AFM
+
 #include "afmparse.h"
 #include "psconv.h"
 
     return error;
   }
 
+#else /* T1_CONFIG_OPTION_NO_AFM */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _afm_parse_dummy;
+
+#endif /* T1_CONFIG_OPTION_NO_AFM */
+
 
 /* END */
index 6d8b193..cd2beb7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    AFM parser (specification).                                          */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 630c4f3..c70a227 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 33b462e..c373aa7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType auxiliary PostScript driver component (body only).          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "psobjs.c"
-#include "psauxmod.c"
-#include "t1decode.c"
-#include "t1cmap.c"
 
-#ifndef T1_CONFIG_OPTION_NO_AFM
 #include "afmparse.c"
-#endif
-
+#include "psauxmod.c"
 #include "psconv.c"
+#include "psobjs.c"
+#include "t1cmap.c"
+#include "t1decode.c"
 
 
 /* END */
index 9739157..1d7ac60 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PS auxiliary module error codes (specification only).                */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 80805e6..1f589ce 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType auxiliary PostScript module implementation (body).          */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   FT_CALLBACK_TABLE_DEF
   const PS_Table_FuncsRec  ps_table_funcs =
   {
-    ps_table_new,
-    ps_table_done,
-    ps_table_add,
-    ps_table_release
+    ps_table_new,     /* init    */
+    ps_table_done,    /* done    */
+    ps_table_add,     /* add     */
+    ps_table_release  /* release */
   };
 
 
   FT_CALLBACK_TABLE_DEF
   const PS_Parser_FuncsRec  ps_parser_funcs =
   {
-    ps_parser_init,
-    ps_parser_done,
-    ps_parser_skip_spaces,
-    ps_parser_skip_PS_token,
-    ps_parser_to_int,
-    ps_parser_to_fixed,
-    ps_parser_to_bytes,
-    ps_parser_to_coord_array,
-    ps_parser_to_fixed_array,
-    ps_parser_to_token,
-    ps_parser_to_token_array,
-    ps_parser_load_field,
-    ps_parser_load_field_table
+    ps_parser_init,             /* init             */
+    ps_parser_done,             /* done             */
+
+    ps_parser_skip_spaces,      /* skip_spaces      */
+    ps_parser_skip_PS_token,    /* skip_PS_token    */
+
+    ps_parser_to_int,           /* to_int           */
+    ps_parser_to_fixed,         /* to_fixed         */
+    ps_parser_to_bytes,         /* to_bytes         */
+    ps_parser_to_coord_array,   /* to_coord_array   */
+    ps_parser_to_fixed_array,   /* to_fixed_array   */
+    ps_parser_to_token,         /* to_token         */
+    ps_parser_to_token_array,   /* to_token_array   */
+
+    ps_parser_load_field,       /* load_field       */
+    ps_parser_load_field_table  /* load_field_table */
   };
 
 
   FT_CALLBACK_TABLE_DEF
   const T1_Builder_FuncsRec  t1_builder_funcs =
   {
-    t1_builder_init,
-    t1_builder_done,
-    t1_builder_check_points,
-    t1_builder_add_point,
-    t1_builder_add_point1,
-    t1_builder_add_contour,
-    t1_builder_start_point,
-    t1_builder_close_contour
+    t1_builder_init,          /* init */
+    t1_builder_done,          /* done */
+
+    t1_builder_check_points,  /* check_points  */
+    t1_builder_add_point,     /* add_point     */
+    t1_builder_add_point1,    /* add_point1    */
+    t1_builder_add_contour,   /* add_contour   */
+    t1_builder_start_point,   /* start_point   */
+    t1_builder_close_contour  /* close_contour */
   };
 
 
   FT_CALLBACK_TABLE_DEF
   const T1_Decoder_FuncsRec  t1_decoder_funcs =
   {
-    t1_decoder_init,
-    t1_decoder_done,
-    t1_decoder_parse_charstrings
+    t1_decoder_init,              /* init              */
+    t1_decoder_done,              /* done              */
+    t1_decoder_parse_charstrings  /* parse_charstrings */
   };
 
 
@@ -83,9 +87,9 @@
   FT_CALLBACK_TABLE_DEF
   const AFM_Parser_FuncsRec  afm_parser_funcs =
   {
-    afm_parser_init,
-    afm_parser_done,
-    afm_parser_parse
+    afm_parser_init,  /* init  */
+    afm_parser_done,  /* done  */
+    afm_parser_parse  /* parse */
   };
 #endif
 
 
     &psaux_interface,  /* module-specific interface */
 
-    (FT_Module_Constructor)0,
-    (FT_Module_Destructor) 0,
-    (FT_Module_Requester)  0
+    (FT_Module_Constructor)NULL,  /* module_init   */
+    (FT_Module_Destructor) NULL,  /* module_done   */
+    (FT_Module_Requester)  NULL   /* get_interface */
   };
 
 
index b1dbb06..926f37e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType auxiliary PostScript module implementation (specification). */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index fdaca7f..b092482 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Some convenience conversions (body).                                 */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 062de36..cab254a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Some convenience conversions (specification).                        */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f208b5f..f04edea 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auxiliary functions for PostScript fonts (body).                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
       FT_Byte  c = *cur;
 
 
-      ++cur;
+      cur++;
 
       if ( c == '\\' )
       {
         case '\\':
         case '(':
         case ')':
-          ++cur;
+          cur++;
           break;
 
         default:
           /* skip octal escape or ignore backslash */
-          for ( i = 0; i < 3 && cur < limit; ++i )
+          for ( i = 0; i < 3 && cur < limit; i++ )
           {
             if ( !IS_OCTAL_DIGIT( *cur ) )
               break;
 
-            ++cur;
+            cur++;
           }
         }
       }
 
     FT_ASSERT( **acur == '{' );
 
-    for ( cur = *acur; cur < limit && error == FT_Err_Ok; ++cur )
+    for ( cur = *acur; cur < limit && error == FT_Err_Ok; cur++ )
     {
       switch ( *cur )
       {
       case '{':
-        ++embed;
+        embed++;
         break;
 
       case '}':
-        --embed;
+        embed--;
         if ( embed == 0 )
         {
-          ++cur;
+          cur++;
           goto end;
         }
         break;
       /* ************ otherwise, it is any token **************/
     default:
       token->start = cur;
-      token->type  = ( *cur == '/' ? T1_TOKEN_TYPE_KEY : T1_TOKEN_TYPE_ANY );
+      token->type  = ( *cur == '/' ) ? T1_TOKEN_TYPE_KEY : T1_TOKEN_TYPE_ANY;
       ps_parser_skip_PS_token( parser );
       cur = parser->cursor;
       if ( !parser->error )
         if ( !token.type )
           break;
 
-        if ( tokens != NULL && cur < limit )
+        if ( tokens && cur < limit )
           *cur = token;
 
         cur++;
 
       old_cur = cur;
 
-      if ( coords != NULL && count >= max_coords )
+      if ( coords && count >= max_coords )
         break;
 
       /* call PS_Conv_ToFixed() even if coords == NULL */
       /* to properly parse number at `cur'             */
-      *( coords != NULL ? &coords[count] : &dummy ) =
+      *( coords ? &coords[count] : &dummy ) =
         (FT_Short)( PS_Conv_ToFixed( &cur, limit, 0 ) >> 16 );
 
       if ( old_cur == cur )
 
       old_cur = cur;
 
-      if ( values != NULL && count >= max_values )
+      if ( values && count >= max_values )
         break;
 
       /* call PS_Conv_ToFixed() even if coords == NULL */
       /* to properly parse number at `cur'             */
-      *( values != NULL ? &values[count] : &dummy ) =
+      *( values ? &values[count] : &dummy ) =
         PS_Conv_ToFixed( &cur, limit, power_ten );
 
       if ( old_cur == cur )
 
           /* for this to work (FT_String**)q must have been */
           /* initialized to NULL                            */
-          if ( *(FT_String**)q != NULL )
+          if ( *(FT_String**)q )
           {
             FT_TRACE0(( "ps_parser_load_field: overwriting field %s\n",
                         field->ident ));
       builder->current = &loader->current.outline;
       FT_GlyphLoader_Rewind( loader );
 
-      builder->hints_globals = size->internal;
+      builder->hints_globals = size->internal->module_data;
       builder->hints_funcs   = NULL;
 
       if ( hinting )
     first = outline->n_contours <= 1
             ? 0 : outline->contours[outline->n_contours - 2] + 1;
 
+    /* in malformed fonts it can happen that a contour was started */
+    /* but no points were added                                    */
+    if ( outline->n_contours && first == outline->n_points )
+    {
+      outline->n_contours--;
+      return;
+    }
+
     /* We must not include the last point in the path if it */
     /* is located on the first point.                       */
     if ( outline->n_points > 1 )
index 4c7178e..202e5b2 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auxiliary functions for PostScript fonts (specification).            */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 19787b5..542ae12 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 43abb98..45b713e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 character map support (body).                                 */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -45,7 +45,7 @@
     cmap->code_to_sid   = is_expert ? psnames->adobe_expert_encoding
                                     : psnames->adobe_std_encoding;
 
-    FT_ASSERT( cmap->code_to_sid != NULL );
+    FT_ASSERT( cmap->code_to_sid );
   }
 
 
   {
     sizeof ( T1_CMapStdRec ),
 
-    (FT_CMap_InitFunc)     t1_cmap_standard_init,
-    (FT_CMap_DoneFunc)     t1_cmap_std_done,
-    (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,
-    (FT_CMap_CharNextFunc) t1_cmap_std_char_next,
+    (FT_CMap_InitFunc)     t1_cmap_standard_init,   /* init       */
+    (FT_CMap_DoneFunc)     t1_cmap_std_done,        /* done       */
+    (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,  /* char_index */
+    (FT_CMap_CharNextFunc) t1_cmap_std_char_next,   /* char_next  */
 
-    NULL, NULL, NULL, NULL, NULL
+    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
   };
 
 
   {
     sizeof ( T1_CMapStdRec ),
 
-    (FT_CMap_InitFunc)     t1_cmap_expert_init,
-    (FT_CMap_DoneFunc)     t1_cmap_std_done,
-    (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,
-    (FT_CMap_CharNextFunc) t1_cmap_std_char_next,
+    (FT_CMap_InitFunc)     t1_cmap_expert_init,     /* init       */
+    (FT_CMap_DoneFunc)     t1_cmap_std_done,        /* done       */
+    (FT_CMap_CharIndexFunc)t1_cmap_std_char_index,  /* char_index */
+    (FT_CMap_CharNextFunc) t1_cmap_std_char_next,   /* char_next  */
 
-    NULL, NULL, NULL, NULL, NULL
+    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
   };
 
 
     cmap->count   = (FT_UInt)encoding->code_last - cmap->first;
     cmap->indices = encoding->char_index;
 
-    FT_ASSERT( cmap->indices != NULL );
+    FT_ASSERT( cmap->indices );
     FT_ASSERT( encoding->code_first <= encoding->code_last );
 
     return 0;
     FT_UInt32  char_code = *pchar_code;
 
 
-    ++char_code;
+    char_code++;
 
     if ( char_code < cmap->first )
       char_code = cmap->first;
   {
     sizeof ( T1_CMapCustomRec ),
 
-    (FT_CMap_InitFunc)     t1_cmap_custom_init,
-    (FT_CMap_DoneFunc)     t1_cmap_custom_done,
-    (FT_CMap_CharIndexFunc)t1_cmap_custom_char_index,
-    (FT_CMap_CharNextFunc) t1_cmap_custom_char_next,
+    (FT_CMap_InitFunc)     t1_cmap_custom_init,        /* init       */
+    (FT_CMap_DoneFunc)     t1_cmap_custom_done,        /* done       */
+    (FT_CMap_CharIndexFunc)t1_cmap_custom_char_index,  /* char_index */
+    (FT_CMap_CharNextFunc) t1_cmap_custom_char_next,   /* char_next  */
 
-    NULL, NULL, NULL, NULL, NULL
+    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
   };
 
 
   {
     sizeof ( PS_UnicodesRec ),
 
-    (FT_CMap_InitFunc)     t1_cmap_unicode_init,
-    (FT_CMap_DoneFunc)     t1_cmap_unicode_done,
-    (FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index,
-    (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next,
+    (FT_CMap_InitFunc)     t1_cmap_unicode_init,        /* init       */
+    (FT_CMap_DoneFunc)     t1_cmap_unicode_done,        /* done       */
+    (FT_CMap_CharIndexFunc)t1_cmap_unicode_char_index,  /* char_index */
+    (FT_CMap_CharNextFunc) t1_cmap_unicode_char_next,   /* char_next  */
 
-    NULL, NULL, NULL, NULL, NULL
+    (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+    (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+    (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+    (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+    (FT_CMap_VariantCharListFunc) NULL   /* variantchar_list */
   };
 
 
index 5e1277d..7870245 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 character map support (specification).                        */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 98f6ce1..7dd4513 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript Type 1 decoding routines (body).                          */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
                ( decoder->buildchar == NULL )  );
 
     if ( decoder->buildchar && decoder->len_buildchar > 0 )
-      ft_memset( &decoder->buildchar[0],
-                 0,
-                 sizeof ( decoder->buildchar[0] ) * decoder->len_buildchar );
+      FT_ARRAY_ZERO( decoder->buildchar, decoder->len_buildchar );
 
     FT_TRACE4(( "\n"
                 "Start charstring\n" ));
 
 #ifdef FT_DEBUG_LEVEL_TRACE
         if ( large_int )
-          FT_TRACE4(( " %ld", value ));
+          FT_TRACE4(( " %d", value ));
         else
-          FT_TRACE4(( " %ld", value / 65536 ));
+          FT_TRACE4(( " %d", value / 65536 ));
 #endif
 
         *top++       = value;
           if ( arg_cnt != 3 )
             goto Unexpected_OtherSubr;
 
-          if ( decoder->flex_state       == 0 ||
+          if ( !decoder->flex_state           ||
                decoder->num_flex_vectors != 7 )
           {
             FT_ERROR(( "t1_decoder_parse_charstrings:"
           if ( arg_cnt != 0 )
             goto Unexpected_OtherSubr;
 
+          if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) ||
+               FT_SET_ERROR( t1_builder_check_points( builder, 6 ) )   )
+            goto Fail;
+
           decoder->flex_state        = 1;
           decoder->num_flex_vectors  = 0;
-          if ( ( error = t1_builder_start_point( builder, x, y ) )
-                 != FT_Err_Ok                                   ||
-               ( error = t1_builder_check_points( builder, 6 ) )
-                 != FT_Err_Ok                                   )
-            goto Fail;
           break;
 
         case 2:                     /* add flex vectors */
             if ( arg_cnt != 0 )
               goto Unexpected_OtherSubr;
 
-            if ( decoder->flex_state == 0 )
+            if ( !decoder->flex_state )
             {
               FT_ERROR(( "t1_decoder_parse_charstrings:"
                          " missing flex start\n" ));
             /* point without adding any point to the outline    */
             idx = decoder->num_flex_vectors++;
             if ( idx > 0 && idx < 7 )
+            {
+              /* in malformed fonts it is possible to have other */
+              /* opcodes in the middle of a flex (which don't    */
+              /* increase `num_flex_vectors'); we thus have to   */
+              /* check whether we can add a point                */
+              if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) )
+                goto Syntax_Error;
+
               t1_builder_add_point( builder,
                                     x,
                                     y,
                                     (FT_Byte)( idx == 3 || idx == 6 ) );
+            }
           }
           break;
 
             PS_Blend  blend = decoder->blend;
 
 
-            if ( arg_cnt != 1 || blend == NULL )
+            if ( arg_cnt != 1 || !blend )
               goto Unexpected_OtherSubr;
 
             idx = Fix2Int( top[0] );
             PS_Blend  blend = decoder->blend;
 
 
-            if ( arg_cnt != 2 || blend == NULL )
+            if ( arg_cnt != 2 || !blend )
               goto Unexpected_OtherSubr;
 
             idx = Fix2Int( top[1] );
             PS_Blend  blend = decoder->blend;
 
 
-            if ( arg_cnt != 1 || blend == NULL )
+            if ( arg_cnt != 1 || !blend )
               goto Unexpected_OtherSubr;
 
             idx = Fix2Int( top[0] );
 
             FT_TRACE4(( "BuildCharArray = [ " ));
 
-            for ( i = 0; i < decoder->len_buildchar; ++i )
+            for ( i = 0; i < decoder->len_buildchar; i++ )
               FT_TRACE4(( "%d ", decoder->buildchar[i] ));
 
             FT_TRACE4(( "]\n" ));
         case op_hlineto:
           FT_TRACE4(( " hlineto" ));
 
-          if ( ( error = t1_builder_start_point( builder, x, y ) )
-                 != FT_Err_Ok )
+          if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) )
             goto Fail;
 
           x += top[0];
         case op_hvcurveto:
           FT_TRACE4(( " hvcurveto" ));
 
-          if ( ( error = t1_builder_start_point( builder, x, y ) )
-                 != FT_Err_Ok                                   ||
-               ( error = t1_builder_check_points( builder, 3 ) )
-                 != FT_Err_Ok                                   )
+          if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) ||
+               FT_SET_ERROR( t1_builder_check_points( builder, 3 ) )   )
             goto Fail;
 
           x += top[0];
         case op_rlineto:
           FT_TRACE4(( " rlineto" ));
 
-          if ( ( error = t1_builder_start_point( builder, x, y ) )
-                 != FT_Err_Ok )
+          if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) )
             goto Fail;
 
           x += top[0];
           y += top[1];
 
         Add_Line:
-          if ( ( error = t1_builder_add_point1( builder, x, y ) )
-                 != FT_Err_Ok )
+          if ( FT_SET_ERROR( t1_builder_add_point1( builder, x, y ) ) )
             goto Fail;
           break;
 
         case op_rrcurveto:
           FT_TRACE4(( " rrcurveto" ));
 
-          if ( ( error = t1_builder_start_point( builder, x, y ) )
-                 != FT_Err_Ok                                   ||
-               ( error = t1_builder_check_points( builder, 3 ) )
-                 != FT_Err_Ok                                   )
+          if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) ||
+               FT_SET_ERROR( t1_builder_check_points( builder, 3 ) )   )
             goto Fail;
 
           x += top[0];
         case op_vhcurveto:
           FT_TRACE4(( " vhcurveto" ));
 
-          if ( ( error = t1_builder_start_point( builder, x, y ) )
-                 != FT_Err_Ok                                   ||
-               ( error = t1_builder_check_points( builder, 3 ) )
-                 != FT_Err_Ok                                   )
+          if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) ||
+               FT_SET_ERROR( t1_builder_check_points( builder, 3 ) )   )
             goto Fail;
 
           y += top[0];
         case op_vlineto:
           FT_TRACE4(( " vlineto" ));
 
-          if ( ( error = t1_builder_start_point( builder, x, y ) )
-                 != FT_Err_Ok )
+          if ( FT_SET_ERROR( t1_builder_start_point( builder, x, y ) ) )
             goto Fail;
 
           y += top[0];
           /* otherwise, we divide numbers in 16.16 format --    */
           /* in both cases, it is the same operation            */
           *top = FT_DivFix( top[0], top[1] );
-          ++top;
+          top++;
 
           large_int = FALSE;
           break;
                    FT_Render_Mode       hint_mode,
                    T1_Decoder_Callback  parse_callback )
   {
-    FT_MEM_ZERO( decoder, sizeof ( *decoder ) );
+    FT_ZERO( decoder );
 
     /* retrieve PSNames interface from list of current modules */
     {
index 0f5adfa..12c27de 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript Type 1 decoding routines (specification).                 */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index fcb2258..2b65271 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/pshinter Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 63110c4..77e35c4 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 8f131be..9ad1a3a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript hinting algorithm (body).                                 */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used        */
   static void
   psh_print_zone( PSH_Zone  zone )
   {
-    printf( "zone [scale,delta,min,max] = [%.3f,%.3f,%d,%d]\n",
+    printf( "zone [scale,delta,min,max] = [%.5f,%.2f,%d,%d]\n",
              zone->scale / 65536.0,
              zone->delta / 64.0,
              zone->min,
 
 
     /* clear all fields */
-    FT_MEM_ZERO( glyph, sizeof ( *glyph ) );
+    FT_ZERO( glyph );
 
     memory = glyph->memory = globals->memory;
 
           }
         }
 
-        if ( point->hint == NULL )
+        if ( !point->hint )
         {
           for ( nn = 0; nn < num_hints; nn++ )
           {
     PS_Mask         mask      = table->hint_masks->masks;
     FT_UInt         num_masks = table->hint_masks->num_masks;
     FT_UInt         first     = 0;
-    FT_Int          major_dir = dimension == 0 ? PSH_DIR_VERTICAL
-                                               : PSH_DIR_HORIZONTAL;
+    FT_Int          major_dir = ( dimension == 0 ) ? PSH_DIR_VERTICAL
+                                                   : PSH_DIR_HORIZONTAL;
     PSH_Dimension   dim       = &glyph->globals->dimension[dimension];
     FT_Fixed        scale     = dim->scale_mult;
     FT_Int          threshold;
index f1bda65..62e97d1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript hinting algorithm (specification).                        */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 2ac5ef1..c68770c 100644 (file)
@@ -5,7 +5,7 @@
 /*    PostScript hinter global hinting management (body).                  */
 /*    Inspired by the new auto-hinter module.                              */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used        */
index 45c957b..8801cba 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript hinter global hinting management.                         */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 614e0bb..13e07e1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PostScript Hinting module                                   */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "pshpic.c"
-#include "pshrec.c"
-#include "pshglob.c"
+
 #include "pshalgo.c"
+#include "pshglob.c"
 #include "pshmod.c"
+#include "pshpic.c"
+#include "pshrec.c"
 
 
 /* END */
index fa4ad1f..860dc0a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PostScript hinter module implementation (body).             */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
   FT_DEFINE_PSHINTER_INTERFACE(
     pshinter_interface,
+
     pshinter_get_globals_funcs,
     pshinter_get_t1_funcs,
-    pshinter_get_t2_funcs )
+    pshinter_get_t2_funcs
+  )
 
 
   FT_DEFINE_MODULE(
 
     &PSHINTER_INTERFACE_GET,              /* module-specific interface */
 
-    (FT_Module_Constructor)ps_hinter_init,
-    (FT_Module_Destructor) ps_hinter_done,
-    (FT_Module_Requester)  NULL )   /* no additional interface for now */
-
+    (FT_Module_Constructor)ps_hinter_init,  /* module_init   */
+    (FT_Module_Destructor) ps_hinter_done,  /* module_done   */
+    (FT_Module_Requester)  NULL             /* get_interface */
+  )
 
 /* END */
index 39112a9..1d2b40f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript hinter module interface (specification).                  */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 7a94588..73d144e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PS Hinter error codes (specification only).                          */
 /*                                                                         */
-/*  Copyright 2003-2016 by                                                 */
+/*  Copyright 2003-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d0a3d8e..c0d3a64 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for pshinter module. */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 75ee573..8d9a01c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for pshinter module. */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index d7cc4a0..fff6d34 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PostScript hints recorder (body).                           */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   ps_hints_init( PS_Hints   hints,
                  FT_Memory  memory )
   {
-    FT_MEM_ZERO( hints, sizeof ( *hints ) );
+    FT_ZERO( hints );
     hints->memory = memory;
   }
 
   FT_LOCAL_DEF( void )
   t1_hints_funcs_init( T1_Hints_FuncsRec*  funcs )
   {
-    FT_MEM_ZERO( (char*)funcs, sizeof ( *funcs ) );
+    FT_ZERO( funcs );
 
     funcs->open  = (T1_Hints_OpenFunc)    t1_hints_open;
     funcs->close = (T1_Hints_CloseFunc)   ps_hints_close;
   FT_LOCAL_DEF( void )
   t2_hints_funcs_init( T2_Hints_FuncsRec*  funcs )
   {
-    FT_MEM_ZERO( funcs, sizeof ( *funcs ) );
+    FT_ZERO( funcs );
 
     funcs->open    = (T2_Hints_OpenFunc)   t2_hints_open;
     funcs->close   = (T2_Hints_CloseFunc)  ps_hints_close;
index 97e6f0e..e10bc2b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Postscript (Type1/Type2) hints recorder (specification).             */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 67ecf78..2be6404 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 35b8a99..5a6e2c0 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/psnames Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index ba29af8..ddd2296 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 345402d..3ff8cb9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PSNames module implementation (body).                                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -22,6 +22,9 @@
 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
 
 #include "psmodule.h"
+
+#include "pstables.h"
+#define  DEFINE_PS_TABLES
 #include "pstables.h"
 
 #include "psnamerr.h"
 
   FT_DEFINE_SERVICE_PSCMAPSREC(
     pscmaps_interface,
+
     (PS_Unicode_ValueFunc)     ps_unicode_value,        /* unicode_value         */
     (PS_Unicodes_InitFunc)     ps_unicodes_init,        /* unicodes_init         */
     (PS_Unicodes_CharIndexFunc)ps_unicodes_char_index,  /* unicodes_char_index   */
     (PS_Adobe_Std_StringsFunc) ps_get_standard_strings, /* adobe_std_strings     */
 
     t1_standard_encoding,                               /* adobe_std_encoding    */
-    t1_expert_encoding )                                /* adobe_expert_encoding */
+    t1_expert_encoding                                  /* adobe_expert_encoding */
+  )
 
 #else
 
   FT_DEFINE_SERVICE_PSCMAPSREC(
     pscmaps_interface,
+
     NULL,                                               /* unicode_value         */
     NULL,                                               /* unicodes_init         */
     NULL,                                               /* unicodes_char_index   */
     (PS_Adobe_Std_StringsFunc) ps_get_standard_strings, /* adobe_std_strings     */
 
     t1_standard_encoding,                               /* adobe_std_encoding    */
-    t1_expert_encoding )                                /* adobe_expert_encoding */
+    t1_expert_encoding                                  /* adobe_expert_encoding */
+  )
 
 #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
 
 
   FT_DEFINE_SERVICEDESCREC1(
     pscmaps_services,
+
     FT_SERVICE_ID_POSTSCRIPT_CMAPS, &PSCMAPS_INTERFACE_GET )
 
 
 
     PUT_PS_NAMES_SERVICE(
       (void*)&PSCMAPS_INTERFACE_GET ),   /* module specific interface */
-    (FT_Module_Constructor)NULL,
-    (FT_Module_Destructor) NULL,
-    (FT_Module_Requester)  PUT_PS_NAMES_SERVICE( psnames_get_service ) )
+
+    (FT_Module_Constructor)NULL,                                       /* module_init   */
+    (FT_Module_Destructor) NULL,                                       /* module_done   */
+    (FT_Module_Requester)  PUT_PS_NAMES_SERVICE( psnames_get_service ) /* get_interface */
+  )
 
 
 /* END */
index ee3c6cb..6983b79 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level PSNames module interface (specification).                 */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 3a9f653..f90bf5e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PS names module error codes (specification only).                    */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e7b2c0b..22466d6 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType PSNames module component (body only).                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "pspic.c"
+
 #include "psmodule.c"
+#include "pspic.c"
 
 
 /* END */
index a78ec5a..8b90034 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for psnames module.  */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 4834876..14497e7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for psnames module.  */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index eb827fa..e0f5e30 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript glyph names.                                              */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   /* This file has been generated automatically -- do not edit! */
 
 
-  static const char  ft_standard_glyph_names[3696] =
+#ifndef  DEFINE_PS_TABLES
+#ifdef  __cplusplus
+  extern "C"
+#else
+  extern
+#endif
+#endif
+  const char  ft_standard_glyph_names[3696]
+#ifdef  DEFINE_PS_TABLES
+  =
   {
     '.','n','u','l','l', 0,
     'n','o','n','m','a','r','k','i','n','g','r','e','t','u','r','n', 0,
     'R','e','g','u','l','a','r', 0,
     'R','o','m','a','n', 0,
     'S','e','m','i','b','o','l','d', 0,
-  };
+  }
+#endif /* DEFINE_PS_TABLES */
+  ;
 
 
 #define FT_NUM_MAC_NAMES  258
 
   /* Values are offsets into the `ft_standard_glyph_names' table */
 
-  static const short  ft_mac_names[FT_NUM_MAC_NAMES] =
+#ifndef  DEFINE_PS_TABLES
+#ifdef  __cplusplus
+  extern "C"
+#else
+  extern
+#endif
+#endif
+  const short  ft_mac_names[FT_NUM_MAC_NAMES]
+#ifdef  DEFINE_PS_TABLES
+  =
   {
      253,   0,   6, 261, 267, 274, 283, 294, 301, 309, 758, 330, 340, 351,
      360, 365, 371, 378, 385, 391, 396, 400, 404, 410, 415, 420, 424, 430,
     1066,1073,1101,1143,1536,1783,1596,1843,1253,1207,1319,1579,1826,1229,
     1270,1313,1323,1171,1290,1332,1211,1235,1276, 169, 175, 182, 189, 200,
      209, 218, 225, 232, 239, 246
-  };
+  }
+#endif /* DEFINE_PS_TABLES */
+  ;
 
 
 #define FT_NUM_SID_NAMES  391
 
   /* Values are offsets into the `ft_standard_glyph_names' table */
 
-  static const short  ft_sid_names[FT_NUM_SID_NAMES] =
+#ifndef  DEFINE_PS_TABLES
+#ifdef  __cplusplus
+  extern "C"
+#else
+  extern
+#endif
+#endif
+  const short  ft_sid_names[FT_NUM_SID_NAMES]
+#ifdef  DEFINE_PS_TABLES
+  =
   {
      253, 261, 267, 274, 283, 294, 301, 309, 319, 330, 340, 351, 360, 365,
      371, 378, 385, 391, 396, 400, 404, 410, 415, 420, 424, 430, 436, 441,
     3237,3249,3264,3275,3283,3297,3309,3321,3338,3353,3365,3377,3394,3409,
     3418,3430,3442,3454,3471,3483,3498,3506,3518,3530,3542,3559,3574,3586,
     3597,3612,3620,3628,3636,3644,3650,3655,3660,3666,3673,3681,3687
-  };
+  }
+#endif /* DEFINE_PS_TABLES */
+  ;
 
 
   /* the following are indices into the SID name table */
-  static const unsigned short  t1_standard_encoding[256] =
+#ifndef  DEFINE_PS_TABLES
+#ifdef  __cplusplus
+  extern "C"
+#else
+  extern
+#endif
+#endif
+  const unsigned short  t1_standard_encoding[256]
+#ifdef  DEFINE_PS_TABLES
+  =
   {
       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
     137,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
       0,138,  0,139,  0,  0,  0,  0,140,141,142,143,  0,  0,  0,  0,
       0,144,  0,  0,  0,145,  0,  0,146,147,148,149,  0,  0,  0,  0
-  };
+  }
+#endif /* DEFINE_PS_TABLES */
+  ;
 
 
   /* the following are indices into the SID name table */
-  static const unsigned short  t1_expert_encoding[256] =
+#ifndef  DEFINE_PS_TABLES
+#ifdef  __cplusplus
+  extern "C"
+#else
+  extern
+#endif
+#endif
+  const unsigned short  t1_expert_encoding[256]
+#ifdef  DEFINE_PS_TABLES
+  =
   {
       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
     331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,
     347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,
     363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378
-  };
+  }
+#endif /* DEFINE_PS_TABLES */
+  ;
 
 
   /*
 
 #ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
 
-  static const unsigned char  ft_adobe_glyph_list[55997L] =
+#ifndef  DEFINE_PS_TABLES
+#ifdef  __cplusplus
+  extern "C"
+#else
+  extern
+#endif
+#endif
+  const unsigned char  ft_adobe_glyph_list[55997L]
+#ifdef  DEFINE_PS_TABLES
+  =
   {
       0, 52,  0,106,  2,167,  3, 63,  4,220,  6,125,  9,143, 10, 23,
      11,137, 12,199, 14,246, 15, 87, 16,233, 17,219, 18,104, 19, 88,
     248,232,239,239,107,128,  2,144,243,244,242,239,235,101,128,  1,
     182,117,  2,218,167,218,178,232,233,242,225,231,225,238, 97,128,
      48, 90,235,225,244,225,235,225,238, 97,128, 48,186
-  };
+  }
+#endif /* DEFINE_PS_TABLES */
+  ;
 
 
+#ifdef  DEFINE_PS_TABLES
   /*
    *  This function searches the compressed table efficiently.
    */
   NotFound:
     return 0;
   }
+#endif /* DEFINE_PS_TABLES */
 
 #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
 
index 9849f40..69fa732 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 2ec88f5..c9f3d6c 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/raster Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 981ce32..d1e6627 100644 (file)
@@ -5,7 +5,7 @@
 /*    Miscellaneous macros for stand-alone rasterizer (specification       */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used        */
index 0fa2f26..c5643f6 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph rasterizer (body).                                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )
 #endif
 
+#ifndef FT_ZERO
+#define FT_ZERO( p )  FT_MEM_ZERO( p, sizeof ( *(p) ) )
+#endif
+
   /* FMulDiv means `Fast MulDiv'; it is used in case where `b' is       */
   /* typically a small value and the result of a*b is known to fit into */
   /* 32 bits.                                                           */
         state_bez = y1 < y3 ? Ascending_State : Descending_State;
         if ( ras.state != state_bez )
         {
-          Bool  o = state_bez == Ascending_State ? IS_BOTTOM_OVERSHOOT( y1 )
-                                                 : IS_TOP_OVERSHOOT( y1 );
+          Bool  o = ( state_bez == Ascending_State )
+                      ? IS_BOTTOM_OVERSHOOT( y1 )
+                      : IS_TOP_OVERSHOOT( y1 );
 
 
           /* finalize current profile if any */
         /* detect a change of direction */
         if ( ras.state != state_bez )
         {
-          Bool  o = state_bez == Ascending_State ? IS_BOTTOM_OVERSHOOT( y1 )
-                                                 : IS_TOP_OVERSHOOT( y1 );
+          Bool  o = ( state_bez == Ascending_State )
+                      ? IS_BOTTOM_OVERSHOOT( y1 )
+                      : IS_TOP_OVERSHOOT( y1 );
 
 
           /* finalize current profile if any */
           pxl = e2;
 
         /* check that the other pixel isn't set */
-        e1 = pxl == e1 ? e2 : e1;
+        e1 = ( pxl == e1 ) ? e2 : e1;
 
         e1 = TRUNC( e1 );
 
           pxl = e2;
 
         /* check that the other pixel isn't set */
-        e1 = pxl == e1 ? e2 : e1;
+        e1 = ( pxl == e1 ) ? e2 : e1;
 
         e1 = TRUNC( e1 );
 
 
 
      *araster = (FT_Raster)&the_raster;
-     FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );
+     FT_ZERO( &the_raster );
      ft_black_init( &the_raster );
 
      return 0;
 
     FT_GLYPH_FORMAT_OUTLINE,
 
-    (FT_Raster_New_Func)     ft_black_new,
-    (FT_Raster_Reset_Func)   ft_black_reset,
-    (FT_Raster_Set_Mode_Func)ft_black_set_mode,
-    (FT_Raster_Render_Func)  ft_black_render,
-    (FT_Raster_Done_Func)    ft_black_done )
+    (FT_Raster_New_Func)     ft_black_new,       /* raster_new      */
+    (FT_Raster_Reset_Func)   ft_black_reset,     /* raster_reset    */
+    (FT_Raster_Set_Mode_Func)ft_black_set_mode,  /* raster_set_mode */
+    (FT_Raster_Render_Func)  ft_black_render,    /* raster_render   */
+    (FT_Raster_Done_Func)    ft_black_done       /* raster_done     */
+  )
 
 
 /* END */
index 65cd5f9..6b3050c 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph rasterizer (specification).                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used        */
index 494f112..1a83e9e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph rasterizer interface (body).                      */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -88,7 +88,7 @@
                        FT_GlyphSlot  slot,
                        FT_BBox*      cbox )
   {
-    FT_MEM_ZERO( cbox, sizeof ( *cbox ) );
+    FT_ZERO( cbox );
 
     if ( slot->format == render->glyph_format )
       FT_Outline_Get_CBox( &slot->outline, cbox );
   }
 
 
-  FT_DEFINE_RENDERER( ft_raster1_renderer_class,
+  FT_DEFINE_RENDERER(
+    ft_raster1_renderer_class,
 
       FT_MODULE_RENDERER,
       sizeof ( FT_RendererRec ),
       0x10000L,
       0x20000L,
 
-      0,    /* module specific interface */
+      NULL,    /* module specific interface */
 
-      (FT_Module_Constructor)ft_raster1_init,
-      (FT_Module_Destructor) 0,
-      (FT_Module_Requester)  0
-    ,
+      (FT_Module_Constructor)ft_raster1_init,  /* module_init   */
+      (FT_Module_Destructor) NULL,             /* module_done   */
+      (FT_Module_Requester)  NULL,             /* get_interface */
 
     FT_GLYPH_FORMAT_OUTLINE,
 
-    (FT_Renderer_RenderFunc)   ft_raster1_render,
-    (FT_Renderer_TransformFunc)ft_raster1_transform,
-    (FT_Renderer_GetCBoxFunc)  ft_raster1_get_cbox,
-    (FT_Renderer_SetModeFunc)  ft_raster1_set_mode,
+    (FT_Renderer_RenderFunc)   ft_raster1_render,     /* render_glyph    */
+    (FT_Renderer_TransformFunc)ft_raster1_transform,  /* transform_glyph */
+    (FT_Renderer_GetCBoxFunc)  ft_raster1_get_cbox,   /* get_glyph_cbox  */
+    (FT_Renderer_SetModeFunc)  ft_raster1_set_mode,   /* set_mode        */
 
-    (FT_Raster_Funcs*)    &FT_STANDARD_RASTER_GET
+    (FT_Raster_Funcs*)&FT_STANDARD_RASTER_GET         /* raster_class    */
   )
 
 
index a431f18..cff702d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph rasterizer interface (specification).             */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f4a5f8e..aad39cb 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 5b21dcb..46a6690 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType monochrome rasterer module component (body only).           */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "rastpic.c"
+
 #include "ftraster.c"
 #include "ftrend1.c"
+#include "rastpic.c"
 
 
 /* END */
index 44da7fc..0d64690 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    monochrome renderer error codes (specification only).                */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index dcfa92e..7085339 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for raster module.   */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 7815876..dcd6913 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for raster module.   */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 929faa3..0462c93 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 089cc26..5971b25 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/sfnt Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index ca19e09..81dea17 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 2815759..b9b296e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PNG Bitmap glyph support.                                            */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  Google, Inc.                                                           */
 /*  Written by Stuart Gill and Behdad Esfahbod.                            */
 /*                                                                         */
 #include FT_CONFIG_STANDARD_LIBRARY_H
 
 
-#ifdef FT_CONFIG_OPTION_USE_PNG
+#if defined( TT_CONFIG_OPTION_EMBEDDED_BITMAPS ) && \
+    defined( FT_CONFIG_OPTION_USE_PNG )
 
-  /* We always include <stjmp.h>, so make libpng shut up! */
+  /* We always include <setjmp.h>, so make libpng shut up! */
 #define PNG_SKIP_SETJMP_CHECK 1
 #include <png.h>
 #include "pngshim.h"
                  FT_Memory        memory,
                  FT_Byte*         data,
                  FT_UInt          png_len,
-                 FT_Bool          populate_map_and_metrics )
+                 FT_Bool          populate_map_and_metrics,
+                 FT_Bool          metrics_only )
   {
     FT_Bitmap    *map   = &slot->bitmap;
     FT_Error      error = FT_Err_Ok;
 
     if ( populate_map_and_metrics )
     {
-      FT_ULong  size;
-
-
       metrics->width  = (FT_UShort)imgWidth;
       metrics->height = (FT_UShort)imgHeight;
 
         error = FT_THROW( Array_Too_Large );
         goto DestroyExit;
       }
-
-      /* this doesn't overflow: 0x7FFF * 0x7FFF * 4 < 2^32 */
-      size = map->rows * (FT_ULong)map->pitch;
-
-      error = ft_glyphslot_alloc_bitmap( slot, size );
-      if ( error )
-        goto DestroyExit;
     }
 
     /* convert palette/gray image to rgb */
       goto DestroyExit;
     }
 
+    if ( metrics_only )
+      goto DestroyExit;
+
     switch ( color_type )
     {
     default:
       break;
     }
 
+    if ( populate_map_and_metrics )
+    {
+      /* this doesn't overflow: 0x7FFF * 0x7FFF * 4 < 2^32 */
+      FT_ULong  size = map->rows * (FT_ULong)map->pitch;
+
+
+      error = ft_glyphslot_alloc_bitmap( slot, size );
+      if ( error )
+        goto DestroyExit;
+    }
+
     if ( FT_NEW_ARRAY( rows, imgHeight ) )
     {
       error = FT_THROW( Out_Of_Memory );
     return error;
   }
 
-#endif /* FT_CONFIG_OPTION_USE_PNG */
+#else /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _pngshim_dummy;
+
+#endif /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */
 
 
 /* END */
index ff05871..344ecea 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PNG Bitmap glyph support.                                            */
 /*                                                                         */
-/*  Copyright 2013-2016 by                                                 */
+/*  Copyright 2013-2017 by                                                 */
 /*  Google, Inc.                                                           */
 /*  Written by Stuart Gill and Behdad Esfahbod.                            */
 /*                                                                         */
@@ -38,7 +38,8 @@ FT_BEGIN_HEADER
                  FT_Memory        memory,
                  FT_Byte*         data,
                  FT_UInt          png_len,
-                 FT_Bool          populate_map_and_metrics );
+                 FT_Bool          populate_map_and_metrics,
+                 FT_Bool          metrics_only );
 
 #endif
 
index e9fc421..230d56c 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 47e8967..991433e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level SFNT driver interface (body).                             */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -20,6 +20,7 @@
 #include FT_INTERNAL_DEBUG_H
 #include FT_INTERNAL_SFNT_H
 #include FT_INTERNAL_OBJECTS_H
+#include FT_TRUETYPE_IDS_H
 
 #include "sfdriver.h"
 #include "ttload.h"
 #include FT_SERVICE_SFNT_H
 #include FT_SERVICE_TT_CMAP_H
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_MULTIPLE_MASTERS_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#endif
+
 
   /*************************************************************************/
   /*                                                                       */
@@ -88,7 +94,7 @@
       break;
 
     case FT_SFNT_OS2:
-      table = face->os2.version == 0xFFFFU ? NULL : &face->os2;
+      table = ( face->os2.version == 0xFFFFU ) ? NULL : &face->os2;
       break;
 
     case FT_SFNT_POST:
 
   FT_DEFINE_SERVICE_SFNT_TABLEREC(
     sfnt_service_sfnt_table,
+
     (FT_SFNT_TableLoadFunc)tt_face_load_any,     /* load_table */
     (FT_SFNT_TableGetFunc) get_sfnt_table,       /* get_table  */
-    (FT_SFNT_TableInfoFunc)sfnt_table_info )     /* table_info */
+    (FT_SFNT_TableInfoFunc)sfnt_table_info       /* table_info */
+  )
 
 
 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
    */
 
   static FT_Error
-  sfnt_get_glyph_name( TT_Face     face,
+  sfnt_get_glyph_name( FT_Face     face,
                        FT_UInt     glyph_index,
                        FT_Pointer  buffer,
                        FT_UInt     buffer_max )
     FT_Error    error;
 
 
-    error = tt_face_get_ps_name( face, glyph_index, &gname );
+    error = tt_face_get_ps_name( (TT_Face)face, glyph_index, &gname );
     if ( !error )
       FT_STRCPYN( buffer, gname, buffer_max );
 
 
 
   static FT_UInt
-  sfnt_get_name_index( TT_Face     face,
+  sfnt_get_name_index( FT_Face     face,
                        FT_String*  glyph_name )
   {
-    FT_Face  root = &face->root;
+    TT_Face  ttface = (TT_Face)face;
 
     FT_UInt  i, max_gid = FT_UINT_MAX;
 
 
-    if ( root->num_glyphs < 0 )
+    if ( face->num_glyphs < 0 )
       return 0;
-    else if ( (FT_ULong)root->num_glyphs < FT_UINT_MAX )
-      max_gid = (FT_UInt)root->num_glyphs;
+    else if ( (FT_ULong)face->num_glyphs < FT_UINT_MAX )
+      max_gid = (FT_UInt)face->num_glyphs;
     else
       FT_TRACE0(( "Ignore glyph names for invalid GID 0x%08x - 0x%08x\n",
-                  FT_UINT_MAX, root->num_glyphs ));
+                  FT_UINT_MAX, face->num_glyphs ));
 
     for ( i = 0; i < max_gid; i++ )
     {
       FT_String*  gname;
-      FT_Error    error = tt_face_get_ps_name( face, i, &gname );
+      FT_Error    error = tt_face_get_ps_name( ttface, i, &gname );
 
 
       if ( error )
 
   FT_DEFINE_SERVICE_GLYPHDICTREC(
     sfnt_service_glyph_dict,
-    (FT_GlyphDict_GetNameFunc)  sfnt_get_glyph_name,    /* get_name   */
-    (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index )   /* name_index */
 
+    (FT_GlyphDict_GetNameFunc)  sfnt_get_glyph_name,    /* get_name   */
+    (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index     /* name_index */
+  )
 
 #endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
 
    *
    */
 
-  static const char*
-  sfnt_get_ps_name( TT_Face  face )
+  /* an array representing allowed ASCII characters in a PS string */
+  static const unsigned char sfnt_ps_map[16] =
   {
-    FT_Int       n, found_win, found_apple;
-    const char*  result = NULL;
+                /*             4        0        C        8 */
+    0x00, 0x00, /* 0x00: 0 0 0 0  0 0 0 0  0 0 0 0  0 0 0 0 */
+    0x00, 0x00, /* 0x10: 0 0 0 0  0 0 0 0  0 0 0 0  0 0 0 0 */
+    0xDE, 0x7C, /* 0x20: 1 1 0 1  1 1 1 0  0 1 1 1  1 1 0 0 */
+    0xFF, 0xAF, /* 0x30: 1 1 1 1  1 1 1 1  1 0 1 0  1 1 1 1 */
+    0xFF, 0xFF, /* 0x40: 1 1 1 1  1 1 1 1  1 1 1 1  1 1 1 1 */
+    0xFF, 0xD7, /* 0x50: 1 1 1 1  1 1 1 1  1 1 0 1  0 1 1 1 */
+    0xFF, 0xFF, /* 0x60: 1 1 1 1  1 1 1 1  1 1 1 1  1 1 1 1 */
+    0xFF, 0x57  /* 0x70: 1 1 1 1  1 1 1 1  0 1 0 1  0 1 1 1 */
+  };
+
+
+  static int
+  sfnt_is_postscript( int  c )
+  {
+    unsigned int  cc;
 
 
-    /* shouldn't happen, but just in case to avoid memory leaks */
-    if ( face->postscript_name )
-      return face->postscript_name;
+    if ( c < 0 || c >= 0x80 )
+      return 0;
 
-    /* scan the name table to see whether we have a Postscript name here, */
-    /* either in Macintosh or Windows platform encodings                  */
-    found_win   = -1;
-    found_apple = -1;
+    cc = (unsigned int)c;
+
+    return sfnt_ps_map[cc >> 3] & ( 1 << ( cc & 0x07 ) );
+  }
+
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+  /* Only ASCII letters and digits are taken for a variation font */
+  /* instance's PostScript name.                                  */
+  /*                                                              */
+  /* `ft_isalnum' is a macro, but we need a function here, thus   */
+  /* this definition.                                             */
+  static int
+  sfnt_is_alphanumeric( int  c )
+  {
+    return ft_isalnum( c );
+  }
+
+
+  /* the implementation of MurmurHash3 is taken and adapted from          */
+  /* https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp */
+
+#define ROTL32( x, r )  ( x << r ) | ( x >> ( 32 - r ) )
+
+
+  static FT_UInt32
+  fmix32( FT_UInt32  h )
+  {
+    h ^= h >> 16;
+    h *= 0x85ebca6b;
+    h ^= h >> 13;
+    h *= 0xc2b2ae35;
+    h ^= h >> 16;
+
+    return h;
+  }
+
+
+  static void
+  murmur_hash_3_128( const void*         key,
+                     const unsigned int  len,
+                     FT_UInt32           seed,
+                     void*               out )
+  {
+    const FT_Byte*  data    = (const FT_Byte*)key;
+    const int       nblocks = (int)len / 16;
+
+    FT_UInt32  h1 = seed;
+    FT_UInt32  h2 = seed;
+    FT_UInt32  h3 = seed;
+    FT_UInt32  h4 = seed;
+
+    const FT_UInt32  c1 = 0x239b961b;
+    const FT_UInt32  c2 = 0xab0e9789;
+    const FT_UInt32  c3 = 0x38b34ae5;
+    const FT_UInt32  c4 = 0xa1e38b93;
+
+    const FT_UInt32*  blocks = (const FT_UInt32*)( data + nblocks * 16 );
+
+    int  i;
+
+
+    for( i = -nblocks; i; i++ )
+    {
+      FT_UInt32  k1 = blocks[i * 4 + 0];
+      FT_UInt32  k2 = blocks[i * 4 + 1];
+      FT_UInt32  k3 = blocks[i * 4 + 2];
+      FT_UInt32  k4 = blocks[i * 4 + 3];
+
+
+      k1 *= c1;
+      k1  = ROTL32( k1, 15 );
+      k1 *= c2;
+      h1 ^= k1;
+
+      h1  = ROTL32( h1, 19 );
+      h1 += h2;
+      h1  = h1 * 5 + 0x561ccd1b;
+
+      k2 *= c2;
+      k2  = ROTL32( k2, 16 );
+      k2 *= c3;
+      h2 ^= k2;
+
+      h2  = ROTL32( h2, 17 );
+      h2 += h3;
+      h2  = h2 * 5 + 0x0bcaa747;
+
+      k3 *= c3;
+      k3  = ROTL32( k3, 17 );
+      k3 *= c4;
+      h3 ^= k3;
+
+      h3  = ROTL32( h3, 15 );
+      h3 += h4;
+      h3  = h3 * 5 + 0x96cd1c35;
+
+      k4 *= c4;
+      k4  = ROTL32( k4, 18 );
+      k4 *= c1;
+      h4 ^= k4;
+
+      h4  = ROTL32( h4, 13 );
+      h4 += h1;
+      h4  = h4 * 5 + 0x32ac3b17;
+    }
 
-    for ( n = 0; n < face->num_names; n++ )
     {
-      TT_NameEntryRec*  name = face->name_table.names + n;
+      const FT_Byte*  tail = (const FT_Byte*)( data + nblocks * 16 );
 
+      FT_UInt32  k1 = 0;
+      FT_UInt32  k2 = 0;
+      FT_UInt32  k3 = 0;
+      FT_UInt32  k4 = 0;
 
-      if ( name->nameID == 6 && name->stringLength > 0 )
+
+      switch ( len & 15 )
       {
-        if ( name->platformID == 3     &&
-             name->encodingID == 1     &&
-             name->languageID == 0x409 )
-          found_win = n;
-
-        if ( name->platformID == 1 &&
-             name->encodingID == 0 &&
-             name->languageID == 0 )
-          found_apple = n;
+      case 15:
+        k4 ^= (FT_UInt32)tail[14] << 16;
+      case 14:
+        k4 ^= (FT_UInt32)tail[13] << 8;
+      case 13:
+        k4 ^= (FT_UInt32)tail[12];
+        k4 *= c4;
+        k4  = ROTL32( k4, 18 );
+        k4 *= c1;
+        h4 ^= k4;
+
+      case 12:
+        k3 ^= (FT_UInt32)tail[11] << 24;
+      case 11:
+        k3 ^= (FT_UInt32)tail[10] << 16;
+      case 10:
+        k3 ^= (FT_UInt32)tail[9] << 8;
+      case 9:
+        k3 ^= (FT_UInt32)tail[8];
+        k3 *= c3;
+        k3  = ROTL32( k3, 17 );
+        k3 *= c4;
+        h3 ^= k3;
+
+      case 8:
+        k2 ^= (FT_UInt32)tail[7] << 24;
+      case 7:
+        k2 ^= (FT_UInt32)tail[6] << 16;
+      case 6:
+        k2 ^= (FT_UInt32)tail[5] << 8;
+      case 5:
+        k2 ^= (FT_UInt32)tail[4];
+        k2 *= c2;
+        k2  = ROTL32( k2, 16 );
+        k2 *= c3;
+        h2 ^= k2;
+
+      case 4:
+        k1 ^= (FT_UInt32)tail[3] << 24;
+      case 3:
+        k1 ^= (FT_UInt32)tail[2] << 16;
+      case 2:
+        k1 ^= (FT_UInt32)tail[1] << 8;
+      case 1:
+        k1 ^= (FT_UInt32)tail[0];
+        k1 *= c1;
+        k1  = ROTL32( k1, 15 );
+        k1 *= c2;
+        h1 ^= k1;
       }
     }
 
-    if ( found_win != -1 )
+    h1 ^= len;
+    h2 ^= len;
+    h3 ^= len;
+    h4 ^= len;
+
+    h1 += h2;
+    h1 += h3;
+    h1 += h4;
+
+    h2 += h1;
+    h3 += h1;
+    h4 += h1;
+
+    h1 = fmix32( h1 );
+    h2 = fmix32( h2 );
+    h3 = fmix32( h3 );
+    h4 = fmix32( h4 );
+
+    h1 += h2;
+    h1 += h3;
+    h1 += h4;
+
+    h2 += h1;
+    h3 += h1;
+    h4 += h1;
+
+    ((FT_UInt32*)out)[0] = h1;
+    ((FT_UInt32*)out)[1] = h2;
+    ((FT_UInt32*)out)[2] = h3;
+    ((FT_UInt32*)out)[3] = h4;
+  }
+
+
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+
+  typedef int (*char_type_func)( int  c );
+
+
+  /* handling of PID/EID 3/0 and 3/1 is the same */
+#define IS_WIN( n )  ( (n)->platformID == 3                             && \
+                       ( (n)->encodingID == 1 || (n)->encodingID == 0 ) && \
+                       (n)->languageID == 0x409                         )
+
+#define IS_APPLE( n )  ( (n)->platformID == 1 && \
+                         (n)->encodingID == 0 && \
+                         (n)->languageID == 0 )
+
+  static char*
+  get_win_string( FT_Memory       memory,
+                  FT_Stream       stream,
+                  TT_Name         entry,
+                  char_type_func  char_type,
+                  FT_Bool         report_invalid_characters )
+  {
+    FT_Error  error = FT_Err_Ok;
+
+    char*       result = NULL;
+    FT_String*  r;
+    FT_Char*    p;
+    FT_UInt     len;
+
+    FT_UNUSED( error );
+
+
+    if ( FT_ALLOC( result, entry->stringLength / 2 + 1 ) )
+      return NULL;
+
+    if ( FT_STREAM_SEEK( entry->stringOffset ) ||
+         FT_FRAME_ENTER( entry->stringLength ) )
     {
-      FT_Memory         memory = face->root.memory;
-      TT_NameEntryRec*  name   = face->name_table.names + found_win;
-      FT_UInt           len    = name->stringLength / 2;
-      FT_Error          error  = FT_Err_Ok;
+      FT_FREE( result );
+      entry->stringLength = 0;
+      entry->stringOffset = 0;
+      FT_FREE( entry->string );
 
-      FT_UNUSED( error );
+      return NULL;
+    }
 
+    r = (FT_String*)result;
+    p = (FT_Char*)stream->cursor;
 
-      if ( !FT_ALLOC( result, name->stringLength + 1 ) )
+    for ( len = entry->stringLength / 2; len > 0; len--, p += 2 )
+    {
+      if ( p[0] == 0 )
       {
-        FT_Stream   stream = face->name_table.stream;
-        FT_String*  r      = (FT_String*)result;
-        FT_Char*    p;
+        if ( char_type( p[1] ) )
+          *r++ = p[1];
+        else
+        {
+          if ( report_invalid_characters )
+          {
+            FT_TRACE0(( "get_win_string:"
+                        " Character `%c' (0x%X) invalid in PS name string\n",
+                        p[1], p[1] ));
+            /* it's not the job of FreeType to correct PS names... */
+            *r++ = p[1];
+          }
+        }
+      }
+    }
+    *r = '\0';
+
+    FT_FRAME_EXIT();
+
+    return result;
+  }
+
+
+  static char*
+  get_apple_string( FT_Memory       memory,
+                    FT_Stream       stream,
+                    TT_Name         entry,
+                    char_type_func  char_type,
+                    FT_Bool         report_invalid_characters )
+  {
+    FT_Error  error = FT_Err_Ok;
+
+    char*       result = NULL;
+    FT_String*  r;
+    FT_Char*    p;
+    FT_UInt     len;
+
+    FT_UNUSED( error );
+
 
+    if ( FT_ALLOC( result, entry->stringLength + 1 ) )
+      return NULL;
+
+    if ( FT_STREAM_SEEK( entry->stringOffset ) ||
+         FT_FRAME_ENTER( entry->stringLength ) )
+    {
+      FT_FREE( result );
+      entry->stringOffset = 0;
+      entry->stringLength = 0;
+      FT_FREE( entry->string );
 
-        if ( FT_STREAM_SEEK( name->stringOffset ) ||
-             FT_FRAME_ENTER( name->stringLength ) )
+      return NULL;
+    }
+
+    r = (FT_String*)result;
+    p = (FT_Char*)stream->cursor;
+
+    for ( len = entry->stringLength; len > 0; len--, p++ )
+    {
+      if ( char_type( *p ) )
+        *r++ = *p;
+      else
+      {
+        if ( report_invalid_characters )
         {
-          FT_FREE( result );
-          name->stringLength = 0;
-          name->stringOffset = 0;
-          FT_FREE( name->string );
+          FT_TRACE0(( "get_apple_string:"
+                      " Character `%c' (0x%X) invalid in PS name string\n",
+                      *p, *p ));
+          /* it's not the job of FreeType to correct PS names... */
+          *r++ = *p;
+        }
+      }
+    }
+    *r = '\0';
+
+    FT_FRAME_EXIT();
+
+    return result;
+  }
+
+
+  static FT_Bool
+  sfnt_get_name_id( TT_Face    face,
+                    FT_UShort  id,
+                    FT_Int    *win,
+                    FT_Int    *apple )
+  {
+    FT_Int  n;
+
+
+    *win   = -1;
+    *apple = -1;
+
+    for ( n = 0; n < face->num_names; n++ )
+    {
+      TT_Name  name = face->name_table.names + n;
+
+
+      if ( name->nameID == id && name->stringLength > 0 )
+      {
+        if ( IS_WIN( name ) )
+          *win = n;
+
+        if ( IS_APPLE( name ) )
+          *apple = n;
+      }
+    }
+
+    return ( *win >= 0 ) || ( *apple >= 0 );
+  }
+
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+  /*
+      The maximum length of an axis value descriptor.
+
+      We need 65536 different values for the decimal fraction; this fits
+      nicely into five decimal places.  Consequently, it consists of
+
+        . the minus sign if the number is negative,
+        . up to five characters for the digits before the decimal point,
+        . the decimal point if there is a fractional part, and
+        . up to five characters for the digits after the decimal point.
+
+      We also need one byte for the leading `_' character and up to four
+      bytes for the axis tag.
+   */
+#define MAX_VALUE_DESCRIPTOR_LEN  ( 1 + 5 + 1 + 5 + 1 + 4 )
+
+
+  /* the maximum length of PostScript font names */
+#define MAX_PS_NAME_LEN  127
+
+
+  /*
+   *  Find the shortest decimal representation of a 16.16 fixed point
+   *  number.  The function fills `buf' with the result, returning a pointer
+   *  to the position after the representation's last byte.
+   */
+
+  static char*
+  fixed2float( FT_Int  fixed,
+               char*   buf )
+  {
+    char*  p;
+    char*  q;
+    char   tmp[5];
+
+    FT_Int  int_part;
+    FT_Int  frac_part;
+
+    FT_Int  i;
+
 
-          goto Exit;
+    p = buf;
+
+    if ( fixed == 0 )
+    {
+      *p++ = '0';
+      return p;
+    }
+
+    if ( fixed < 0 )
+    {
+      *p++ = '-';
+      fixed = -fixed;
+    }
+
+    int_part  = ( fixed >> 16 ) & 0xFFFF;
+    frac_part = fixed & 0xFFFF;
+
+    /* get digits of integer part (in reverse order) */
+    q = tmp;
+    while ( int_part > 0 )
+    {
+      *q++      = '0' + int_part % 10;
+      int_part /= 10;
+    }
+
+    /* copy digits in correct order to buffer */
+    while ( q > tmp )
+      *p++ = *--q;
+
+    if ( !frac_part )
+      return p;
+
+    /* save position of point */
+    q    = p;
+    *p++ = '.';
+
+    /* apply rounding */
+    frac_part = frac_part * 10 + 5;
+
+    /* get digits of fractional part */
+    for ( i = 0; i < 5; i++ )
+    {
+      *p++ = '0' + (char)( frac_part / 0x10000L );
+
+      frac_part %= 0x10000L;
+      if ( !frac_part )
+        break;
+
+      frac_part *= 10;
+    }
+
+    /*
+        If the remainder stored in `frac_part' (after the last FOR loop) is
+        smaller than 34480*10, the resulting decimal value minus 0.00001 is
+        an equivalent representation of `fixed'.
+
+        The above FOR loop always finds the larger of the two values; I
+        verified this by iterating over all possible fixed point numbers.
+
+        If the remainder is 17232*10, both values are equally good, and we
+        take the next even number (following IEEE 754's `round to nearest,
+        ties to even' rounding rule).
+
+        If the remainder is smaller than 17232*10, the lower of the two
+        numbers is nearer to the exact result (values 17232 and 34480 were
+        also found by testing all possible fixed point values).
+
+        We use this to find a shorter decimal representation.  If not ending
+        with digit zero, we take the representation with less error.
+     */
+    p--;
+    if ( p - q == 5 )  /* five digits? */
+    {
+      /* take the representation that has zero as the last digit */
+      if ( frac_part < 34480 * 10 &&
+           *p == '1'              )
+        *p = '0';
+
+      /* otherwise use the one with less error */
+      else if ( frac_part == 17232 * 10 &&
+                *p & 1                  )
+        *p -= 1;
+
+      else if ( frac_part < 17232 * 10 &&
+                *p != '0'              )
+        *p -= 1;
+    }
+
+    /* remove trailing zeros */
+    while ( *p == '0' )
+      *p-- = '\0';
+
+    return p + 1;
+  }
+
+
+  static const char  hexdigits[16] =
+  {
+    '0', '1', '2', '3', '4', '5', '6', '7',
+    '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+  };
+
+
+  static const char*
+  sfnt_get_var_ps_name( TT_Face  face )
+  {
+    FT_Error   error;
+    FT_Memory  memory = face->root.memory;
+
+    FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
+
+    FT_UInt     num_coords;
+    FT_Fixed*   coords;
+    FT_MM_Var*  mm_var;
+
+    FT_Int   found, win, apple;
+    FT_UInt  i, j;
+
+    char*  result = NULL;
+    char*  p;
+
+
+    if ( !face->var_postscript_prefix )
+    {
+      FT_UInt  len;
+
+
+      /* check whether we have a Variations PostScript Name Prefix */
+      found = sfnt_get_name_id( face,
+                                TT_NAME_ID_VARIATIONS_PREFIX,
+                                &win,
+                                &apple );
+      if ( !found )
+      {
+        /* otherwise use the typographic family name */
+        found = sfnt_get_name_id( face,
+                                  TT_NAME_ID_TYPOGRAPHIC_FAMILY,
+                                  &win,
+                                  &apple );
+      }
+
+      if ( !found )
+      {
+        /* as a last resort we try the family name; note that this is */
+        /* not in the Adobe TechNote, but GX fonts (which predate the */
+        /* TechNote) benefit from this behaviour                      */
+        found = sfnt_get_name_id( face,
+                                  TT_NAME_ID_FONT_FAMILY,
+                                  &win,
+                                  &apple );
+      }
+
+      if ( !found )
+      {
+        FT_TRACE0(( "sfnt_get_var_ps_name:"
+                    " Can't construct PS name prefix for font instances\n" ));
+        return NULL;
+      }
+
+      /* prefer Windows entries over Apple */
+      if ( win != -1 )
+        result = get_win_string( face->root.memory,
+                                 face->name_table.stream,
+                                 face->name_table.names + win,
+                                 sfnt_is_alphanumeric,
+                                 0 );
+      else
+        result = get_apple_string( face->root.memory,
+                                   face->name_table.stream,
+                                   face->name_table.names + apple,
+                                   sfnt_is_alphanumeric,
+                                   0 );
+
+      len = ft_strlen( result );
+
+      /* sanitize if necessary; we reserve space for 36 bytes (a 128bit  */
+      /* checksum as a hex number, preceded by `-' and followed by three */
+      /* ASCII dots, to be used if the constructed PS name would be too  */
+      /* long); this is also sufficient for a single instance            */
+      if ( len > MAX_PS_NAME_LEN - ( 1 + 32 + 3 ) )
+      {
+        len         = MAX_PS_NAME_LEN - ( 1 + 32 + 3 );
+        result[len] = '\0';
+
+        FT_TRACE0(( "sfnt_get_var_ps_name:"
+                    " Shortening variation PS name prefix\n"
+                    "                     "
+                    " to %d characters\n", len ));
+      }
+
+      face->var_postscript_prefix     = result;
+      face->var_postscript_prefix_len = len;
+    }
+
+    mm->get_var_blend( FT_FACE( face ),
+                       &num_coords,
+                       &coords,
+                       NULL,
+                       &mm_var );
+
+    if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) )
+    {
+      SFNT_Service  sfnt = (SFNT_Service)face->sfnt;
+
+      FT_Long  instance = ( ( face->root.face_index & 0x7FFF0000L ) >> 16 ) - 1;
+      FT_UInt  psid     = mm_var->namedstyle[instance].psid;
+
+      char*  ps_name = NULL;
+
+
+      /* try first to load the name string with index `postScriptNameID' */
+      if ( psid == 6                      ||
+           ( psid > 255 && psid < 32768 ) )
+        (void)sfnt->get_name( face, (FT_UShort)psid, &ps_name );
+
+      if ( ps_name )
+      {
+        result = ps_name;
+        p      = result + ft_strlen( result ) + 1;
+
+        goto check_length;
+      }
+      else
+      {
+        /* otherwise construct a name using `subfamilyNameID' */
+        FT_UInt  strid = mm_var->namedstyle[instance].strid;
+
+        char*  subfamily_name;
+        char*  s;
+
+
+        (void)sfnt->get_name( face, (FT_UShort)strid, &subfamily_name );
+
+        if ( !subfamily_name )
+        {
+          FT_TRACE1(( "sfnt_get_var_ps_name:"
+                      " can't construct named instance PS name;\n"
+                      "                     "
+                      " trying to construct normal instance PS name\n" ));
+          goto construct_instance_name;
         }
 
-        p = (FT_Char*)stream->cursor;
+        /* after the prefix we have character `-' followed by the   */
+        /* subfamily name (using only characters a-z, A-Z, and 0-9) */
+        if ( FT_ALLOC( result, face->var_postscript_prefix_len +
+                               1 + ft_strlen( subfamily_name ) + 1 ) )
+          return NULL;
 
-        for ( ; len > 0; len--, p += 2 )
+        ft_strcpy( result, face->var_postscript_prefix );
+
+        p = result + face->var_postscript_prefix_len;
+        *p++ = '-';
+
+        s = subfamily_name;
+        while ( *s )
         {
-          if ( p[0] == 0 && p[1] >= 32 )
-            *r++ = p[1];
+          if ( ft_isalnum( *s ) )
+            *p++ = *s;
+          s++;
         }
-        *r = '\0';
+        *p++ = '\0';
+
+        FT_FREE( subfamily_name );
+      }
+    }
+    else
+    {
+      FT_Var_Axis*  axis;
 
-        FT_FRAME_EXIT();
+
+    construct_instance_name:
+      axis = mm_var->axis;
+
+      if ( FT_ALLOC( result,
+                     face->var_postscript_prefix_len +
+                       num_coords * MAX_VALUE_DESCRIPTOR_LEN + 1 ) )
+        return NULL;
+
+      p = result;
+
+      ft_strcpy( p, face->var_postscript_prefix );
+      p += face->var_postscript_prefix_len;
+
+      for ( i = 0; i < num_coords; i++, coords++, axis++ )
+      {
+        char  t;
+
+
+        /* omit axis value descriptor if it is identical */
+        /* to the default axis value                     */
+        if ( *coords == axis->def )
+          continue;
+
+        *p++ = '_';
+        p    = fixed2float( *coords, p );
+
+        t = (char)( axis->tag >> 24 );
+        if ( t != ' ' && ft_isalnum( t ) )
+          *p++ = t;
+        t = (char)( axis->tag >> 16 );
+        if ( t != ' ' && ft_isalnum( t ) )
+          *p++ = t;
+        t = (char)( axis->tag >> 8 );
+        if ( t != ' ' && ft_isalnum( t ) )
+          *p++ = t;
+        t = (char)axis->tag;
+        if ( t != ' ' && ft_isalnum( t ) )
+          *p++ = t;
       }
-      goto Exit;
     }
 
-    if ( found_apple != -1 )
+  check_length:
+    if ( p - result > MAX_PS_NAME_LEN )
     {
-      FT_Memory         memory = face->root.memory;
-      TT_NameEntryRec*  name   = face->name_table.names + found_apple;
-      FT_UInt           len    = name->stringLength;
-      FT_Error          error  = FT_Err_Ok;
+      /* the PS name is too long; replace the part after the prefix with */
+      /* a checksum; we use MurmurHash 3 with a hash length of 128 bit   */
+
+      FT_UInt32  seed = 123456789;
+
+      FT_UInt32   hash[4];
+      FT_UInt32*  h;
+
 
-      FT_UNUSED( error );
+      murmur_hash_3_128( result, p - result, seed, hash );
 
+      p = result + face->var_postscript_prefix_len;
+      *p++ = '-';
 
-      if ( !FT_ALLOC( result, len + 1 ) )
+      /* we convert the hash value to hex digits from back to front */
+      p += 32 + 3;
+      h  = hash + 3;
+
+      *p-- = '\0';
+      *p-- = '.';
+      *p-- = '.';
+      *p-- = '.';
+
+      for ( i = 0; i < 4; i++, h-- )
       {
-        FT_Stream  stream = face->name_table.stream;
+        FT_UInt32  v = *h;
 
 
-        if ( FT_STREAM_SEEK( name->stringOffset ) ||
-             FT_STREAM_READ( result, len )        )
+        for ( j = 0; j < 8; j++ )
         {
-          name->stringOffset = 0;
-          name->stringLength = 0;
-          FT_FREE( name->string );
-          FT_FREE( result );
-          goto Exit;
+          *p--   = hexdigits[v & 0xF];
+          v    >>= 4;
         }
-        ((char*)result)[len] = '\0';
       }
     }
 
-  Exit:
+    return result;
+  }
+
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+
+  static const char*
+  sfnt_get_ps_name( TT_Face  face )
+  {
+    FT_Int       found, win, apple;
+    const char*  result = NULL;
+
+
+    if ( face->postscript_name )
+      return face->postscript_name;
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    if ( face->blend )
+    {
+      face->postscript_name = sfnt_get_var_ps_name( face );
+      return face->postscript_name;
+    }
+#endif
+
+    /* scan the name table to see whether we have a Postscript name here, */
+    /* either in Macintosh or Windows platform encodings                  */
+    found = sfnt_get_name_id( face, TT_NAME_ID_PS_NAME, &win, &apple );
+    if ( !found )
+      return NULL;
+
+    /* prefer Windows entries over Apple */
+    if ( win != -1 )
+      result = get_win_string( face->root.memory,
+                               face->name_table.stream,
+                               face->name_table.names + win,
+                               sfnt_is_postscript,
+                               1 );
+    else
+      result = get_apple_string( face->root.memory,
+                                 face->name_table.stream,
+                                 face->name_table.names + apple,
+                                 sfnt_is_postscript,
+                                 1 );
+
     face->postscript_name = result;
+
     return result;
   }
 
 
   FT_DEFINE_SERVICE_PSFONTNAMEREC(
     sfnt_service_ps_name,
-    (FT_PsName_GetFunc)sfnt_get_ps_name )     /* get_ps_font_name */
+
+    (FT_PsName_GetFunc)sfnt_get_ps_name       /* get_ps_font_name */
+  )
 
 
   /*
    */
   FT_DEFINE_SERVICE_TTCMAPSREC(
     tt_service_get_cmap_info,
-    (TT_CMap_Info_GetFunc)tt_get_cmap_info )  /* get_cmap_info */
+
+    (TT_CMap_Info_GetFunc)tt_get_cmap_info    /* get_cmap_info */
+  )
 
 
 #ifdef TT_CONFIG_OPTION_BDF
 
   FT_DEFINE_SERVICE_BDFRec(
     sfnt_service_bdf,
+
     (FT_BDF_GetCharsetIdFunc)sfnt_get_charset_id,     /* get_charset_id */
-    (FT_BDF_GetPropertyFunc) tt_face_find_bdf_prop )  /* get_property   */
+    (FT_BDF_GetPropertyFunc) tt_face_find_bdf_prop    /* get_property   */
+  )
 
 
 #endif /* TT_CONFIG_OPTION_BDF */
 #if defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES && defined TT_CONFIG_OPTION_BDF
   FT_DEFINE_SERVICEDESCREC5(
     sfnt_services,
+
     FT_SERVICE_ID_SFNT_TABLE,           &SFNT_SERVICE_SFNT_TABLE_GET,
     FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,
     FT_SERVICE_ID_GLYPH_DICT,           &SFNT_SERVICE_GLYPH_DICT_GET,
 #elif defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES
   FT_DEFINE_SERVICEDESCREC4(
     sfnt_services,
+
     FT_SERVICE_ID_SFNT_TABLE,           &SFNT_SERVICE_SFNT_TABLE_GET,
     FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,
     FT_SERVICE_ID_GLYPH_DICT,           &SFNT_SERVICE_GLYPH_DICT_GET,
 #elif defined TT_CONFIG_OPTION_BDF
   FT_DEFINE_SERVICEDESCREC4(
     sfnt_services,
+
     FT_SERVICE_ID_SFNT_TABLE,           &SFNT_SERVICE_SFNT_TABLE_GET,
     FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,
     FT_SERVICE_ID_BDF,                  &SFNT_SERVICE_BDF_GET,
 #else
   FT_DEFINE_SERVICEDESCREC3(
     sfnt_services,
+
     FT_SERVICE_ID_SFNT_TABLE,           &SFNT_SERVICE_SFNT_TABLE_GET,
     FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET,
     FT_SERVICE_ID_TT_CMAP,              &TT_SERVICE_CMAP_INFO_GET )
 
   FT_DEFINE_SFNT_INTERFACE(
     sfnt_interface,
-    tt_face_goto_table,
 
-    sfnt_init_face,
-    sfnt_load_face,
-    sfnt_done_face,
-    sfnt_get_interface,
+    tt_face_goto_table,     /* TT_Loader_GotoTableFunc goto_table      */
+
+    sfnt_init_face,         /* TT_Init_Face_Func       init_face       */
+    sfnt_load_face,         /* TT_Load_Face_Func       load_face       */
+    sfnt_done_face,         /* TT_Done_Face_Func       done_face       */
+    sfnt_get_interface,     /* FT_Module_Requester     get_interface   */
 
-    tt_face_load_any,
+    tt_face_load_any,       /* TT_Load_Any_Func        load_any        */
 
-    tt_face_load_head,
-    tt_face_load_hhea,
-    tt_face_load_cmap,
-    tt_face_load_maxp,
-    tt_face_load_os2,
-    tt_face_load_post,
+    tt_face_load_head,      /* TT_Load_Table_Func      load_head       */
+    tt_face_load_hhea,      /* TT_Load_Metrics_Func    load_hhea       */
+    tt_face_load_cmap,      /* TT_Load_Table_Func      load_cmap       */
+    tt_face_load_maxp,      /* TT_Load_Table_Func      load_maxp       */
+    tt_face_load_os2,       /* TT_Load_Table_Func      load_os2        */
+    tt_face_load_post,      /* TT_Load_Table_Func      load_post       */
 
-    tt_face_load_name,
-    tt_face_free_name,
+    tt_face_load_name,      /* TT_Load_Table_Func      load_name       */
+    tt_face_free_name,      /* TT_Free_Table_Func      free_name       */
 
-    tt_face_load_kern,
-    tt_face_load_gasp,
-    tt_face_load_pclt,
+    tt_face_load_kern,      /* TT_Load_Table_Func      load_kern       */
+    tt_face_load_gasp,      /* TT_Load_Table_Func      load_gasp       */
+    tt_face_load_pclt,      /* TT_Load_Table_Func      load_init       */
 
     /* see `ttload.h' */
     PUT_EMBEDDED_BITMAPS( tt_face_load_bhed ),
-
+                            /* TT_Load_Table_Func      load_bhed       */
     PUT_EMBEDDED_BITMAPS( tt_face_load_sbit_image ),
+                            /* TT_Load_SBit_Image_Func load_sbit_image */
 
     /* see `ttpost.h' */
     PUT_PS_NAMES( tt_face_get_ps_name   ),
+                            /* TT_Get_PS_Name_Func     get_psname      */
     PUT_PS_NAMES( tt_face_free_ps_names ),
+                            /* TT_Free_Table_Func      free_psnames    */
 
     /* since version 2.1.8 */
-    tt_face_get_kerning,
+    tt_face_get_kerning,    /* TT_Face_GetKerningFunc  get_kerning     */
 
     /* since version 2.2 */
-    tt_face_load_font_dir,
-    tt_face_load_hmtx,
+    tt_face_load_font_dir,  /* TT_Load_Table_Func      load_font_dir   */
+    tt_face_load_hmtx,      /* TT_Load_Metrics_Func    load_hmtx       */
 
     /* see `ttsbit.h' and `sfnt.h' */
     PUT_EMBEDDED_BITMAPS( tt_face_load_sbit ),
+                            /* TT_Load_Table_Func      load_eblc       */
     PUT_EMBEDDED_BITMAPS( tt_face_free_sbit ),
+                            /* TT_Free_Table_Func      free_eblc       */
 
     PUT_EMBEDDED_BITMAPS( tt_face_set_sbit_strike     ),
+                            /* TT_Set_SBit_Strike_Func set_sbit_strike */
     PUT_EMBEDDED_BITMAPS( tt_face_load_strike_metrics ),
+                    /* TT_Load_Strike_Metrics_Func load_strike_metrics */
 
-    tt_face_get_metrics,
+    tt_face_get_metrics,    /* TT_Get_Metrics_Func     get_metrics     */
 
-    tt_face_get_name
+    tt_face_get_name,       /* TT_Get_Name_Func        get_name        */
+    sfnt_get_name_id        /* TT_Get_Name_ID_Func     get_name_id     */
   )
 
 
 
     (const void*)&SFNT_INTERFACE_GET,  /* module specific interface */
 
-    (FT_Module_Constructor)0,
-    (FT_Module_Destructor) 0,
-    (FT_Module_Requester)  sfnt_get_interface )
+    (FT_Module_Constructor)NULL,               /* module_init   */
+    (FT_Module_Destructor) NULL,               /* module_done   */
+    (FT_Module_Requester)  sfnt_get_interface  /* get_interface */
+  )
 
 
 /* END */
index 2694488..38710b6 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level SFNT driver interface (specification).                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c2f9fdf..3cf73d7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    SFNT error codes (specification only).                               */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 952d6d4..6cf8c9e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Single object library component.                                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
+
+#include "pngshim.c"
+#include "sfdriver.c"
 #include "sfntpic.c"
-#include "ttload.c"
-#include "ttmtx.c"
+#include "sfobjs.c"
+#include "ttbdf.c"
 #include "ttcmap.c"
 #include "ttkern.c"
-#include "sfobjs.c"
-#include "sfdriver.c"
-
-#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-#include "pngshim.c"
-#include "ttsbit.c"
-#endif
-
-#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#include "ttload.c"
+#include "ttmtx.c"
 #include "ttpost.c"
-#endif
+#include "ttsbit.c"
 
-#ifdef TT_CONFIG_OPTION_BDF
-#include "ttbdf.c"
-#endif
 
 /* END */
index 1f596c0..8eadd60 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for sfnt module.     */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 5ce96d3..3afb668 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for sfnt module.     */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 2e8c1ec..ac2e620 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    SFNT object management (base).                                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
 #include FT_SFNT_NAMES_H
 #include FT_GZIP_H
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
+#endif
+
 #include "sferrors.h"
 
 #ifdef TT_CONFIG_OPTION_BDF
@@ -48,8 +54,8 @@
 
   /* convert a UTF-16 name entry to ASCII */
   static FT_String*
-  tt_name_entry_ascii_from_utf16( TT_NameEntry  entry,
-                                  FT_Memory     memory )
+  tt_name_ascii_from_utf16( TT_Name    entry,
+                            FT_Memory  memory )
   {
     FT_String*  string = NULL;
     FT_UInt     len, code, n;
@@ -83,8 +89,8 @@
 
   /* convert an Apple Roman or symbol name entry to ASCII */
   static FT_String*
-  tt_name_entry_ascii_from_other( TT_NameEntry  entry,
-                                  FT_Memory     memory )
+  tt_name_ascii_from_other( TT_Name    entry,
+                            FT_Memory  memory )
   {
     FT_String*  string = NULL;
     FT_UInt     len, code, n;
   }
 
 
-  typedef FT_String*  (*TT_NameEntry_ConvertFunc)( TT_NameEntry  entry,
-                                                   FT_Memory     memory );
+  typedef FT_String*  (*TT_Name_ConvertFunc)( TT_Name    entry,
+                                              FT_Memory  memory );
 
 
   /* documentation is in sfnt.h */
                     FT_UShort    nameid,
                     FT_String**  name )
   {
-    FT_Memory         memory = face->root.memory;
-    FT_Error          error  = FT_Err_Ok;
-    FT_String*        result = NULL;
-    FT_UShort         n;
-    TT_NameEntryRec*  rec;
-    FT_Int            found_apple         = -1;
-    FT_Int            found_apple_roman   = -1;
-    FT_Int            found_apple_english = -1;
-    FT_Int            found_win           = -1;
-    FT_Int            found_unicode       = -1;
+    FT_Memory   memory = face->root.memory;
+    FT_Error    error  = FT_Err_Ok;
+    FT_String*  result = NULL;
+    FT_UShort   n;
+    TT_Name     rec;
+
+    FT_Int  found_apple         = -1;
+    FT_Int  found_apple_roman   = -1;
+    FT_Int  found_apple_english = -1;
+    FT_Int  found_win           = -1;
+    FT_Int  found_unicode       = -1;
 
-    FT_Bool           is_english = 0;
+    FT_Bool  is_english = 0;
 
-    TT_NameEntry_ConvertFunc  convert;
+    TT_Name_ConvertFunc  convert;
 
 
     FT_ASSERT( name );
         /* all Unicode strings are encoded using UTF-16BE */
       case TT_MS_ID_UNICODE_CS:
       case TT_MS_ID_SYMBOL_CS:
-        convert = tt_name_entry_ascii_from_utf16;
+        convert = tt_name_ascii_from_utf16;
         break;
 
       case TT_MS_ID_UCS_4:
         /* MsGothic font shipped with Windows Vista shows that this really */
         /* means UTF-16 encoded names (UCS-4 values are only used within   */
         /* charmaps).                                                      */
-        convert = tt_name_entry_ascii_from_utf16;
+        convert = tt_name_ascii_from_utf16;
         break;
 
       default:
     else if ( found_apple >= 0 )
     {
       rec     = face->name_table.names + found_apple;
-      convert = tt_name_entry_ascii_from_other;
+      convert = tt_name_ascii_from_other;
     }
     else if ( found_unicode >= 0 )
     {
       rec     = face->name_table.names + found_unicode;
-      convert = tt_name_entry_ascii_from_utf16;
+      convert = tt_name_ascii_from_utf16;
     }
 
     if ( rec && convert )
     {
-      if ( rec->string == NULL )
+      if ( !rec->string )
       {
         FT_Stream  stream = face->name_table.stream;
 
       { TT_PLATFORM_MICROSOFT,     TT_MS_ID_UCS_4,      FT_ENCODING_UNICODE },
       { TT_PLATFORM_MICROSOFT,     TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE },
       { TT_PLATFORM_MICROSOFT,     TT_MS_ID_SJIS,       FT_ENCODING_SJIS },
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_GB2312,     FT_ENCODING_GB2312 },
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_PRC,        FT_ENCODING_PRC },
       { TT_PLATFORM_MICROSOFT,     TT_MS_ID_BIG_5,      FT_ENCODING_BIG5 },
       { TT_PLATFORM_MICROSOFT,     TT_MS_ID_WANSUNG,    FT_ENCODING_WANSUNG },
       { TT_PLATFORM_MICROSOFT,     TT_MS_ID_JOHAB,      FT_ENCODING_JOHAB }
       if ( FT_STREAM_READ_FIELDS( ttc_header_fields, &face->ttc_header ) )
         return error;
 
+      FT_TRACE3(( "                with %ld subfonts\n",
+                  face->ttc_header.count ));
+
       if ( face->ttc_header.count == 0 )
         return FT_THROW( Invalid_Table );
 
 
     FT_FACE_FIND_GLOBAL_SERVICE( face, face->psnames, POSTSCRIPT_CMAPS );
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    if ( !face->mm )
+    {
+      /* we want the MM interface from the `truetype' module only */
+      FT_Module  tt_module = FT_Get_Module( library, "truetype" );
+
+
+      face->mm = ft_module_get_service( tt_module,
+                                        FT_SERVICE_ID_MULTI_MASTERS,
+                                        0 );
+    }
+
+    if ( !face->var )
+    {
+      /* we want the metrics variations interface */
+      /* from the `truetype' module only          */
+      FT_Module  tt_module = FT_Get_Module( library, "truetype" );
+
+
+      face->var = ft_module_get_service( tt_module,
+                                         FT_SERVICE_ID_METRICS_VARIATIONS,
+                                         0 );
+    }
+#endif
+
     FT_TRACE2(( "SFNT driver\n" ));
 
     error = sfnt_open_font( stream, face );
     /* Stream may have changed in sfnt_open_font. */
     stream = face->root.stream;
 
-    FT_TRACE2(( "sfnt_init_face: %08p, %ld\n", face, face_instance_index ));
+    FT_TRACE2(( "sfnt_init_face: %08p, %d\n", face, face_instance_index ));
 
     face_index = FT_ABS( face_instance_index ) & 0xFFFF;
 
+    /* value -(N+1) requests information on index N */
+    if ( face_instance_index < 0 )
+      face_index--;
+
     if ( face_index >= face->ttc_header.count )
     {
       if ( face_instance_index >= 0 )
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
     {
+      FT_Memory  memory = face->root.memory;
+
       FT_ULong  fvar_len;
 
       FT_ULong  version;
 
       FT_Int  instance_index;
 
+      FT_Byte*  default_values  = NULL;
+      FT_Byte*  instance_values = NULL;
+
+
+      face->is_default_instance = 1;
 
       instance_index = FT_ABS( face_instance_index ) >> 16;
 
            fvar_len < 20                                          ||
            FT_READ_ULONG( version )                               ||
            FT_READ_USHORT( offset )                               ||
-           FT_STREAM_SKIP( 2 )                                    ||
+           FT_STREAM_SKIP( 2 ) /* reserved */                     ||
            FT_READ_USHORT( num_axes )                             ||
            FT_READ_USHORT( axis_size )                            ||
            FT_READ_USHORT( num_instances )                        ||
         instance_size = 0;
       }
 
-      /* check that the data is bound by the table length; */
-      /* based on similar code in function `TT_Get_MM_Var' */
+      /* check that the data is bound by the table length */
       if ( version != 0x00010000UL                    ||
            axis_size != 20                            ||
+           num_axes == 0                              ||
+           /* `num_axes' limit implied by 16-bit `instance_size' */
            num_axes > 0x3FFE                          ||
-           instance_size != 4 + 4 * num_axes          ||
+           !( instance_size == 4 + 4 * num_axes ||
+              instance_size == 6 + 4 * num_axes )     ||
+           /* `num_instances' limit implied by limited range of name IDs */
            num_instances > 0x7EFF                     ||
            offset                          +
              axis_size * num_axes          +
              instance_size * num_instances > fvar_len )
         num_instances = 0;
+      else
+        face->variation_support |= TT_FACE_FLAG_VAR_FVAR;
 
-      /* we don't support Multiple Master CFFs yet */
-      if ( !face->goto_table( face, TTAG_CFF, stream, 0 ) )
-        num_instances = 0;
+      /*
+       *  As documented in the OpenType specification, an entry for the
+       *  default instance may be omitted in the named instance table.  In
+       *  particular this means that even if there is no named instance
+       *  table in the font we actually do have a named instance, namely the
+       *  default instance.
+       *
+       *  For consistency, we always want the default instance in our list
+       *  of named instances.  If it is missing, we try to synthesize it
+       *  later on.  Here, we have to adjust `num_instances' accordingly.
+       */
 
-      /* we support at most 2^15 - 1 instances */
-      if ( num_instances >= ( 1U << 15 ) - 1 )
+      if ( ( face->variation_support & TT_FACE_FLAG_VAR_FVAR ) &&
+           !( FT_ALLOC( default_values, num_axes * 4 )  ||
+              FT_ALLOC( instance_values, num_axes * 4 ) )      )
       {
-        if ( face_instance_index >= 0 )
-          return FT_THROW( Invalid_Argument );
-        else
-          num_instances = 0;
+        /* the current stream position is 16 bytes after the table start */
+        FT_ULong  array_start = FT_STREAM_POS() - 16 + offset;
+        FT_ULong  default_value_offset, instance_offset;
+
+        FT_Byte*  p;
+        FT_UInt   i;
+
+
+        default_value_offset = array_start + 8;
+        p                    = default_values;
+
+        for ( i = 0; i < num_axes; i++ )
+        {
+          (void)FT_STREAM_READ_AT( default_value_offset, p, 4 );
+
+          default_value_offset += axis_size;
+          p                    += 4;
+        }
+
+        instance_offset = array_start + axis_size * num_axes + 4;
+
+        for ( i = 0; i < num_instances; i++ )
+        {
+          (void)FT_STREAM_READ_AT( instance_offset,
+                                   instance_values,
+                                   num_axes * 4 );
+
+          if ( !ft_memcmp( default_values, instance_values, num_axes * 4 ) )
+            break;
+
+          instance_offset += instance_size;
+        }
+
+        if ( i == num_instances )
+        {
+          /* no default instance in named instance table; */
+          /* we thus have to synthesize it                */
+          num_instances++;
+        }
       }
 
+      FT_FREE( default_values );
+      FT_FREE( instance_values );
+
+      /* we don't support Multiple Master CFFs yet; */
+      /* note that `glyf' or `CFF2' have precedence */
+      if ( face->goto_table( face, TTAG_glyf, stream, 0 ) &&
+           face->goto_table( face, TTAG_CFF2, stream, 0 ) &&
+           !face->goto_table( face, TTAG_CFF, stream, 0 ) )
+        num_instances = 0;
+
       /* instance indices in `face_instance_index' start with index 1, */
       /* thus `>' and not `>='                                         */
       if ( instance_index > num_instances )
 #endif
 
     face->root.num_faces  = face->ttc_header.count;
-    face->root.face_index = face_index;
+    face->root.face_index = face_instance_index;
 
     return error;
   }
     FT_Bool       has_outline;
     FT_Bool       is_apple_sbit;
     FT_Bool       is_apple_sbix;
-    FT_Bool       ignore_preferred_family    = FALSE;
-    FT_Bool       ignore_preferred_subfamily = FALSE;
+    FT_Bool       ignore_typographic_family    = FALSE;
+    FT_Bool       ignore_typographic_subfamily = FALSE;
 
     SFNT_Service  sfnt = (SFNT_Service)face->sfnt;
 
 
       for ( i = 0; i < num_params; i++ )
       {
-        if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY )
-          ignore_preferred_family = TRUE;
-        else if ( params[i].tag == FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY )
-          ignore_preferred_subfamily = TRUE;
+        if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY )
+          ignore_typographic_family = TRUE;
+        else if ( params[i].tag == FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY )
+          ignore_typographic_subfamily = TRUE;
       }
     }
 
 
     /* do we have outlines in there? */
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
-    has_outline = FT_BOOL( face->root.internal->incremental_interface != 0 ||
-                           tt_face_lookup_table( face, TTAG_glyf )    != 0 ||
-                           tt_face_lookup_table( face, TTAG_CFF )     != 0 );
+    has_outline = FT_BOOL( face->root.internal->incremental_interface ||
+                           tt_face_lookup_table( face, TTAG_glyf )    ||
+                           tt_face_lookup_table( face, TTAG_CFF )     ||
+                           tt_face_lookup_table( face, TTAG_CFF2 )    );
 #else
-    has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
-                           tt_face_lookup_table( face, TTAG_CFF )  != 0 );
+    has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) ||
+                           tt_face_lookup_table( face, TTAG_CFF )  ||
+                           tt_face_lookup_table( face, TTAG_CFF2 ) );
 #endif
 
     is_apple_sbit = 0;
 
     /* embedded bitmap support */
     if ( sfnt->load_eblc )
-    {
       LOAD_( eblc );
-      if ( error )
-      {
-        /* a font which contains neither bitmaps nor outlines is */
-        /* still valid (although rather useless in most cases);  */
-        /* however, you can find such stripped fonts in PDFs     */
-        if ( FT_ERR_EQ( error, Table_Missing ) )
-          error = FT_Err_Ok;
-        else
-          goto Exit;
-      }
-    }
 
+    /* consider the pclt, kerning, and gasp tables as optional */
     LOAD_( pclt );
-    if ( error )
-    {
-      if ( FT_ERR_NEQ( error, Table_Missing ) )
-        goto Exit;
-
-      face->pclt.Version = 0;
-    }
-
-    /* consider the kerning and gasp tables as optional */
     LOAD_( gasp );
     LOAD_( kern );
 
     face->root.style_name  = NULL;
     if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 )
     {
-      if ( !ignore_preferred_family )
-        GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
+      if ( !ignore_typographic_family )
+        GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name );
       if ( !face->root.family_name )
         GET_NAME( FONT_FAMILY, &face->root.family_name );
 
-      if ( !ignore_preferred_subfamily )
-        GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
+      if ( !ignore_typographic_subfamily )
+        GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name );
       if ( !face->root.style_name )
         GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
     }
     else
     {
       GET_NAME( WWS_FAMILY, &face->root.family_name );
-      if ( !face->root.family_name && !ignore_preferred_family )
-        GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
+      if ( !face->root.family_name && !ignore_typographic_family )
+        GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name );
       if ( !face->root.family_name )
         GET_NAME( FONT_FAMILY, &face->root.family_name );
 
       GET_NAME( WWS_SUBFAMILY, &face->root.style_name );
-      if ( !face->root.style_name && !ignore_preferred_subfamily )
-        GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
+      if ( !face->root.style_name && !ignore_typographic_subfamily )
+        GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name );
       if ( !face->root.style_name )
         GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
     }
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
       /* Don't bother to load the tables unless somebody asks for them. */
       /* No need to do work which will (probably) not be used.          */
-      if ( tt_face_lookup_table( face, TTAG_glyf ) != 0 &&
-           tt_face_lookup_table( face, TTAG_fvar ) != 0 &&
-           tt_face_lookup_table( face, TTAG_gvar ) != 0 )
-        flags |= FT_FACE_FLAG_MULTIPLE_MASTERS;
+      if ( face->variation_support & TT_FACE_FLAG_VAR_FVAR )
+      {
+        if ( tt_face_lookup_table( face, TTAG_glyf ) != 0 &&
+             tt_face_lookup_table( face, TTAG_gvar ) != 0 )
+          flags |= FT_FACE_FLAG_MULTIPLE_MASTERS;
+        if ( tt_face_lookup_table( face, TTAG_CFF2 ) != 0 )
+          flags |= FT_FACE_FLAG_MULTIPLE_MASTERS;
+      }
 #endif
 
       root->face_flags = flags;
                                                   charmap->encoding_id );
 
 #if 0
-          if ( root->charmap     == NULL &&
+          if ( !root->charmap                           &&
                charmap->encoding == FT_ENCODING_UNICODE )
           {
             /* set 'root->charmap' to the first Unicode encoding we find */
        *  depths in the FT_Bitmap_Size record.  This is a design error.
        */
       {
-        FT_UInt  i, count;
+        FT_UInt  count;
 
 
         count = face->sbit_num_strikes;
           FT_Short         avgwidth = face->os2.xAvgCharWidth;
           FT_Size_Metrics  metrics;
 
+          FT_UInt*  sbit_strike_map = NULL;
+          FT_UInt   strike_idx, bsize_idx;
+
 
           if ( em_size == 0 || face->os2.version == 0xFFFFU )
           {
             em_size = 1;
           }
 
-          if ( FT_NEW_ARRAY( root->available_sizes, count ) )
+          /* to avoid invalid strike data in the `available_sizes' field */
+          /* of `FT_Face', we map `available_sizes' indices to strike    */
+          /* indices                                                     */
+          if ( FT_NEW_ARRAY( root->available_sizes, count ) ||
+               FT_NEW_ARRAY( sbit_strike_map, count ) )
             goto Exit;
 
-          for ( i = 0; i < count; i++ )
+          bsize_idx = 0;
+          for ( strike_idx = 0; strike_idx < count; strike_idx++ )
           {
-            FT_Bitmap_Size*  bsize = root->available_sizes + i;
+            FT_Bitmap_Size*  bsize = root->available_sizes + bsize_idx;
 
 
-            error = sfnt->load_strike_metrics( face, i, &metrics );
+            error = sfnt->load_strike_metrics( face, strike_idx, &metrics );
             if ( error )
-              goto Exit;
+              continue;
 
             bsize->height = (FT_Short)( metrics.height >> 6 );
-            bsize->width = (FT_Short)(
-                ( avgwidth * metrics.x_ppem + em_size / 2 ) / em_size );
+            bsize->width  = (FT_Short)(
+              ( avgwidth * metrics.x_ppem + em_size / 2 ) / em_size );
 
             bsize->x_ppem = metrics.x_ppem << 6;
             bsize->y_ppem = metrics.y_ppem << 6;
 
             /* assume 72dpi */
             bsize->size   = metrics.y_ppem << 6;
+
+            /* only use strikes with valid PPEM values */
+            if ( bsize->x_ppem && bsize->y_ppem )
+              sbit_strike_map[bsize_idx++] = strike_idx;
           }
 
-          root->face_flags     |= FT_FACE_FLAG_FIXED_SIZES;
-          root->num_fixed_sizes = (FT_Int)count;
+          /* reduce array size to the actually used elements */
+          (void)FT_RENEW_ARRAY( sbit_strike_map, count, bsize_idx );
+
+          /* from now on, all strike indices are mapped */
+          /* using `sbit_strike_map'                    */
+          if ( bsize_idx )
+          {
+            face->sbit_strike_map = sbit_strike_map;
+
+            root->face_flags     |= FT_FACE_FLAG_FIXED_SIZES;
+            root->num_fixed_sizes = (FT_Int)bsize_idx;
+          }
         }
       }
 
       face->cmap_size = 0;
     }
 
-    /* freeing the horizontal metrics */
-    {
-      FT_Stream  stream = FT_FACE_STREAM( face );
-
+    face->horz_metrics_size = 0;
+    face->vert_metrics_size = 0;
 
-      FT_FRAME_RELEASE( face->horz_metrics );
-      FT_FRAME_RELEASE( face->vert_metrics );
-      face->horz_metrics_size = 0;
-      face->vert_metrics_size = 0;
-    }
-
-    /* freeing the vertical ones, if any */
+    /* freeing vertical metrics, if any */
     if ( face->vertical_info )
     {
       FT_FREE( face->vertical.long_metrics  );
 
     /* freeing sbit size table */
     FT_FREE( face->root.available_sizes );
+    FT_FREE( face->sbit_strike_map );
     face->root.num_fixed_sizes = 0;
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
     FT_FREE( face->postscript_name );
+    FT_FREE( face->var_postscript_prefix );
+#endif
 
     face->sfnt = NULL;
   }
index 60b5698..7053814 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    SFNT object management (specification).                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f891691..2196e37 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded BDF properties (body).                */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -48,7 +48,7 @@
       FT_Stream  stream = FT_FACE(face)->stream;
 
 
-      if ( bdf->table != NULL )
+      if ( bdf->table )
         FT_FRAME_RELEASE( bdf->table );
 
       bdf->table_end    = NULL;
 
     error = FT_ERR( Invalid_Argument );
 
-    if ( size == NULL || property_name == NULL )
+    if ( !size || !property_name )
       goto Exit;
 
     property_len = ft_strlen( property_name );
       FT_UInt  _ppem  = FT_NEXT_USHORT( p );
       FT_UInt  _count = FT_NEXT_USHORT( p );
 
+
       if ( _ppem == size->metrics.y_ppem )
       {
         count = _count;
     {
       FT_UInt  type = FT_PEEK_USHORT( p + 4 );
 
+
       if ( ( type & 0x10 ) != 0 )
       {
         FT_UInt32  name_offset = FT_PEEK_ULONG( p     );
     return error;
   }
 
-#endif /* TT_CONFIG_OPTION_BDF */
+#else /* !TT_CONFIG_OPTION_BDF */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _tt_bdf_dummy;
+
+#endif /* !TT_CONFIG_OPTION_BDF */
 
 
 /* END */
index ae521c6..398b620 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded BDF properties (specification).       */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 01255a8..5afa6ae 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType character mapping table (cmap) support (body).              */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
   FT_DEFINE_TT_CMAP(
     tt_cmap0_class_rec,
-    sizeof ( TT_CMapRec ),
 
-    (FT_CMap_InitFunc)     tt_cmap_init,
-    (FT_CMap_DoneFunc)     NULL,
-    (FT_CMap_CharIndexFunc)tt_cmap0_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap0_char_next,
+      sizeof ( TT_CMapRec ),
 
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+      (FT_CMap_InitFunc)     tt_cmap_init,         /* init       */
+      (FT_CMap_DoneFunc)     NULL,                 /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap0_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap0_char_next,   /* char_next  */
+
+      (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+      (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+      (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+      (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+      (FT_CMap_VariantCharListFunc) NULL,  /* variantchar_list */
 
     0,
-    (TT_CMap_ValidateFunc)tt_cmap0_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap0_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap0_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap0_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_0 */
 
 
   FT_DEFINE_TT_CMAP(
     tt_cmap2_class_rec,
-    sizeof ( TT_CMapRec ),
 
-    (FT_CMap_InitFunc)     tt_cmap_init,
-    (FT_CMap_DoneFunc)     NULL,
-    (FT_CMap_CharIndexFunc)tt_cmap2_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap2_char_next,
+      sizeof ( TT_CMapRec ),
 
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+      (FT_CMap_InitFunc)     tt_cmap_init,         /* init       */
+      (FT_CMap_DoneFunc)     NULL,                 /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap2_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap2_char_next,   /* char_next  */
+
+      (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+      (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+      (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+      (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+      (FT_CMap_VariantCharListFunc) NULL,  /* variantchar_list */
 
     2,
-    (TT_CMap_ValidateFunc)tt_cmap2_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap2_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap2_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap2_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_2 */
 
   static void
   tt_cmap4_next( TT_CMap4  cmap )
   {
+    TT_Face   face  = (TT_Face)cmap->cmap.cmap.charmap.face;
+    FT_Byte*  limit = face->cmap_table + face->cmap_size;
+
     FT_UInt  charcode;
 
 
           FT_Byte*  p = values + 2 * ( charcode - cmap->cur_start );
 
 
+          /* if p > limit, the whole segment is invalid */
+          if ( p > limit )
+            goto Next_Segment;
+
           do
           {
             FT_UInt  gindex = FT_NEXT_USHORT( p );
 
 
-            if ( gindex != 0 )
+            if ( gindex )
             {
               gindex = (FT_UInt)( (FT_Int)gindex + delta ) & 0xFFFFU;
-              if ( gindex != 0 )
+              if ( gindex )
               {
                 cmap->cur_charcode = charcode;
                 cmap->cur_gindex   = gindex;
             FT_UInt  gindex = (FT_UInt)( (FT_Int)charcode + delta ) & 0xFFFFU;
 
 
-            if ( gindex != 0 )
+            if ( gindex >= (FT_UInt)face->root.num_glyphs )
+            {
+              /* we have an invalid glyph index; if there is an overflow, */
+              /* we can adjust `charcode', otherwise the whole segment is */
+              /* invalid                                                  */
+              gindex = 0;
+
+              if ( (FT_Int)charcode + delta < 0 &&
+                   (FT_Int)end + delta >= 0     )
+                charcode = (FT_UInt)( -delta );
+
+              else if ( (FT_Int)charcode + delta < 0x10000L &&
+                        (FT_Int)end + delta >= 0x10000L     )
+                charcode = (FT_UInt)( 0x10000L - delta );
+
+              else
+                goto Next_Segment;
+            }
+
+            if ( gindex )
             {
               cmap->cur_charcode = charcode;
               cmap->cur_gindex   = gindex;
         }
       }
 
+    Next_Segment:
       /* we need to find another range */
       if ( tt_cmap4_set_range( cmap, cmap->cur_range + 1 ) < 0 )
         break;
                             FT_UInt32*  pcharcode,
                             FT_Bool     next )
   {
+    TT_Face   face  = (TT_Face)cmap->cmap.charmap.face;
+    FT_Byte*  limit = face->cmap_table + face->cmap_size;
+
     FT_UInt   num_segs2, start, end, offset;
     FT_Int    delta;
     FT_UInt   max, min, mid, num_segs;
         if ( mid >= num_segs - 1                &&
              start == 0xFFFFU && end == 0xFFFFU )
         {
-          TT_Face   face  = (TT_Face)cmap->cmap.charmap.face;
-          FT_Byte*  limit = face->cmap_table + face->cmap_size;
-
-
           if ( offset && p + offset + 2 > limit )
           {
             delta  = 1;
         if ( offset )
         {
           p += offset + ( charcode - start ) * 2;
+
+          /* if p > limit, the whole segment is invalid */
+          if ( next && p > limit )
+            break;
+
           gindex = TT_PEEK_USHORT( p );
-          if ( gindex != 0 )
+          if ( gindex )
+          {
             gindex = (FT_UInt)( (FT_Int)gindex + delta ) & 0xFFFFU;
+            if ( gindex >= (FT_UInt)face->root.num_glyphs )
+              gindex = 0;
+          }
         }
         else
+        {
           gindex = (FT_UInt)( (FT_Int)charcode + delta ) & 0xFFFFU;
 
+          if ( next && gindex >= (FT_UInt)face->root.num_glyphs )
+          {
+            /* we have an invalid glyph index; if there is an overflow, */
+            /* we can adjust `charcode', otherwise the whole segment is */
+            /* invalid                                                  */
+            gindex = 0;
+
+            if ( (FT_Int)charcode + delta < 0 &&
+                 (FT_Int)end + delta >= 0     )
+              charcode = (FT_UInt)( -delta );
+
+            else if ( (FT_Int)charcode + delta < 0x10000L &&
+                      (FT_Int)end + delta >= 0x10000L     )
+              charcode = (FT_UInt)( 0x10000L - delta );
+          }
+        }
+
         break;
       }
     }
 
   FT_DEFINE_TT_CMAP(
     tt_cmap4_class_rec,
-    sizeof ( TT_CMap4Rec ),
-    (FT_CMap_InitFunc)     tt_cmap4_init,
-    (FT_CMap_DoneFunc)     NULL,
-    (FT_CMap_CharIndexFunc)tt_cmap4_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap4_char_next,
 
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+      sizeof ( TT_CMap4Rec ),
+
+      (FT_CMap_InitFunc)     tt_cmap4_init,        /* init       */
+      (FT_CMap_DoneFunc)     NULL,                 /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap4_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap4_char_next,   /* char_next  */
+
+      (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+      (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+      (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+      (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+      (FT_CMap_VariantCharListFunc) NULL,  /* variantchar_list */
 
     4,
-    (TT_CMap_ValidateFunc)tt_cmap4_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap4_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap4_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap4_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_4 */
 
 
   FT_DEFINE_TT_CMAP(
     tt_cmap6_class_rec,
-    sizeof ( TT_CMapRec ),
 
-    (FT_CMap_InitFunc)     tt_cmap_init,
-    (FT_CMap_DoneFunc)     NULL,
-    (FT_CMap_CharIndexFunc)tt_cmap6_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap6_char_next,
+      sizeof ( TT_CMapRec ),
 
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+      (FT_CMap_InitFunc)     tt_cmap_init,         /* init       */
+      (FT_CMap_DoneFunc)     NULL,                 /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap6_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap6_char_next,   /* char_next  */
+
+      (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+      (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+      (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+      (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+      (FT_CMap_VariantCharListFunc) NULL,  /* variantchar_list */
 
     6,
-    (TT_CMap_ValidateFunc)tt_cmap6_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap6_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap6_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap6_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_6 */
 
 
   FT_DEFINE_TT_CMAP(
     tt_cmap8_class_rec,
-    sizeof ( TT_CMapRec ),
 
-    (FT_CMap_InitFunc)     tt_cmap_init,
-    (FT_CMap_DoneFunc)     NULL,
-    (FT_CMap_CharIndexFunc)tt_cmap8_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap8_char_next,
+      sizeof ( TT_CMapRec ),
 
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+      (FT_CMap_InitFunc)     tt_cmap_init,         /* init       */
+      (FT_CMap_DoneFunc)     NULL,                 /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap8_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap8_char_next,   /* char_next  */
+
+      (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+      (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+      (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+      (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+      (FT_CMap_VariantCharListFunc) NULL,  /* variantchar_list */
 
     8,
-    (TT_CMap_ValidateFunc)tt_cmap8_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap8_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap8_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap8_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_8 */
 
 
   FT_DEFINE_TT_CMAP(
     tt_cmap10_class_rec,
-    sizeof ( TT_CMapRec ),
 
-    (FT_CMap_InitFunc)     tt_cmap_init,
-    (FT_CMap_DoneFunc)     NULL,
-    (FT_CMap_CharIndexFunc)tt_cmap10_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap10_char_next,
+      sizeof ( TT_CMapRec ),
 
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+      (FT_CMap_InitFunc)     tt_cmap_init,          /* init       */
+      (FT_CMap_DoneFunc)     NULL,                  /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap10_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap10_char_next,   /* char_next  */
+
+      (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+      (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+      (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+      (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+      (FT_CMap_VariantCharListFunc) NULL,  /* variantchar_list */
 
     10,
-    (TT_CMap_ValidateFunc)tt_cmap10_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap10_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap10_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap10_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_10 */
 
 
   FT_DEFINE_TT_CMAP(
     tt_cmap12_class_rec,
-    sizeof ( TT_CMap12Rec ),
 
-    (FT_CMap_InitFunc)     tt_cmap12_init,
-    (FT_CMap_DoneFunc)     NULL,
-    (FT_CMap_CharIndexFunc)tt_cmap12_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap12_char_next,
+      sizeof ( TT_CMap12Rec ),
 
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+      (FT_CMap_InitFunc)     tt_cmap12_init,        /* init       */
+      (FT_CMap_DoneFunc)     NULL,                  /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap12_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap12_char_next,   /* char_next  */
+
+      (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+      (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+      (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+      (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+      (FT_CMap_VariantCharListFunc) NULL,  /* variantchar_list */
 
     12,
-    (TT_CMap_ValidateFunc)tt_cmap12_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap12_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap12_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap12_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_12 */
 
 
   FT_DEFINE_TT_CMAP(
     tt_cmap13_class_rec,
-    sizeof ( TT_CMap13Rec ),
 
-    (FT_CMap_InitFunc)     tt_cmap13_init,
-    (FT_CMap_DoneFunc)     NULL,
-    (FT_CMap_CharIndexFunc)tt_cmap13_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap13_char_next,
+      sizeof ( TT_CMap13Rec ),
 
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
+      (FT_CMap_InitFunc)     tt_cmap13_init,        /* init       */
+      (FT_CMap_DoneFunc)     NULL,                  /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap13_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap13_char_next,   /* char_next  */
+
+      (FT_CMap_CharVarIndexFunc)    NULL,  /* char_var_index   */
+      (FT_CMap_CharVarIsDefaultFunc)NULL,  /* char_var_default */
+      (FT_CMap_VariantListFunc)     NULL,  /* variant_list     */
+      (FT_CMap_CharVariantListFunc) NULL,  /* charvariant_list */
+      (FT_CMap_VariantCharListFunc) NULL,  /* variantchar_list */
 
     13,
-    (TT_CMap_ValidateFunc)tt_cmap13_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap13_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap13_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap13_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_13 */
 
 
 
     cmap->max_results = 0;
-    if ( memory != NULL && cmap->results != NULL )
+    if ( memory && cmap->results )
       FT_FREE( cmap->results );
   }
 
           if ( numRanges > (FT_ULong)( valid->limit - defp ) / 4 )
             FT_INVALID_TOO_SHORT;
 
-          for ( i = 0; i < numRanges; ++i )
+          for ( i = 0; i < numRanges; i++ )
           {
             FT_ULong  base = TT_NEXT_UINT24( defp );
             FT_ULong  cnt  = FT_NEXT_BYTE( defp );
           if ( numMappings > ( (FT_ULong)( valid->limit - ndp ) ) / 5 )
             FT_INVALID_TOO_SHORT;
 
-          for ( i = 0; i < numMappings; ++i )
+          for ( i = 0; i < numMappings; i++ )
           {
             FT_ULong  uni = TT_NEXT_UINT24( ndp );
             FT_ULong  gid = TT_NEXT_USHORT( ndp );
       return NULL;
 
     result = cmap14->results;
-    for ( i = 0; i < count; ++i )
+    for ( i = 0; i < count; i++ )
     {
       result[i] = (FT_UInt32)TT_NEXT_UINT24( p );
       p        += 8;
     if ( tt_cmap14_ensure( cmap14, ( count + 1 ), memory ) )
       return NULL;
 
-    for ( q = cmap14->results; count > 0; --count )
+    for ( q = cmap14->results; count > 0; count-- )
     {
       FT_UInt32  varSel    = TT_NEXT_UINT24( p );
       FT_ULong   defOff    = TT_NEXT_ULONG( p );
     if ( tt_cmap14_ensure( cmap14, ( cnt + 1 ), memory ) )
       return NULL;
 
-    for ( q = cmap14->results; numRanges > 0; --numRanges )
+    for ( q = cmap14->results; numRanges > 0; numRanges-- )
     {
       FT_UInt32  uni = (FT_UInt32)TT_NEXT_UINT24( p );
 
       return NULL;
 
     ret = cmap14->results;
-    for ( i = 0; i < numMappings; ++i )
+    for ( i = 0; i < numMappings; i++ )
     {
       ret[i] = (FT_UInt32)TT_NEXT_UINT24( p );
       p += 2;
       {
         if ( nuni > duni + dcnt )
         {
-          for ( k = 0; k <= dcnt; ++k )
+          for ( k = 0; k <= dcnt; k++ )
             ret[i++] = duni + k;
 
-          ++di;
+          di++;
 
           if ( di > numRanges )
             break;
             ret[i++] = nuni;
           /* If it is within the default range then ignore it -- */
           /* that should not have happened                       */
-          ++ni;
+          ni++;
           if ( ni > numMappings )
             break;
 
         {
           ret[i++] = (FT_UInt32)TT_NEXT_UINT24( p );
           p += 2;
-          ++ni;
+          ni++;
         }
       }
       else if ( di <= numRanges )
         /* If we get here then we have run out of all non-default     */
         /* mappings.  We have read one default range which we haven't */
         /* stored and there may be others that need to be read.       */
-        for ( k = 0; k <= dcnt; ++k )
+        for ( k = 0; k <= dcnt; k++ )
           ret[i++] = duni + k;
 
         while ( di < numRanges )
           duni = (FT_UInt32)TT_NEXT_UINT24( dp );
           dcnt = FT_NEXT_BYTE( dp );
 
-          for ( k = 0; k <= dcnt; ++k )
+          for ( k = 0; k <= dcnt; k++ )
             ret[i++] = duni + k;
-          ++di;
+          di++;
         }
       }
 
 
   FT_DEFINE_TT_CMAP(
     tt_cmap14_class_rec,
-    sizeof ( TT_CMap14Rec ),
 
-    (FT_CMap_InitFunc)     tt_cmap14_init,
-    (FT_CMap_DoneFunc)     tt_cmap14_done,
-    (FT_CMap_CharIndexFunc)tt_cmap14_char_index,
-    (FT_CMap_CharNextFunc) tt_cmap14_char_next,
+      sizeof ( TT_CMap14Rec ),
+
+      (FT_CMap_InitFunc)     tt_cmap14_init,        /* init       */
+      (FT_CMap_DoneFunc)     tt_cmap14_done,        /* done       */
+      (FT_CMap_CharIndexFunc)tt_cmap14_char_index,  /* char_index */
+      (FT_CMap_CharNextFunc) tt_cmap14_char_next,   /* char_next  */
 
-    /* Format 14 extension functions */
-    (FT_CMap_CharVarIndexFunc)    tt_cmap14_char_var_index,
-    (FT_CMap_CharVarIsDefaultFunc)tt_cmap14_char_var_isdefault,
-    (FT_CMap_VariantListFunc)     tt_cmap14_variants,
-    (FT_CMap_CharVariantListFunc) tt_cmap14_char_variants,
-    (FT_CMap_VariantCharListFunc) tt_cmap14_variant_chars,
+      /* Format 14 extension functions */
+      (FT_CMap_CharVarIndexFunc)    tt_cmap14_char_var_index,
+      (FT_CMap_CharVarIsDefaultFunc)tt_cmap14_char_var_isdefault,
+      (FT_CMap_VariantListFunc)     tt_cmap14_variants,
+      (FT_CMap_CharVariantListFunc) tt_cmap14_char_variants,
+      (FT_CMap_VariantCharListFunc) tt_cmap14_variant_chars,
 
     14,
-    (TT_CMap_ValidateFunc)tt_cmap14_validate,
-    (TT_CMap_Info_GetFunc)tt_cmap14_get_info )
+    (TT_CMap_ValidateFunc)tt_cmap14_validate,  /* validate      */
+    (TT_CMap_Info_GetFunc)tt_cmap14_get_info   /* get_cmap_info */
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_14 */
 
               error = clazz->validate( cmap, FT_VALIDATOR( &valid ) );
             }
 
-            if ( valid.validator.error == 0 )
+            if ( !valid.validator.error )
             {
               FT_CMap  ttcmap;
 
           }
         }
 
-        if ( *pclazz == NULL )
+        if ( !*pclazz )
         {
           FT_TRACE0(( "tt_face_build_cmaps:"
                       " unsupported cmap sub-table ignored\n" ));
index 2273cbd..83f12df 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType character mapping table (cmap) support (specification).     */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 7c732fb..9a5e708 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TT CMAP classes definitions (specification only).                    */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 6f9fa52..c97e578 100644 (file)
@@ -5,7 +5,7 @@
 /*    Load the basic TrueType kerning table.  This doesn't handle          */
 /*    kerning data within the GPOS table at the moment.                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
         p_next = p_limit;
 
       /* only use horizontal kerning tables */
-      if ( ( coverage & ~8U ) != 0x0001 ||
-           p + 8 > p_limit              )
+      if ( ( coverage & 3U ) != 0x0001 ||
+           p + 8 > p_next              )
         goto NextTable;
 
       num_pairs = FT_NEXT_USHORT( p );
       if ( ( face->kern_avail_bits & mask ) == 0 )
         goto NextTable;
 
-      if ( p + 8 > next )
-        goto NextTable;
+      FT_ASSERT( p + 8 <= next ); /* tested in tt_face_load_kern */
 
       num_pairs = FT_NEXT_USHORT( p );
       p        += 6;
index 85dd5c3..db1a30b 100644 (file)
@@ -5,7 +5,7 @@
 /*    Load the basic TrueType kerning table.  This doesn't handle          */
 /*    kerning data within the GPOS table at the moment.                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 2f5b2c3..df99baa 100644 (file)
@@ -5,7 +5,7 @@
 /*    Load the basic TrueType tables, i.e., tables that can be either in   */
 /*    TTF or OTF fonts (body).                                             */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    tt_face_load_max_profile                                           */
+  /*    tt_face_load_maxp                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the maximum profile into a face object.                      */
 
         maxProfile->maxTwilightPoints = 0xFFFFU - 4;
       }
-
-      /* we arbitrarily limit recursion to avoid stack exhaustion */
-      if ( maxProfile->maxComponentDepth > 100 )
-      {
-        FT_TRACE0(( "tt_face_load_maxp:"
-                    " abnormally large component depth (%d) set to 100\n",
-                    maxProfile->maxComponentDepth ));
-        maxProfile->maxComponentDepth = 100;
-      }
     }
 
     FT_TRACE3(( "numGlyphs: %u\n", maxProfile->numGlyphs ));
     FT_Memory     memory = stream->memory;
     FT_ULong      table_pos, table_len;
     FT_ULong      storage_start, storage_limit;
-    FT_UInt       count;
     TT_NameTable  table;
 
     static const FT_Frame_Field  name_table_fields[] =
     static const FT_Frame_Field  name_record_fields[] =
     {
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  TT_NameEntryRec
+#define FT_STRUCTURE  TT_NameRec
 
       /* no FT_FRAME_START */
         FT_FRAME_USHORT( platformID ),
       FT_FRAME_END
     };
 
+    static const FT_Frame_Field  langTag_record_fields[] =
+    {
+#undef  FT_STRUCTURE
+#define FT_STRUCTURE  TT_LangTagRec
+
+      /* no FT_FRAME_START */
+        FT_FRAME_USHORT( stringLength ),
+        FT_FRAME_USHORT( stringOffset ),
+      FT_FRAME_END
+    };
+
 
     table         = &face->name_table;
     table->stream = stream;
 
     table_pos = FT_STREAM_POS();
 
-
     if ( FT_STREAM_READ_FIELDS( name_table_fields, table ) )
       goto Exit;
 
-    /* Some popular Asian fonts have an invalid `storageOffset' value   */
-    /* (it should be at least "6 + 12*num_names").  However, the string */
-    /* offsets, computed as "storageOffset + entry->stringOffset", are  */
-    /* valid pointers within the name table...                          */
-    /*                                                                  */
-    /* We thus can't check `storageOffset' right now.                   */
-    /*                                                                  */
-    storage_start = table_pos + 6 + 12*table->numNameRecords;
+    /* Some popular Asian fonts have an invalid `storageOffset' value (it */
+    /* should be at least `6 + 12*numNameRecords').  However, the string  */
+    /* offsets, computed as `storageOffset + entry->stringOffset', are    */
+    /* valid pointers within the name table...                            */
+    /*                                                                    */
+    /* We thus can't check `storageOffset' right now.                     */
+    /*                                                                    */
+    storage_start = table_pos + 6 + 12 * table->numNameRecords;
     storage_limit = table_pos + table_len;
 
     if ( storage_start > storage_limit )
       goto Exit;
     }
 
-    /* Allocate the array of name records. */
-    count                 = table->numNameRecords;
-    table->numNameRecords = 0;
+    /* `name' format 1 contains additional language tag records, */
+    /* which we load first                                       */
+    if ( table->format == 1 )
+    {
+      if ( FT_STREAM_SEEK( storage_start )            ||
+           FT_READ_USHORT( table->numLangTagRecords ) )
+        goto Exit;
+
+      storage_start += 2 + 4 * table->numLangTagRecords;
+
+      /* allocate language tag records array */
+      if ( FT_NEW_ARRAY( table->langTags, table->numLangTagRecords ) ||
+           FT_FRAME_ENTER( table->numLangTagRecords * 4 )            )
+        goto Exit;
+
+      /* load language tags */
+      {
+        TT_LangTag  entry = table->langTags;
+        TT_LangTag  limit = entry + table->numLangTagRecords;
+
 
-    if ( FT_NEW_ARRAY( table->names, count ) ||
-         FT_FRAME_ENTER( count * 12 )        )
+        for ( ; entry < limit; entry++ )
+        {
+          (void)FT_STREAM_READ_FIELDS( langTag_record_fields, entry );
+
+          /* check that the langTag string is within the table */
+          entry->stringOffset += table_pos + table->storageOffset;
+          if ( entry->stringOffset                       < storage_start ||
+               entry->stringOffset + entry->stringLength > storage_limit )
+          {
+            /* invalid entry; ignore it */
+            entry->stringLength = 0;
+          }
+        }
+      }
+
+      FT_FRAME_EXIT();
+
+      (void)FT_STREAM_SEEK( table_pos + 6 );
+    }
+
+    /* allocate name records array */
+    if ( FT_NEW_ARRAY( table->names, table->numNameRecords ) ||
+         FT_FRAME_ENTER( table->numNameRecords * 12 )        )
       goto Exit;
 
-    /* Load the name records and determine how much storage is needed */
-    /* to hold the strings themselves.                                */
+    /* load name records */
     {
-      TT_NameEntryRec*  entry = table->names;
+      TT_Name  entry = table->names;
+      FT_UInt  count = table->numNameRecords;
 
 
       for ( ; count > 0; count-- )
         if ( entry->stringOffset                       < storage_start ||
              entry->stringOffset + entry->stringLength > storage_limit )
         {
-          /* invalid entry - ignore it */
-          entry->stringOffset = 0;
-          entry->stringLength = 0;
+          /* invalid entry; ignore it */
           continue;
         }
 
+        /* assure that we have a valid language tag ID, and   */
+        /* that the corresponding langTag entry is valid, too */
+        if ( table->format == 1 && entry->languageID >= 0x8000U )
+        {
+          if ( entry->languageID - 0x8000U >= table->numLangTagRecords    ||
+               !table->langTags[entry->languageID - 0x8000U].stringLength )
+          {
+            /* invalid entry; ignore it */
+            continue;
+          }
+        }
+
         entry++;
       }
 
-      table->numNameRecords = (FT_UInt)( entry - table->names );
+      /* reduce array size to the actually used elements */
+      count = (FT_UInt)( entry - table->names );
+      (void)FT_RENEW_ARRAY( table->names,
+                            table->numNameRecords,
+                            count );
+      table->numNameRecords = count;
     }
 
     FT_FRAME_EXIT();
 
     /* everything went well, update face->num_names */
-    face->num_names = (FT_UShort) table->numNameRecords;
+    face->num_names = (FT_UShort)table->numNameRecords;
 
   Exit:
     return error;
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    tt_face_free_names                                                 */
+  /*    tt_face_free_name                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Frees the name records.                                            */
   {
     FT_Memory     memory = face->root.driver->root.memory;
     TT_NameTable  table  = &face->name_table;
-    TT_NameEntry  entry  = table->names;
-    FT_UInt       count  = table->numNameRecords;
 
 
     if ( table->names )
     {
-      for ( ; count > 0; count--, entry++ )
-      {
+      TT_Name  entry = table->names;
+      TT_Name  limit = entry + table->numNameRecords;
+
+
+      for ( ; entry < limit; entry++ )
         FT_FREE( entry->string );
-        entry->stringLength = 0;
-      }
 
-      /* free strings table */
       FT_FREE( table->names );
     }
 
-    table->numNameRecords = 0;
-    table->format         = 0;
-    table->storageOffset  = 0;
+    if ( table->langTags )
+    {
+      TT_LangTag  entry = table->langTags;
+      TT_LangTag  limit = entry + table->numLangTagRecords;
+
+
+      for ( ; entry < limit; entry++ )
+        FT_FREE( entry->string );
+
+      FT_FREE( table->langTags );
+    }
+
+    table->numNameRecords    = 0;
+    table->numLangTagRecords = 0;
+    table->format            = 0;
+    table->storageOffset     = 0;
   }
 
 
 #define FT_STRUCTURE  TT_Postscript
 
       FT_FRAME_START( 32 ),
-        FT_FRAME_ULONG( FormatType ),
-        FT_FRAME_ULONG( italicAngle ),
+        FT_FRAME_LONG ( FormatType ),
+        FT_FRAME_LONG ( italicAngle ),
         FT_FRAME_SHORT( underlinePosition ),
         FT_FRAME_SHORT( underlineThickness ),
         FT_FRAME_ULONG( isFixedPitch ),
index bec42b9..296da86 100644 (file)
@@ -5,7 +5,7 @@
 /*    Load the basic TrueType tables, i.e., tables that can be either in   */
 /*    TTF or OTF fonts (specification).                                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 186f873..394c6db 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Load the metrics tables common to TTF and OTF fonts (body).          */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #include FT_INTERNAL_DEBUG_H
 #include FT_INTERNAL_STREAM_H
 #include FT_TRUETYPE_TAGS_H
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_SERVICE_METRICS_VARIATIONS_H
+#endif
+
 #include "ttmtx.h"
 
 #include "sferrors.h"
 
 
+  /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should   */
+  /*            be identical except for the names of their fields,      */
+  /*            which are different.                                    */
+  /*                                                                    */
+  /*            This ensures that `tt_face_load_hmtx' is able to read   */
+  /*            both the horizontal and vertical headers.               */
+
+
   /*************************************************************************/
   /*                                                                       */
   /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
     FT_ULong        table_pos, table_size, table_end;
     FT_UShort       k;
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    FT_Service_MetricsVariations  var =
+      (FT_Service_MetricsVariations)face->var;
+#endif
+
 
     if ( vertical )
     {
       *abearing = 0;
       *aadvance = 0;
     }
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    if ( var )
+    {
+      FT_Face  f = FT_FACE( face );
+      FT_Int   a = (FT_Int)*aadvance;
+      FT_Int   b = (FT_Int)*abearing;
+
+
+      if ( vertical )
+      {
+        if ( var->vadvance_adjust )
+          var->vadvance_adjust( f, gindex, &a );
+        if ( var->tsb_adjust )
+          var->tsb_adjust( f, gindex, &b );
+      }
+      else
+      {
+        if ( var->hadvance_adjust )
+          var->hadvance_adjust( f, gindex, &a );
+        if ( var->lsb_adjust )
+          var->lsb_adjust( f, gindex, &b );
+      }
+
+      *aadvance = (FT_UShort)a;
+      *abearing = (FT_Short)b;
+    }
+#endif
   }
 
 
index 78395de..2b93ab2 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Load the metrics tables common to TTF and OTF fonts (specification). */
 /*                                                                         */
-/*  Copyright 2006-2016 by                                                 */
+/*  Copyright 2006-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 3277f1e..540d5f2 100644 (file)
@@ -5,7 +5,7 @@
 /*    PostScript name table processing for TrueType and OpenType fonts     */
 /*    (body).                                                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #include FT_INTERNAL_DEBUG_H
 #include FT_INTERNAL_STREAM_H
 #include FT_TRUETYPE_TAGS_H
+
+
+#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
 #include "ttpost.h"
 
 #include "sferrors.h"
       goto Exit;
 
     /* check the number of glyphs */
-    if ( num_glyphs > face->max_profile.numGlyphs || num_glyphs > 258 )
+    if ( num_glyphs > face->max_profile.numGlyphs ||
+         num_glyphs > 258                         ||
+         num_glyphs < 1                           )
     {
       error = FT_THROW( Invalid_File_Format );
       goto Exit;
     return FT_Err_Ok;
   }
 
+#else /* !TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _tt_post_dummy;
+
+#endif /* !TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
 
 /* END */
index ede45fd..722485e 100644 (file)
@@ -5,7 +5,7 @@
 /*    PostScript name table processing for TrueType and OpenType fonts     */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e24e7d6..0c76a55 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded bitmap support (body).                */
 /*                                                                         */
-/*  Copyright 2005-2016 by                                                 */
+/*  Copyright 2005-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  Copyright 2013 by Google, Inc.                                         */
 #include FT_INTERNAL_STREAM_H
 #include FT_TRUETYPE_TAGS_H
 #include FT_BITMAP_H
+
+
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
 #include "ttsbit.h"
 
 #include "sferrors.h"
@@ -48,6 +52,7 @@
   {
     FT_Error  error;
     FT_ULong  table_size;
+    FT_ULong  table_start;
 
 
     face->sbit_table       = NULL;
@@ -83,6 +88,8 @@
       goto Exit;
     }
 
+    table_start = FT_STREAM_POS();
+
     switch ( (FT_UInt)face->sbit_table_type )
     {
     case TT_SBIT_TABLE_TYPE_EBLC:
         version     = FT_NEXT_LONG( p );
         num_strikes = FT_NEXT_ULONG( p );
 
+        /* there's at least one font (FZShuSong-Z01, version 3)   */
+        /* that uses the wrong byte order for the `version' field */
         if ( ( (FT_ULong)version & 0xFFFF0000UL ) != 0x00020000UL &&
-             ( (FT_ULong)version & 0xFFFF0000UL ) != 0x00030000UL )
+             ( (FT_ULong)version & 0x0000FFFFUL ) != 0x00000200UL &&
+             ( (FT_ULong)version & 0xFFFF0000UL ) != 0x00030000UL &&
+             ( (FT_ULong)version & 0x0000FFFFUL ) != 0x00000300UL )
         {
           error = FT_THROW( Unknown_File_Format );
           goto Exit;
       break;
 
     default:
+      /* we ignore unknown table formats */
       error = FT_THROW( Unknown_File_Format );
       break;
     }
 
     if ( !error )
-      FT_TRACE3(( "sbit_num_strikes: %u\n", face->sbit_num_strikes ));
+      FT_TRACE3(( "tt_face_load_sbit_strikes: found %u strikes\n",
+                  face->sbit_num_strikes ));
+
+    face->ebdt_start = 0;
+    face->ebdt_size  = 0;
+
+    if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX )
+    {
+      /* the `sbix' table is self-contained; */
+      /* it has no associated data table     */
+      face->ebdt_start = table_start;
+      face->ebdt_size  = table_size;
+    }
+    else if ( face->sbit_table_type != TT_SBIT_TABLE_TYPE_NONE )
+    {
+      FT_ULong  ebdt_size;
+
+
+      error = face->goto_table( face, TTAG_CBDT, stream, &ebdt_size );
+      if ( error )
+        error = face->goto_table( face, TTAG_EBDT, stream, &ebdt_size );
+      if ( error )
+        error = face->goto_table( face, TTAG_bdat, stream, &ebdt_size );
+
+      if ( !error )
+      {
+        face->ebdt_start = FT_STREAM_POS();
+        face->ebdt_size  = ebdt_size;
+      }
+    }
+
+    if ( !face->ebdt_size )
+    {
+      FT_TRACE2(( "tt_face_load_sbit_strikes:"
+                  " no embedded bitmap data table found;\n"
+                  "                          "
+                  " resetting number of strikes to zero\n" ));
+      face->sbit_num_strikes = 0;
+    }
 
     return FT_Err_Ok;
 
                                FT_ULong          strike_index,
                                FT_Size_Metrics*  metrics )
   {
-    if ( strike_index >= (FT_ULong)face->sbit_num_strikes )
-      return FT_THROW( Invalid_Argument );
+    /* we have to test for the existence of `sbit_strike_map'    */
+    /* because the function gets also used at the very beginning */
+    /* to construct `sbit_strike_map' itself                     */
+    if ( face->sbit_strike_map )
+    {
+      if ( strike_index >= (FT_ULong)face->root.num_fixed_sizes )
+        return FT_THROW( Invalid_Argument );
+
+      /* map to real index */
+      strike_index = face->sbit_strike_map[strike_index];
+    }
+    else
+    {
+      if ( strike_index >= (FT_ULong)face->sbit_num_strikes )
+        return FT_THROW( Invalid_Argument );
+    }
 
     switch ( (FT_UInt)face->sbit_table_type )
     {
             FT_TRACE2(( "tt_face_load_strike_metrics:"
                         " sanitizing invalid ascender and descender\n"
                         "                            "
-                        " values for strike (%d, %d)\n",
+                        " values for strike %d (%dppem, %dppem)\n",
+                        strike_index,
                         metrics->x_ppem, metrics->y_ppem ));
 
             /* sanitize buggy ascender and descender values */
                                           strike[18] + /* max_width      */
                                  (FT_Char)strike[23]   /* min_advance_SB */
                                                      ) * 64;
+
+        /* set the scale values (in 16.16 units) so advances */
+        /* from the hmtx and vmtx table are scaled correctly */
+        metrics->x_scale = FT_MulDiv( metrics->x_ppem,
+                                      64 * 0x10000,
+                                      face->header.Units_Per_EM );
+        metrics->y_scale = FT_MulDiv( metrics->y_ppem,
+                                      64 * 0x10000,
+                                      face->header.Units_Per_EM );
+
         return FT_Err_Ok;
       }
 
         FT_UInt         offset;
         FT_UShort       upem, ppem, resolution;
         TT_HoriHeader  *hori;
-        FT_ULong        table_size;
         FT_Pos          ppem_; /* to reduce casts */
 
         FT_Error  error;
         p      = face->sbit_table + 8 + 4 * strike_index;
         offset = FT_NEXT_ULONG( p );
 
-        error = face->goto_table( face, TTAG_sbix, stream, &table_size );
-        if ( error )
-          return error;
-
-        if ( offset + 4  > table_size )
+        if ( offset + 4 > face->ebdt_size )
           return FT_THROW( Invalid_File_Format );
 
-        if ( FT_STREAM_SEEK( FT_STREAM_POS() + offset ) ||
-             FT_FRAME_ENTER( 4 )                        )
+        if ( FT_STREAM_SEEK( face->ebdt_start + offset ) ||
+             FT_FRAME_ENTER( 4 )                         )
           return error;
 
         ppem       = FT_GET_USHORT();
                         FT_ULong             strike_index,
                         TT_SBit_MetricsRec*  metrics )
   {
-    FT_Error   error;
+    FT_Error   error  = FT_ERR( Table_Missing );
     FT_Stream  stream = face->root.stream;
-    FT_ULong   ebdt_size;
 
 
-    error = face->goto_table( face, TTAG_CBDT, stream, &ebdt_size );
-    if ( error )
-      error = face->goto_table( face, TTAG_EBDT, stream, &ebdt_size );
-    if ( error )
-      error = face->goto_table( face, TTAG_bdat, stream, &ebdt_size );
-    if ( error )
+    strike_index = face->sbit_strike_map[strike_index];
+
+    if ( !face->ebdt_size )
+      goto Exit;
+    if ( FT_STREAM_SEEK( face->ebdt_start ) )
       goto Exit;
 
     decoder->face    = face;
     decoder->metrics_loaded   = 0;
     decoder->bitmap_allocated = 0;
 
-    decoder->ebdt_start = FT_STREAM_POS();
-    decoder->ebdt_size  = ebdt_size;
+    decoder->ebdt_start = face->ebdt_start;
+    decoder->ebdt_size  = face->ebdt_size;
 
     decoder->eblc_base  = face->sbit_table;
     decoder->eblc_limit = face->sbit_table + face->sbit_table_size;
 
 
   static FT_Error
-  tt_sbit_decoder_alloc_bitmap( TT_SBitDecoder  decoder )
+  tt_sbit_decoder_alloc_bitmap( TT_SBitDecoder  decoder,
+                                FT_Bool         metrics_only )
   {
     FT_Error    error = FT_Err_Ok;
     FT_UInt     width, height;
     if ( size == 0 )
       goto Exit;     /* exit successfully! */
 
+    if ( metrics_only )
+      goto Exit;     /* only metrics are requested */
+
     error = ft_glyphslot_alloc_bitmap( decoder->face->root.glyph, size );
     if ( error )
       goto Exit;
                               FT_UInt         glyph_index,
                               FT_Int          x_pos,
                               FT_Int          y_pos,
-                              FT_UInt         recurse_count );
+                              FT_UInt         recurse_count,
+                              FT_Bool         metrics_only );
 
   typedef FT_Error  (*TT_SBitDecoder_LoadFunc)(
                       TT_SBitDecoder  decoder,
         }
 
         *pwrite++ |= ( ( rval >> nbits ) & 0xFF ) &
-                     ( ~( 0xFF << w ) << ( 8 - w - x_pos ) );
+                     ( ~( 0xFFU << w ) << ( 8 - w - x_pos ) );
         rval     <<= 8;
 
         w = line_bits - w;
                                           gindex,
                                           x_pos + dx,
                                           y_pos + dy,
-                                          recurse_count + 1 );
+                                          recurse_count + 1,
+                                          /* request full bitmap image */
+                                          FALSE );
       if ( error )
         break;
     }
                            decoder->stream->memory,
                            p,
                            png_len,
+                           FALSE,
                            FALSE );
 
   Exit:
                                FT_ULong        glyph_size,
                                FT_Int          x_pos,
                                FT_Int          y_pos,
-                               FT_UInt         recurse_count )
+                               FT_UInt         recurse_count,
+                               FT_Bool         metrics_only )
   {
     FT_Error   error;
     FT_Stream  stream = decoder->stream;
 
       if ( !decoder->bitmap_allocated )
       {
-        error = tt_sbit_decoder_alloc_bitmap( decoder );
+        error = tt_sbit_decoder_alloc_bitmap( decoder, metrics_only );
+
         if ( error )
           goto Fail;
       }
 
+      if ( metrics_only )
+        goto Fail; /* this is not an error */
+
       error = loader( decoder, p, p_limit, x_pos, y_pos, recurse_count );
     }
 
                               FT_UInt         glyph_index,
                               FT_Int          x_pos,
                               FT_Int          y_pos,
-                              FT_UInt         recurse_count )
+                              FT_UInt         recurse_count,
+                              FT_Bool         metrics_only )
   {
     FT_Byte*  p          = decoder->eblc_base + decoder->strike_index_array;
     FT_Byte*  p_limit    = decoder->eblc_limit;
                                         image_end,
                                         x_pos,
                                         y_pos,
-                                        recurse_count );
+                                        recurse_count,
+                                        metrics_only );
 
   Failure:
     return FT_THROW( Invalid_Table );
                            FT_UInt              glyph_index,
                            FT_Stream            stream,
                            FT_Bitmap           *map,
-                           TT_SBit_MetricsRec  *metrics )
+                           TT_SBit_MetricsRec  *metrics,
+                           FT_Bool              metrics_only )
   {
-    FT_UInt   sbix_pos, strike_offset, glyph_start, glyph_end;
-    FT_ULong  table_size;
+    FT_UInt   strike_offset, glyph_start, glyph_end;
     FT_Int    originOffsetX, originOffsetY;
     FT_Tag    graphicType;
     FT_Int    recurse_depth = 0;
     FT_Byte*  p;
 
     FT_UNUSED( map );
+#ifndef FT_CONFIG_OPTION_USE_PNG
+    FT_UNUSED( metrics_only );
+#endif
+
 
+    strike_index = face->sbit_strike_map[strike_index];
 
     metrics->width  = 0;
     metrics->height = 0;
     p = face->sbit_table + 8 + 4 * strike_index;
     strike_offset = FT_NEXT_ULONG( p );
 
-    error = face->goto_table( face, TTAG_sbix, stream, &table_size );
-    if ( error )
-      return error;
-    sbix_pos = FT_STREAM_POS();
-
   retry:
     if ( glyph_index > (FT_UInt)face->root.num_glyphs )
       return FT_THROW( Invalid_Argument );
 
-    if ( strike_offset >= table_size                          ||
-         table_size - strike_offset < 4 + glyph_index * 4 + 8 )
+    if ( strike_offset >= face->ebdt_size                          ||
+         face->ebdt_size - strike_offset < 4 + glyph_index * 4 + 8 )
       return FT_THROW( Invalid_File_Format );
 
-    if ( FT_STREAM_SEEK( sbix_pos + strike_offset + 4 + glyph_index * 4 ) ||
-         FT_FRAME_ENTER( 8 )                                              )
+    if ( FT_STREAM_SEEK( face->ebdt_start  +
+                         strike_offset + 4 +
+                         glyph_index * 4   ) ||
+         FT_FRAME_ENTER( 8 )                 )
       return error;
 
     glyph_start = FT_GET_ULONG();
 
     if ( glyph_start == glyph_end )
       return FT_THROW( Invalid_Argument );
-    if ( glyph_start > glyph_end                ||
-         glyph_end - glyph_start < 8            ||
-         table_size - strike_offset < glyph_end )
+    if ( glyph_start > glyph_end                     ||
+         glyph_end - glyph_start < 8                 ||
+         face->ebdt_size - strike_offset < glyph_end )
       return FT_THROW( Invalid_File_Format );
 
-    if ( FT_STREAM_SEEK( sbix_pos + strike_offset + glyph_start ) ||
-         FT_FRAME_ENTER( glyph_end - glyph_start )                )
+    if ( FT_STREAM_SEEK( face->ebdt_start + strike_offset + glyph_start ) ||
+         FT_FRAME_ENTER( glyph_end - glyph_start )                        )
       return error;
 
     originOffsetX = FT_GET_SHORT();
                              stream->memory,
                              stream->cursor,
                              glyph_end - glyph_start - 8,
-                             TRUE );
+                             TRUE,
+                             metrics_only );
 #else
       error = FT_THROW( Unimplemented_Feature );
 #endif
         error = tt_sbit_decoder_init( decoder, face, strike_index, metrics );
         if ( !error )
         {
-          error = tt_sbit_decoder_load_image( decoder,
-                                              glyph_index,
-                                              0,
-                                              0,
-                                              0 );
+          error = tt_sbit_decoder_load_image(
+                    decoder,
+                    glyph_index,
+                    0,
+                    0,
+                    0,
+                    ( load_flags & FT_LOAD_BITMAP_METRICS_ONLY ) != 0 );
           tt_sbit_decoder_done( decoder );
         }
       }
       break;
 
     case TT_SBIT_TABLE_TYPE_SBIX:
-      error = tt_face_load_sbix_image( face,
-                                       strike_index,
-                                       glyph_index,
-                                       stream,
-                                       map,
-                                       metrics );
+      error = tt_face_load_sbix_image(
+                face,
+                strike_index,
+                glyph_index,
+                stream,
+                map,
+                metrics,
+                ( load_flags & FT_LOAD_BITMAP_METRICS_ONLY ) != 0 );
       break;
 
     default:
     }
 
     /* Flatten color bitmaps if color was not requested. */
-    if ( !error                                &&
-         !( load_flags & FT_LOAD_COLOR )       &&
-         map->pixel_mode == FT_PIXEL_MODE_BGRA )
+    if ( !error                                        &&
+         !( load_flags & FT_LOAD_COLOR )               &&
+         !( load_flags & FT_LOAD_BITMAP_METRICS_ONLY ) &&
+         map->pixel_mode == FT_PIXEL_MODE_BGRA         )
     {
       FT_Bitmap   new_map;
       FT_Library  library = face->root.glyph->library;
     return error;
   }
 
+#else /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _tt_sbit_dummy;
+
+#endif /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
 
-/* EOF */
+/* END */
index d8a8167..e859ddd 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded bitmap support (specification).       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index a388c11..4cd0769 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/smooth Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 0bf3ac6..e9a3ce7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    A new `perfect' anti-aliasing renderer (body).                       */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -286,6 +286,10 @@ typedef ptrdiff_t  FT_PtrDist;
 #define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )
 #endif
 
+#ifndef FT_ZERO
+#define FT_ZERO( p )  FT_MEM_ZERO( p, sizeof ( *(p) ) )
+#endif
+
   /* as usual, for the speed hungry :-) */
 
 #undef RAS_ARG
@@ -337,7 +341,8 @@ typedef ptrdiff_t  FT_PtrDist;
 
   /* Compute `dividend / divisor' and return both its quotient and     */
   /* remainder, cast to a specific type.  This macro also ensures that */
-  /* the remainder is always positive.                                 */
+  /* the remainder is always positive.  We use the remainder to keep   */
+  /* track of accumulating errors and compensate for them.             */
 #define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \
   FT_BEGIN_STMNT                                                   \
     (quotient)  = (type)( (dividend) / (divisor) );                \
@@ -371,8 +376,9 @@ typedef ptrdiff_t  FT_PtrDist;
 
   /* These macros speed up repetitive divisions by replacing them */
   /* with multiplications and right shifts.                       */
-#define FT_UDIVPREP( b )                                       \
-  long  b ## _r = (long)( FT_ULONG_MAX >> PIXEL_BITS ) / ( b )
+#define FT_UDIVPREP( c, b )                                        \
+  long  b ## _r = c ? (long)( FT_ULONG_MAX >> PIXEL_BITS ) / ( b ) \
+                    : 0
 #define FT_UDIV( a, b )                                        \
   ( ( (unsigned long)( a ) * (unsigned long)( b ## _r ) ) >>   \
     ( sizeof( long ) * FT_CHAR_BIT - PIXEL_BITS ) )
@@ -403,9 +409,12 @@ typedef ptrdiff_t  FT_PtrDist;
 
   } TCell;
 
+  typedef struct TPixmap_
+  {
+    unsigned char*  origin;  /* pixmap origin at the bottom-left */
+    int             pitch;   /* pitch to go down one row */
 
-  /* maximum number of gray spans in a call to the span callback */
-#define FT_MAX_GRAY_SPANS  32
+  } TPixmap;
 
   /* maximum number of gray cells in the buffer */
 #if FT_RENDER_POOL_SIZE > 2048
@@ -430,12 +439,12 @@ typedef ptrdiff_t  FT_PtrDist;
     TCoord  ex, ey;
     TCoord  min_ex, max_ex;
     TCoord  min_ey, max_ey;
-    TCoord  count_ex, count_ey;
 
     TArea   area;
     TCoord  cover;
     int     invalid;
 
+    PCell*      ycells;
     PCell       cells;
     FT_PtrDist  max_cells;
     FT_PtrDist  num_cells;
@@ -443,16 +452,10 @@ typedef ptrdiff_t  FT_PtrDist;
     TPos    x,  y;
 
     FT_Outline  outline;
-    FT_Bitmap   target;
-
-    FT_Span     gray_spans[FT_MAX_GRAY_SPANS];
-    int         num_gray_spans;
+    TPixmap     target;
 
     FT_Raster_Span_Func  render_span;
     void*                render_span_data;
-    int                  span_y;
-
-    PCell*     ycells;
 
   } gray_TWorker, *gray_PWorker;
 
@@ -482,17 +485,17 @@ typedef ptrdiff_t  FT_PtrDist;
   static void
   gray_dump_cells( RAS_ARG )
   {
-    int  yindex;
+    int  y;
 
 
-    for ( yindex = 0; yindex < ras.count_ey; yindex++ )
+    for ( y = ras.min_ey; y < ras.max_ey; y++ )
     {
-      PCell  cell;
+      PCell  cell = ras.ycells[y - ras.min_ey];
 
 
-      printf( "%3d:", yindex );
+      printf( "%3d:", y );
 
-      for ( cell = ras.ycells[yindex]; cell != NULL; cell = cell->next )
+      for ( ; cell != NULL; cell = cell->next )
         printf( " (%3d, c:%4d, a:%6d)",
                 cell->x, cell->cover, cell->area );
       printf( "\n" );
@@ -506,25 +509,22 @@ typedef ptrdiff_t  FT_PtrDist;
   /*                                                                       */
   /* Record the current cell in the table.                                 */
   /*                                                                       */
-  static PCell
-  gray_find_cell( RAS_ARG )
+  static void
+  gray_record_cell( RAS_ARG )
   {
     PCell  *pcell, cell;
     TCoord  x = ras.ex;
 
 
-    if ( x > ras.count_ex )
-      x = ras.count_ex;
-
-    pcell = &ras.ycells[ras.ey];
+    pcell = &ras.ycells[ras.ey - ras.min_ey];
     for (;;)
     {
       cell = *pcell;
-      if ( cell == NULL || cell->x > x )
+      if ( !cell || cell->x > x )
         break;
 
       if ( cell->x == x )
-        goto Exit;
+        goto Found;
 
       pcell = &cell->next;
     }
@@ -532,30 +532,21 @@ typedef ptrdiff_t  FT_PtrDist;
     if ( ras.num_cells >= ras.max_cells )
       ft_longjmp( ras.jump_buffer, 1 );
 
+    /* insert new cell */
     cell        = ras.cells + ras.num_cells++;
     cell->x     = x;
-    cell->area  = 0;
-    cell->cover = 0;
+    cell->area  = ras.area;
+    cell->cover = ras.cover;
 
     cell->next  = *pcell;
     *pcell      = cell;
 
-  Exit:
-    return cell;
-  }
-
+    return;
 
-  static void
-  gray_record_cell( RAS_ARG )
-  {
-    if ( ras.area | ras.cover )
-    {
-      PCell  cell = gray_find_cell( RAS_VAR );
-
-
-      cell->area  += ras.area;
-      cell->cover += ras.cover;
-    }
+  Found:
+    /* update old cell */
+    cell->area  += ras.area;
+    cell->cover += ras.cover;
   }
 
 
@@ -577,58 +568,23 @@ typedef ptrdiff_t  FT_PtrDist;
     /* Note that if a cell is to the left of the clipping region, it is    */
     /* actually set to the (min_ex-1) horizontal position.                 */
 
-    /* All cells that are on the left of the clipping region go to the */
-    /* min_ex - 1 horizontal position.                                 */
-    ey -= ras.min_ey;
-
-    if ( ex > ras.max_ex )
-      ex = ras.max_ex;
-
-    ex -= ras.min_ex;
-    if ( ex < 0 )
-      ex = -1;
-
-    /* are we moving to a different cell ? */
-    if ( ex != ras.ex || ey != ras.ey )
-    {
-      /* record the current one if it is valid */
-      if ( !ras.invalid )
-        gray_record_cell( RAS_VAR );
-
-      ras.area  = 0;
-      ras.cover = 0;
-      ras.ex    = ex;
-      ras.ey    = ey;
-    }
-
-    ras.invalid = ( (unsigned int)ey >= (unsigned int)ras.count_ey ||
-                                  ex >= ras.count_ex               );
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Start a new contour at a given cell.                                  */
-  /*                                                                       */
-  static void
-  gray_start_cell( RAS_ARG_ TCoord  ex,
-                            TCoord  ey )
-  {
-    if ( ex > ras.max_ex )
-      ex = ras.max_ex;
-
     if ( ex < ras.min_ex )
       ex = ras.min_ex - 1;
 
-    ras.area    = 0;
-    ras.cover   = 0;
-    ras.ex      = ex - ras.min_ex;
-    ras.ey      = ey - ras.min_ey;
-    ras.invalid = 0;
+    /* record the current one if it is valid */
+    if ( !ras.invalid )
+      gray_record_cell( RAS_VAR );
+
+    ras.area  = 0;
+    ras.cover = 0;
+    ras.ex    = ex;
+    ras.ey    = ey;
 
-    gray_set_cell( RAS_VAR_ ex, ey );
+    ras.invalid = ( ey >= ras.max_ey || ey < ras.min_ey ||
+                    ex >= ras.max_ex );
   }
 
+
 #ifndef FT_LONG64
 
   /*************************************************************************/
@@ -642,7 +598,7 @@ typedef ptrdiff_t  FT_PtrDist;
                                  TPos    x2,
                                  TCoord  y2 )
   {
-    TCoord  ex1, ex2, fx1, fx2, first, delta, mod;
+    TCoord  ex1, ex2, fx1, fx2, first, dy, delta, mod;
     TPos    p, dx;
     int     incr;
 
@@ -657,30 +613,29 @@ typedef ptrdiff_t  FT_PtrDist;
       return;
     }
 
-    fx1 = (TCoord)( x1 - SUBPIXELS( ex1 ) );
-    fx2 = (TCoord)( x2 - SUBPIXELS( ex2 ) );
+    fx1   = (TCoord)( x1 - SUBPIXELS( ex1 ) );
+    fx2   = (TCoord)( x2 - SUBPIXELS( ex2 ) );
 
     /* everything is located in a single cell.  That is easy! */
     /*                                                        */
     if ( ex1 == ex2 )
-    {
-      delta      = y2 - y1;
-      ras.area  += (TArea)(( fx1 + fx2 ) * delta);
-      ras.cover += delta;
-      return;
-    }
+      goto End;
 
     /* ok, we'll have to render a run of adjacent cells on the same */
     /* scanline...                                                  */
     /*                                                              */
-    p     = ( ONE_PIXEL - fx1 ) * ( y2 - y1 );
-    first = ONE_PIXEL;
-    incr  = 1;
-    dx    = x2 - x1;
+    dx = x2 - x1;
+    dy = y2 - y1;
 
-    if ( dx < 0 )
+    if ( dx > 0 )
     {
-      p     = fx1 * ( y2 - y1 );
+      p     = ( ONE_PIXEL - fx1 ) * dy;
+      first = ONE_PIXEL;
+      incr  = 1;
+    }
+    else
+    {
+      p     = fx1 * dy;
       first = 0;
       incr  = -1;
       dx    = -dx;
@@ -688,34 +643,31 @@ typedef ptrdiff_t  FT_PtrDist;
 
     FT_DIV_MOD( TCoord, p, dx, delta, mod );
 
-    ras.area  += (TArea)(( fx1 + first ) * delta);
+    ras.area  += (TArea)( ( fx1 + first ) * delta );
     ras.cover += delta;
-
-    ex1 += incr;
+    y1        += delta;
+    ex1       += incr;
     gray_set_cell( RAS_VAR_ ex1, ey );
-    y1  += delta;
 
     if ( ex1 != ex2 )
     {
       TCoord  lift, rem;
 
 
-      p = ONE_PIXEL * ( y2 - y1 + delta );
+      p = ONE_PIXEL * dy;
       FT_DIV_MOD( TCoord, p, dx, lift, rem );
 
-      mod -= (int)dx;
-
       do
       {
         delta = lift;
         mod  += rem;
-        if ( mod >= 0 )
+        if ( mod >= (TCoord)dx )
         {
           mod -= (TCoord)dx;
           delta++;
         }
 
-        ras.area  += (TArea)(ONE_PIXEL * delta);
+        ras.area  += (TArea)( ONE_PIXEL * delta );
         ras.cover += delta;
         y1        += delta;
         ex1       += incr;
@@ -723,9 +675,13 @@ typedef ptrdiff_t  FT_PtrDist;
       } while ( ex1 != ex2 );
     }
 
-    delta      = y2 - y1;
-    ras.area  += (TArea)(( fx2 + ONE_PIXEL - first ) * delta);
-    ras.cover += delta;
+    fx1 = ONE_PIXEL - first;
+
+  End:
+    dy = y2 - y1;
+
+    ras.area  += (TArea)( ( fx1 + fx2 ) * dy );
+    ras.cover += dy;
   }
 
 
@@ -764,8 +720,6 @@ typedef ptrdiff_t  FT_PtrDist;
     dy = to_y - ras.y;
 
     /* vertical line - avoid calling gray_render_scanline */
-    incr = 1;
-
     if ( dx == 0 )
     {
       TCoord  ex     = TRUNC( ras.x );
@@ -773,8 +727,12 @@ typedef ptrdiff_t  FT_PtrDist;
       TArea   area;
 
 
-      first = ONE_PIXEL;
-      if ( dy < 0 )
+      if ( dy > 0)
+      {
+        first = ONE_PIXEL;
+        incr  = 1;
+      }
+      else
       {
         first = 0;
         incr  = -1;
@@ -806,11 +764,13 @@ typedef ptrdiff_t  FT_PtrDist;
     }
 
     /* ok, we have to render several scanlines */
-    p     = ( ONE_PIXEL - fy1 ) * dx;
-    first = ONE_PIXEL;
-    incr  = 1;
-
-    if ( dy < 0 )
+    if ( dy > 0)
+    {
+      p     = ( ONE_PIXEL - fy1 ) * dx;
+      first = ONE_PIXEL;
+      incr  = 1;
+    }
+    else
     {
       p     = fy1 * dx;
       first = 0;
@@ -833,13 +793,12 @@ typedef ptrdiff_t  FT_PtrDist;
 
       p    = ONE_PIXEL * dx;
       FT_DIV_MOD( TCoord, p, dy, lift, rem );
-      mod -= (TCoord)dy;
 
       do
       {
         delta = lift;
         mod  += rem;
-        if ( mod >= 0 )
+        if ( mod >= (TCoord)dy )
         {
           mod -= (TCoord)dy;
           delta++;
@@ -929,8 +888,8 @@ typedef ptrdiff_t  FT_PtrDist;
     else                                  /* any other line */
     {
       TPos  prod = dx * fy1 - dy * fx1;
-      FT_UDIVPREP( dx );
-      FT_UDIVPREP( dy );
+      FT_UDIVPREP( ex1 != ex2, dx );
+      FT_UDIVPREP( ey1 != ey2, dy );
 
 
       /* The fundamental value `prod' determines which side and the  */
@@ -1218,15 +1177,11 @@ typedef ptrdiff_t  FT_PtrDist;
     TPos  x, y;
 
 
-    /* record current cell, if any */
-    if ( !ras.invalid )
-      gray_record_cell( RAS_VAR );
-
     /* start to a new position */
     x = UPSCALE( to->x );
     y = UPSCALE( to->y );
 
-    gray_start_cell( RAS_VAR_ TRUNC( x ), TRUNC( y ) );
+    gray_set_cell( RAS_VAR_ TRUNC( x ), TRUNC( y ) );
 
     ras.x = x;
     ras.y = y;
@@ -1265,79 +1220,23 @@ typedef ptrdiff_t  FT_PtrDist;
 
 
   static void
-  gray_render_span( int             y,
-                    int             count,
-                    const FT_Span*  spans,
-                    gray_PWorker    worker )
-  {
-    unsigned char*  p;
-    FT_Bitmap*      map = &worker->target;
-
-
-    /* first of all, compute the scanline offset */
-    p = (unsigned char*)map->buffer - y * map->pitch;
-    if ( map->pitch >= 0 )
-      p += ( map->rows - 1 ) * (unsigned int)map->pitch;
-
-    for ( ; count > 0; count--, spans++ )
-    {
-      unsigned char  coverage = spans->coverage;
-
-
-      if ( coverage )
-      {
-        unsigned char*  q = p + spans->x;
-
-
-        /* For small-spans it is faster to do it by ourselves than
-         * calling `memset'.  This is mainly due to the cost of the
-         * function call.
-         */
-        switch ( spans->len )
-        {
-        case 7: *q++ = coverage;
-        case 6: *q++ = coverage;
-        case 5: *q++ = coverage;
-        case 4: *q++ = coverage;
-        case 3: *q++ = coverage;
-        case 2: *q++ = coverage;
-        case 1: *q   = coverage;
-        case 0: break;
-        default:
-          FT_MEM_SET( q, coverage, spans->len );
-        }
-      }
-    }
-  }
-
-
-  static void
   gray_hline( RAS_ARG_ TCoord  x,
                        TCoord  y,
-                       TArea   area,
+                       TArea   coverage,
                        TCoord  acount )
   {
-    int  coverage;
-
-
-    /* compute the coverage line's coverage, depending on the    */
-    /* outline fill rule                                         */
-    /*                                                           */
-    /* the coverage percentage is area/(PIXEL_BITS*PIXEL_BITS*2) */
-    /*                                                           */
-    coverage = (int)( area >> ( PIXEL_BITS * 2 + 1 - 8 ) );
-                                                    /* use range 0..256 */
+    /* scale the coverage from 0..(ONE_PIXEL*ONE_PIXEL*2) to 0..256  */
+    coverage >>= PIXEL_BITS * 2 + 1 - 8;
     if ( coverage < 0 )
-      coverage = -coverage;
+      coverage = -coverage - 1;
 
+    /* compute the line's coverage depending on the outline fill rule */
     if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL )
     {
       coverage &= 511;
 
-      if ( coverage > 256 )
-        coverage = 512 - coverage;
-      else if ( coverage == 256 )
-        coverage = 255;
+      if ( coverage >= 256 )
+        coverage = 511 - coverage;
     }
     else
     {
@@ -1346,64 +1245,40 @@ typedef ptrdiff_t  FT_PtrDist;
         coverage = 255;
     }
 
-    y += ras.min_ey;
-    x += ras.min_ex;
-
-    if ( coverage )
+    if ( ras.render_span )  /* for FT_RASTER_FLAG_DIRECT only */
     {
-      FT_Span*  span;
-      int       count;
-
-
-      /* see whether we can add this span to the current list */
-      count = ras.num_gray_spans;
-      span  = ras.gray_spans + count - 1;
-      if ( span->coverage == coverage &&
-           span->x + span->len == x   &&
-           ras.span_y == y            &&
-           count > 0                  )
-      {
-        span->len = (unsigned short)( span->len + acount );
-        return;
-      }
-
-      if ( ras.span_y != y || count >= FT_MAX_GRAY_SPANS )
-      {
-        if ( ras.render_span && count > 0 )
-          ras.render_span( ras.span_y, count, ras.gray_spans,
-                           ras.render_span_data );
+      FT_Span  span;
 
-#ifdef FT_DEBUG_LEVEL_TRACE
-
-        if ( count > 0 )
-        {
-          int  n;
 
+      span.x        = (short)x;
+      span.len      = (unsigned short)acount;
+      span.coverage = (unsigned char)coverage;
 
-          FT_TRACE7(( "y = %3d ", ras.span_y ));
-          span = ras.gray_spans;
-          for ( n = 0; n < count; n++, span++ )
-            FT_TRACE7(( "[%d..%d]:%02x ",
-                        span->x, span->x + span->len - 1, span->coverage ));
-          FT_TRACE7(( "\n" ));
-        }
-
-#endif /* FT_DEBUG_LEVEL_TRACE */
+      ras.render_span( y, 1, &span, ras.render_span_data );
+    }
+    else
+    {
+      unsigned char*  q = ras.target.origin - ras.target.pitch * y + x;
+      unsigned char   c = (unsigned char)coverage;
 
-        ras.num_gray_spans = 0;
-        ras.span_y         = (int)y;
 
-        span  = ras.gray_spans;
+      /* For small-spans it is faster to do it by ourselves than
+       * calling `memset'.  This is mainly due to the cost of the
+       * function call.
+       */
+      switch ( acount )
+      {
+      case 7: *q++ = c;
+      case 6: *q++ = c;
+      case 5: *q++ = c;
+      case 4: *q++ = c;
+      case 3: *q++ = c;
+      case 2: *q++ = c;
+      case 1: *q   = c;
+      case 0: break;
+      default:
+        FT_MEM_SET( q, c, acount );
       }
-      else
-        span++;
-
-      /* add a gray span to the current list */
-      span->x        = (short)x;
-      span->len      = (unsigned short)acount;
-      span->coverage = (unsigned char)coverage;
-
-      ras.num_gray_spans++;
     }
   }
 
@@ -1411,71 +1286,38 @@ typedef ptrdiff_t  FT_PtrDist;
   static void
   gray_sweep( RAS_ARG )
   {
-    int  yindex;
+    int  y;
 
 
-    if ( ras.num_cells == 0 )
-      return;
-
-    ras.num_gray_spans = 0;
-    ras.span_y         = 0;
-
     FT_TRACE7(( "gray_sweep: start\n" ));
 
-    for ( yindex = 0; yindex < ras.count_ey; yindex++ )
+    for ( y = ras.min_ey; y < ras.max_ey; y++ )
     {
-      PCell   cell  = ras.ycells[yindex];
-      TCoord  cover = 0;
-      TCoord  x     = 0;
+      PCell   cell  = ras.ycells[y - ras.min_ey];
+      TCoord  x     = ras.min_ex;
+      TArea   cover = 0;
+      TArea   area;
 
 
       for ( ; cell != NULL; cell = cell->next )
       {
-        TArea  area;
-
-
-        if ( cell->x > x && cover != 0 )
-          gray_hline( RAS_VAR_ x, yindex, (TArea)cover * ( ONE_PIXEL * 2 ),
-                      cell->x - x );
+        if ( cover != 0 && cell->x > x )
+          gray_hline( RAS_VAR_ x, y, cover, cell->x - x );
 
-        cover += cell->cover;
-        area   = (TArea)cover * ( ONE_PIXEL * 2 ) - cell->area;
+        cover += (TArea)cell->cover * ( ONE_PIXEL * 2 );
+        area   = cover - cell->area;
 
-        if ( area != 0 && cell->x >= 0 )
-          gray_hline( RAS_VAR_ cell->x, yindex, area, 1 );
+        if ( area != 0 && cell->x >= ras.min_ex )
+          gray_hline( RAS_VAR_ cell->x, y, area, 1 );
 
         x = cell->x + 1;
       }
 
       if ( cover != 0 )
-        gray_hline( RAS_VAR_ x, yindex, (TArea)cover * ( ONE_PIXEL * 2 ),
-                    ras.count_ex - x );
-    }
-
-    if ( ras.render_span && ras.num_gray_spans > 0 )
-      ras.render_span( ras.span_y, ras.num_gray_spans,
-                       ras.gray_spans, ras.render_span_data );
-
-#ifdef FT_DEBUG_LEVEL_TRACE
-
-    if ( ras.num_gray_spans > 0 )
-    {
-      FT_Span*  span;
-      int       n;
-
-
-      FT_TRACE7(( "y = %3d ", ras.span_y ));
-      span = ras.gray_spans;
-      for ( n = 0; n < ras.num_gray_spans; n++, span++ )
-        FT_TRACE7(( "[%d..%d]:%02x ",
-                    span->x, span->x + span->len - 1, span->coverage ));
-      FT_TRACE7(( "\n" ));
+        gray_hline( RAS_VAR_ x, y, cover, ras.max_ex - x );
     }
 
     FT_TRACE7(( "gray_sweep: end\n" ));
-
-#endif /* FT_DEBUG_LEVEL_TRACE */
-
   }
 
 
@@ -1754,7 +1596,7 @@ typedef ptrdiff_t  FT_PtrDist;
     return 0;
 
   Exit:
-    FT_TRACE5(( "FT_Outline_Decompose: Error %d\n", error ));
+    FT_TRACE5(( "FT_Outline_Decompose: Error 0x%x\n", error ));
     return error;
 
   Invalid_Outline:
@@ -1839,22 +1681,17 @@ typedef ptrdiff_t  FT_PtrDist;
 #endif /* STANDALONE_ */
 
 
-  typedef struct  gray_TBand_
-  {
-    TCoord  min, max;
-
-  } gray_TBand;
-
-
   FT_DEFINE_OUTLINE_FUNCS(
     func_interface,
 
-    (FT_Outline_MoveTo_Func) gray_move_to,
-    (FT_Outline_LineTo_Func) gray_line_to,
-    (FT_Outline_ConicTo_Func)gray_conic_to,
-    (FT_Outline_CubicTo_Func)gray_cubic_to,
-    0,
-    0 )
+    (FT_Outline_MoveTo_Func) gray_move_to,   /* move_to  */
+    (FT_Outline_LineTo_Func) gray_line_to,   /* line_to  */
+    (FT_Outline_ConicTo_Func)gray_conic_to,  /* conic_to */
+    (FT_Outline_CubicTo_Func)gray_cubic_to,  /* cubic_to */
+
+    0,                                       /* shift    */
+    0                                        /* delta    */
+  )
 
 
   static int
@@ -1892,20 +1729,21 @@ typedef ptrdiff_t  FT_PtrDist;
   static int
   gray_convert_glyph( RAS_ARG )
   {
-    TCell        buffer[FT_MAX_GRAY_POOL];
-    TCoord       band_size = FT_MAX_GRAY_POOL / 8;
-    int          num_bands;
-    TCoord       min, max, max_y;
-    gray_TBand   bands[32];  /* enough to accommodate bisections */
-    gray_TBand*  band;
+    TCell    buffer[FT_MAX_GRAY_POOL];
+    TCoord   band_size = FT_MAX_GRAY_POOL / 8;
+    TCoord   count = ras.max_ey - ras.min_ey;
+    int      num_bands;
+    TCoord   min, max, max_y;
+    TCoord   bands[32];  /* enough to accommodate bisections */
+    TCoord*  band;
 
 
     /* set up vertical bands */
-    if ( ras.count_ey > band_size )
+    if ( count > band_size )
     {
       /* two divisions rounded up */
-      num_bands = (int)( ( ras.count_ey + band_size - 1) / band_size );
-      band_size = ( ras.count_ey + num_bands - 1 ) / num_bands;
+      num_bands = (int)( ( count + band_size - 1) / band_size );
+      band_size = ( count + num_bands - 1 ) / num_bands;
     }
 
     min   = ras.min_ey;
@@ -1917,41 +1755,37 @@ typedef ptrdiff_t  FT_PtrDist;
       if ( max > max_y )
         max = max_y;
 
-      bands[0].min = min;
-      bands[0].max = max;
-      band         = bands;
+      band    = bands;
+      band[1] = min;
+      band[0] = max;
 
       do
       {
-        TCoord  bottom, top, middle;
+        TCoord  width = band[0] - band[1];
         int     error;
 
 
         /* memory management */
         {
-          size_t  ycount = (size_t)( band->max - band->min );
+          size_t  ycount = (size_t)width;
           size_t  cell_start;
 
 
           cell_start = ( ycount * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) /
                        sizeof ( TCell );
 
-          if ( FT_MAX_GRAY_POOL - cell_start < 2 )
-            goto ReduceBands;
-
           ras.cells     = buffer + cell_start;
           ras.max_cells = (FT_PtrDist)( FT_MAX_GRAY_POOL - cell_start );
+          ras.num_cells = 0;
 
           ras.ycells = (PCell*)buffer;
           while ( ycount )
             ras.ycells[--ycount] = NULL;
         }
 
-        ras.num_cells = 0;
         ras.invalid   = 1;
-        ras.min_ey    = band->min;
-        ras.max_ey    = band->max;
-        ras.count_ey  = band->max - band->min;
+        ras.min_ey    = band[1];
+        ras.max_ey    = band[0];
 
         error = gray_convert_glyph_inner( RAS_VAR );
 
@@ -1964,25 +1798,20 @@ typedef ptrdiff_t  FT_PtrDist;
         else if ( error != ErrRaster_Memory_Overflow )
           return 1;
 
-      ReduceBands:
         /* render pool overflow; we will reduce the render band by half */
-        bottom = band->min;
-        top    = band->max;
-        middle = bottom + ( ( top - bottom ) >> 1 );
+        width >>= 1;
 
         /* This is too complex for a single scanline; there must */
         /* be some problems.                                     */
-        if ( middle == bottom )
+        if ( width == 0 )
         {
           FT_TRACE7(( "gray_convert_glyph: rotten glyph\n" ));
           return 1;
         }
 
-        band[1].min = bottom;
-        band[1].max = middle;
-        band[0].min = middle;
-        band[0].max = top;
         band++;
+        band[1]  = band[0];
+        band[0] += width;
       } while ( band >= bands );
     }
 
@@ -1994,16 +1823,22 @@ typedef ptrdiff_t  FT_PtrDist;
   gray_raster_render( FT_Raster                raster,
                       const FT_Raster_Params*  params )
   {
-    const FT_Outline*  outline     = (const FT_Outline*)params->source;
-    const FT_Bitmap*   target_map  = params->target;
+    const FT_Outline*  outline    = (const FT_Outline*)params->source;
+    const FT_Bitmap*   target_map = params->target;
     FT_BBox            cbox, clip;
 
+#ifndef FT_STATIC_RASTER
     gray_TWorker  worker[1];
+#endif
 
 
     if ( !raster )
       return FT_THROW( Invalid_Argument );
 
+    /* this version does not support monochrome rendering */
+    if ( !( params->flags & FT_RASTER_FLAG_AA ) )
+      return FT_THROW( Invalid_Mode );
+
     if ( !outline )
       return FT_THROW( Invalid_Outline );
 
@@ -2018,9 +1853,19 @@ typedef ptrdiff_t  FT_PtrDist;
            outline->contours[outline->n_contours - 1] + 1 )
       return FT_THROW( Invalid_Outline );
 
-    /* if direct mode is not set, we must have a target bitmap */
-    if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) )
+    ras.outline = *outline;
+
+    if ( params->flags & FT_RASTER_FLAG_DIRECT )
+    {
+      if ( !params->gray_spans )
+        return 0;
+
+      ras.render_span      = (FT_Raster_Span_Func)params->gray_spans;
+      ras.render_span_data = params->user;
+    }
+    else
     {
+      /* if direct mode is not set, we must have a target bitmap */
       if ( !target_map )
         return FT_THROW( Invalid_Argument );
 
@@ -2030,11 +1875,18 @@ typedef ptrdiff_t  FT_PtrDist;
 
       if ( !target_map->buffer )
         return FT_THROW( Invalid_Argument );
-    }
 
-    /* this version does not support monochrome rendering */
-    if ( !( params->flags & FT_RASTER_FLAG_AA ) )
-      return FT_THROW( Invalid_Mode );
+      if ( target_map->pitch < 0 )
+        ras.target.origin = target_map->buffer;
+      else
+        ras.target.origin = target_map->buffer
+              + ( target_map->rows - 1 ) * (unsigned int)target_map->pitch;
+
+      ras.target.pitch = target_map->pitch;
+
+      ras.render_span      = (FT_Raster_Span_Func)NULL;
+      ras.render_span_data = NULL;
+    }
 
     FT_Outline_Get_CBox( outline, &cbox );
 
@@ -2077,23 +1929,6 @@ typedef ptrdiff_t  FT_PtrDist;
     if ( ras.max_ex <= ras.min_ex || ras.max_ey <= ras.min_ey )
       return 0;
 
-    ras.count_ex = ras.max_ex - ras.min_ex;
-    ras.count_ey = ras.max_ey - ras.min_ey;
-
-    ras.outline        = *outline;
-
-    if ( params->flags & FT_RASTER_FLAG_DIRECT )
-    {
-      ras.render_span      = (FT_Raster_Span_Func)params->gray_spans;
-      ras.render_span_data = params->user;
-    }
-    else
-    {
-      ras.target           = *target_map;
-      ras.render_span      = (FT_Raster_Span_Func)gray_render_span;
-      ras.render_span_data = &ras;
-    }
-
     return gray_convert_glyph( RAS_VAR );
   }
 
@@ -2113,7 +1948,7 @@ typedef ptrdiff_t  FT_PtrDist;
 
 
     *araster = (FT_Raster)&the_raster;
-    FT_MEM_ZERO( &the_raster, sizeof ( the_raster ) );
+    FT_ZERO( &the_raster );
 
     return 0;
   }
@@ -2189,11 +2024,12 @@ typedef ptrdiff_t  FT_PtrDist;
 
     FT_GLYPH_FORMAT_OUTLINE,
 
-    (FT_Raster_New_Func)     gray_raster_new,
-    (FT_Raster_Reset_Func)   gray_raster_reset,
-    (FT_Raster_Set_Mode_Func)gray_raster_set_mode,
-    (FT_Raster_Render_Func)  gray_raster_render,
-    (FT_Raster_Done_Func)    gray_raster_done )
+    (FT_Raster_New_Func)     gray_raster_new,       /* raster_new      */
+    (FT_Raster_Reset_Func)   gray_raster_reset,     /* raster_reset    */
+    (FT_Raster_Set_Mode_Func)gray_raster_set_mode,  /* raster_set_mode */
+    (FT_Raster_Render_Func)  gray_raster_render,    /* raster_render   */
+    (FT_Raster_Done_Func)    gray_raster_done       /* raster_done     */
+  )
 
 
 /* END */
index 21c2bad..a5447da 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType smooth renderer declaration                                 */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index a759b91..a528c61 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    smooth renderer error codes (specification only).                    */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 7927676..435854e 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Anti-aliasing renderer interface (body).                             */
 /*                                                                         */
-/*  Copyright 2000-2016 by                                                 */
+/*  Copyright 2000-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -87,7 +87,7 @@
                       FT_GlyphSlot  slot,
                       FT_BBox*      cbox )
   {
-    FT_MEM_ZERO( cbox, sizeof ( *cbox ) );
+    FT_ZERO( cbox );
 
     if ( slot->format == render->glyph_format )
       FT_Outline_Get_CBox( &slot->outline, cbox );
 #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
     FT_Pos       height_org, width_org;
 #endif
-    FT_Int       hmul    = mode == FT_RENDER_MODE_LCD;
-    FT_Int       vmul    = mode == FT_RENDER_MODE_LCD_V;
+    FT_Int       hmul    = ( mode == FT_RENDER_MODE_LCD );
+    FT_Int       vmul    = ( mode == FT_RENDER_MODE_LCD_V );
 
     FT_Raster_Params  params;
 
     FT_Bool  have_outline_shifted = FALSE;
     FT_Bool  have_buffer          = FALSE;
 
+#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+    FT_Int                   lcd_extra          = 0;
+    FT_LcdFiveTapFilter      lcd_weights        = { 0 };
+    FT_Bool                  have_custom_weight = FALSE;
+    FT_Bitmap_LcdFilterFunc  lcd_filter_func    = NULL;
+
+
+    if ( slot->face )
+    {
+      FT_Char  i;
+
+
+      for ( i = 0; i < FT_LCD_FILTER_FIVE_TAPS; i++ )
+        if ( slot->face->internal->lcd_weights[i] != 0 )
+        {
+          have_custom_weight = TRUE;
+          break;
+        }
+    }
+
+    /*
+     * The LCD filter can be set library-wide and per-face.  Face overrides
+     * library.  If the face filter weights are all zero (the default), it
+     * means that the library default should be used.
+     */
+    if ( have_custom_weight )
+    {
+      /*
+       * A per-font filter is set.  It always uses the default 5-tap
+       * in-place FIR filter that needs 2 extra pixels.
+       */
+      ft_memcpy( lcd_weights,
+                 slot->face->internal->lcd_weights,
+                 FT_LCD_FILTER_FIVE_TAPS );
+      lcd_filter_func = ft_lcd_filter_fir;
+      lcd_extra       = 2;
+    }
+    else
+    {
+      /*
+       * The face's lcd_weights is {0, 0, 0, 0, 0}, meaning `use library
+       * default'.  If the library is set to use no LCD filtering
+       * (lcd_filter_func == NULL), `lcd_filter_func' here is also set to
+       * NULL and the tests further below pass over the filtering process.
+       */
+      ft_memcpy( lcd_weights,
+                 slot->library->lcd_weights,
+                 FT_LCD_FILTER_FIVE_TAPS );
+      lcd_filter_func = slot->library->lcd_filter_func;
+      lcd_extra       = slot->library->lcd_extra;
+    }
+
+#endif /*FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
 
     /* check glyph image format */
     if ( slot->format != render->glyph_format )
       height *= 3;
 
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-
-    if ( slot->library->lcd_filter_func )
+    if ( lcd_filter_func )
     {
-      FT_Int  extra = slot->library->lcd_extra;
-
-
       if ( hmul )
       {
-        x_shift += 64 * ( extra >> 1 );
-        x_left  -= extra >> 1;
-        width   += 3 * extra;
+        x_shift += 64 * ( lcd_extra >> 1 );
+        x_left  -= lcd_extra >> 1;
+        width   += 3 * lcd_extra;
         pitch    = FT_PAD_CEIL( width, 4 );
       }
 
       if ( vmul )
       {
-        y_shift += 64 * ( extra >> 1 );
-        y_top   += extra >> 1;
-        height  += 3 * extra;
+        y_shift += 64 * ( lcd_extra >> 1 );
+        y_top   += lcd_extra >> 1;
+        height  += 3 * lcd_extra;
       }
     }
-
 #endif
 
     /*
     if ( error )
       goto Exit;
 
-    if ( slot->library->lcd_filter_func )
-      slot->library->lcd_filter_func( bitmap, mode, slot->library );
+    if ( lcd_filter_func )
+      lcd_filter_func( bitmap, mode, lcd_weights );
 
 #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
 
   }
 
 
-  FT_DEFINE_RENDERER( ft_smooth_renderer_class,
+  FT_DEFINE_RENDERER(
+    ft_smooth_renderer_class,
 
       FT_MODULE_RENDERER,
       sizeof ( FT_RendererRec ),
       0x10000L,
       0x20000L,
 
-      0,    /* module specific interface */
+      NULL,    /* module specific interface */
 
-      (FT_Module_Constructor)ft_smooth_init,
-      (FT_Module_Destructor) 0,
-      (FT_Module_Requester)  0
-    ,
+      (FT_Module_Constructor)ft_smooth_init,  /* module_init   */
+      (FT_Module_Destructor) NULL,            /* module_done   */
+      (FT_Module_Requester)  NULL,            /* get_interface */
 
     FT_GLYPH_FORMAT_OUTLINE,
 
-    (FT_Renderer_RenderFunc)   ft_smooth_render,
-    (FT_Renderer_TransformFunc)ft_smooth_transform,
-    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,
-    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,
+    (FT_Renderer_RenderFunc)   ft_smooth_render,     /* render_glyph    */
+    (FT_Renderer_TransformFunc)ft_smooth_transform,  /* transform_glyph */
+    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,   /* get_glyph_cbox  */
+    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,   /* set_mode        */
 
-    (FT_Raster_Funcs*)    &FT_GRAYS_RASTER_GET
+    (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET           /* raster_class    */
   )
 
 
-  FT_DEFINE_RENDERER( ft_smooth_lcd_renderer_class,
+  FT_DEFINE_RENDERER(
+    ft_smooth_lcd_renderer_class,
 
       FT_MODULE_RENDERER,
       sizeof ( FT_RendererRec ),
       0x10000L,
       0x20000L,
 
-      0,    /* module specific interface */
+      NULL,    /* module specific interface */
 
-      (FT_Module_Constructor)ft_smooth_init,
-      (FT_Module_Destructor) 0,
-      (FT_Module_Requester)  0
-    ,
+      (FT_Module_Constructor)ft_smooth_init,  /* module_init   */
+      (FT_Module_Destructor) NULL,            /* module_done   */
+      (FT_Module_Requester)  NULL,            /* get_interface */
 
     FT_GLYPH_FORMAT_OUTLINE,
 
-    (FT_Renderer_RenderFunc)   ft_smooth_render_lcd,
-    (FT_Renderer_TransformFunc)ft_smooth_transform,
-    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,
-    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,
+    (FT_Renderer_RenderFunc)   ft_smooth_render_lcd,  /* render_glyph    */
+    (FT_Renderer_TransformFunc)ft_smooth_transform,   /* transform_glyph */
+    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,    /* get_glyph_cbox  */
+    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,    /* set_mode        */
 
-    (FT_Raster_Funcs*)    &FT_GRAYS_RASTER_GET
+    (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET            /* raster_class    */
   )
 
-  FT_DEFINE_RENDERER( ft_smooth_lcdv_renderer_class,
+
+  FT_DEFINE_RENDERER(
+    ft_smooth_lcdv_renderer_class,
 
       FT_MODULE_RENDERER,
       sizeof ( FT_RendererRec ),
       0x10000L,
       0x20000L,
 
-      0,    /* module specific interface */
+      NULL,    /* module specific interface */
 
-      (FT_Module_Constructor)ft_smooth_init,
-      (FT_Module_Destructor) 0,
-      (FT_Module_Requester)  0
-    ,
+      (FT_Module_Constructor)ft_smooth_init,  /* module_init   */
+      (FT_Module_Destructor) NULL,            /* module_done   */
+      (FT_Module_Requester)  NULL,            /* get_interface */
 
     FT_GLYPH_FORMAT_OUTLINE,
 
-    (FT_Renderer_RenderFunc)   ft_smooth_render_lcd_v,
-    (FT_Renderer_TransformFunc)ft_smooth_transform,
-    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,
-    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,
+    (FT_Renderer_RenderFunc)   ft_smooth_render_lcd_v,  /* render_glyph    */
+    (FT_Renderer_TransformFunc)ft_smooth_transform,     /* transform_glyph */
+    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,      /* get_glyph_cbox  */
+    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,      /* set_mode        */
 
-    (FT_Raster_Funcs*)    &FT_GRAYS_RASTER_GET
+    (FT_Raster_Funcs*)&FT_GRAYS_RASTER_GET              /* raster_class    */
   )
 
 
index c7c28c2..6dfd657 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Anti-aliasing renderer interface (specification).                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 FT_BEGIN_HEADER
 
 
-#ifndef FT_CONFIG_OPTION_NO_STD_RASTER
-  FT_DECLARE_RENDERER( ft_std_renderer_class )
-#endif
-
-#ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER
   FT_DECLARE_RENDERER( ft_smooth_renderer_class )
 
   FT_DECLARE_RENDERER( ft_smooth_lcd_renderer_class )
 
-  FT_DECLARE_RENDERER( ft_smooth_lcd_v_renderer_class )
-#endif
-
+  FT_DECLARE_RENDERER( ft_smooth_lcdv_renderer_class )
 
 
 FT_END_HEADER
index 6c2b232..fb89be3 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for smooth module.   */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index fe76152..9ddd1c7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for smooth module.   */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f3cb044..804e9b1 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 5e94f73..dfdc9bc 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 97ca3e5..e0460d9 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType anti-aliasing rasterer module component (body only).        */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "ftspic.c"
+
 #include "ftgrays.c"
 #include "ftsmooth.c"
+#include "ftspic.c"
 
 
 /* END */
index 39fe5c5..027b630 100644 (file)
@@ -5,7 +5,7 @@
 #
 # Process a blue zone character data file.
 #
-# Copyright 2013-2016 by
+# Copyright 2013-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used,
index 9f81b1a..73bc99d 100644 (file)
@@ -90,14 +90,14 @@ names_add( const char*  name,
     max_names += (max_names >> 1) + 4;
     the_names  = (NameRec*)realloc( the_names,
                                     sizeof ( the_names[0] ) * max_names );
-    if ( the_names == NULL )
+    if ( !the_names )
       panic( "not enough memory" );
   }
   nm = &the_names[num_names++];
 
   nm->hash = h;
   nm->name = (char*)malloc( len+1 );
-  if ( nm->name == NULL )
+  if ( !nm->name )
     panic( "not enough memory" );
 
   memcpy( nm->name, name, len );
@@ -159,7 +159,7 @@ names_dump( FILE*         out,
         char         temp[512];
 
 
-        if ( dll_name == NULL )
+        if ( !dll_name )
         {
           fprintf( stderr,
                    "you must provide a DLL name with the -d option!\n" );
@@ -168,7 +168,7 @@ names_dump( FILE*         out,
 
         /* we must omit the .dll suffix from the library name */
         dot = strchr( dll_name, '.' );
-        if ( dot != NULL )
+        if ( dot )
         {
           int  len = dot - dll_name;
 
@@ -190,7 +190,7 @@ names_dump( FILE*         out,
 
     case OUTPUT_NETWARE_IMP:
       {
-        if ( dll_name != NULL )
+        if ( dll_name )
           fprintf( out, "  (%s)\n", dll_name );
         for ( nn = 0; nn < num_names - 1; nn++ )
           fprintf( out, "  %s,\n", the_names[nn].name );
@@ -371,7 +371,7 @@ int  main( int argc, const char* const*  argv )
           arg += 2;
 
         out = fopen( arg, "wt" );
-        if ( out == NULL )
+        if ( !out )
         {
           fprintf( stderr, "could not open '%s' for writing\n", argv[2] );
           exit(3);
@@ -440,7 +440,7 @@ int  main( int argc, const char* const*  argv )
     {
       FILE*  file = fopen( argv[0], "rb" );
 
-      if ( file == NULL )
+      if ( !file )
         fprintf( stderr, "unable to open '%s'\n", argv[0] );
       else
       {
index 438345c..283d815 100644 (file)
@@ -3,7 +3,7 @@
 #
 #    Parse comment blocks to build content blocks (library file).
 #
-#  Copyright 2002-2016 by
+#  Copyright 2002-2017 by
 #  David Turner.
 #
 #  This file is part of the FreeType project, and may only be used,
index aa88996..4e25ff0 100644 (file)
@@ -4,7 +4,7 @@
 #
 #    Convert source code markup to HTML documentation.
 #
-#  Copyright 2002-2016 by
+#  Copyright 2002-2017 by
 #  David Turner.
 #
 #  This file is part of the FreeType project, and may only be used,
index c475890..2745754 100644 (file)
@@ -3,7 +3,7 @@
 #
 #    Convert parsed content blocks to a structured document (library file).
 #
-#  Copyright 2002-2016 by
+#  Copyright 2002-2017 by
 #  David Turner.
 #
 #  This file is part of the FreeType project, and may only be used,
index 3d30c72..06407e1 100644 (file)
@@ -3,7 +3,7 @@
 #
 #    Convert source code comments to multi-line blocks (library file).
 #
-#  Copyright 2002-2016 by
+#  Copyright 2002-2017 by
 #  David Turner.
 #
 #  This file is part of the FreeType project, and may only be used,
index 9b28780..012b55e 100644 (file)
@@ -3,7 +3,7 @@
 #
 #    A sub-class container of the `Formatter' class to produce HTML.
 #
-#  Copyright 2002-2016 by
+#  Copyright 2002-2017 by
 #  David Turner.
 #
 #  This file is part of the FreeType project, and may only be used,
index cbba9b8..ba5b2e7 100644 (file)
@@ -3,7 +3,7 @@
 #
 #    Auxiliary functions for the `docmaker' tool (library file).
 #
-#  Copyright 2002-2016 by
+#  Copyright 2002-2017 by
 #  David Turner.
 #
 #  This file is part of the FreeType project, and may only be used,
index c16b7e9..53f9071 100644 (file)
@@ -64,7 +64,7 @@ a   convenience  `main'   function.   Link   it  with   `ftfuzzer.cc',
 
 ----------------------------------------------------------------------
 
-Copyright 2015-2016 by
+Copyright 2015-2017 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
index 39f2b39..4da0c2b 100644 (file)
@@ -2,7 +2,7 @@
 //
 //   A fuzzing function to test FreeType with libFuzzer.
 //
-// Copyright 2015-2016 by
+// Copyright 2015-2017 by
 // David Turner, Robert Wilhelm, and Werner Lemberg.
 //
 // This file is part of the FreeType project, and may only be used,
   static int         InitResult;
 
 
-  struct FT_Global {
-    FT_Global() {
+  struct FT_Global
+  {
+    FT_Global()
+    {
       InitResult = FT_Init_FreeType( &library );
+      if ( InitResult )
+        return;
+
+      // try to activate Adobe's CFF engine; it might not be the default
+      unsigned int  cff_hinting_engine = FT_CFF_HINTING_ADOBE;
+      FT_Property_Set( library,
+                       "cff",
+                       "hinting-engine", &cff_hinting_engine );
     }
-    ~FT_Global() {
+
+    ~FT_Global()
+    {
       FT_Done_FreeType( library );
     }
   };
   FT_Global  global_ft;
 
 
+  // We want to select n values at random (without repetition),
+  // with 0 < n <= N.  The algorithm is taken from TAoCP, Vol. 2
+  // (Algorithm S, selection sampling technique)
+  struct Random
+  {
+    int  n;
+    int  N;
+
+    int  t; // total number of values so far
+    int  m; // number of selected values so far
+
+    uint32_t  r; // the current pseudo-random number
+
+    Random( int n_,
+            int N_ )
+    : n( n_ ),
+      N( N_ )
+    {
+      t = 0;
+      m = 0;
+
+      // Ideally, this should depend on the input file,
+      // for example, taking the sha256 as input;
+      // however, this is overkill for fuzzying tests.
+      r = 12345;
+    }
+
+    int get()
+    {
+      if ( m >= n )
+        return -1;
+
+    Redo:
+      // We can't use `rand': different C libraries might provide
+      // different implementations of this function.  As a replacement,
+      // we use a 32bit version of the `xorshift' algorithm.
+      r ^= r << 13;
+      r ^= r >> 17;
+      r ^= r << 5;
+
+      double  U = double( r ) / UINT32_MAX;
+
+      if ( ( N - t ) * U >= ( n - m ) )
+      {
+        t++;
+        goto Redo;
+      }
+
+      t++;
+      m++;
+
+      return t;
+    }
+  };
+
+
   static int
   archive_read_entry_data( struct archive   *ar,
                            vector<FT_Byte>  *vw )
     long  num_faces = face->num_faces;
     FT_Done_Face( face );
 
-    // loop over all faces
-    for ( long  face_index = 0;
-          face_index < num_faces;
-          face_index++ )
+    // loop over up to 20 arbitrarily selected faces
+    // from index range [0;num-faces-1]
+    long  max_face_cnt = num_faces < 20
+                           ? num_faces
+                           : 20;
+
+    Random  faces_pool( (int)max_face_cnt, (int)num_faces );
+
+    for ( long  face_cnt = 0;
+          face_cnt < max_face_cnt;
+          face_cnt++ )
     {
+      long  face_index = faces_pool.get() - 1;
+
       // get number of instances
       if ( FT_New_Memory_Face( library,
                                files[0].data(),
       long  num_instances = face->style_flags >> 16;
       FT_Done_Face( face );
 
-      // load face with and without instances
-      for ( long  instance_index = 0;
-            instance_index < num_instances + 1;
-            instance_index++ )
+      // loop over the face without instance (index 0)
+      // and up to 20 arbitrarily selected instances
+      // from index range [1;num_instances]
+      long  max_instance_cnt = num_instances < 20
+                                 ? num_instances
+                                 : 20;
+
+      Random  instances_pool( (int)max_instance_cnt, (int)num_instances );
+
+      for ( long  instance_cnt = 0;
+            instance_cnt <= max_instance_cnt;
+            instance_cnt++ )
       {
-        if ( FT_New_Memory_Face( library,
-                                 files[0].data(),
-                                 (FT_Long)files[0].size(),
-                                 ( instance_index << 16 ) + face_index,
-                                 &face ) )
-          continue;
+        long  instance_index = 0;
+
+        if ( !instance_cnt )
+        {
+          if ( FT_New_Memory_Face( library,
+                                   files[0].data(),
+                                   (FT_Long)files[0].size(),
+                                   face_index,
+                                   &face ) )
+            continue;
+        }
+        else
+        {
+          instance_index = instances_pool.get();
+
+          if ( FT_New_Memory_Face( library,
+                                   files[0].data(),
+                                   (FT_Long)files[0].size(),
+                                   ( instance_index << 16 ) + face_index,
+                                   &face ) )
+            continue;
+        }
 
         // if we have more than a single input file coming from an archive,
         // attach them (starting with the second file) using the order given
           FT_Attach_Stream( face, &open_args );
         }
 
-        // loop over all bitmap stroke sizes
-        // and an arbitrary size for outlines
-        for ( int  fixed_sizes_index = 0;
-              fixed_sizes_index < face->num_fixed_sizes + 1;
-              fixed_sizes_index++ )
+        // loop over an arbitrary size for outlines
+        // and up to ten arbitrarily selected bitmap strike sizes
+        // from the range [0;num_fixed_sizes - 1]
+        int  max_size_cnt = face->num_fixed_sizes < 10
+                              ? face->num_fixed_sizes
+                              : 10;
+
+        Random sizes_pool( max_size_cnt, face->num_fixed_sizes );
+
+        for ( int  size_cnt = 0;
+              size_cnt <= max_size_cnt;
+              size_cnt++ )
         {
           FT_Int32  flags = load_flags;
 
-          if ( !fixed_sizes_index )
+          int  size_index = 0;
+
+          if ( !size_cnt )
           {
             // set up 20pt at 72dpi as an arbitrary size
-            FT_Set_Char_Size( face, 20, 20, 72, 72 );
+            if ( FT_Set_Char_Size( face, 20 * 64, 20 * 64, 72, 72 ) )
+              continue;
             flags |= FT_LOAD_NO_BITMAP;
           }
           else
           {
-            FT_Select_Size( face, fixed_sizes_index - 1 );
+            // bitmap strikes are not active for font variations
+            if ( instance_index )
+              continue;
+
+            size_index = sizes_pool.get() - 1;
+
+            if ( FT_Select_Size( face, size_index ) )
+              continue;
             flags |= FT_LOAD_COLOR;
           }
 
           // test MM interface only for a face without a selected instance
-          if ( instance_index == 0 )
+          // and without a selected bitmap strike
+          if ( !instance_index && !size_cnt )
             setIntermediateAxis( face );
 
           // loop over all glyphs
index 4818450..22aa5a7 100644 (file)
@@ -2,7 +2,7 @@
 //
 //   A custom fuzzer mutator to test for FreeType with libFuzzer.
 //
-// Copyright 2015-2016 by
+// Copyright 2015-2017 by
 // David Turner, Robert Wilhelm, and Werner Lemberg.
 //
 // This file is part of the FreeType project, and may only be used,
index 05187b0..ae9b1a5 100644 (file)
@@ -2,7 +2,7 @@
 //
 //   A fuzzing function to test FreeType's rasterizers with libFuzzer.
 //
-// Copyright 2016 by
+// Copyright 2016-2017 by
 // David Turner, Robert Wilhelm, and Werner Lemberg.
 //
 // This file is part of the FreeType project, and may only be used,
index d5f9f15..1526120 100644 (file)
@@ -2,7 +2,7 @@
 //
 //   A `main' function for fuzzers like `ftfuzzer.cc'.
 //
-// Copyright 2015-2016 by
+// Copyright 2015-2017 by
 // David Turner, Robert Wilhelm, and Werner Lemberg.
 //
 // This file is part of the FreeType project, and may only be used,
index 2e61929..24dc49c 100644 (file)
@@ -5,7 +5,12 @@ TOP_DIR ?= ../../..
 OBJ_DIR ?= $(TOP_DIR)/objs
 
 
-# The setup below is for gcc on a Unix-like platform.
+# The setup below is for gcc on a Unix-like platform,
+# where FreeType has been set up to create a static library
+# (which is the default).
+
+VPATH = $(OBJ_DIR) \
+        $(OBJ_DIR)/.libs
 
 SRC_DIR = $(TOP_DIR)/src/tools/ftrandom
 
@@ -20,16 +25,21 @@ WFLAGS = -Wmissing-prototypes \
          -Wchar-subscripts \
          -Wsequence-point
 CFLAGS = $(WFLAGS) \
-         -g \
-         -I $(TOP_DIR)/include
+         -g
+INCLUDES = -I $(TOP_DIR)/include
+LDFLAGS =
 LIBS = -lm \
-       -L $(OBJ_DIR) \
-       -lfreetype \
-       -lz
+       -lz \
+       -lpng \
+       -lbz2 \
+       -lharfbuzz
 
 all: $(OBJ_DIR)/ftrandom
 
-$(OBJ_DIR)/ftrandom: $(SRC_DIR)/ftrandom.c $(OBJ_DIR)/libfreetype.a
-       $(CC) -o $(OBJ_DIR)/ftrandom $(CFLAGS) $(SRC_DIR)/ftrandom.c $(LIBS)
+$(OBJ_DIR)/ftrandom.o: $(SRC_DIR)/ftrandom.c
+       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
+
+$(OBJ_DIR)/ftrandom: $(OBJ_DIR)/ftrandom.o libfreetype.a
+       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 # EOF
index 71bf053..7c61086 100644 (file)
@@ -1,48 +1,69 @@
 ftrandom
---------
+========
 
 This program expects a set of directories containing good fonts, and a set
 of extensions of fonts to be tested.  It will randomly pick a font, copy it,
-introduce and error and then test it.
+introduce an error and then test it.
 
-The FreeType tests are quite basic:
+The FreeType tests are quite basic; for each erroneous font ftrandom
 
-  For each erroneous font it
-    forks off a new tester;
-    initializes the library;
-    opens each font in the file;
-    loads each glyph;
-      (optionally reviewing the contours of the glyph)
-      (optionally rasterizing)
-    closes the face.
+  . forks off a new tester,
+  . initializes the library,
+  . opens each font in the file,
+  . loads each glyph,
+  . optionally reviews the contours of the glyph,
+  . optionally rasterizes the glyph, and
+  . closes the face.
 
-If the tester exits with a signal, or takes longer than 20 seconds then
-ftrandom saves the erroneous font and continues.  If the tester exits
-normally or with an error, then the superstructure removes the test font and
-continues.
+If a tester takes longer than 20 seconds, ftrandom saves the erroneous font
+and continues.  If the tester exits normally or with an error, then the
+superstructure removes the test font and continues.
 
-Arguments are:
+
+Command line options
+--------------------
 
   --all                    Test every font in the directory(ies) no matter
-                           what its extension (some CID-keyed fonts have no
-                           extension).
-  --check-outlines         Call FT_Outline_Decompose on each glyph.
+                           what its extension.
+  --check-outlines         Call `FT_Outline_Decompose' on each glyph.
   --dir <dir>              Append <dir> to the list of directories to search
-                           for good fonts.
+                           for good fonts.  No recursive search.
   --error-count <cnt>      Introduce <cnt> single-byte errors into the
-                           erroneous fonts.
+                           erroneous fonts (default: 1).
   --error-fraction <frac>  Multiply the file size of the font by <frac> and
                            introduce that many errors into the erroneous
-                           font file.
-  --ext <ext>              Add <ext> to the set of font types tested.  Known
-                           extensions are `ttf', `otf', `ttc', `cid', `pfb',
-                           `pfa', `bdf', `pcf', `pfr', `fon', `otb', and
-                           `cff'.
+                           font file.  <frac> should be in the range [0;1]
+                           (default: 0.0).
+  --ext <ext>              Add <ext> to the set of font types tested.
   --help                   Print out this list of options.
   --nohints                Specify FT_LOAD_NO_HINTING when loading glyphs.
-  --rasterize              Call FT_Render_Glyph as well as loading it.
+  --rasterize              Call `FT_Render_Glyph' as well as loading it.
   --result <dir>           This is the directory in which test files are
                            placed.
   --test <file>            Run a single test on a pre-generated testcase.
-                           Done in the current process so it can be debugged
-                           more easily.
+                           This is done in the current process so it can be
+                           debugged more easily.
+
+The default font extensions tested by ftrandom are
+
+  .ttf .otf .ttc .cid .pfb .pfa .bdf .pcf .pfr .fon .otb .cff
+
+The default font directory is controlled by the macro `GOOD_FONTS_DIR' in
+the source code (and can be thus specified during compilation); its default
+value is
+
+  /usr/local/share/fonts
+
+The default result directory is `results' (in the current directory).
+
+
+Compilation
+-----------
+
+Two possible solutions.
+
+. Run ftrandom within a debugging tool like `valgrind' to catch various
+  memory issues.
+
+. Compile FreeType with sanitizer flags as provided by gcc or clang, for
+  example, then link it with ftrandom.
index 9a5b632..ab5cfc9 100644 (file)
@@ -29,6 +29,9 @@
 /* This file is now part of the FreeType library */
 
 
+#define _XOPEN_SOURCE 500 /* for `kill', `strdup', `random', and `srandom' */
+
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -38,7 +41,6 @@
 #include <sys/wait.h>
 #include <unistd.h>
 #include <dirent.h>
-#include <math.h>
 #include <signal.h>
 #include <time.h>
 
@@ -56,7 +58,7 @@
   static int    rasterize      = false;
   static char*  results_dir    = "results";
 
-#define GOOD_FONTS_DIR  "/home/wl/freetype-testfonts"
+#define GOOD_FONTS_DIR  "/usr/local/share/fonts"
 
   static char*  default_dir_list[] =
   {
     NULL
   };
 
-  static int  error_count    = 1;
-  static int  error_fraction = 0;
+  static unsigned int  error_count    = 1;
+  static double        error_fraction = 0.0;
 
   static FT_F26Dot6  font_size = 12 * 64;
 
   static struct fontlist
   {
     char*         name;
-    int           len;
+    long          len;
     unsigned int  isbinary: 1;
     unsigned int  isascii: 1;
     unsigned int  ishex: 1;
 
   } *fontlist;
 
-  static int  fcnt;
+  static unsigned int  fcnt;
 
 
   static int
   FT_MoveTo( const FT_Vector  *to,
              void             *user )
   {
+    FT_UNUSED( to );
+    FT_UNUSED( user );
+
     return 0;
   }
 
   FT_LineTo( const FT_Vector  *to,
              void             *user )
   {
+    FT_UNUSED( to );
+    FT_UNUSED( user );
+
     return 0;
   }
 
               const FT_Vector  *to,
               void             *user )
   {
+    FT_UNUSED( _cp );
+    FT_UNUSED( to );
+    FT_UNUSED( user );
+
     return 0;
   }
 
               const FT_Vector  *to,
               void             *user )
   {
+    FT_UNUSED( cp1 );
+    FT_UNUSED( cp2 );
+    FT_UNUSED( to );
+    FT_UNUSED( user );
+
     return 0;
   }
 
   static void
   TestFace( FT_Face  face )
   {
-    int  gid;
-    int  load_flags = FT_LOAD_DEFAULT;
+    unsigned int  gid;
+    int           load_flags = FT_LOAD_DEFAULT;
 
 
     if ( check_outlines         &&
 
     FT_Set_Char_Size( face, 0, font_size, 72, 72 );
 
-    for ( gid = 0; gid < face->num_glyphs; ++gid )
+    for ( gid = 0; gid < face->num_glyphs; gid++ )
     {
       if ( check_outlines         &&
            FT_IS_SCALABLE( face ) )
       TestFace( face );
     else
     {
-      int  i, num;
+      long  i, num;
 
 
       num = face->num_faces;
       FT_Done_Face( face );
 
-      for ( i = 0; i < num; ++i )
+      for ( i = 0; i < num; i++ )
       {
         if ( !FT_New_Face( context, testfont, i, &face ) )
           TestFace( face );
       }
     }
 
+    FT_Done_FreeType( context );
+
     exit( 0 );
   }
 
     char*  pt;
 
 
-    if ( extensions == NULL )
+    if ( !extensions )
       return true;
 
     pt = strrchr( filename, '.' );
-    if ( pt == NULL )
+    if ( !pt )
       return false;
     if ( pt < strrchr( filename, '/' ) )
       return false;
 
-    for ( i = 0; extensions[i] != NULL; ++i )
+    for ( i = 0; extensions[i] != NULL; i++ )
       if ( strcasecmp( pt + 1, extensions[i] ) == 0 ||
            strcasecmp( pt,     extensions[i] ) == 0 )
         return true;
     item->isbinary = item->isascii = item->ishex = false;
 
     foo = fopen( item->name, "rb" );
-    if ( foo != NULL )
+    if ( foo )
     {
       /* Try to guess the file type from the first few characters... */
       int  ch1 = getc( foo );
       else if ( ch1 == '%' && ch2 == '!' )
       {
         /* Random PostScript */
-        if ( strstr( item->name, ".pfa" ) != NULL ||
-             strstr( item->name, ".PFA" ) != NULL )
+        if ( strstr( item->name, ".pfa" ) ||
+             strstr( item->name, ".PFA" ) )
           item->ishex = true;
         else
           item->isascii = true;
   FindFonts( char**  fontdirs,
              char**  extensions )
   {
-    int          i, max;
-    char         buffer[1025];
-    struct stat  statb;
+    int           i;
+    unsigned int  max;
+    char          buffer[1025];
+    struct stat   statb;
 
 
     max  = 0;
     fcnt = 0;
 
-    for ( i = 0; fontdirs[i] != NULL; ++i )
+    for ( i = 0; fontdirs[i] != NULL; i++ )
     {
       DIR*            examples;
       struct dirent*  ent;
 
 
       examples = opendir( fontdirs[i] );
-      if ( examples == NULL )
+      if ( !examples )
       {
         fprintf( stderr,
                  "Can't open example font directory `%s'\n",
                   "%s/%s", fontdirs[i], ent->d_name );
         if ( stat( buffer, &statb ) == -1 || S_ISDIR( statb.st_mode ) )
           continue;
-        if ( extensions == NULL || extmatch( buffer, extensions ) )
+        if ( !extensions || extmatch( buffer, extensions ) )
         {
           if ( fcnt >= max )
           {
             max += 100;
             fontlist = realloc( fontlist, max * sizeof ( struct fontlist ) );
-            if ( fontlist == NULL )
+            if ( !fontlist )
             {
               fprintf( stderr, "Can't allocate memory\n" );
               exit( 1 );
           fontlist[fcnt].len  = statb.st_size;
 
           figurefiletype( &fontlist[fcnt] );
-          ++fcnt;
+          fcnt++;
         }
       }
 
   }
 
 
-  static int
+  static unsigned int
   getErrorCnt( struct fontlist*  item )
   {
-    if ( error_count == 0 && error_fraction == 0 )
+    if ( error_count == 0 && error_fraction == 0.0 )
       return 0;
 
-    return error_count + ceil( error_fraction * item->len );
+    return error_count + (unsigned int)( error_fraction * item->len );
   }
 
 
   copyfont( struct fontlist*  item,
             char*             newfont )
   {
-    static char  buffer[8096];
-    FILE         *good, *new;
-    int          len;
-    int          i, err_cnt;
+    static char   buffer[8096];
+    FILE          *good, *newf;
+    size_t        len;
+    unsigned int  i, err_cnt;
 
 
     good = fopen( item->name, "r" );
-    if ( good == NULL )
+    if ( !good )
     {
       fprintf( stderr, "Can't open `%s'\n", item->name );
       return false;
     }
 
-    new = fopen( newfont, "w+" );
-    if ( new == NULL )
+    newf = fopen( newfont, "w+" );
+    if ( !newf )
     {
       fprintf( stderr, "Can't create temporary output file `%s'\n",
                newfont );
     }
 
     while ( ( len = fread( buffer, 1, sizeof ( buffer ), good ) ) > 0 )
-      fwrite( buffer, 1, len, new );
+      fwrite( buffer, 1, len, newf );
 
     fclose( good );
 
     err_cnt = getErrorCnt( item );
-    for ( i = 0; i < err_cnt; ++i )
+    for ( i = 0; i < err_cnt; i++ )
     {
-      fseek( new, getRandom( 0, item->len - 1 ), SEEK_SET );
+      fseek( newf, getRandom( 0, (int)( item->len - 1 ) ), SEEK_SET );
 
       if ( item->isbinary )
-        putc( getRandom( 0, 0xFF ), new );
+        putc( getRandom( 0, 0xFF ), newf );
       else if ( item->isascii )
-        putc( getRandom( 0x20, 0x7E ), new );
+        putc( getRandom( 0x20, 0x7E ), newf );
       else
       {
         int  hex = getRandom( 0, 15 );
         else
           hex += 'A' - 10;
 
-        putc( hex, new );
+        putc( hex, newf );
       }
     }
 
-    if ( ferror( new ) )
+    if ( ferror( newf ) )
     {
-      fclose( new );
+      fclose( newf );
       unlink( newfont );
       return false;
     }
 
-    fclose( new );
+    fclose( newf );
 
     return true;
   }
   static void
   abort_test( int  sig )
   {
+    FT_UNUSED( sig );
+
     /* If a time-out happens, then kill the child */
     kill( child_pid, SIGFPE );
     write( 2, "Timeout... ", 11 );
   static void
   do_test( void )
   {
-    int         i        = getRandom( 0, fcnt - 1 );
+    int         i        = getRandom( 0, (int)( fcnt - 1 ) );
     static int  test_num = 0;
     char        buffer[1024];
 
   usage( FILE*  out,
          char*  name )
   {
+    char**  d = default_dir_list;
+    char**  e = default_ext_list;
+
+
     fprintf( out, "%s [options] -- Generate random erroneous fonts\n"
                   "  and attempt to parse them with FreeType.\n\n", name );
 
     fprintf( out, "  --all                    All non-directory files are assumed to be fonts.\n" );
     fprintf( out, "  --check-outlines         Make sure we can parse the outlines of each glyph.\n" );
-    fprintf( out, "  --dir <path>             Append <path> to list of font search directories.\n" );
-    fprintf( out, "  --error-count <cnt>      Introduce <cnt> single byte errors into each font.\n" );
+    fprintf( out, "  --dir <path>             Append <path> to list of font search directories\n"
+                  "                           (no recursive search).\n" );
+    fprintf( out, "  --error-count <cnt>      Introduce <cnt> single byte errors into each font\n"
+                  "                           (default: 1)\n" );
     fprintf( out, "  --error-fraction <frac>  Introduce <frac>*filesize single byte errors\n"
-                  "                           into each font.\n" );
+                  "                           into each font (default: 0.0).\n" );
     fprintf( out, "  --ext <ext>              Add <ext> to list of extensions indicating fonts.\n" );
     fprintf( out, "  --help                   Print this.\n" );
     fprintf( out, "  --nohints                Turn off hinting.\n" );
     fprintf( out, "  --rasterize              Attempt to rasterize each glyph.\n" );
-    fprintf( out, "  --results <dir>          Directory in which to place the test fonts.\n" );
+    fprintf( out, "  --results <path>         Place the created test fonts into <path>\n"
+                  "                           (default: `results')\n" );
     fprintf( out, "  --size <float>           Use the given font size for the tests.\n" );
     fprintf( out, "  --test <file>            Run a single test on an already existing file.\n" );
+    fprintf( out, "\n" );
+
+    fprintf( out, "Default font extensions:\n" );
+    fprintf( out, " " );
+    while ( *e )
+      fprintf( out, " .%s", *e++ );
+    fprintf( out, "\n" );
+
+    fprintf( out, "Default font directories:\n" );
+    fprintf( out, " " );
+    while ( *d )
+      fprintf( out, " %s", *d++ );
+    fprintf( out, "\n" );
   }
 
 
     char*   testfile = NULL;
 
 
-    dirs = calloc( argc + 1, sizeof ( char ** ) );
-    exts = calloc( argc + 1, sizeof ( char ** ) );
+    dirs = calloc( (size_t)( argc + 1 ), sizeof ( char ** ) );
+    exts = calloc( (size_t)( argc + 1 ), sizeof ( char ** ) );
 
-    for ( i = 1; i < argc; ++i )
+    for ( i = 1; i < argc; i++ )
     {
       char*  pt = argv[i];
       char*  end;
 
 
       if ( pt[0] == '-' && pt[1] == '-' )
-        ++pt;
+        pt++;
 
       if ( strcmp( pt, "-all" ) == 0 )
         allexts = true;
       else if ( strcmp( pt, "-error-count" ) == 0 )
       {
         if ( !rset )
-          error_fraction = 0;
+          error_fraction = 0.0;
         rset = true;
-        error_count = strtol( argv[++i], &end, 10 );
+        error_count = (unsigned int)strtoul( argv[++i], &end, 10 );
         if ( *end != '\0' )
         {
           fprintf( stderr, "Bad value for error-count: %s\n", argv[i] );
           fprintf( stderr, "Bad value for error-fraction: %s\n", argv[i] );
           exit( 1 );
         }
+        if ( error_fraction < 0.0 || error_fraction > 1.0 )
+        {
+          fprintf( stderr, "error-fraction must be in the range [0;1]\n" );
+          exit( 1 );
+        }
       }
       else if ( strcmp( pt, "-ext" ) == 0 )
         exts[ecnt++] = argv[++i];
       dirs = default_dir_list;
     }
 
-    if ( testfile != NULL )
+    if ( testfile )
       ExecuteTest( testfile );         /* This should never return */
 
     time( &now );
-    srandom( now );
+    srandom( (unsigned int)now );
 
     FindFonts( dirs, exts );
     mkdir( results_dir, 0755 );
index 0729c2b..9ed1588 100644 (file)
@@ -6,7 +6,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -415,7 +415,7 @@ t1_expert_encoding = \
 # This data has been taken literally from the files `glyphlist.txt'
 # and `zapfdingbats.txt' version 2.0, Sept 2002.  It is available from
 #
-#   http://sourceforge.net/adobe/aglfn/
+#   https://github.com/adobe-type-tools/agl-aglfn
 #
 adobe_glyph_list = """\
 A;0041
@@ -4920,8 +4920,17 @@ class StringTable:
 
   def dump( self, file ):
     write = file.write
-    write( "  static const char  " + self.master_table +
-           "[" + repr( self.total ) + "] =\n" )
+    write( "#ifndef  DEFINE_PS_TABLES\n" )
+    write( "#ifdef  __cplusplus\n" )
+    write( '  extern "C"\n' )
+    write( "#else\n" )
+    write( "  extern\n" )
+    write( "#endif\n" )
+    write( "#endif\n" )
+    write( "  const char  " + self.master_table +
+           "[" + repr( self.total ) + "]\n" )
+    write( "#ifdef  DEFINE_PS_TABLES\n" )
+    write( "  =\n" )
     write( "  {\n" )
 
     line = ""
@@ -4930,7 +4939,10 @@ class StringTable:
       line += string.join( ( re.findall( ".", name ) ), "','" )
       line += "', 0,\n"
 
-    write( line + "  };\n\n\n" )
+    write( line )
+    write( "  }\n" )
+    write( "#endif /* DEFINE_PS_TABLES */\n" )
+    write( "  ;\n\n\n" )
 
   def dump_sublist( self, file, table_name, macro_name, sublist ):
     write = file.write
@@ -4938,8 +4950,17 @@ class StringTable:
 
     write( "  /* Values are offsets into the `" +
            self.master_table + "' table */\n\n" )
-    write( "  static const short  " + table_name +
-           "[" + macro_name + "] =\n" )
+    write( "#ifndef  DEFINE_PS_TABLES\n" )
+    write( "#ifdef  __cplusplus\n" )
+    write( '  extern "C"\n' )
+    write( "#else\n" )
+    write( "  extern\n" )
+    write( "#endif\n" )
+    write( "#endif\n" )
+    write( "  const short  " + table_name +
+           "[" + macro_name + "]\n" )
+    write( "#ifdef  DEFINE_PS_TABLES\n" )
+    write( "  =\n" )
     write( "  {\n" )
 
     line  = "    "
@@ -4955,7 +4976,11 @@ class StringTable:
         col   = 0
         comma = ",\n    "
 
-    write( line + "\n  };\n\n\n" )
+    write( line )
+    write( "\n" )
+    write( "  }\n" )
+    write( "#endif /* DEFINE_PS_TABLES */\n" )
+    write( "  ;\n\n\n" )
 
 
 # We now store the Adobe Glyph List in compressed form.  The list is put
@@ -5188,8 +5213,17 @@ def dump_encoding( file, encoding_name, encoding_list ):
 
   write = file.write
   write( "  /* the following are indices into the SID name table */\n" )
-  write( "  static const unsigned short  " + encoding_name +
-         "[" + repr( len( encoding_list ) ) + "] =\n" )
+  write( "#ifndef  DEFINE_PS_TABLES\n" )
+  write( "#ifdef  __cplusplus\n" )
+  write( '  extern "C"\n' )
+  write( "#else\n" )
+  write( "  extern\n" )
+  write( "#endif\n" )
+  write( "#endif\n" )
+  write( "  const unsigned short  " + encoding_name +
+         "[" + repr( len( encoding_list ) ) + "]\n" )
+  write( "#ifdef  DEFINE_PS_TABLES\n" )
+  write( "  =\n" )
   write( "  {\n" )
 
   line  = "    "
@@ -5204,14 +5238,27 @@ def dump_encoding( file, encoding_name, encoding_list ):
       col = 0
       comma = ",\n    "
 
-  write( line + "\n  };\n\n\n" )
+  write( line )
+  write( "\n" )
+  write( "  }\n" )
+  write( "#endif /* DEFINE_PS_TABLES */\n" )
+  write( "  ;\n\n\n" )
 
 
 def dump_array( the_array, write, array_name ):
   """dumps a given encoding"""
 
-  write( "  static const unsigned char  " + array_name +
-         "[" + repr( len( the_array ) ) + "L] =\n" )
+  write( "#ifndef  DEFINE_PS_TABLES\n" )
+  write( "#ifdef  __cplusplus\n" )
+  write( '  extern "C"\n' )
+  write( "#else\n" )
+  write( "  extern\n" )
+  write( "#endif\n" )
+  write( "#endif\n" )
+  write( "  const unsigned char  " + array_name +
+         "[" + repr( len( the_array ) ) + "L]\n" )
+  write( "#ifdef  DEFINE_PS_TABLES\n" )
+  write( "  =\n" )
   write( "  {\n" )
 
   line  = ""
@@ -5232,7 +5279,11 @@ def dump_array( the_array, write, array_name ):
       write( line )
       line = ""
 
-  write( line + "\n  };\n\n\n" )
+  write( line )
+  write( "\n" )
+  write( "  }\n" )
+  write( "#endif /* DEFINE_PS_TABLES */\n" )
+  write( "  ;\n\n\n" )
 
 
 def main():
@@ -5267,7 +5318,7 @@ def main():
   write( "/*                                                                         */\n" )
   write( "/*    PostScript glyph names.                                              */\n" )
   write( "/*                                                                         */\n" )
-  write( "/*  Copyright 2005-2015 by                                                 */\n" )
+  write( "/*  Copyright 2005-2017 by                                                 */\n" )
   write( "/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n" )
   write( "/*                                                                         */\n" )
   write( "/*  This file is part of the FreeType project, and may only be used,       */\n" )
@@ -5327,6 +5378,7 @@ def main():
   # write the lookup routine now
   #
   write( """\
+#ifdef  DEFINE_PS_TABLES
   /*
    *  This function searches the compressed table efficiently.
    */
@@ -5421,6 +5473,7 @@ def main():
   NotFound:
     return 0;
   }
+#endif /* DEFINE_PS_TABLES */
 
 #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
 
index f4a323b..4b04bfc 100755 (executable)
@@ -2,7 +2,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -i "$0" ${1+"$@"}'
   & eval 'exec perl -wS -i "$0" $argv:q'
     if 0;
 
-# Copyright 2015-2016 by
+# Copyright 2015-2017 by
 # Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index ecbb2db..22d406c 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/truetype Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 80c9832..563c584 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 3bf7cf7..ad3d007 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 23e2ea0..301b82a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType TrueType driver component (body only).                      */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "ttpic.c"
+
 #include "ttdriver.c"   /* driver interface    */
-#include "ttpload.c"    /* tables loader       */
 #include "ttgload.c"    /* glyph loader        */
-#include "ttobjs.c"     /* object manager      */
-
-#ifdef TT_USE_BYTECODE_INTERPRETER
+#include "ttgxvar.c"    /* gx distortable font */
 #include "ttinterp.c"
+#include "ttobjs.c"     /* object manager      */
+#include "ttpic.c"
+#include "ttpload.c"    /* tables loader       */
 #include "ttsubpix.c"
-#endif
-
-#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-#include "ttgxvar.c"    /* gx distortable font */
-#endif
 
 
 /* END */
index c9d4081..a1653b2 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType font driver implementation (body).                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -25,6 +25,7 @@
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
 #include FT_MULTIPLE_MASTERS_H
 #include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
 #endif
 
 #include FT_SERVICE_TRUETYPE_ENGINE_H
   static FT_Error
   tt_property_set( FT_Module    module,         /* TT_Driver */
                    const char*  property_name,
-                   const void*  value )
+                   const void*  value,
+                   FT_Bool      value_is_string )
   {
     FT_Error   error  = FT_Err_Ok;
     TT_Driver  driver = (TT_Driver)module;
 
+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+    FT_UNUSED( value_is_string );
+#endif
+
 
     if ( !ft_strcmp( property_name, "interpreter-version" ) )
     {
-      FT_UInt*  interpreter_version = (FT_UInt*)value;
+      FT_UInt  interpreter_version;
 
 
-      if ( *interpreter_version == TT_INTERPRETER_VERSION_35
+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+      if ( value_is_string )
+      {
+        const char*  s = (const char*)value;
+
+
+        interpreter_version = (FT_UInt)ft_strtol( s, NULL, 10 );
+      }
+      else
+#endif
+      {
+        FT_UInt*  iv = (FT_UInt*)value;
+
+
+        interpreter_version = *iv;
+      }
+
+      if ( interpreter_version == TT_INTERPRETER_VERSION_35
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
-           || *interpreter_version == TT_INTERPRETER_VERSION_38
+           || interpreter_version == TT_INTERPRETER_VERSION_38
 #endif
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-           || *interpreter_version == TT_INTERPRETER_VERSION_40
+           || interpreter_version == TT_INTERPRETER_VERSION_40
 #endif
          )
-        driver->interpreter_version = *interpreter_version;
+        driver->interpreter_version = interpreter_version;
       else
         error = FT_ERR( Unimplemented_Feature );
 
 
   FT_DEFINE_SERVICE_PROPERTIESREC(
     tt_service_properties,
+
     (FT_Properties_SetFunc)tt_property_set,     /* set_property */
-    (FT_Properties_GetFunc)tt_property_get )    /* get_property */
+    (FT_Properties_GetFunc)tt_property_get      /* get_property */
+  )
 
 
   /*************************************************************************/
                    FT_Fixed  *advances )
   {
     FT_UInt  nn;
-    TT_Face  face = (TT_Face) ttface;
+    TT_Face  face = (TT_Face)ttface;
 
 
     /* XXX: TODO: check for sbits */
 
     if ( flags & FT_LOAD_VERTICAL_LAYOUT )
     {
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+      /* no fast retrieval for blended MM fonts without VVAR table */
+      if ( !face->is_default_instance                               &&
+           !( face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+        return FT_THROW( Unimplemented_Feature );
+#endif
+
       for ( nn = 0; nn < count; nn++ )
       {
         FT_Short   tsb;
     }
     else
     {
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+      /* no fast retrieval for blended MM fonts without HVAR table */
+      if ( !face->is_default_instance                               &&
+           !( face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+        return FT_THROW( Unimplemented_Feature );
+#endif
+
       for ( nn = 0; nn < count; nn++ )
       {
         FT_Short   lsb;
       /* use the scaled metrics, even when tt_size_reset fails */
       FT_Select_Metrics( size->face, strike_index );
 
-      tt_size_reset( ttsize ); /* ignore return value */
+      tt_size_reset( ttsize, 0 ); /* ignore return value */
     }
     else
     {
-      SFNT_Service      sfnt    = (SFNT_Service) ttface->sfnt;
-      FT_Size_Metrics*  metrics = &size->metrics;
+      SFNT_Service      sfnt         = (SFNT_Service)ttface->sfnt;
+      FT_Size_Metrics*  size_metrics = &size->metrics;
 
 
-      error = sfnt->load_strike_metrics( ttface, strike_index, metrics );
+      error = sfnt->load_strike_metrics( ttface,
+                                         strike_index,
+                                         size_metrics );
       if ( error )
         ttsize->strike_index = 0xFFFFFFFFUL;
     }
     if ( FT_HAS_FIXED_SIZES( size->face ) )
     {
       TT_Face       ttface = (TT_Face)size->face;
-      SFNT_Service  sfnt   = (SFNT_Service) ttface->sfnt;
+      SFNT_Service  sfnt   = (SFNT_Service)ttface->sfnt;
       FT_ULong      strike_index;
 
 
 
     if ( FT_IS_SCALABLE( size->face ) )
     {
-      error = tt_size_reset( ttsize );
-      ttsize->root.metrics = ttsize->metrics;
+      error = tt_size_reset( ttsize, 0 );
+
+#ifdef TT_USE_BYTECODE_INTERPRETER
+      /* for the `MPS' bytecode instruction we need the point size */
+      if ( !error )
+      {
+        FT_UInt  resolution =
+                   ttsize->metrics->x_ppem > ttsize->metrics->y_ppem
+                     ? req->horiResolution
+                     : req->vertResolution;
+
+
+        /* if we don't have a resolution value, assume 72dpi */
+        if ( req->type == FT_SIZE_REQUEST_TYPE_SCALES ||
+             !resolution                              )
+          resolution = 72;
+
+        ttsize->point_size = FT_MulDiv( ttsize->ttmetrics.ppem,
+                                        64 * 72,
+                                        resolution );
+      }
+#endif
     }
 
     return error;
         load_flags |= FT_LOAD_NO_HINTING;
     }
 
+    /* use hinted metrics only if we load a glyph with hinting */
+    size->metrics = ( load_flags & FT_LOAD_NO_HINTING )
+                      ? &ttsize->metrics
+                      : &size->hinted_metrics;
+
     /* now load the glyph outline if necessary */
     error = TT_Load_Glyph( size, slot, glyph_index, load_flags );
 
   /*************************************************************************/
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
   FT_DEFINE_SERVICE_MULTIMASTERSREC(
     tt_service_gx_multi_masters,
+
     (FT_Get_MM_Func)        NULL,                   /* get_mm         */
     (FT_Set_MM_Design_Func) NULL,                   /* set_mm_design  */
     (FT_Set_MM_Blend_Func)  TT_Set_MM_Blend,        /* set_mm_blend   */
+    (FT_Get_MM_Blend_Func)  TT_Get_MM_Blend,        /* get_mm_blend   */
     (FT_Get_MM_Var_Func)    TT_Get_MM_Var,          /* get_mm_var     */
-    (FT_Set_Var_Design_Func)TT_Set_Var_Design )     /* set_var_design */
-#endif
+    (FT_Set_Var_Design_Func)TT_Set_Var_Design,      /* set_var_design */
+    (FT_Get_Var_Design_Func)TT_Get_Var_Design,      /* get_var_design */
+
+    (FT_Get_Var_Blend_Func) tt_get_var_blend,       /* get_var_blend  */
+    (FT_Done_Blend_Func)    tt_done_blend           /* done_blend     */
+  )
+
+  FT_DEFINE_SERVICE_METRICSVARIATIONSREC(
+    tt_service_metrics_variations,
+
+    (FT_HAdvance_Adjust_Func)tt_hadvance_adjust,     /* hadvance_adjust */
+    (FT_LSB_Adjust_Func)     NULL,                   /* lsb_adjust      */
+    (FT_RSB_Adjust_Func)     NULL,                   /* rsb_adjust      */
+
+    (FT_VAdvance_Adjust_Func)tt_vadvance_adjust,     /* vadvance_adjust */
+    (FT_TSB_Adjust_Func)     NULL,                   /* tsb_adjust      */
+    (FT_BSB_Adjust_Func)     NULL,                   /* bsb_adjust      */
+    (FT_VOrg_Adjust_Func)    NULL,                   /* vorg_adjust     */
+
+    (FT_Metrics_Adjust_Func) tt_apply_mvar           /* metrics_adjust  */
+  )
+
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
 
 
   static const FT_Service_TrueTypeEngineRec  tt_service_truetype_engine =
 
   FT_DEFINE_SERVICE_TTGLYFREC(
     tt_service_truetype_glyf,
-    (TT_Glyf_GetLocationFunc)tt_face_get_location )    /* get_location */
+
+    (TT_Glyf_GetLocationFunc)tt_face_get_location      /* get_location */
+  )
 
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-  FT_DEFINE_SERVICEDESCREC5(
+  FT_DEFINE_SERVICEDESCREC6(
     tt_services,
-    FT_SERVICE_ID_FONT_FORMAT,     FT_FONT_FORMAT_TRUETYPE,
-    FT_SERVICE_ID_MULTI_MASTERS,   &TT_SERVICE_GX_MULTI_MASTERS_GET,
-    FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
-    FT_SERVICE_ID_TT_GLYF,         &TT_SERVICE_TRUETYPE_GLYF_GET,
-    FT_SERVICE_ID_PROPERTIES,      &TT_SERVICE_PROPERTIES_GET )
+
+    FT_SERVICE_ID_FONT_FORMAT,        FT_FONT_FORMAT_TRUETYPE,
+    FT_SERVICE_ID_MULTI_MASTERS,      &TT_SERVICE_GX_MULTI_MASTERS_GET,
+    FT_SERVICE_ID_METRICS_VARIATIONS, &TT_SERVICE_METRICS_VARIATIONS_GET,
+    FT_SERVICE_ID_TRUETYPE_ENGINE,    &tt_service_truetype_engine,
+    FT_SERVICE_ID_TT_GLYF,            &TT_SERVICE_TRUETYPE_GLYF_GET,
+    FT_SERVICE_ID_PROPERTIES,         &TT_SERVICE_PROPERTIES_GET )
 #else
   FT_DEFINE_SERVICEDESCREC4(
     tt_services,
+
     FT_SERVICE_ID_FONT_FORMAT,     FT_FONT_FORMAT_TRUETYPE,
     FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
     FT_SERVICE_ID_TT_GLYF,         &TT_SERVICE_TRUETYPE_GLYF_GET,
 #endif
 
     result = ft_service_list_lookup( TT_SERVICES_GET, tt_interface );
-    if ( result != NULL )
+    if ( result )
       return result;
 
 #ifndef FT_CONFIG_OPTION_PIC
       0x10000L,        /* driver version == 1.0                 */
       0x20000L,        /* driver requires FreeType 2.0 or above */
 
-      0,    /* module-specific interface */
+      NULL,    /* module-specific interface */
 
       tt_driver_init,           /* FT_Module_Constructor  module_init   */
       tt_driver_done,           /* FT_Module_Destructor   module_done   */
     tt_size_init,               /* FT_Size_InitFunc  init_size */
     tt_size_done,               /* FT_Size_DoneFunc  done_size */
     tt_slot_init,               /* FT_Slot_InitFunc  init_slot */
-    0,                          /* FT_Slot_DoneFunc  done_slot */
+    NULL,                       /* FT_Slot_DoneFunc  done_slot */
 
     tt_glyph_load,              /* FT_Slot_LoadFunc  load_glyph */
 
     tt_get_kerning,             /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
     tt_get_advances,            /* FT_Face_GetAdvancesFunc  get_advances */
 
     tt_size_request,            /* FT_Size_RequestFunc  request_size */
index 74392bb..3bcba7f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level TrueType driver interface (specification).                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 895989f..a49f205 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType error codes (specification only).                           */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 8be9b6a..b7a844a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Glyph Loader (body).                                        */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -18,6 +18,7 @@
 
 #include <ft2build.h>
 #include FT_INTERNAL_DEBUG_H
+#include FT_CONFIG_CONFIG_H
 #include FT_INTERNAL_CALC_H
 #include FT_INTERNAL_STREAM_H
 #include FT_INTERNAL_SFNT_H
       /* This may not be the right place for this, but it works...  */
       /* Note that we have to unconditionally load the tweaks since */
       /* it is possible that glyphs individually switch ClearType's */
-      /* backwards compatibility mode on and off.                   */
+      /* backward compatibility mode on and off.                    */
       sph_set_tweaks( loader, glyph_index );
     }
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
     if ( face->root.internal->incremental_interface                           &&
          face->root.internal->incremental_interface->funcs->get_glyph_metrics )
     {
-      FT_Incremental_MetricsRec  metrics;
+      FT_Incremental_MetricsRec  incr_metrics;
       FT_Error                   error;
 
 
-      metrics.bearing_x = loader->left_bearing;
-      metrics.bearing_y = 0;
-      metrics.advance   = loader->advance;
-      metrics.advance_v = 0;
+      incr_metrics.bearing_x = loader->left_bearing;
+      incr_metrics.bearing_y = 0;
+      incr_metrics.advance   = loader->advance;
+      incr_metrics.advance_v = 0;
 
       error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
                 face->root.internal->incremental_interface->object,
-                glyph_index, FALSE, &metrics );
+                glyph_index, FALSE, &incr_metrics );
       if ( error )
         goto Exit;
 
-      left_bearing  = (FT_Short)metrics.bearing_x;
-      advance_width = (FT_UShort)metrics.advance;
+      left_bearing  = (FT_Short)incr_metrics.bearing_x;
+      advance_width = (FT_UShort)incr_metrics.advance;
 
 #if 0
 
       /* GWW: Do I do the same for vertical metrics? */
-      metrics.bearing_x = 0;
-      metrics.bearing_y = loader->top_bearing;
-      metrics.advance   = loader->vadvance;
+      incr_metrics.bearing_x = 0;
+      incr_metrics.bearing_y = loader->top_bearing;
+      incr_metrics.advance   = loader->vadvance;
 
       error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
                 face->root.internal->incremental_interface->object,
-                glyph_index, TRUE, &metrics );
+                glyph_index, TRUE, &incr_metrics );
       if ( error )
         goto Exit;
 
-      top_bearing    = (FT_Short)metrics.bearing_y;
-      advance_height = (FT_UShort)metrics.advance;
+      top_bearing    = (FT_Short)incr_metrics.bearing_y;
+      advance_height = (FT_UShort)incr_metrics.advance;
 
 #endif /* 0 */
 
     FT_Outline*     outline;
     FT_UShort       n_ins;
     FT_Int          n_points;
-    FT_ULong        tmp;
 
     FT_Byte         *flag, *flag_limit;
     FT_Byte         c, count;
 
     FT_TRACE5(( "  Instructions size: %u\n", n_ins ));
 
-    /* check it */
-    if ( ( limit - p ) < n_ins )
-    {
-      FT_TRACE0(( "TT_Load_Simple_Glyph: instruction count mismatch\n" ));
-      error = FT_THROW( Too_Many_Hints );
-      goto Fail;
-    }
-
 #ifdef TT_USE_BYTECODE_INTERPRETER
 
     if ( IS_HINTED( load->load_flags ) )
     {
+      FT_ULong  tmp;
+
+
+      /* check instructions size */
+      if ( ( limit - p ) < n_ins )
+      {
+        FT_TRACE1(( "TT_Load_Simple_Glyph: instruction count mismatch\n" ));
+        error = FT_THROW( Too_Many_Hints );
+        goto Fail;
+      }
+
       /* we don't trust `maxSizeOfInstructions' in the `maxp' table */
       /* and thus update the bytecode array size by ourselves       */
 
     flag       = (FT_Byte*)outline->tags;
     flag_limit = flag + n_points;
 
-    FT_ASSERT( flag != NULL );
+    FT_ASSERT( flag );
 
     while ( flag < flag_limit )
     {
     }
     else
     {
-      loader->exec->metrics.x_scale = loader->size->metrics.x_scale;
-      loader->exec->metrics.y_scale = loader->size->metrics.y_scale;
+      loader->exec->metrics.x_scale = loader->size->metrics->x_scale;
+      loader->exec->metrics.y_scale = loader->size->metrics->y_scale;
     }
 #endif
 
 #endif
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    /* Save possibly modified glyph phantom points unless in v40 backwards */
+    /* Save possibly modified glyph phantom points unless in v40 backward  */
     /* compatibility mode, where no movement on the x axis means no reason */
     /* to change bearings or advance widths.                               */
     if ( !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 &&
-            !loader->exec->backwards_compatibility ) )
+            !loader->exec->backward_compatibility ) )
     {
 #endif
       loader->pp1 = zone->cur[zone->n_points - 4];
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
 
-    if ( loader->face->doblend )
+    if ( !loader->face->is_default_instance )
     {
       /* Deltas apply to the unscaled data. */
       error = TT_Vary_Apply_Glyph_Deltas( loader->face,
                                           loader->glyph_index,
                                           outline,
                                           (FT_UInt)n_points );
+
+      /* recalculate linear horizontal and vertical advances */
+      /* if we don't have HVAR and VVAR, respectively        */
+      if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+        loader->linear = outline->points[n_points - 3].x -
+                         outline->points[n_points - 4].x;
+      if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+        loader->vadvance = outline->points[n_points - 1].x -
+                           outline->points[n_points - 2].x;
+
       if ( error )
         return error;
     }
       TT_Driver  driver = (TT_Driver)FT_FACE_DRIVER( face );
 
       FT_String*  family         = face->root.family_name;
-      FT_UInt     ppem           = loader->size->metrics.x_ppem;
+      FT_UInt     ppem           = loader->size->metrics->x_ppem;
       FT_String*  style          = face->root.style_name;
       FT_UInt     x_scale_factor = 1000;
 #endif
         if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ||
              x_scale_factor != 1000                         )
         {
-          x_scale = FT_MulDiv( loader->size->metrics.x_scale,
+          x_scale = FT_MulDiv( loader->size->metrics->x_scale,
                                (FT_Long)x_scale_factor, 1000 );
-          y_scale = loader->size->metrics.y_scale;
+          y_scale = loader->size->metrics->y_scale;
 
           /* compensate for any scaling by de/emboldening; */
           /* the amount was determined via experimentation */
         /* scale the glyph */
         if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
         {
-          x_scale = loader->size->metrics.x_scale;
-          y_scale = loader->size->metrics.y_scale;
+          x_scale = loader->size->metrics->x_scale;
+          y_scale = loader->size->metrics->y_scale;
 
           do_scale = TRUE;
         }
 
       if ( !( loader->load_flags & FT_LOAD_NO_SCALE ) )
       {
-        FT_Fixed  x_scale = loader->size->metrics.x_scale;
-        FT_Fixed  y_scale = loader->size->metrics.y_scale;
+        FT_Fixed  x_scale = loader->size->metrics->x_scale;
+        FT_Fixed  y_scale = loader->size->metrics->y_scale;
 
 
         x = FT_MulFix( x, x_scale );
   /* a utility function to retrieve i-th node from given FT_List */
   static FT_ListNode
   ft_list_get_node_at( FT_List  list,
-                       FT_UInt  index )
+                       FT_UInt  idx )
   {
     FT_ListNode  cur;
 
 
     for ( cur = list->head; cur; cur = cur->next )
     {
-      if ( !index )
+      if ( !idx )
         return cur;
 
-      index--;
+      idx--;
     }
 
     return NULL;
       FT_TRACE5(( "  nesting level: %d\n", recurse_count ));
 #endif
 
-    /* some fonts have an incorrect value of `maxComponentDepth', */
-    /* thus we allow depth 1 to catch the majority of them        */
-    if ( recurse_count > 1                                   &&
-         recurse_count > face->max_profile.maxComponentDepth )
+    /* some fonts have an incorrect value of `maxComponentDepth' */
+    if ( recurse_count > face->max_profile.maxComponentDepth )
     {
-      error = FT_THROW( Invalid_Composite );
-      goto Exit;
+      FT_TRACE1(( "load_truetype_glyph: maxComponentDepth set to %d\n",
+                  recurse_count ));
+      face->max_profile.maxComponentDepth = (FT_UShort)recurse_count;
     }
 
 #ifndef FT_CONFIG_OPTION_INCREMENTAL
 
     if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
     {
-      x_scale = loader->size->metrics.x_scale;
-      y_scale = loader->size->metrics.y_scale;
+      x_scale = loader->size->metrics->x_scale;
+      y_scale = loader->size->metrics->y_scale;
     }
     else
     {
       offset            = 0;
       loader->byte_len  = glyph_data.length;
 
-      FT_MEM_ZERO( &inc_stream, sizeof ( inc_stream ) );
+      FT_ZERO( &inc_stream );
       FT_Stream_OpenMemory( &inc_stream,
                             glyph_data.pointer,
                             (FT_ULong)glyph_data.length );
     {
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
       /* for the incremental interface, `glyf_offset' is always zero */
-      if ( !loader->glyf_offset                        &&
+      if ( !face->glyf_offset                          &&
            !face->root.internal->incremental_interface )
 #else
-      if ( !loader->glyf_offset )
+      if ( !face->glyf_offset )
 #endif /* FT_CONFIG_OPTION_INCREMENTAL */
       {
         FT_TRACE2(( "no `glyf' table but non-zero `loca' entry\n" ));
       }
 
       error = face->access_glyph_frame( loader, glyph_index,
-                                        loader->glyf_offset + offset,
+                                        face->glyf_offset + offset,
                                         (FT_UInt)loader->byte_len );
       if ( error )
         goto Exit;
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
 
-      if ( loader->face->doblend )
+      if ( !loader->face->is_default_instance )
       {
         /* a small outline structure with four elements for */
         /* communication with `TT_Vary_Apply_Glyph_Deltas'  */
         loader->pp3.y = points[2].y;
         loader->pp4.x = points[3].x;
         loader->pp4.y = points[3].y;
+
+
+        /* recalculate linear horizontal and vertical advances */
+        /* if we don't have HVAR and VVAR, respectively        */
+        if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+          loader->linear = loader->pp2.x - loader->pp1.x;
+        if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+          loader->vadvance = loader->pp4.x - loader->pp3.x;
       }
 
 #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
 
       /* check whether we already have a composite glyph with this index */
       if ( FT_List_Find( &loader->composites,
-                         (void*)(unsigned long)glyph_index ) )
+                         FT_UINT_TO_POINTER( glyph_index ) ) )
       {
         FT_TRACE1(( "TT_Load_Composite_Glyph:"
                     " infinite recursion detected\n" ));
       }
 
       else if ( node )
-        node->data = (void*)(unsigned long)glyph_index;
+        node->data = FT_UINT_TO_POINTER( glyph_index );
 
       else
       {
         if ( FT_NEW( node ) )
           goto Exit;
-        node->data = (void*)(unsigned long)glyph_index;
+        node->data = FT_UINT_TO_POINTER( glyph_index );
         FT_List_Add( &loader->composites, node );
       }
 
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
 
-      if ( face->doblend )
+      if ( !face->is_default_instance )
       {
         short        i, limit;
         FT_SubGlyph  subglyph;
 
         /* this call provides additional offsets */
         /* for each component's translation      */
-        if ( ( error = TT_Vary_Apply_Glyph_Deltas(
-                         face,
-                         glyph_index,
-                         &outline,
-                         (FT_UInt)outline.n_points ) ) != 0 )
+        if ( FT_SET_ERROR( TT_Vary_Apply_Glyph_Deltas(
+                             face,
+                             glyph_index,
+                             &outline,
+                             (FT_UInt)outline.n_points ) ) )
           goto Exit1;
 
         subglyph = gloader->current.subglyphs;
 
         for ( i = 0; i < limit; i++, subglyph++ )
         {
-          /* XXX: overflow check for subglyph->{arg1,arg2}.         */
-          /*      Deltas must be within signed 16-bit,              */
-          /*      but the restriction of summed deltas is not clear */
-          subglyph->arg1 = (FT_Int16)points[i].x;
-          subglyph->arg2 = (FT_Int16)points[i].y;
+          if ( subglyph->flags & ARGS_ARE_XY_VALUES )
+          {
+            subglyph->arg1 = (FT_Int16)points[i].x;
+            subglyph->arg2 = (FT_Int16)points[i].y;
+          }
         }
 
         loader->pp1.x = points[i + 0].x;
         loader->pp4.x = points[i + 3].x;
         loader->pp4.y = points[i + 3].y;
 
+        /* recalculate linear horizontal and vertical advances */
+        /* if we don't have HVAR and VVAR, respectively        */
+        if ( !( face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+          loader->linear = loader->pp2.x - loader->pp1.x;
+        if ( !( face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+          loader->vadvance = loader->pp4.x - loader->pp3.x;
+
       Exit1:
         FT_FREE( outline.points );
         FT_FREE( outline.tags );
         {
           FT_Vector  pp[4];
 
+          FT_Int  linear_hadvance;
+          FT_Int  linear_vadvance;
+
 
           /* Each time we call load_truetype_glyph in this loop, the   */
           /* value of `gloader.base.subglyphs' can change due to table */
           pp[2] = loader->pp3;
           pp[3] = loader->pp4;
 
+          linear_hadvance = loader->linear;
+          linear_vadvance = loader->vadvance;
+
           num_base_points = (FT_UInt)gloader->base.outline.n_points;
 
           error = load_truetype_glyph( loader,
             loader->pp2 = pp[1];
             loader->pp3 = pp[2];
             loader->pp4 = pp[3];
+
+            loader->linear   = linear_hadvance;
+            loader->vadvance = linear_vadvance;
           }
 
           num_points = (FT_UInt)gloader->base.outline.n_points;
 
     y_scale = 0x10000L;
     if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
-      y_scale = size->root.metrics.y_scale;
+      y_scale = size->metrics->y_scale;
 
     if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE )
       FT_Outline_Get_CBox( &glyph->outline, &bbox );
     glyph->metrics.horiBearingY = bbox.yMax;
     glyph->metrics.horiAdvance  = loader->pp2.x - loader->pp1.x;
 
-    /* Adjust advance width to the value contained in the hdmx table    */
-    /* unless FT_LOAD_COMPUTE_METRICS is set or backwards compatibility */
-    /* mode of the v40 interpreter is active.  See `ttinterp.h' for     */
-    /* details on backwards compatibility mode.                         */
+    /* Adjust advance width to the value contained in the hdmx table   */
+    /* unless FT_LOAD_COMPUTE_METRICS is set or backward compatibility */
+    /* mode of the v40 interpreter is active.  See `ttinterp.h' for    */
+    /* details on backward compatibility mode.                         */
     if (
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-         !( driver->interpreter_version == TT_INTERPRETER_VERSION_40 &&
-            ( loader->exec && loader->exec->backwards_compatibility  ) ) &&
+         !( driver->interpreter_version == TT_INTERPRETER_VERSION_40  &&
+            ( loader->exec && loader->exec->backward_compatibility  ) ) &&
 #endif
-         !face->postscript.isFixedPitch                                  &&
-         IS_HINTED( loader->load_flags )                                 &&
-         !( loader->load_flags & FT_LOAD_COMPUTE_METRICS )               )
+         !face->postscript.isFixedPitch                                 &&
+         IS_HINTED( loader->load_flags )                                &&
+         !( loader->load_flags & FT_LOAD_COMPUTE_METRICS )              )
     {
       FT_Byte*  widthp;
 
 
       widthp = tt_face_get_device_metrics( face,
-                                           size->root.metrics.x_ppem,
+                                           size->metrics->x_ppem,
                                            glyph_index );
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
       {
         FT_Incremental_InterfaceRec*  incr;
-        FT_Incremental_MetricsRec     metrics;
+        FT_Incremental_MetricsRec     incr_metrics;
         FT_Error                      error;
 
 
         /* overriding metrics for this glyph.                       */
         if ( incr && incr->funcs->get_glyph_metrics )
         {
-          metrics.bearing_x = 0;
-          metrics.bearing_y = top;
-          metrics.advance   = advance;
+          incr_metrics.bearing_x = 0;
+          incr_metrics.bearing_y = top;
+          incr_metrics.advance   = advance;
 
           error = incr->funcs->get_glyph_metrics( incr->object,
                                                   glyph_index,
                                                   TRUE,
-                                                  &metrics );
+                                                  &incr_metrics );
           if ( error )
             return error;
 
-          top     = metrics.bearing_y;
-          advance = metrics.advance;
+          top     = incr_metrics.bearing_y;
+          advance = incr_metrics.advance;
         }
       }
 
     SFNT_Service        sfnt;
     FT_Stream           stream;
     FT_Error            error;
-    TT_SBit_MetricsRec  metrics;
+    TT_SBit_MetricsRec  sbit_metrics;
 
 
     face   = (TT_Face)glyph->face;
                                    (FT_UInt)load_flags,
                                    stream,
                                    &glyph->bitmap,
-                                   &metrics );
+                                   &sbit_metrics );
     if ( !error )
     {
       glyph->outline.n_points   = 0;
       glyph->outline.n_contours = 0;
 
-      glyph->metrics.width  = (FT_Pos)metrics.width  * 64;
-      glyph->metrics.height = (FT_Pos)metrics.height * 64;
+      glyph->metrics.width  = (FT_Pos)sbit_metrics.width  * 64;
+      glyph->metrics.height = (FT_Pos)sbit_metrics.height * 64;
 
-      glyph->metrics.horiBearingX = (FT_Pos)metrics.horiBearingX * 64;
-      glyph->metrics.horiBearingY = (FT_Pos)metrics.horiBearingY * 64;
-      glyph->metrics.horiAdvance  = (FT_Pos)metrics.horiAdvance  * 64;
+      glyph->metrics.horiBearingX = (FT_Pos)sbit_metrics.horiBearingX * 64;
+      glyph->metrics.horiBearingY = (FT_Pos)sbit_metrics.horiBearingY * 64;
+      glyph->metrics.horiAdvance  = (FT_Pos)sbit_metrics.horiAdvance  * 64;
 
-      glyph->metrics.vertBearingX = (FT_Pos)metrics.vertBearingX * 64;
-      glyph->metrics.vertBearingY = (FT_Pos)metrics.vertBearingY * 64;
-      glyph->metrics.vertAdvance  = (FT_Pos)metrics.vertAdvance  * 64;
+      glyph->metrics.vertBearingX = (FT_Pos)sbit_metrics.vertBearingX * 64;
+      glyph->metrics.vertBearingY = (FT_Pos)sbit_metrics.vertBearingY * 64;
+      glyph->metrics.vertAdvance  = (FT_Pos)sbit_metrics.vertAdvance  * 64;
 
       glyph->format = FT_GLYPH_FORMAT_BITMAP;
 
       if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
       {
-        glyph->bitmap_left = metrics.vertBearingX;
-        glyph->bitmap_top  = metrics.vertBearingY;
+        glyph->bitmap_left = sbit_metrics.vertBearingX;
+        glyph->bitmap_top  = sbit_metrics.vertBearingY;
       }
       else
       {
-        glyph->bitmap_left = metrics.horiBearingX;
-        glyph->bitmap_top  = metrics.horiBearingY;
+        glyph->bitmap_left = sbit_metrics.horiBearingX;
+        glyph->bitmap_top  = sbit_metrics.horiBearingY;
       }
     }
 
                   FT_Int32      load_flags,
                   FT_Bool       glyf_table_only )
   {
-    FT_Error  error;
-
     TT_Face    face;
     FT_Stream  stream;
+
 #ifdef TT_USE_BYTECODE_INTERPRETER
+    FT_Error   error;
     FT_Bool    pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );
-#endif
 #if defined TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY || \
     defined TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
     TT_Driver  driver = (TT_Driver)FT_FACE_DRIVER( (TT_Face)glyph->face );
 #endif
+#endif
 
 
     face   = (TT_Face)glyph->face;
     stream = face->root.stream;
 
-    FT_MEM_ZERO( loader, sizeof ( TT_LoaderRec ) );
+    FT_ZERO( loader );
 
 #ifdef TT_USE_BYTECODE_INTERPRETER
 
 
 #endif /* TT_USE_BYTECODE_INTERPRETER */
 
-    /* seek to the beginning of the glyph table -- for Type 42 fonts     */
-    /* the table might be accessed from a Postscript stream or something */
-    /* else...                                                           */
-
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
-
-    if ( face->root.internal->incremental_interface )
-      loader->glyf_offset = 0;
-    else
-
-#endif
-
-    {
-      error = face->goto_table( face, TTAG_glyf, stream, 0 );
-
-      if ( FT_ERR_EQ( error, Table_Missing ) )
-        loader->glyf_offset = 0;
-      else if ( error )
-      {
-        FT_ERROR(( "tt_loader_init: could not access glyph table\n" ));
-        return error;
-      }
-      else
-        loader->glyf_offset = FT_STREAM_POS();
-    }
-
     /* get face's glyph loader */
     if ( !glyf_table_only )
     {
     FT_Error      error;
     TT_LoaderRec  loader;
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#define IS_DEFAULT_INSTANCE  ( ( (TT_Face)glyph->face )->is_default_instance )
+#else
+#define IS_DEFAULT_INSTANCE  1
+#endif
+
 
     FT_TRACE1(( "TT_Load_Glyph: glyph index %d\n", glyph_index ));
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
 
-    /* try to load embedded bitmap if any              */
-    /*                                                 */
-    /* XXX: The convention should be emphasized in     */
-    /*      the documents because it can be confusing. */
+    /* try to load embedded bitmap (if any) */
     if ( size->strike_index != 0xFFFFFFFFUL      &&
-         ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
+         ( load_flags & FT_LOAD_NO_BITMAP ) == 0 &&
+         IS_DEFAULT_INSTANCE                     )
     {
       error = load_sbit_image( size, glyph, glyph_index, load_flags );
       if ( !error )
           if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance )
             glyph->metrics.horiAdvance =
               FT_MulFix( glyph->linearHoriAdvance,
-                         size->root.metrics.x_scale );
+                         size->metrics->x_scale );
           if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance )
             glyph->metrics.vertAdvance =
               FT_MulFix( glyph->linearVertAdvance,
-                         size->root.metrics.y_scale );
+                         size->metrics->y_scale );
         }
 
         return FT_Err_Ok;
 
     /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */
     if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid )
-      return FT_THROW( Invalid_Size_Handle );
+    {
+      error = FT_THROW( Invalid_Size_Handle );
+      goto Exit;
+    }
 
     if ( load_flags & FT_LOAD_SBITS_ONLY )
-      return FT_THROW( Invalid_Argument );
+    {
+      error = FT_THROW( Invalid_Argument );
+      goto Exit;
+    }
 
     error = tt_loader_init( &loader, size, glyph, load_flags, FALSE );
     if ( error )
-      return error;
+      goto Exit;
 
     glyph->format        = FT_GLYPH_FORMAT_OUTLINE;
     glyph->num_subglyphs = 0;
     /* TrueType glyphs at all sizes using the bytecode interpreter. */
     /*                                                              */
     if ( !( load_flags & FT_LOAD_NO_SCALE ) &&
-         size->root.metrics.y_ppem < 24     )
+         size->metrics->y_ppem < 24         )
       glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
 
+  Exit:
+#ifdef FT_DEBUG_LEVEL_TRACE
+    if ( error )
+      FT_TRACE1(( "  failed (error code 0x%x)\n",
+                  error ));
+#endif
+
     return error;
   }
 
index bfa29e4..1dd6c84 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Glyph Loader (specification).                               */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 9a02c5a..0cedb6b 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType GX Font Variation loader                                    */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, Werner Lemberg, and George Williams.     */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
   /*                                                                       */
   /*   https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6[fgca]var.html */
   /*                                                                       */
-  /* The documentation for `fvar' is inconsistent.  At one point it says   */
-  /* that `countSizePairs' should be 3, at another point 2.  It should     */
-  /* be 2.                                                                 */
-  /*                                                                       */
   /* The documentation for `gvar' is not intelligible; `cvar' refers you   */
   /* to `gvar' and is thus also incomprehensible.                          */
   /*                                                                       */
@@ -49,7 +45,9 @@
 #include FT_INTERNAL_STREAM_H
 #include FT_INTERNAL_SFNT_H
 #include FT_TRUETYPE_TAGS_H
+#include FT_TRUETYPE_IDS_H
 #include FT_MULTIPLE_MASTERS_H
+#include FT_LIST_H
 
 #include "ttpload.h"
 #include "ttgxvar.h"
       return NULL;
     }
 
-    if ( FT_NEW_ARRAY( points, n ) )
+    /* in the nested loops below we increase `i' twice; */
+    /* it is faster to simply allocate one more slot    */
+    /* than to add another test within the loop         */
+    if ( FT_NEW_ARRAY( points, n + 1 ) )
       return NULL;
 
     *point_cnt = n;
 
-    i = 0;
+    first = 0;
+    i     = 0;
     while ( i < n )
     {
       runcnt = FT_GET_BYTE();
       if ( runcnt & GX_PT_POINTS_ARE_WORDS )
       {
         runcnt     &= GX_PT_POINT_RUN_COUNT_MASK;
-        first       = FT_GET_USHORT();
+        first      += FT_GET_USHORT();
         points[i++] = first;
 
-        if ( runcnt < 1 || i + runcnt > n )
-          goto Exit;
-
         /* first point not included in run count */
         for ( j = 0; j < runcnt; j++ )
         {
           first      += FT_GET_USHORT();
           points[i++] = first;
+          if ( i >= n )
+            break;
         }
       }
       else
       {
-        first       = FT_GET_BYTE();
+        first      += FT_GET_BYTE();
         points[i++] = first;
 
-        if ( runcnt < 1 || i + runcnt > n )
-          goto Exit;
-
         for ( j = 0; j < runcnt; j++ )
         {
           first      += FT_GET_BYTE();
           points[i++] = first;
+          if ( i >= n )
+            break;
         }
       }
     }
 
-  Exit:
     return points;
   }
 
 
     FT_TRACE2(( "AVAR " ));
 
-    blend->avar_checked = TRUE;
+    blend->avar_loaded = TRUE;
     error = face->goto_table( face, TTAG_avar, stream, &table_len );
     if ( error )
     {
 
     if ( axisCount != (FT_Long)blend->mmvar->num_axis )
     {
-      FT_TRACE2(( "ft_var_load_avar: number of axes in `avar' and `cvar'\n"
+      FT_TRACE2(( "ft_var_load_avar: number of axes in `avar' and `fvar'\n"
                   "                  table are different\n" ));
       goto Exit;
     }
         segment->correspondence[j].fromCoord = FT_GET_SHORT() * 4;
         segment->correspondence[j].toCoord   = FT_GET_SHORT() * 4;
 
-        FT_TRACE5(( "    mapping %.4f to %.4f\n",
+        FT_TRACE5(( "    mapping %.5f to %.5f\n",
                     segment->correspondence[j].fromCoord / 65536.0,
                     segment->correspondence[j].toCoord / 65536.0 ));
       }
   }
 
 
-  typedef struct  GX_GVar_Head_
-  {
-    FT_Long    version;
-    FT_UShort  axisCount;
-    FT_UShort  globalCoordCount;
-    FT_ULong   offsetToCoord;
-    FT_UShort  glyphCount;
-    FT_UShort  flags;
-    FT_ULong   offsetToData;
+  /* some macros we need */
+  #define FT_FIXED_ONE  ( (FT_Fixed)0x10000 )
 
-  } GX_GVar_Head;
+  #define FT_fdot14ToFixed( x )                \
+          ( (FT_Fixed)( (FT_ULong)(x) << 2 ) )
+  #define FT_intToFixed( i )                    \
+          ( (FT_Fixed)( (FT_ULong)(i) << 16 ) )
+  #define FT_fixedToInt( x )                                   \
+          ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ft_var_load_gvar                                                   */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Parse the `gvar' table if present.  If `fvar' is there, `gvar' had */
-  /*    better be there too.                                               */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face :: The font face.                                             */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
   static FT_Error
-  ft_var_load_gvar( TT_Face  face )
+  ft_var_load_item_variation_store( TT_Face          face,
+                                    FT_ULong         offset,
+                                    GX_ItemVarStore  itemStore )
   {
-    FT_Stream     stream = FT_FACE_STREAM( face );
-    FT_Memory     memory = stream->memory;
-    GX_Blend      blend  = face->blend;
-    FT_Error      error;
-    FT_UInt       i, j;
-    FT_ULong      table_len;
-    FT_ULong      gvar_start;
-    FT_ULong      offsetToData;
-    GX_GVar_Head  gvar_head;
+    FT_Stream  stream = FT_FACE_STREAM( face );
+    FT_Memory  memory = stream->memory;
 
-    static const FT_Frame_Field  gvar_fields[] =
-    {
+    FT_Error   error;
+    FT_UShort  format;
+    FT_ULong   region_offset;
+    FT_UInt    i, j, k;
+    FT_UInt    shortDeltaCount;
 
-#undef  FT_STRUCTURE
-#define FT_STRUCTURE  GX_GVar_Head
+    GX_Blend        blend = face->blend;
+    GX_ItemVarData  varData;
 
-      FT_FRAME_START( 20 ),
-        FT_FRAME_LONG  ( version ),
-        FT_FRAME_USHORT( axisCount ),
-        FT_FRAME_USHORT( globalCoordCount ),
-        FT_FRAME_ULONG ( offsetToCoord ),
-        FT_FRAME_USHORT( glyphCount ),
-        FT_FRAME_USHORT( flags ),
-        FT_FRAME_ULONG ( offsetToData ),
-      FT_FRAME_END
-    };
+    FT_ULong*  dataOffsetArray = NULL;
 
 
-    FT_TRACE2(( "GVAR " ));
+    if ( FT_STREAM_SEEK( offset ) ||
+         FT_READ_USHORT( format ) )
+      goto Exit;
 
-    if ( ( error = face->goto_table( face,
-                                     TTAG_gvar,
-                                     stream,
-                                     &table_len ) ) != 0 )
+    if ( format != 1 )
     {
-      FT_TRACE2(( "is missing\n" ));
+      FT_TRACE2(( "ft_var_load_item_variation_store: bad store format %d\n",
+                  format ));
+      error = FT_THROW( Invalid_Table );
       goto Exit;
     }
 
-    gvar_start = FT_STREAM_POS( );
-    if ( FT_STREAM_READ_FIELDS( gvar_fields, &gvar_head ) )
+    /* read top level fields */
+    if ( FT_READ_ULONG( region_offset )         ||
+         FT_READ_USHORT( itemStore->dataCount ) )
       goto Exit;
 
-    if ( gvar_head.version != 0x00010000L )
+    /* we need at least one entry in `itemStore->varData' */
+    if ( !itemStore->dataCount )
     {
-      FT_TRACE1(( "bad table version\n" ));
+      FT_TRACE2(( "ft_var_load_item_variation_store: missing varData\n" ));
       error = FT_THROW( Invalid_Table );
       goto Exit;
     }
 
-    if ( gvar_head.axisCount != (FT_UShort)blend->mmvar->num_axis )
-    {
-      FT_TRACE1(( "ft_var_load_gvar: number of axes in `gvar' and `cvar'\n"
-                  "                  table are different\n" ));
-      error = FT_THROW( Invalid_Table );
+    /* make temporary copy of item variation data offsets; */
+    /* we will parse region list first, then come back     */
+    if ( FT_NEW_ARRAY( dataOffsetArray, itemStore->dataCount ) )
       goto Exit;
-    }
 
-    /* rough sanity check, ignoring offsets */
-    if ( (FT_ULong)gvar_head.globalCoordCount * gvar_head.axisCount >
-           table_len / 2 )
+    for ( i = 0; i < itemStore->dataCount; i++ )
     {
-      FT_TRACE1(( "ft_var_load_gvar:"
-                  " invalid number of global coordinates\n" ));
-      error = FT_THROW( Invalid_Table );
-      goto Exit;
+      if ( FT_READ_ULONG( dataOffsetArray[i] ) )
+        goto Exit;
     }
 
-    /* rough sanity check: offsets can be either 2 or 4 bytes, */
-    /* and a single variation needs at least 4 bytes per glyph */
-    if ( (FT_ULong)gvar_head.glyphCount *
-           ( ( gvar_head.flags & 1 ) ? 8 : 6 ) > table_len )
+    /* parse array of region records (region list) */
+    if ( FT_STREAM_SEEK( offset + region_offset ) )
+      goto Exit;
+
+    if ( FT_READ_USHORT( itemStore->axisCount )   ||
+         FT_READ_USHORT( itemStore->regionCount ) )
+      goto Exit;
+
+    if ( itemStore->axisCount != (FT_Long)blend->mmvar->num_axis )
     {
-      FT_TRACE1(( "ft_var_load_gvar: invalid number of glyphs\n" ));
+      FT_TRACE2(( "ft_var_load_item_variation_store:"
+                  " number of axes in item variation store\n"
+                  "                                 "
+                  " and `fvar' table are different\n" ));
       error = FT_THROW( Invalid_Table );
       goto Exit;
     }
 
-    FT_TRACE2(( "loaded\n" ));
-
-    blend->gvar_size   = table_len;
-    blend->tuplecount  = gvar_head.globalCoordCount;
-    blend->gv_glyphcnt = gvar_head.glyphCount;
-    offsetToData       = gvar_start + gvar_head.offsetToData;
-
-    FT_TRACE5(( "gvar: there are %d shared coordinates:\n",
-                blend->tuplecount ));
-
-    if ( FT_NEW_ARRAY( blend->glyphoffsets, blend->gv_glyphcnt + 1 ) )
+    if ( FT_NEW_ARRAY( itemStore->varRegionList, itemStore->regionCount ) )
       goto Exit;
 
-    if ( gvar_head.flags & 1 )
+    for ( i = 0; i < itemStore->regionCount; i++ )
     {
-      /* long offsets (one more offset than glyphs, to mark size of last) */
-      if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 4L ) )
+      GX_AxisCoords  axisCoords;
+
+
+      if ( FT_NEW_ARRAY( itemStore->varRegionList[i].axisList,
+                         itemStore->axisCount ) )
         goto Exit;
 
-      for ( i = 0; i <= blend->gv_glyphcnt; i++ )
-        blend->glyphoffsets[i] = offsetToData + FT_GET_ULONG();
+      axisCoords = itemStore->varRegionList[i].axisList;
 
-      FT_FRAME_EXIT();
+      for ( j = 0; j < itemStore->axisCount; j++ )
+      {
+        FT_Short  start, peak, end;
+
+
+        if ( FT_READ_SHORT( start ) ||
+             FT_READ_SHORT( peak )  ||
+             FT_READ_SHORT( end )   )
+          goto Exit;
+
+        axisCoords[j].startCoord = FT_fdot14ToFixed( start );
+        axisCoords[j].peakCoord  = FT_fdot14ToFixed( peak );
+        axisCoords[j].endCoord   = FT_fdot14ToFixed( end );
+      }
     }
-    else
+
+    /* end of region list parse */
+
+    /* use dataOffsetArray now to parse varData items */
+    if ( FT_NEW_ARRAY( itemStore->varData, itemStore->dataCount ) )
+      goto Exit;
+
+    for ( i = 0; i < itemStore->dataCount; i++ )
     {
-      /* short offsets (one more offset than glyphs, to mark size of last) */
-      if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 2L ) )
+      varData = &itemStore->varData[i];
+
+      if ( FT_STREAM_SEEK( offset + dataOffsetArray[i] ) )
         goto Exit;
 
-      for ( i = 0; i <= blend->gv_glyphcnt; i++ )
-        blend->glyphoffsets[i] = offsetToData + FT_GET_USHORT() * 2;
-                                               /* XXX: Undocumented: `*2'! */
+      if ( FT_READ_USHORT( varData->itemCount )      ||
+           FT_READ_USHORT( shortDeltaCount )         ||
+           FT_READ_USHORT( varData->regionIdxCount ) )
+        goto Exit;
 
-      FT_FRAME_EXIT();
-    }
+      /* check some data consistency */
+      if ( shortDeltaCount > varData->regionIdxCount )
+      {
+        FT_TRACE2(( "bad short count %d or region count %d\n",
+                    shortDeltaCount,
+                    varData->regionIdxCount ));
+        error = FT_THROW( Invalid_Table );
+        goto Exit;
+      }
 
-    if ( blend->tuplecount != 0 )
-    {
-      if ( FT_NEW_ARRAY( blend->tuplecoords,
-                         gvar_head.axisCount * blend->tuplecount ) )
+      if ( varData->regionIdxCount > itemStore->regionCount )
+      {
+        FT_TRACE2(( "inconsistent regionCount %d in varData[%d]\n",
+                    varData->regionIdxCount,
+                    i ));
+        error = FT_THROW( Invalid_Table );
         goto Exit;
+      }
 
-      if ( FT_STREAM_SEEK( gvar_start + gvar_head.offsetToCoord )         ||
-           FT_FRAME_ENTER( blend->tuplecount * gvar_head.axisCount * 2L ) )
+      /* parse region indices */
+      if ( FT_NEW_ARRAY( varData->regionIndices,
+                         varData->regionIdxCount ) )
         goto Exit;
 
-      for ( i = 0; i < blend->tuplecount; i++ )
+      for ( j = 0; j < varData->regionIdxCount; j++ )
       {
-        FT_TRACE5(( "  [ " ));
-        for ( j = 0; j < (FT_UInt)gvar_head.axisCount; j++ )
+        if ( FT_READ_USHORT( varData->regionIndices[j] ) )
+          goto Exit;
+
+        if ( varData->regionIndices[j] >= itemStore->regionCount )
         {
-          blend->tuplecoords[i * gvar_head.axisCount + j] =
-            FT_GET_SHORT() * 4;                 /* convert to FT_Fixed */
-          FT_TRACE5(( "%.4f ",
-            blend->tuplecoords[i * gvar_head.axisCount + j] / 65536.0 ));
+          FT_TRACE2(( "bad region index %d\n",
+                      varData->regionIndices[j] ));
+          error = FT_THROW( Invalid_Table );
+          goto Exit;
         }
-        FT_TRACE5(( "]\n" ));
       }
 
-      FT_TRACE5(( "\n" ));
+      /* Parse delta set.                                                */
+      /*                                                                 */
+      /* On input, deltas are (shortDeltaCount + regionIdxCount) bytes   */
+      /* each; on output, deltas are expanded to `regionIdxCount' shorts */
+      /* each.                                                           */
+      if ( FT_NEW_ARRAY( varData->deltaSet,
+                         varData->regionIdxCount * varData->itemCount ) )
+        goto Exit;
 
-      FT_FRAME_EXIT();
+      /* the delta set is stored as a 2-dimensional array of shorts; */
+      /* sign-extend signed bytes to signed shorts                   */
+      for ( j = 0; j < varData->itemCount * varData->regionIdxCount; )
+      {
+        for ( k = 0; k < shortDeltaCount; k++, j++ )
+        {
+          /* read the short deltas */
+          FT_Short  delta;
+
+
+          if ( FT_READ_SHORT( delta ) )
+            goto Exit;
+
+          varData->deltaSet[j] = delta;
+        }
+
+        for ( ; k < varData->regionIdxCount; k++, j++ )
+        {
+          /* read the (signed) byte deltas */
+          FT_Char  delta;
+
+
+          if ( FT_READ_CHAR( delta ) )
+            goto Exit;
+
+          varData->deltaSet[j] = delta;
+        }
+      }
     }
 
   Exit:
+    FT_FREE( dataOffsetArray );
+
     return error;
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    ft_var_apply_tuple                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Figure out whether a given tuple (design) applies to the current   */
-  /*    blend, and if so, what is the scaling factor.                      */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    blend           :: The current blend of the font.                  */
-  /*                                                                       */
-  /*    tupleIndex      :: A flag saying whether this is an intermediate   */
-  /*                       tuple or not.                                   */
-  /*                                                                       */
-  /*    tuple_coords    :: The coordinates of the tuple in normalized axis */
-  /*                       units.                                          */
-  /*                                                                       */
-  /*    im_start_coords :: The initial coordinates where this tuple starts */
-  /*                       to apply (for intermediate coordinates).        */
-  /*                                                                       */
-  /*    im_end_coords   :: The final coordinates after which this tuple no */
-  /*                       longer applies (for intermediate coordinates).  */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    An FT_Fixed value containing the scaling factor.                   */
-  /*                                                                       */
-  static FT_Fixed
-  ft_var_apply_tuple( GX_Blend   blend,
-                      FT_UShort  tupleIndex,
-                      FT_Fixed*  tuple_coords,
-                      FT_Fixed*  im_start_coords,
-                      FT_Fixed*  im_end_coords )
+  static FT_Error
+  ft_var_load_delta_set_index_mapping( TT_Face            face,
+                                       FT_ULong           offset,
+                                       GX_DeltaSetIdxMap  map,
+                                       GX_ItemVarStore    itemStore )
   {
-    FT_UInt   i;
-    FT_Fixed  apply = 0x10000L;
+    FT_Stream  stream = FT_FACE_STREAM( face );
+    FT_Memory  memory = stream->memory;
 
+    FT_Error   error;
 
-    for ( i = 0; i < blend->num_axis; i++ )
+    FT_UShort  format;
+    FT_UInt    entrySize;
+    FT_UInt    innerBitCount;
+    FT_UInt    innerIndexMask;
+    FT_UInt    i, j;
+
+
+    if ( FT_STREAM_SEEK( offset )        ||
+         FT_READ_USHORT( format )        ||
+         FT_READ_USHORT( map->mapCount ) )
+      goto Exit;
+
+    if ( format & 0xFFC0 )
     {
-      FT_TRACE6(( "    axis coordinate %d (%.4f):\n",
-                  i, blend->normalizedcoords[i] / 65536.0 ));
-      if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )
-        FT_TRACE6(( "      intermediate coordinates %d (%.4f, %.4f):\n",
-                    i,
-                    im_start_coords[i] / 65536.0,
-                    im_end_coords[i] / 65536.0 ));
+      FT_TRACE2(( "bad map format %d\n", format ));
+      error = FT_THROW( Invalid_Table );
+      goto Exit;
+    }
 
-      /* It's not clear why (for intermediate tuples) we don't need     */
-      /* to check against start/end -- the documentation says we don't. */
-      /* Similarly, it's unclear why we don't need to scale along the   */
-      /* axis.                                                          */
+    /* bytes per entry: 1, 2, 3, or 4 */
+    entrySize      = ( ( format & 0x0030 ) >> 4 ) + 1;
+    innerBitCount  = ( format & 0x000F ) + 1;
+    innerIndexMask = ( 1 << innerBitCount ) - 1;
 
-      if ( tuple_coords[i] == 0 )
+    if ( FT_NEW_ARRAY( map->innerIndex, map->mapCount ) )
+      goto Exit;
+
+    if ( FT_NEW_ARRAY( map->outerIndex, map->mapCount ) )
+      goto Exit;
+
+    for ( i = 0; i < map->mapCount; i++ )
+    {
+      FT_UInt  mapData = 0;
+      FT_UInt  outerIndex, innerIndex;
+
+
+      /* read map data one unsigned byte at a time, big endian */
+      for ( j = 0; j < entrySize; j++ )
       {
-        FT_TRACE6(( "      tuple coordinate is zero, ignored\n", i ));
-        continue;
+        FT_Byte  data;
+
+
+        if ( FT_READ_BYTE( data ) )
+          goto Exit;
+
+        mapData = ( mapData << 8 ) | data;
       }
 
-      if ( blend->normalizedcoords[i] == 0 )
+      outerIndex = mapData >> innerBitCount;
+
+      if ( outerIndex >= itemStore->dataCount )
       {
-        FT_TRACE6(( "      axis coordinate is zero, stop\n" ));
-        apply = 0;
-        break;
+        FT_TRACE2(( "outerIndex[%d] == %d out of range\n",
+                    i,
+                    outerIndex ));
+        error = FT_THROW( Invalid_Table );
+        goto Exit;
       }
 
-      if ( blend->normalizedcoords[i] == tuple_coords[i] )
+      map->outerIndex[i] = outerIndex;
+
+      innerIndex = mapData & innerIndexMask;
+
+      if ( innerIndex >= itemStore->varData[outerIndex].itemCount )
       {
-        FT_TRACE6(( "      tuple coordinate value %.4f fits perfectly\n",
-                    tuple_coords[i] / 65536.0 ));
-        /* `apply' does not change */
-        continue;
+        FT_TRACE2(( "innerIndex[%d] == %d out of range\n",
+                    i,
+                    innerIndex ));
+        error = FT_THROW( Invalid_Table );
+          goto Exit;
       }
 
-      if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )
-      {
-        /* not an intermediate tuple */
+      map->innerIndex[i] = innerIndex;
+    }
+
+  Exit:
+    return error;
+  }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    ft_var_load_hvvar                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    If `vertical' is zero, parse the `HVAR' table and set              */
+  /*    `blend->hvar_loaded' to TRUE.  On success, `blend->hvar_checked'   */
+  /*    is set to TRUE.                                                    */
+  /*                                                                       */
+  /*    If `vertical' is not zero, parse the `VVAR' table and set          */
+  /*    `blend->vvar_loaded' to TRUE.  On success, `blend->vvar_checked'   */
+  /*    is set to TRUE.                                                    */
+  /*                                                                       */
+  /*    Some memory may remain allocated on error; it is always freed in   */
+  /*    `tt_done_blend', however.                                          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face :: The font face.                                             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  static FT_Error
+  ft_var_load_hvvar( TT_Face  face,
+                     FT_Bool  vertical )
+  {
+    FT_Stream  stream = FT_FACE_STREAM( face );
+    FT_Memory  memory = stream->memory;
+
+    GX_Blend  blend = face->blend;
+
+    GX_HVVarTable  table;
+
+    FT_Error   error;
+    FT_UShort  majorVersion;
+    FT_ULong   table_len;
+    FT_ULong   table_offset;
+    FT_ULong   store_offset;
+    FT_ULong   widthMap_offset;
+
+
+    if ( vertical )
+    {
+      blend->vvar_loaded = TRUE;
+
+      FT_TRACE2(( "VVAR " ));
+
+      error = face->goto_table( face, TTAG_VVAR, stream, &table_len );
+    }
+    else
+    {
+      blend->hvar_loaded = TRUE;
+
+      FT_TRACE2(( "HVAR " ));
+
+      error = face->goto_table( face, TTAG_HVAR, stream, &table_len );
+    }
+
+    if ( error )
+    {
+      FT_TRACE2(( "is missing\n" ));
+      goto Exit;
+    }
+
+    table_offset = FT_STREAM_POS();
+
+    /* skip minor version */
+    if ( FT_READ_USHORT( majorVersion ) ||
+         FT_STREAM_SKIP( 2 )            )
+      goto Exit;
+
+    if ( majorVersion != 1 )
+    {
+      FT_TRACE2(( "bad table version %d\n", majorVersion ));
+      error = FT_THROW( Invalid_Table );
+      goto Exit;
+    }
+
+    if ( FT_READ_ULONG( store_offset )    ||
+         FT_READ_ULONG( widthMap_offset ) )
+      goto Exit;
+
+    if ( vertical )
+    {
+      if ( FT_NEW( blend->vvar_table ) )
+        goto Exit;
+      table = blend->vvar_table;
+    }
+    else
+    {
+      if ( FT_NEW( blend->hvar_table ) )
+        goto Exit;
+      table = blend->hvar_table;
+    }
+
+    error = ft_var_load_item_variation_store(
+              face,
+              table_offset + store_offset,
+              &table->itemStore );
+    if ( error )
+      goto Exit;
+
+    if ( widthMap_offset )
+    {
+      error = ft_var_load_delta_set_index_mapping(
+                face,
+                table_offset + widthMap_offset,
+                &table->widthMap,
+                &table->itemStore );
+      if ( error )
+        goto Exit;
+    }
+
+    FT_TRACE2(( "loaded\n" ));
+    error = FT_Err_Ok;
+
+  Exit:
+    if ( !error )
+    {
+      if ( vertical )
+      {
+        blend->vvar_checked = TRUE;
+
+        /* FreeType doesn't provide functions to quickly retrieve    */
+        /* TSB, BSB, or VORG values; we thus don't have to implement */
+        /* support for those three item variation stores.            */
+
+        face->variation_support |= TT_FACE_FLAG_VAR_VADVANCE;
+      }
+      else
+      {
+        blend->hvar_checked = TRUE;
+
+        /* FreeType doesn't provide functions to quickly retrieve */
+        /* LSB or RSB values; we thus don't have to implement     */
+        /* support for those two item variation stores.           */
+
+        face->variation_support |= TT_FACE_FLAG_VAR_HADVANCE;
+      }
+    }
+
+    return error;
+  }
+
+
+  static FT_Int
+  ft_var_get_item_delta( TT_Face          face,
+                         GX_ItemVarStore  itemStore,
+                         FT_UInt          outerIndex,
+                         FT_UInt          innerIndex )
+  {
+    GX_ItemVarData  varData;
+    FT_Short*       deltaSet;
+
+    FT_UInt   master, j;
+    FT_Fixed  netAdjustment = 0;     /* accumulated adjustment */
+    FT_Fixed  scaledDelta;
+    FT_Fixed  delta;
+
+
+    /* See pseudo code from `Font Variations Overview' */
+    /* in the OpenType specification.                  */
+
+    varData  = &itemStore->varData[outerIndex];
+    deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex];
+
+    /* outer loop steps through master designs to be blended */
+    for ( master = 0; master < varData->regionIdxCount; master++ )
+    {
+      FT_Fixed  scalar      = FT_FIXED_ONE;
+      FT_UInt   regionIndex = varData->regionIndices[master];
+
+      GX_AxisCoords  axis = itemStore->varRegionList[regionIndex].axisList;
+
+
+      /* inner loop steps through axes in this region */
+      for ( j = 0; j < itemStore->axisCount; j++, axis++ )
+      {
+        FT_Fixed  axisScalar;
+
+
+        /* compute the scalar contribution of this axis; */
+        /* ignore invalid ranges                         */
+        if ( axis->startCoord > axis->peakCoord ||
+             axis->peakCoord > axis->endCoord   )
+          axisScalar = FT_FIXED_ONE;
+
+        else if ( axis->startCoord < 0 &&
+                  axis->endCoord > 0   &&
+                  axis->peakCoord != 0 )
+          axisScalar = FT_FIXED_ONE;
+
+        /* peak of 0 means ignore this axis */
+        else if ( axis->peakCoord == 0 )
+          axisScalar = FT_FIXED_ONE;
+
+        /* ignore this region if coords are out of range */
+        else if ( face->blend->normalizedcoords[j] < axis->startCoord ||
+                  face->blend->normalizedcoords[j] > axis->endCoord   )
+          axisScalar = 0;
+
+        /* calculate a proportional factor */
+        else
+        {
+          if ( face->blend->normalizedcoords[j] == axis->peakCoord )
+            axisScalar = FT_FIXED_ONE;
+          else if ( face->blend->normalizedcoords[j] < axis->peakCoord )
+            axisScalar =
+              FT_DivFix( face->blend->normalizedcoords[j] - axis->startCoord,
+                         axis->peakCoord - axis->startCoord );
+          else
+            axisScalar =
+              FT_DivFix( axis->endCoord - face->blend->normalizedcoords[j],
+                         axis->endCoord - axis->peakCoord );
+        }
+
+        /* take product of all the axis scalars */
+        scalar = FT_MulFix( scalar, axisScalar );
+
+      } /* per-axis loop */
+
+      /* get the scaled delta for this region */
+      delta       = FT_intToFixed( deltaSet[master] );
+      scaledDelta = FT_MulFix( scalar, delta );
+
+      /* accumulate the adjustments from each region */
+      netAdjustment = netAdjustment + scaledDelta;
+
+    } /* per-region loop */
+
+    return FT_fixedToInt( netAdjustment );
+  }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    tt_hvadvance_adjust                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Apply `HVAR' advance width or `VVAR' advance height adjustment of  */
+  /*    a given glyph.                                                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    gindex   :: The glyph index.                                       */
+  /*                                                                       */
+  /*    vertical :: If set, handle `VVAR' table.                           */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face     :: The font face.                                         */
+  /*                                                                       */
+  /*    adelta   :: Points to width or height value that gets modified.    */
+  /*                                                                       */
+  static FT_Error
+  tt_hvadvance_adjust( TT_Face  face,
+                       FT_UInt  gindex,
+                       FT_Int  *avalue,
+                       FT_Bool  vertical )
+  {
+    FT_Error  error = FT_Err_Ok;
+    FT_UInt   innerIndex, outerIndex;
+    FT_Int    delta;
+
+    GX_HVVarTable  table;
+
+
+    if ( !face->doblend || !face->blend )
+      goto Exit;
+
+    if ( vertical )
+    {
+      if ( !face->blend->vvar_loaded )
+      {
+        /* initialize vvar table */
+        face->blend->vvar_error = ft_var_load_hvvar( face, 1 );
+      }
+
+      if ( !face->blend->vvar_checked )
+      {
+        error = face->blend->vvar_error;
+        goto Exit;
+      }
+
+      table = face->blend->vvar_table;
+    }
+    else
+    {
+      if ( !face->blend->hvar_loaded )
+      {
+        /* initialize hvar table */
+        face->blend->hvar_error = ft_var_load_hvvar( face, 0 );
+      }
+
+      if ( !face->blend->hvar_checked )
+      {
+        error = face->blend->hvar_error;
+        goto Exit;
+      }
+
+      table = face->blend->hvar_table;
+    }
+
+    /* advance width or height adjustments are always present in an */
+    /* `HVAR' or `VVAR' table; no need to test for this capability  */
+
+    if ( table->widthMap.innerIndex )
+    {
+      FT_UInt  idx = gindex;
+
+
+      if ( idx >= table->widthMap.mapCount )
+        idx = table->widthMap.mapCount - 1;
+
+      /* trust that HVAR parser has checked indices */
+      outerIndex = table->widthMap.outerIndex[idx];
+      innerIndex = table->widthMap.innerIndex[idx];
+    }
+    else
+    {
+      GX_ItemVarData  varData;
+
+
+      /* no widthMap data */
+      outerIndex = 0;
+      innerIndex = gindex;
+
+      varData = &table->itemStore.varData[outerIndex];
+      if ( gindex >= varData->itemCount )
+      {
+        FT_TRACE2(( "gindex %d out of range\n", gindex ));
+        error = FT_THROW( Invalid_Argument );
+        goto Exit;
+      }
+    }
+
+    delta = ft_var_get_item_delta( face,
+                                   &table->itemStore,
+                                   outerIndex,
+                                   innerIndex );
+
+    FT_TRACE5(( "%s value %d adjusted by %d units (%s)\n",
+                vertical ? "vertical height" : "horizontal width",
+                *avalue,
+                delta,
+                vertical ? "VVAR" : "HVAR" ));
+
+    *avalue += delta;
+
+  Exit:
+    return error;
+  }
+
+
+  FT_LOCAL_DEF( FT_Error )
+  tt_hadvance_adjust( TT_Face  face,
+                      FT_UInt  gindex,
+                      FT_Int  *avalue )
+  {
+    return tt_hvadvance_adjust( face, gindex, avalue, 0 );
+  }
+
+
+  FT_LOCAL_DEF( FT_Error )
+  tt_vadvance_adjust( TT_Face  face,
+                      FT_UInt  gindex,
+                      FT_Int  *avalue )
+  {
+    return tt_hvadvance_adjust( face, gindex, avalue, 1 );
+  }
+
+
+#define GX_VALUE_SIZE  8
+
+  /* all values are FT_Short or FT_UShort entities; */
+  /* we treat them consistently as FT_Short         */
+#define GX_VALUE_CASE( tag, dflt )      \
+          case MVAR_TAG_ ## tag :       \
+            p = (FT_Short*)&face->dflt; \
+            break
+
+#define GX_GASP_CASE( idx )                                       \
+          case MVAR_TAG_GASP_ ## idx :                            \
+            if ( idx < face->gasp.numRanges - 1 )                 \
+              p = (FT_Short*)&face->gasp.gaspRanges[idx].maxPPEM; \
+            else                                                  \
+              p = NULL;                                           \
+            break
+
+
+  static FT_Short*
+  ft_var_get_value_pointer( TT_Face   face,
+                            FT_ULong  mvar_tag )
+  {
+    FT_Short*  p;
+
+
+    switch ( mvar_tag )
+    {
+      GX_GASP_CASE( 0 );
+      GX_GASP_CASE( 1 );
+      GX_GASP_CASE( 2 );
+      GX_GASP_CASE( 3 );
+      GX_GASP_CASE( 4 );
+      GX_GASP_CASE( 5 );
+      GX_GASP_CASE( 6 );
+      GX_GASP_CASE( 7 );
+      GX_GASP_CASE( 8 );
+      GX_GASP_CASE( 9 );
+
+      GX_VALUE_CASE( CPHT, os2.sCapHeight );
+      GX_VALUE_CASE( HASC, os2.sTypoAscender );
+      GX_VALUE_CASE( HCLA, os2.usWinAscent );
+      GX_VALUE_CASE( HCLD, os2.usWinDescent );
+      GX_VALUE_CASE( HCOF, horizontal.caret_Offset );
+      GX_VALUE_CASE( HCRN, horizontal.caret_Slope_Run );
+      GX_VALUE_CASE( HCRS, horizontal.caret_Slope_Rise );
+      GX_VALUE_CASE( HDSC, os2.sTypoDescender );
+      GX_VALUE_CASE( HLGP, os2.sTypoLineGap );
+      GX_VALUE_CASE( SBXO, os2.ySubscriptXOffset);
+      GX_VALUE_CASE( SBXS, os2.ySubscriptXSize );
+      GX_VALUE_CASE( SBYO, os2.ySubscriptYOffset );
+      GX_VALUE_CASE( SBYS, os2.ySubscriptYSize );
+      GX_VALUE_CASE( SPXO, os2.ySuperscriptXOffset );
+      GX_VALUE_CASE( SPXS, os2.ySuperscriptXSize );
+      GX_VALUE_CASE( SPYO, os2.ySuperscriptYOffset );
+      GX_VALUE_CASE( SPYS, os2.ySuperscriptYSize );
+      GX_VALUE_CASE( STRO, os2.yStrikeoutPosition );
+      GX_VALUE_CASE( STRS, os2.yStrikeoutSize );
+      GX_VALUE_CASE( UNDO, postscript.underlinePosition );
+      GX_VALUE_CASE( UNDS, postscript.underlineThickness );
+      GX_VALUE_CASE( VASC, vertical.Ascender );
+      GX_VALUE_CASE( VCOF, vertical.caret_Offset );
+      GX_VALUE_CASE( VCRN, vertical.caret_Slope_Run );
+      GX_VALUE_CASE( VCRS, vertical.caret_Slope_Rise );
+      GX_VALUE_CASE( VDSC, vertical.Descender );
+      GX_VALUE_CASE( VLGP, vertical.Line_Gap );
+      GX_VALUE_CASE( XHGT, os2.sxHeight );
+
+    default:
+      /* ignore unknown tag */
+      p = NULL;
+    }
+
+    return p;
+  }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    ft_var_load_mvar                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Parse the `MVAR' table.                                            */
+  /*                                                                       */
+  /*    Some memory may remain allocated on error; it is always freed in   */
+  /*    `tt_done_blend', however.                                          */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face :: The font face.                                             */
+  /*                                                                       */
+  static void
+  ft_var_load_mvar( TT_Face  face )
+  {
+    FT_Stream  stream = FT_FACE_STREAM( face );
+    FT_Memory  memory = stream->memory;
+
+    GX_Blend         blend = face->blend;
+    GX_ItemVarStore  itemStore;
+    GX_Value         value, limit;
+
+    FT_Error   error;
+    FT_UShort  majorVersion;
+    FT_ULong   table_len;
+    FT_ULong   table_offset;
+    FT_UShort  store_offset;
+    FT_ULong   records_offset;
+
+
+    FT_TRACE2(( "MVAR " ));
+
+    error = face->goto_table( face, TTAG_MVAR, stream, &table_len );
+    if ( error )
+    {
+      FT_TRACE2(( "is missing\n" ));
+      return;
+    }
+
+    table_offset = FT_STREAM_POS();
+
+    /* skip minor version */
+    if ( FT_READ_USHORT( majorVersion ) ||
+         FT_STREAM_SKIP( 2 )            )
+      return;
+
+    if ( majorVersion != 1 )
+    {
+      FT_TRACE2(( "bad table version %d\n", majorVersion ));
+      return;
+    }
+
+    if ( FT_NEW( blend->mvar_table ) )
+      return;
+
+    /* skip reserved entry and value record size */
+    if ( FT_STREAM_SKIP( 4 )                             ||
+         FT_READ_USHORT( blend->mvar_table->valueCount ) ||
+         FT_READ_USHORT( store_offset )                  )
+      return;
+
+    records_offset = FT_STREAM_POS();
+
+    error = ft_var_load_item_variation_store(
+              face,
+              table_offset + store_offset,
+              &blend->mvar_table->itemStore );
+    if ( error )
+      return;
+
+    if ( FT_NEW_ARRAY( blend->mvar_table->values,
+                       blend->mvar_table->valueCount ) )
+      return;
+
+    if ( FT_STREAM_SEEK( records_offset )                                ||
+         FT_FRAME_ENTER( blend->mvar_table->valueCount * GX_VALUE_SIZE ) )
+      return;
+
+    value     = blend->mvar_table->values;
+    limit     = value + blend->mvar_table->valueCount;
+    itemStore = &blend->mvar_table->itemStore;
+
+    for ( ; value < limit; value++ )
+    {
+      value->tag        = FT_GET_ULONG();
+      value->outerIndex = FT_GET_USHORT();
+      value->innerIndex = FT_GET_USHORT();
+
+      if ( value->outerIndex >= itemStore->dataCount                  ||
+           value->innerIndex >= itemStore->varData[value->outerIndex]
+                                                  .itemCount          )
+      {
+        error = FT_THROW( Invalid_Table );
+        break;
+      }
+    }
+
+    FT_FRAME_EXIT();
+
+    if ( error )
+      return;
+
+    FT_TRACE2(( "loaded\n" ));
+
+    value = blend->mvar_table->values;
+    limit = value + blend->mvar_table->valueCount;
+
+    /* save original values of the data MVAR is going to modify */
+    for ( ; value < limit; value++ )
+    {
+      FT_Short*  p = ft_var_get_value_pointer( face, value->tag );
+
+
+      if ( p )
+        value->unmodified = *p;
+#ifdef FT_DEBUG_LEVEL_TRACE
+      else
+        FT_TRACE1(( "ft_var_load_mvar: Ignoring unknown tag `%c%c%c%c'\n",
+                    (FT_Char)( value->tag >> 24 ),
+                    (FT_Char)( value->tag >> 16 ),
+                    (FT_Char)( value->tag >> 8 ),
+                    (FT_Char)( value->tag ) ));
+#endif
+    }
+
+    face->variation_support |= TT_FACE_FLAG_VAR_MVAR;
+  }
+
+
+  static FT_Error
+  tt_size_reset_iterator( FT_ListNode  node,
+                          void*        user )
+  {
+    TT_Size  size = (TT_Size)node->data;
+
+    FT_UNUSED( user );
+
+
+    tt_size_reset( size, 1 );
+
+    return FT_Err_Ok;
+  }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    tt_apply_mvar                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Apply `MVAR' table adjustments.                                    */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face :: The font face.                                             */
+  /*                                                                       */
+  FT_LOCAL_DEF( void )
+  tt_apply_mvar( TT_Face  face )
+  {
+    GX_Blend  blend = face->blend;
+    GX_Value  value, limit;
+
+
+    if ( !( face->variation_support & TT_FACE_FLAG_VAR_MVAR ) )
+      return;
+
+    value = blend->mvar_table->values;
+    limit = value + blend->mvar_table->valueCount;
+
+    for ( ; value < limit; value++ )
+    {
+      FT_Short*  p = ft_var_get_value_pointer( face, value->tag );
+      FT_Int     delta;
+
+
+      delta = ft_var_get_item_delta( face,
+                                     &blend->mvar_table->itemStore,
+                                     value->outerIndex,
+                                     value->innerIndex );
+
+      if ( p )
+      {
+        FT_TRACE5(( "value %c%c%c%c (%d units) adjusted by %d units (MVAR)\n",
+                    (FT_Char)( value->tag >> 24 ),
+                    (FT_Char)( value->tag >> 16 ),
+                    (FT_Char)( value->tag >> 8 ),
+                    (FT_Char)( value->tag ),
+                    value->unmodified,
+                    delta ));
+
+        /* since we handle both signed and unsigned values as FT_Short, */
+        /* ensure proper overflow arithmetic                            */
+        *p = (FT_Short)( value->unmodified + (FT_Short)delta );
+      }
+    }
+
+    /* adjust all derived values */
+    {
+      FT_Face  root = &face->root;
+
+
+      if ( face->os2.version != 0xFFFFU )
+      {
+        if ( face->os2.sTypoAscender || face->os2.sTypoDescender )
+        {
+          root->ascender  = face->os2.sTypoAscender;
+          root->descender = face->os2.sTypoDescender;
+
+          root->height = root->ascender - root->descender +
+                         face->os2.sTypoLineGap;
+        }
+        else
+        {
+          root->ascender  =  (FT_Short)face->os2.usWinAscent;
+          root->descender = -(FT_Short)face->os2.usWinDescent;
+
+          root->height = root->ascender - root->descender;
+        }
+      }
+
+      root->underline_position  = face->postscript.underlinePosition -
+                                  face->postscript.underlineThickness / 2;
+      root->underline_thickness = face->postscript.underlineThickness;
+
+      /* iterate over all FT_Size objects and call `tt_size_reset' */
+      /* to propagate the metrics changes                          */
+      FT_List_Iterate( &root->sizes_list,
+                       tt_size_reset_iterator,
+                       NULL );
+    }
+  }
+
+
+  typedef struct  GX_GVar_Head_
+  {
+    FT_Long    version;
+    FT_UShort  axisCount;
+    FT_UShort  globalCoordCount;
+    FT_ULong   offsetToCoord;
+    FT_UShort  glyphCount;
+    FT_UShort  flags;
+    FT_ULong   offsetToData;
+
+  } GX_GVar_Head;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    ft_var_load_gvar                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Parse the `gvar' table if present.  If `fvar' is there, `gvar' had */
+  /*    better be there too.                                               */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face :: The font face.                                             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  static FT_Error
+  ft_var_load_gvar( TT_Face  face )
+  {
+    FT_Stream     stream = FT_FACE_STREAM( face );
+    FT_Memory     memory = stream->memory;
+    GX_Blend      blend  = face->blend;
+    FT_Error      error;
+    FT_UInt       i, j;
+    FT_ULong      table_len;
+    FT_ULong      gvar_start;
+    FT_ULong      offsetToData;
+    GX_GVar_Head  gvar_head;
+
+    static const FT_Frame_Field  gvar_fields[] =
+    {
+
+#undef  FT_STRUCTURE
+#define FT_STRUCTURE  GX_GVar_Head
+
+      FT_FRAME_START( 20 ),
+        FT_FRAME_LONG  ( version ),
+        FT_FRAME_USHORT( axisCount ),
+        FT_FRAME_USHORT( globalCoordCount ),
+        FT_FRAME_ULONG ( offsetToCoord ),
+        FT_FRAME_USHORT( glyphCount ),
+        FT_FRAME_USHORT( flags ),
+        FT_FRAME_ULONG ( offsetToData ),
+      FT_FRAME_END
+    };
+
+
+    FT_TRACE2(( "GVAR " ));
+
+    if ( FT_SET_ERROR( face->goto_table( face,
+                                         TTAG_gvar,
+                                         stream,
+                                         &table_len ) ) )
+    {
+      FT_TRACE2(( "is missing\n" ));
+      goto Exit;
+    }
+
+    gvar_start = FT_STREAM_POS( );
+    if ( FT_STREAM_READ_FIELDS( gvar_fields, &gvar_head ) )
+      goto Exit;
+
+    if ( gvar_head.version != 0x00010000L )
+    {
+      FT_TRACE1(( "bad table version\n" ));
+      error = FT_THROW( Invalid_Table );
+      goto Exit;
+    }
+
+    if ( gvar_head.axisCount != (FT_UShort)blend->mmvar->num_axis )
+    {
+      FT_TRACE1(( "ft_var_load_gvar: number of axes in `gvar' and `cvar'\n"
+                  "                  table are different\n" ));
+      error = FT_THROW( Invalid_Table );
+      goto Exit;
+    }
+
+    /* rough sanity check, ignoring offsets */
+    if ( (FT_ULong)gvar_head.globalCoordCount * gvar_head.axisCount >
+           table_len / 2 )
+    {
+      FT_TRACE1(( "ft_var_load_gvar:"
+                  " invalid number of global coordinates\n" ));
+      error = FT_THROW( Invalid_Table );
+      goto Exit;
+    }
+
+    /* rough sanity check: offsets can be either 2 or 4 bytes */
+    if ( (FT_ULong)gvar_head.glyphCount *
+           ( ( gvar_head.flags & 1 ) ? 4 : 2 ) > table_len )
+    {
+      FT_TRACE1(( "ft_var_load_gvar: invalid number of glyphs\n" ));
+      error = FT_THROW( Invalid_Table );
+      goto Exit;
+    }
+
+    FT_TRACE2(( "loaded\n" ));
+
+    blend->gvar_size   = table_len;
+    blend->tuplecount  = gvar_head.globalCoordCount;
+    blend->gv_glyphcnt = gvar_head.glyphCount;
+    offsetToData       = gvar_start + gvar_head.offsetToData;
+
+    FT_TRACE5(( "gvar: there are %d shared coordinates:\n",
+                blend->tuplecount ));
+
+    if ( FT_NEW_ARRAY( blend->glyphoffsets, blend->gv_glyphcnt + 1 ) )
+      goto Exit;
+
+    if ( gvar_head.flags & 1 )
+    {
+      /* long offsets (one more offset than glyphs, to mark size of last) */
+      if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 4L ) )
+        goto Exit;
+
+      for ( i = 0; i <= blend->gv_glyphcnt; i++ )
+        blend->glyphoffsets[i] = offsetToData + FT_GET_ULONG();
+
+      FT_FRAME_EXIT();
+    }
+    else
+    {
+      /* short offsets (one more offset than glyphs, to mark size of last) */
+      if ( FT_FRAME_ENTER( ( blend->gv_glyphcnt + 1 ) * 2L ) )
+        goto Exit;
+
+      for ( i = 0; i <= blend->gv_glyphcnt; i++ )
+        blend->glyphoffsets[i] = offsetToData + FT_GET_USHORT() * 2;
+                                               /* XXX: Undocumented: `*2'! */
+
+      FT_FRAME_EXIT();
+    }
+
+    if ( blend->tuplecount != 0 )
+    {
+      if ( FT_NEW_ARRAY( blend->tuplecoords,
+                         gvar_head.axisCount * blend->tuplecount ) )
+        goto Exit;
+
+      if ( FT_STREAM_SEEK( gvar_start + gvar_head.offsetToCoord )         ||
+           FT_FRAME_ENTER( blend->tuplecount * gvar_head.axisCount * 2L ) )
+        goto Exit;
+
+      for ( i = 0; i < blend->tuplecount; i++ )
+      {
+        FT_TRACE5(( "  [ " ));
+        for ( j = 0; j < (FT_UInt)gvar_head.axisCount; j++ )
+        {
+          blend->tuplecoords[i * gvar_head.axisCount + j] =
+            FT_GET_SHORT() * 4;                 /* convert to FT_Fixed */
+          FT_TRACE5(( "%.5f ",
+            blend->tuplecoords[i * gvar_head.axisCount + j] / 65536.0 ));
+        }
+        FT_TRACE5(( "]\n" ));
+      }
+
+      FT_TRACE5(( "\n" ));
+
+      FT_FRAME_EXIT();
+    }
+
+  Exit:
+    return error;
+  }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    ft_var_apply_tuple                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Figure out whether a given tuple (design) applies to the current   */
+  /*    blend, and if so, what is the scaling factor.                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    blend           :: The current blend of the font.                  */
+  /*                                                                       */
+  /*    tupleIndex      :: A flag saying whether this is an intermediate   */
+  /*                       tuple or not.                                   */
+  /*                                                                       */
+  /*    tuple_coords    :: The coordinates of the tuple in normalized axis */
+  /*                       units.                                          */
+  /*                                                                       */
+  /*    im_start_coords :: The initial coordinates where this tuple starts */
+  /*                       to apply (for intermediate coordinates).        */
+  /*                                                                       */
+  /*    im_end_coords   :: The final coordinates after which this tuple no */
+  /*                       longer applies (for intermediate coordinates).  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    An FT_Fixed value containing the scaling factor.                   */
+  /*                                                                       */
+  static FT_Fixed
+  ft_var_apply_tuple( GX_Blend   blend,
+                      FT_UShort  tupleIndex,
+                      FT_Fixed*  tuple_coords,
+                      FT_Fixed*  im_start_coords,
+                      FT_Fixed*  im_end_coords )
+  {
+    FT_UInt   i;
+    FT_Fixed  apply = 0x10000L;
+
+
+    for ( i = 0; i < blend->num_axis; i++ )
+    {
+      FT_TRACE6(( "    axis coordinate %d (%.5f):\n",
+                  i, blend->normalizedcoords[i] / 65536.0 ));
+      if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )
+        FT_TRACE6(( "      intermediate coordinates %d (%.5f, %.5f):\n",
+                    i,
+                    im_start_coords[i] / 65536.0,
+                    im_end_coords[i] / 65536.0 ));
+
+      /* It's not clear why (for intermediate tuples) we don't need     */
+      /* to check against start/end -- the documentation says we don't. */
+      /* Similarly, it's unclear why we don't need to scale along the   */
+      /* axis.                                                          */
+
+      if ( tuple_coords[i] == 0 )
+      {
+        FT_TRACE6(( "      tuple coordinate is zero, ignored\n", i ));
+        continue;
+      }
+
+      if ( blend->normalizedcoords[i] == 0 )
+      {
+        FT_TRACE6(( "      axis coordinate is zero, stop\n" ));
+        apply = 0;
+        break;
+      }
+
+      if ( blend->normalizedcoords[i] == tuple_coords[i] )
+      {
+        FT_TRACE6(( "      tuple coordinate value %.5f fits perfectly\n",
+                    tuple_coords[i] / 65536.0 ));
+        /* `apply' does not change */
+        continue;
+      }
+
+      if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )
+      {
+        /* not an intermediate tuple */
 
         if ( blend->normalizedcoords[i] < FT_MIN( 0, tuple_coords[i] ) ||
              blend->normalizedcoords[i] > FT_MAX( 0, tuple_coords[i] ) )
         {
-          FT_TRACE6(( "      tuple coordinate value %.4f is exceeded, stop\n",
+          FT_TRACE6(( "      tuple coordinate value %.5f is exceeded, stop\n",
                       tuple_coords[i] / 65536.0 ));
           apply = 0;
           break;
         }
 
-        FT_TRACE6(( "      tuple coordinate value %.4f fits\n",
+        FT_TRACE6(( "      tuple coordinate value %.5f fits\n",
                     tuple_coords[i] / 65536.0 ));
         apply = FT_MulDiv( apply,
                            blend->normalizedcoords[i],
                            tuple_coords[i] );
       }
       else
-      {
-        /* intermediate tuple */
+      {
+        /* intermediate tuple */
+
+        if ( blend->normalizedcoords[i] < im_start_coords[i] ||
+             blend->normalizedcoords[i] > im_end_coords[i]   )
+        {
+          FT_TRACE6(( "      intermediate tuple range [%.5f;%.5f] is exceeded,"
+                      " stop\n",
+                      im_start_coords[i] / 65536.0,
+                      im_end_coords[i] / 65536.0 ));
+          apply = 0;
+          break;
+        }
+
+        else if ( blend->normalizedcoords[i] < tuple_coords[i] )
+        {
+          FT_TRACE6(( "      intermediate tuple range [%.5f;%.5f] fits\n",
+                      im_start_coords[i] / 65536.0,
+                      im_end_coords[i] / 65536.0 ));
+          apply = FT_MulDiv( apply,
+                             blend->normalizedcoords[i] - im_start_coords[i],
+                             tuple_coords[i] - im_start_coords[i] );
+        }
+
+        else
+        {
+          FT_TRACE6(( "      intermediate tuple range [%.5f;%.5f] fits\n",
+                      im_start_coords[i] / 65536.0,
+                      im_end_coords[i] / 65536.0 ));
+          apply = FT_MulDiv( apply,
+                             im_end_coords[i] - blend->normalizedcoords[i],
+                             im_end_coords[i] - tuple_coords[i] );
+        }
+      }
+    }
+
+    FT_TRACE6(( "    apply factor is %.5f\n", apply / 65536.0 ));
+
+    return apply;
+  }
+
+
+  /* convert from design coordinates to normalized coordinates */
+
+  static void
+  ft_var_to_normalized( TT_Face    face,
+                        FT_UInt    num_coords,
+                        FT_Fixed*  coords,
+                        FT_Fixed*  normalized )
+  {
+    GX_Blend        blend;
+    FT_MM_Var*      mmvar;
+    FT_UInt         i, j;
+    FT_Var_Axis*    a;
+    GX_AVarSegment  av;
+
+
+    blend = face->blend;
+    mmvar = blend->mmvar;
+
+    if ( num_coords > mmvar->num_axis )
+    {
+      FT_TRACE2(( "ft_var_to_normalized:"
+                  " only using first %d of %d coordinates\n",
+                  mmvar->num_axis, num_coords ));
+      num_coords = mmvar->num_axis;
+    }
+
+    /* Axis normalization is a two-stage process.  First we normalize */
+    /* based on the [min,def,max] values for the axis to be [-1,0,1]. */
+    /* Then, if there's an `avar' table, we renormalize this range.   */
+
+    FT_TRACE5(( "design coordinates:\n" ));
+
+    a = mmvar->axis;
+    for ( i = 0; i < num_coords; i++, a++ )
+    {
+      FT_Fixed  coord = coords[i];
+
+
+      FT_TRACE5(( "  %.5f\n", coord / 65536.0 ));
+      if ( coord > a->maximum || coord < a->minimum )
+      {
+        FT_TRACE1((
+          "ft_var_to_normalized: design coordinate %.5f\n"
+          "                      is out of range [%.5f;%.5f]; clamping\n",
+          coord / 65536.0,
+          a->minimum / 65536.0,
+          a->maximum / 65536.0 ));
+
+        if ( coord > a->maximum)
+          coord = a->maximum;
+        else
+          coord = a->minimum;
+      }
+
+      if ( coord < a->def )
+        normalized[i] = -FT_DivFix( coords[i] - a->def,
+                                    a->minimum - a->def );
+      else if ( coord > a->def )
+        normalized[i] = FT_DivFix( coords[i] - a->def,
+                                   a->maximum - a->def );
+      else
+        normalized[i] = 0;
+    }
 
-        if ( blend->normalizedcoords[i] < im_start_coords[i] ||
-             blend->normalizedcoords[i] > im_end_coords[i]   )
-        {
-          FT_TRACE6(( "      intermediate tuple range [%.4f;%.4f] is exceeded,"
-                      " stop\n",
-                      im_start_coords[i] / 65536.0,
-                      im_end_coords[i] / 65536.0 ));
-          apply = 0;
-          break;
-        }
+    FT_TRACE5(( "\n" ));
 
-        else if ( blend->normalizedcoords[i] < tuple_coords[i] )
+    for ( ; i < mmvar->num_axis; i++ )
+      normalized[i] = 0;
+
+    if ( blend->avar_segment )
+    {
+      FT_TRACE5(( "normalized design coordinates"
+                  " before applying `avar' data:\n" ));
+
+      av = blend->avar_segment;
+      for ( i = 0; i < mmvar->num_axis; i++, av++ )
+      {
+        for ( j = 1; j < (FT_UInt)av->pairCount; j++ )
         {
-          FT_TRACE6(( "      intermediate tuple range [%.4f;%.4f] fits\n",
-                      im_start_coords[i] / 65536.0,
-                      im_end_coords[i] / 65536.0 ));
-          apply = FT_MulDiv( apply,
-                             blend->normalizedcoords[i] - im_start_coords[i],
-                             tuple_coords[i] - im_start_coords[i] );
+          if ( normalized[i] < av->correspondence[j].fromCoord )
+          {
+            FT_TRACE5(( "  %.5f\n", normalized[i] / 65536.0 ));
+
+            normalized[i] =
+              FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord,
+                         av->correspondence[j].toCoord -
+                           av->correspondence[j - 1].toCoord,
+                         av->correspondence[j].fromCoord -
+                           av->correspondence[j - 1].fromCoord ) +
+              av->correspondence[j - 1].toCoord;
+            break;
+          }
         }
+      }
+    }
+  }
 
-        else
+
+  /* convert from normalized coordinates to design coordinates */
+
+  static void
+  ft_var_to_design( TT_Face    face,
+                    FT_UInt    num_coords,
+                    FT_Fixed*  coords,
+                    FT_Fixed*  design )
+  {
+    GX_Blend      blend;
+    FT_MM_Var*    mmvar;
+    FT_Var_Axis*  a;
+
+    FT_UInt  i, j, nc;
+
+
+    blend = face->blend;
+
+    nc = num_coords;
+    if ( num_coords > blend->num_axis )
+    {
+      FT_TRACE2(( "ft_var_to_design:"
+                  " only using first %d of %d coordinates\n",
+                  blend->num_axis, num_coords ));
+      nc = blend->num_axis;
+    }
+
+    if ( face->doblend )
+    {
+      for ( i = 0; i < nc; i++ )
+        design[i] = coords[i];
+    }
+    else
+    {
+      for ( i = 0; i < nc; i++ )
+        design[i] = 0;
+    }
+
+    for ( ; i < num_coords; i++ )
+      design[i] = 0;
+
+    if ( blend->avar_segment )
+    {
+      GX_AVarSegment  av = blend->avar_segment;
+
+
+      FT_TRACE5(( "design coordinates"
+                  " after removing `avar' distortion:\n" ));
+
+      for ( i = 0; i < nc; i++, av++ )
+      {
+        for ( j = 1; j < (FT_UInt)av->pairCount; j++ )
         {
-          FT_TRACE6(( "      intermediate tuple range [%.4f;%.4f] fits\n",
-                      im_start_coords[i] / 65536.0,
-                      im_end_coords[i] / 65536.0 ));
-          apply = FT_MulDiv( apply,
-                             im_end_coords[i] - blend->normalizedcoords[i],
-                             im_end_coords[i] - tuple_coords[i] );
+          if ( design[i] < av->correspondence[j].toCoord )
+          {
+            design[i] =
+              FT_MulDiv( design[i] - av->correspondence[j - 1].toCoord,
+                         av->correspondence[j].fromCoord -
+                           av->correspondence[j - 1].fromCoord,
+                         av->correspondence[j].toCoord -
+                           av->correspondence[j - 1].toCoord ) +
+              av->correspondence[j - 1].fromCoord;
+
+            FT_TRACE5(( "  %.5f\n", design[i] / 65536.0 ));
+            break;
+          }
         }
       }
     }
 
-    FT_TRACE6(( "    apply factor is %.4f\n", apply / 65536.0 ));
+    mmvar = blend->mmvar;
+    a     = mmvar->axis;
 
-    return apply;
+    for ( i = 0; i < nc; i++, a++ )
+    {
+      if ( design[i] < 0 )
+        design[i] = a->def + FT_MulFix( design[i],
+                                        a->def - a->minimum );
+      else if ( design[i] > 0 )
+        design[i] = a->def + FT_MulFix( design[i],
+                                        a->maximum - a->def );
+      else
+        design[i] = a->def;
+    }
   }
 
 
   {
     FT_Long    version;
     FT_UShort  offsetToData;
-    FT_UShort  countSizePairs;
     FT_UShort  axisCount;
     FT_UShort  axisSize;
     FT_UShort  instanceCount;
   /*                                                                       */
   /* <Description>                                                         */
   /*    Check that the font's `fvar' table is valid, parse it, and return  */
-  /*    those data.                                                        */
+  /*    those data.  It also loads (and parses) the `MVAR' table, if       */
+  /*    possible.                                                          */
   /*                                                                       */
   /* <InOut>                                                               */
   /*    face   :: The font face.                                           */
     FT_ULong             table_len;
     FT_Error             error  = FT_Err_Ok;
     FT_ULong             fvar_start;
-    FT_Int               i, j;
+    FT_UInt              i, j;
     FT_MM_Var*           mmvar = NULL;
     FT_Fixed*            next_coords;
+    FT_Fixed*            nsc;
     FT_String*           next_name;
     FT_Var_Axis*         a;
+    FT_Fixed*            c;
     FT_Var_Named_Style*  ns;
     GX_FVar_Head         fvar_head;
+    FT_Bool              usePsName;
+    FT_UInt              num_instances;
 
     static const FT_Frame_Field  fvar_fields[] =
     {
 #define FT_STRUCTURE  GX_FVar_Head
 
       FT_FRAME_START( 16 ),
-        FT_FRAME_LONG  ( version ),
-        FT_FRAME_USHORT( offsetToData ),
-        FT_FRAME_USHORT( countSizePairs ),
-        FT_FRAME_USHORT( axisCount ),
-        FT_FRAME_USHORT( axisSize ),
-        FT_FRAME_USHORT( instanceCount ),
-        FT_FRAME_USHORT( instanceSize ),
+        FT_FRAME_LONG      ( version ),
+        FT_FRAME_USHORT    ( offsetToData ),
+        FT_FRAME_SKIP_SHORT,
+        FT_FRAME_USHORT    ( axisCount ),
+        FT_FRAME_USHORT    ( axisSize ),
+        FT_FRAME_USHORT    ( instanceCount ),
+        FT_FRAME_USHORT    ( instanceSize ),
       FT_FRAME_END
     };
 
     /* read the font data and set up the internal representation */
     /* if not already done                                       */
 
-    if ( face->blend == NULL )
+    if ( !face->blend )
     {
       FT_TRACE2(( "FVAR " ));
 
       /* both `fvar' and `gvar' must be present */
-      if ( ( error = face->goto_table( face, TTAG_gvar,
-                                       stream, &table_len ) ) != 0 )
+      if ( FT_SET_ERROR( face->goto_table( face, TTAG_gvar,
+                                           stream, &table_len ) ) )
       {
-        FT_TRACE1(( "\n"
-                    "TT_Get_MM_Var: `gvar' table is missing\n" ));
-        goto Exit;
+        /* CFF2 is an alternate to gvar here */
+        if ( FT_SET_ERROR( face->goto_table( face, TTAG_CFF2,
+                                             stream, &table_len ) ) )
+        {
+          FT_TRACE1(( "\n"
+                      "TT_Get_MM_Var: `gvar' or `CFF2' table is missing\n" ));
+          goto Exit;
+        }
       }
 
-      if ( ( error = face->goto_table( face, TTAG_fvar,
-                                       stream, &table_len ) ) != 0 )
+      if ( FT_SET_ERROR( face->goto_table( face, TTAG_fvar,
+                                           stream, &table_len ) ) )
       {
         FT_TRACE1(( "is missing\n" ));
         goto Exit;
 
       fvar_start = FT_STREAM_POS( );
 
+      /* the validity of the `fvar' header data was already checked */
+      /* in function `sfnt_init_face'                               */
       if ( FT_STREAM_READ_FIELDS( fvar_fields, &fvar_head ) )
         goto Exit;
 
-      if ( fvar_head.version != (FT_Long)0x00010000L                      ||
-#if 0
-           /* fonts like `JamRegular.ttf' have an incorrect value for */
-           /* `countSizePairs'; since value 2 is hard-coded in `fvar' */
-           /* version 1.0, we simply ignore it                        */
-           fvar_head.countSizePairs != 2                                  ||
-#endif
-           fvar_head.axisSize != 20                                       ||
-           /* axisCount limit implied by 16-bit instanceSize */
-           fvar_head.axisCount > 0x3FFE                                   ||
-           fvar_head.instanceSize != 4 + 4 * fvar_head.axisCount          ||
-           /* instanceCount limit implied by limited range of name IDs */
-           fvar_head.instanceCount > 0x7EFF                               ||
-           fvar_head.offsetToData + fvar_head.axisCount * 20U +
-             fvar_head.instanceCount * fvar_head.instanceSize > table_len )
-      {
-        FT_TRACE1(( "\n"
-                    "TT_Get_MM_Var: invalid `fvar' header\n" ));
-        error = FT_THROW( Invalid_Table );
-        goto Exit;
-      }
+      usePsName = FT_BOOL( fvar_head.instanceSize ==
+                           6 + 4 * fvar_head.axisCount );
 
       FT_TRACE2(( "loaded\n" ));
 
       if ( FT_NEW( face->blend ) )
         goto Exit;
 
-      /* cannot overflow 32-bit arithmetic because of limits above */
+      /* `num_instances' holds the number of all named instances, */
+      /* including the default instance which might be missing    */
+      /* in fvar's table of named instances                       */
+      num_instances = face->root.style_flags >> 16;
+
+      /* cannot overflow 32-bit arithmetic because of the size limits */
+      /* used in the `fvar' table validity check in `sfnt_init_face'  */
       face->blend->mmvar_len =
         sizeof ( FT_MM_Var ) +
         fvar_head.axisCount * sizeof ( FT_Var_Axis ) +
-        fvar_head.instanceCount * sizeof ( FT_Var_Named_Style ) +
-        fvar_head.instanceCount * fvar_head.axisCount * sizeof ( FT_Fixed ) +
+        num_instances * sizeof ( FT_Var_Named_Style ) +
+        num_instances * fvar_head.axisCount * sizeof ( FT_Fixed ) +
         5 * fvar_head.axisCount;
 
       if ( FT_ALLOC( mmvar, face->blend->mmvar_len ) )
                                /* may have a different number of designs  */
                                /* (or tuples, as called by Apple)         */
       mmvar->num_namedstyles =
-        fvar_head.instanceCount;
+        num_instances;
       mmvar->axis =
         (FT_Var_Axis*)&( mmvar[1] );
       mmvar->namedstyle =
         (FT_Var_Named_Style*)&( mmvar->axis[fvar_head.axisCount] );
 
       next_coords =
-        (FT_Fixed*)&( mmvar->namedstyle[fvar_head.instanceCount] );
-      for ( i = 0; i < fvar_head.instanceCount; i++ )
+        (FT_Fixed*)&( mmvar->namedstyle[num_instances] );
+      for ( i = 0; i < num_instances; i++ )
       {
         mmvar->namedstyle[i].coords  = next_coords;
         next_coords                 += fvar_head.axisCount;
         a->name[3] = (FT_String)( ( a->tag       ) & 0xFF );
         a->name[4] = '\0';
 
-        FT_TRACE5(( "  \"%s\": minimum=%.4f, default=%.4f, maximum=%.4f\n",
+        if ( a->minimum > a->def ||
+             a->def > a->maximum )
+        {
+          FT_TRACE2(( "TT_Get_MM_Var:"
+                      " invalid \"%s\" axis record; disabling\n",
+                      a->name ));
+
+          a->minimum = a->def;
+          a->maximum = a->def;
+        }
+
+        FT_TRACE5(( "  \"%s\": minimum=%.5f, default=%.5f, maximum=%.5f\n",
                     a->name,
                     a->minimum / 65536.0,
                     a->def / 65536.0,
 
       FT_TRACE5(( "\n" ));
 
-      ns = mmvar->namedstyle;
+      /* named instance coordinates are stored as design coordinates; */
+      /* we have to convert them to normalized coordinates also       */
+      if ( FT_NEW_ARRAY( face->blend->normalized_stylecoords,
+                         fvar_head.axisCount * num_instances ) )
+        goto Exit;
+
+      if ( fvar_head.instanceCount && !face->blend->avar_loaded )
+        ft_var_load_avar( face );
+
+      ns  = mmvar->namedstyle;
+      nsc = face->blend->normalized_stylecoords;
       for ( i = 0; i < fvar_head.instanceCount; i++, ns++ )
       {
-        if ( FT_FRAME_ENTER( 4L + 4L * fvar_head.axisCount ) )
+        /* PostScript names add 2 bytes to the instance record size */
+        if ( FT_FRAME_ENTER( ( usePsName ? 6L : 4L ) +
+                             4L * fvar_head.axisCount ) )
           goto Exit;
 
         ns->strid       =    FT_GET_USHORT();
         (void) /* flags = */ FT_GET_USHORT();
 
-        for ( j = 0; j < fvar_head.axisCount; j++ )
-          ns->coords[j] = FT_GET_LONG();
+        c = ns->coords;
+        for ( j = 0; j < fvar_head.axisCount; j++, c++ )
+          *c = FT_GET_LONG();
+
+        if ( usePsName )
+          ns->psid = FT_GET_USHORT();
+
+        ft_var_to_normalized( face,
+                              fvar_head.axisCount,
+                              ns->coords,
+                              nsc );
+        nsc += fvar_head.axisCount;
 
         FT_FRAME_EXIT();
       }
+
+      if ( num_instances != fvar_head.instanceCount )
+      {
+        SFNT_Service  sfnt = (SFNT_Service)face->sfnt;
+
+        FT_Int   found, dummy1, dummy2;
+        FT_UInt  strid = 0xFFFFFFFFUL;
+
+
+        /* the default instance is missing in array the   */
+        /* of named instances; try to synthesize an entry */
+        found = sfnt->get_name_id( face,
+                                   TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY,
+                                   &dummy1,
+                                   &dummy2 );
+        if ( found )
+          strid = TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY;
+        else
+        {
+          found = sfnt->get_name_id( face,
+                                     TT_NAME_ID_FONT_SUBFAMILY,
+                                     &dummy1,
+                                     &dummy2 );
+          if ( found )
+            strid = TT_NAME_ID_FONT_SUBFAMILY;
+        }
+
+        if ( found )
+        {
+          found = sfnt->get_name_id( face,
+                                     TT_NAME_ID_PS_NAME,
+                                     &dummy1,
+                                     &dummy2 );
+          if ( found )
+          {
+            FT_TRACE5(( "TT_Get_MM_Var:"
+                        " Adding default instance to named instances\n" ));
+
+            ns = &mmvar->namedstyle[fvar_head.instanceCount];
+
+            ns->strid = strid;
+            ns->psid  = TT_NAME_ID_PS_NAME;
+
+            a = mmvar->axis;
+            c = ns->coords;
+            for ( j = 0; j < fvar_head.axisCount; j++, a++, c++ )
+              *c = a->def;
+          }
+        }
+      }
+
+      ft_var_load_mvar( face );
     }
 
     /* fill the output array if requested */
 
-    if ( master != NULL )
+    if ( master )
     {
       FT_UInt  n;
 
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    TT_Set_MM_Blend                                                    */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Set the blend (normalized) coordinates for this instance of the    */
-  /*    font.  Check that the `gvar' table is reasonable and does some     */
-  /*    initial preparation.                                               */
-  /*                                                                       */
-  /* <InOut>                                                               */
-  /*    face       :: The font.                                            */
-  /*                  Initialize the blend structure with `gvar' data.     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    num_coords :: The number of available coordinates.  If it is       */
-  /*                  larger than the number of axes, ignore the excess    */
-  /*                  values.  If it is smaller than the number of axes,   */
-  /*                  use the default value (0) for the remaining axes.    */
-  /*                                                                       */
-  /*    coords     :: An array of `num_coords', each between [-1,1].       */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
-  FT_LOCAL_DEF( FT_Error )
-  TT_Set_MM_Blend( TT_Face    face,
+  static FT_Error
+  tt_set_mm_blend( TT_Face    face,
                    FT_UInt    num_coords,
-                   FT_Fixed*  coords )
+                   FT_Fixed*  coords,
+                   FT_Bool    set_design_coords )
   {
     FT_Error    error = FT_Err_Ok;
     GX_Blend    blend;
     FT_MM_Var*  mmvar;
-    FT_UInt     i;
+    FT_UInt     i, j;
+    FT_Bool     is_default_instance = 1;
     FT_Memory   memory = face->root.memory;
 
     enum
 
     face->doblend = FALSE;
 
-    if ( face->blend == NULL )
+    if ( !face->blend )
     {
-      if ( ( error = TT_Get_MM_Var( face, NULL ) ) != 0 )
+      if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) )
         goto Exit;
     }
 
 
     if ( num_coords > mmvar->num_axis )
     {
-      FT_TRACE2(( "TT_Set_MM_Blend: only using first %d of %d coordinates\n",
+      FT_TRACE2(( "TT_Set_MM_Blend:"
+                  " only using first %d of %d coordinates\n",
                   mmvar->num_axis, num_coords ));
       num_coords = mmvar->num_axis;
     }
 
     for ( i = 0; i < num_coords; i++ )
     {
-      FT_TRACE5(( "  %.4f\n", coords[i] / 65536.0 ));
+      FT_TRACE5(( "  %.5f\n", coords[i] / 65536.0 ));
       if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L )
       {
-        FT_TRACE1(( "TT_Set_MM_Blend: normalized design coordinate %.4f\n"
+        FT_TRACE1(( "TT_Set_MM_Blend: normalized design coordinate %.5f\n"
                     "                 is out of range [-1;1]\n",
                     coords[i] / 65536.0 ));
         error = FT_THROW( Invalid_Argument );
         goto Exit;
       }
+
+      if ( coords[i] != 0 )
+        is_default_instance = 0;
     }
 
     FT_TRACE5(( "\n" ));
 
-    if ( blend->glyphoffsets == NULL )
-      if ( ( error = ft_var_load_gvar( face ) ) != 0 )
+    if ( !face->is_cff2 && !blend->glyphoffsets )
+      if ( FT_SET_ERROR( ft_var_load_gvar( face ) ) )
+        goto Exit;
+
+    if ( !blend->coords )
+    {
+      if ( FT_NEW_ARRAY( blend->coords, mmvar->num_axis ) )
         goto Exit;
+    }
 
-    if ( blend->normalizedcoords == NULL )
+    if ( !blend->normalizedcoords )
     {
       if ( FT_NEW_ARRAY( blend->normalizedcoords, mmvar->num_axis ) )
         goto Exit;
         }
       }
 
-      /* If we don't change the blend coords then we don't need to do  */
-      /* anything to the cvt table.  It will be correct.  Otherwise we */
-      /* no longer have the original cvt (it was modified when we set  */
-      /* the blend last time), so we must reload and then modify it.   */
-    }
+      /* If we don't change the blend coords then we don't need to do  */
+      /* anything to the cvt table.  It will be correct.  Otherwise we */
+      /* no longer have the original cvt (it was modified when we set  */
+      /* the blend last time), so we must reload and then modify it.   */
+    }
+
+    blend->num_axis = mmvar->num_axis;
+    FT_MEM_COPY( blend->normalizedcoords,
+                 coords,
+                 num_coords * sizeof ( FT_Fixed ) );
+
+    if ( set_design_coords )
+      ft_var_to_design( face,
+                        num_coords,
+                        blend->normalizedcoords,
+                        blend->coords );
+
+    face->doblend = TRUE;
+
+    if ( face->cvt )
+    {
+      switch ( manageCvt )
+      {
+      case mcvt_load:
+        /* The cvt table has been loaded already; every time we change the */
+        /* blend we may need to reload and remodify the cvt table.         */
+        FT_FREE( face->cvt );
+        face->cvt = NULL;
+
+        error = tt_face_load_cvt( face, face->root.stream );
+        break;
+
+      case mcvt_modify:
+        /* The original cvt table is in memory.  All we need to do is */
+        /* apply the `cvar' table (if any).                           */
+        error = tt_face_vary_cvt( face, face->root.stream );
+        break;
+
+      case mcvt_retain:
+        /* The cvt table is correct for this set of coordinates. */
+        break;
+      }
+    }
+
+    /* check whether the current variation tuple coincides */
+    /* with a named instance                               */
+
+    for ( i = 0; i < blend->mmvar->num_namedstyles; i++ )
+    {
+      FT_Fixed*  nsc = blend->normalized_stylecoords + i * blend->num_axis;
+      FT_Fixed*  ns  = blend->normalizedcoords;
+
+
+      for ( j = 0; j < blend->num_axis; j++, nsc++, ns++ )
+      {
+        if ( *nsc != *ns )
+          break;
+      }
+
+      if ( j == blend->num_axis )
+        break;
+    }
+
+    /* adjust named instance index */
+    face->root.face_index &= 0xFFFF;
+    if ( i < blend->mmvar->num_namedstyles )
+      face->root.face_index |= ( i + 1 ) << 16;
+
+    face->is_default_instance = is_default_instance;
+
+    /* enforce recomputation of the PostScript name; */
+    FT_FREE( face->postscript_name );
+    face->postscript_name = NULL;
+
+  Exit:
+    return error;
+  }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    TT_Set_MM_Blend                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Set the blend (normalized) coordinates for this instance of the    */
+  /*    font.  Check that the `gvar' table is reasonable and does some     */
+  /*    initial preparation.                                               */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: The font.                                            */
+  /*                  Initialize the blend structure with `gvar' data.     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    num_coords :: The number of available coordinates.  If it is       */
+  /*                  larger than the number of axes, ignore the excess    */
+  /*                  values.  If it is smaller than the number of axes,   */
+  /*                  use the default value (0) for the remaining axes.    */
+  /*                                                                       */
+  /*    coords     :: An array of `num_coords', each between [-1,1].       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_LOCAL_DEF( FT_Error )
+  TT_Set_MM_Blend( TT_Face    face,
+                   FT_UInt    num_coords,
+                   FT_Fixed*  coords )
+  {
+    return tt_set_mm_blend( face, num_coords, coords, 1 );
+  }
+
 
-    blend->num_axis = mmvar->num_axis;
-    FT_MEM_COPY( blend->normalizedcoords,
-                 coords,
-                 num_coords * sizeof ( FT_Fixed ) );
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    TT_Get_MM_Blend                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the blend (normalized) coordinates for this instance of the    */
+  /*    font.                                                              */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    face       :: The font.                                            */
+  /*                  Initialize the blend structure with `gvar' data.     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    num_coords :: The number of available coordinates.  If it is       */
+  /*                  larger than the number of axes, set the excess       */
+  /*                  values to 0.                                         */
+  /*                                                                       */
+  /*    coords     :: An array of `num_coords', each between [-1,1].       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_LOCAL_DEF( FT_Error )
+  TT_Get_MM_Blend( TT_Face    face,
+                   FT_UInt    num_coords,
+                   FT_Fixed*  coords )
+  {
+    FT_Error  error = FT_Err_Ok;
+    GX_Blend  blend;
+    FT_UInt   i, nc;
 
-    face->doblend = TRUE;
 
-    if ( face->cvt != NULL )
+    if ( !face->blend )
     {
-      switch ( manageCvt )
-      {
-      case mcvt_load:
-        /* The cvt table has been loaded already; every time we change the */
-        /* blend we may need to reload and remodify the cvt table.         */
-        FT_FREE( face->cvt );
-        face->cvt = NULL;
+      if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) )
+        return error;
+    }
 
-        error = tt_face_load_cvt( face, face->root.stream );
-        break;
+    blend = face->blend;
 
-      case mcvt_modify:
-        /* The original cvt table is in memory.  All we need to do is */
-        /* apply the `cvar' table (if any).                           */
-        error = tt_face_vary_cvt( face, face->root.stream );
-        break;
+    nc = num_coords;
+    if ( num_coords > blend->num_axis )
+    {
+      FT_TRACE2(( "TT_Get_MM_Blend:"
+                  " only using first %d of %d coordinates\n",
+                  blend->num_axis, num_coords ));
+      nc = blend->num_axis;
+    }
 
-      case mcvt_retain:
-        /* The cvt table is correct for this set of coordinates. */
-        break;
-      }
+    if ( face->doblend )
+    {
+      for ( i = 0; i < nc; i++ )
+        coords[i] = blend->normalizedcoords[i];
+    }
+    else
+    {
+      for ( i = 0; i < nc; i++ )
+        coords[i] = 0;
     }
 
-  Exit:
-    return error;
+    for ( ; i < num_coords; i++ )
+      coords[i] = 0;
+
+    return FT_Err_Ok;
   }
 
 
                      FT_UInt    num_coords,
                      FT_Fixed*  coords )
   {
-    FT_Error        error      = FT_Err_Ok;
-    FT_Fixed*       normalized = NULL;
-    GX_Blend        blend;
-    FT_MM_Var*      mmvar;
-    FT_UInt         i, j;
-    FT_Var_Axis*    a;
-    GX_AVarSegment  av;
-    FT_Memory       memory = face->root.memory;
+    FT_Error    error  = FT_Err_Ok;
+    GX_Blend    blend;
+    FT_MM_Var*  mmvar;
+    FT_UInt     i;
+    FT_Memory   memory = face->root.memory;
+
+    FT_Var_Axis*  a;
+    FT_Fixed*     c;
 
+    FT_Fixed*  normalized = NULL;
 
-    if ( face->blend == NULL )
+
+    if ( !face->blend )
     {
-      if ( ( error = TT_Get_MM_Var( face, NULL ) ) != 0 )
+      if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) )
         goto Exit;
     }
 
       num_coords = mmvar->num_axis;
     }
 
-    /* Axis normalization is a two stage process.  First we normalize */
-    /* based on the [min,def,max] values for the axis to be [-1,0,1]. */
-    /* Then, if there's an `avar' table, we renormalize this range.   */
+    if ( !blend->coords )
+    {
+      if ( FT_NEW_ARRAY( blend->coords, mmvar->num_axis ) )
+        goto Exit;
+    }
+
+    FT_MEM_COPY( blend->coords,
+                 coords,
+                 num_coords * sizeof ( FT_Fixed ) );
+
+    a = mmvar->axis + num_coords;
+    c = coords + num_coords;
+    for ( i = num_coords; i < mmvar->num_axis; i++, a++, c++ )
+      *c = a->def;
 
     if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) )
       goto Exit;
 
-    FT_TRACE5(( "design coordinates:\n" ));
+    if ( !face->blend->avar_loaded )
+      ft_var_load_avar( face );
 
-    a = mmvar->axis;
-    for ( i = 0; i < num_coords; i++, a++ )
-    {
-      FT_TRACE5(( "  %.4f\n", coords[i] / 65536.0 ));
-      if ( coords[i] > a->maximum || coords[i] < a->minimum )
-      {
-        FT_TRACE1(( "TT_Set_Var_Design: normalized design coordinate %.4f\n"
-                    "                   is out of range [%.4f;%.4f]\n",
-                    coords[i] / 65536.0,
-                    a->minimum / 65536.0,
-                    a->maximum / 65536.0 ));
-        error = FT_THROW( Invalid_Argument );
-        goto Exit;
-      }
+    ft_var_to_normalized( face, num_coords, coords, normalized );
 
-      if ( coords[i] < a->def )
-        normalized[i] = -FT_DivFix( coords[i] - a->def,
-                                    a->minimum - a->def );
-      else if ( a->maximum == a->def )
-        normalized[i] = 0;
-      else
-        normalized[i] = FT_DivFix( coords[i] - a->def,
-                                   a->maximum - a->def );
-    }
+    error = tt_set_mm_blend( face, mmvar->num_axis, normalized, 0 );
 
-    FT_TRACE5(( "\n" ));
+  Exit:
+    FT_FREE( normalized );
+    return error;
+  }
 
-    for ( ; i < mmvar->num_axis; i++ )
-      normalized[i] = 0;
 
-    if ( !blend->avar_checked )
-      ft_var_load_avar( face );
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    TT_Get_Var_Design                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the design coordinates of the currently selected interpolated  */
+  /*    font.                                                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face       :: A handle to the source face.                         */
+  /*                                                                       */
+  /*    num_coords :: The number of design coordinates to retrieve.  If it */
+  /*                  is larger than the number of axes, set the excess    */
+  /*                  values to~0.                                         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    coords     :: The design coordinates array.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  FT_LOCAL_DEF( FT_Error )
+  TT_Get_Var_Design( TT_Face    face,
+                     FT_UInt    num_coords,
+                     FT_Fixed*  coords )
+  {
+    FT_Error  error = FT_Err_Ok;
+    GX_Blend  blend;
+    FT_UInt   i, nc;
+
 
-    if ( blend->avar_segment != NULL )
+    if ( !face->blend )
     {
-      FT_TRACE5(( "normalized design coordinates"
-                  " before applying `avar' data:\n" ));
+      if ( FT_SET_ERROR( TT_Get_MM_Var( face, NULL ) ) )
+        return error;
+    }
 
-      av = blend->avar_segment;
-      for ( i = 0; i < mmvar->num_axis; i++, av++ )
-      {
-        for ( j = 1; j < (FT_UInt)av->pairCount; j++ )
-        {
-          FT_TRACE5(( "  %.4f\n", normalized[i] / 65536.0 ));
-          if ( normalized[i] < av->correspondence[j].fromCoord )
-          {
-            normalized[i] =
-              FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord,
-                         av->correspondence[j].toCoord -
-                           av->correspondence[j - 1].toCoord,
-                         av->correspondence[j].fromCoord -
-                           av->correspondence[j - 1].fromCoord ) +
-              av->correspondence[j - 1].toCoord;
-            break;
-          }
-        }
-      }
+    blend = face->blend;
+
+    nc = num_coords;
+    if ( num_coords > blend->num_axis )
+    {
+      FT_TRACE2(( "TT_Get_Var_Design:"
+                  " only using first %d of %d coordinates\n",
+                  blend->num_axis, num_coords ));
+      nc = blend->num_axis;
+    }
+
+    if ( face->doblend )
+    {
+      for ( i = 0; i < nc; i++ )
+        coords[i] = blend->coords[i];
+    }
+    else
+    {
+      for ( i = 0; i < nc; i++ )
+        coords[i] = 0;
     }
 
-    error = TT_Set_MM_Blend( face, mmvar->num_axis, normalized );
+    for ( ; i < num_coords; i++ )
+      coords[i] = 0;
 
-  Exit:
-    FT_FREE( normalized );
-    return error;
+    return FT_Err_Ok;
   }
 
 
 
     FT_TRACE2(( "CVAR " ));
 
-    if ( blend == NULL )
+    if ( !blend )
     {
       FT_TRACE2(( "\n"
                   "tt_face_vary_cvt: no blend specified\n" ));
       goto Exit;
     }
 
-    if ( face->cvt == NULL )
+    if ( !face->cvt )
     {
       FT_TRACE2(( "\n"
                   "tt_face_vary_cvt: no `cvt ' table\n" ));
     offsetToData = FT_GET_USHORT();
 
     /* rough sanity test */
-    if ( offsetToData + tupleCount * 4 > table_len )
+    if ( offsetToData + ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) * 4 >
+           table_len )
     {
       FT_TRACE2(( "tt_face_vary_cvt:"
                   " invalid CVT variation array header\n" ));
                                              table_len,
                                              point_count == 0 ? face->cvt_size
                                                               : point_count );
-      if ( localpoints == NULL || deltas == NULL )
+      if ( !localpoints || !deltas )
         ; /* failure, ignore it */
 
       else if ( localpoints == ALL_POINTS )
 
         for ( j = 0; j < point_count; j++ )
         {
-          int      pindex   = localpoints[j];
-          FT_Long  orig_cvt = face->cvt[pindex];
+          int      pindex;
+          FT_Long  orig_cvt;
 
 
+          pindex = localpoints[j];
+          if ( (FT_ULong)pindex >= face->cvt_size )
+            continue;
+
+          orig_cvt          = face->cvt[pindex];
           face->cvt[pindex] = (FT_Short)( orig_cvt +
                                           FT_MulFix( deltas[j], apply ) );
 
       d1   = out1 - in1;
       d2   = out2 - in2;
 
-      if ( out1 == out2 || in1 == in2 )
-      {
-        for ( p = p1; p <= p2; p++ )
-        {
-          out = in_points[p].x;
-
-          if ( out <= in1 )
-            out += d1;
-          else if ( out >= in2 )
-            out += d2;
-          else
-            out = out1;
-
-          out_points[p].x = out;
-        }
-      }
-      else
+      /* If the reference points have the same coordinate but different */
+      /* delta, inferred delta is zero.  Otherwise interpolate.         */
+      if ( in1 != in2 || out1 == out2 )
       {
-        FT_Fixed  scale = FT_DivFix( out2 - out1, in2 - in1 );
+        FT_Fixed  scale = in1 != in2 ? FT_DivFix( out2 - out1, in2 - in1 )
+                                     : 0;
 
 
         for ( p = p1; p <= p2; p++ )
   /* modeled after `Ins_IUP */
 
   static void
-  tt_handle_deltas( FT_Outline*  outline,
-                    FT_Vector*   in_points,
-                    FT_Bool*     has_delta )
+  tt_interpolate_deltas( FT_Outline*  outline,
+                         FT_Vector*   out_points,
+                         FT_Vector*   in_points,
+                         FT_Bool*     has_delta )
   {
-    FT_Vector*  out_points;
-
     FT_Int  first_point;
     FT_Int  end_point;
 
     if ( !outline->n_contours )
       return;
 
-    out_points = outline->points;
-
     contour = 0;
     point   = 0;
 
     GX_Blend    blend  = face->blend;
 
     FT_Vector*  points_org = NULL;
+    FT_Vector*  points_out = NULL;
     FT_Bool*    has_delta  = NULL;
 
     FT_Error    error;
     FT_Short    *deltas_x, *deltas_y;
 
 
-    if ( !face->doblend || blend == NULL )
+    if ( !face->doblend || !blend )
       return FT_THROW( Invalid_Argument );
 
     if ( glyph_index >= blend->gv_glyphcnt      ||
     }
 
     if ( FT_NEW_ARRAY( points_org, n_points ) ||
+         FT_NEW_ARRAY( points_out, n_points ) ||
          FT_NEW_ARRAY( has_delta, n_points )  )
       goto Fail1;
 
     offsetToData = FT_GET_USHORT();
 
     /* rough sanity test */
-    if ( offsetToData + tupleCount * 4 > blend->gvar_size )
+    if ( offsetToData + ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) * 4 >
+           blend->gvar_size )
     {
       FT_TRACE2(( "TT_Vary_Apply_Glyph_Deltas:"
                   " invalid glyph variation array header\n" ));
     FT_TRACE5(( "gvar: there are %d tuples:\n",
                 tupleCount & GX_TC_TUPLE_COUNT_MASK ));
 
+    for ( j = 0; j < n_points; j++ )
+      points_org[j] = outline->points[j];
+
     for ( i = 0; i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK ); i++ )
     {
       FT_UInt   tupleDataSize;
 
       here = FT_Stream_FTell( stream );
 
+      FT_Stream_SeekSet( stream, offsetToData );
+
       if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS )
       {
-        FT_Stream_SeekSet( stream, offsetToData );
-
         localpoints = ft_var_readpackedpoints( stream,
                                                blend->gvar_size,
                                                &point_count );
                                           point_count == 0 ? n_points
                                                            : point_count );
 
-      if ( points == NULL || deltas_y == NULL || deltas_x == NULL )
+      if ( !points || !deltas_y || !deltas_x )
         ; /* failure, ignore it */
 
       else if ( points == ALL_POINTS )
         /* this means that there are deltas for every point in the glyph */
         for ( j = 0; j < n_points; j++ )
         {
-#ifdef FT_DEBUG_LEVEL_TRACE
-          FT_Vector  point_org = outline->points[j];
-#endif
+          FT_Pos  delta_x = FT_MulFix( deltas_x[j], apply );
+          FT_Pos  delta_y = FT_MulFix( deltas_y[j], apply );
 
 
-          outline->points[j].x += FT_MulFix( deltas_x[j], apply );
-          outline->points[j].y += FT_MulFix( deltas_y[j], apply );
+          if ( j < n_points - 3 )
+          {
+            outline->points[j].x += delta_x;
+            outline->points[j].y += delta_y;
+          }
+          else
+          {
+            /* To avoid double adjustment of advance width or height, */
+            /* adjust phantom points only if there is no HVAR or VVAR */
+            /* support, respectively.                                 */
+            if ( j == ( n_points - 3 )          &&
+                 !( face->variation_support   &
+                    TT_FACE_FLAG_VAR_HADVANCE ) )
+              outline->points[j].x += delta_x;
+
+            else if ( j == ( n_points - 2 )        &&
+                      !( face->variation_support &
+                         TT_FACE_FLAG_VAR_LSB    ) )
+              outline->points[j].x += delta_x;
+
+            else if ( j == ( n_points - 1 )          &&
+                      !( face->variation_support   &
+                         TT_FACE_FLAG_VAR_VADVANCE ) )
+              outline->points[j].y += delta_y;
+
+            else if ( j == ( n_points - 0 )        &&
+                      !( face->variation_support &
+                         TT_FACE_FLAG_VAR_TSB    ) )
+              outline->points[j].y += delta_y;
+          }
 
 #ifdef FT_DEBUG_LEVEL_TRACE
-          if ( ( point_org.x != outline->points[j].x ) ||
-               ( point_org.y != outline->points[j].y ) )
+          if ( delta_x || delta_y )
           {
             FT_TRACE7(( "      %d: (%d, %d) -> (%d, %d)\n",
                         j,
-                        point_org.x,
-                        point_org.y,
+                        outline->points[j].x - delta_x,
+                        outline->points[j].y - delta_y,
                         outline->points[j].x,
                         outline->points[j].y ));
             count++;
 #endif
       }
 
-      else if ( localpoints == NULL )
-        ; /* failure, ignore it */
-
       else
       {
 #ifdef FT_DEBUG_LEVEL_TRACE
         /* IUP bytecode instruction                                 */
         for ( j = 0; j < n_points; j++ )
         {
-          points_org[j] = outline->points[j];
           has_delta[j]  = FALSE;
+          points_out[j] = points_org[j];
         }
 
         for ( j = 0; j < point_count; j++ )
         {
-          FT_UShort  idx = localpoints[j];
+          FT_UShort  idx = points[j];
 
 
           if ( idx >= n_points )
 
           has_delta[idx] = TRUE;
 
-          outline->points[idx].x += FT_MulFix( deltas_x[j], apply );
-          outline->points[idx].y += FT_MulFix( deltas_y[j], apply );
+          points_out[idx].x += FT_MulFix( deltas_x[j], apply );
+          points_out[idx].y += FT_MulFix( deltas_y[j], apply );
         }
 
         /* no need to handle phantom points here,      */
         /* since solitary points can't be interpolated */
-        tt_handle_deltas( outline,
-                          points_org,
-                          has_delta );
+        tt_interpolate_deltas( outline,
+                               points_out,
+                               points_org,
+                               has_delta );
 
-#ifdef FT_DEBUG_LEVEL_TRACE
         FT_TRACE7(( "    point deltas:\n" ));
 
-        for ( j = 0; j < n_points; j++)
+        for ( j = 0; j < n_points; j++ )
         {
-          if ( ( points_org[j].x != outline->points[j].x ) ||
-               ( points_org[j].y != outline->points[j].y ) )
+          FT_Pos  delta_x = points_out[j].x - points_org[j].x;
+          FT_Pos  delta_y = points_out[j].y - points_org[j].y;
+
+
+          outline->points[j].x += delta_x;
+          outline->points[j].y += delta_y;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+          if ( delta_x || delta_y )
           {
             FT_TRACE7(( "      %d: (%d, %d) -> (%d, %d)\n",
                         j,
-                        points_org[j].x,
-                        points_org[j].y,
+                        outline->points[j].x - delta_x,
+                        outline->points[j].y - delta_y,
                         outline->points[j].x,
                         outline->points[j].y ));
             count++;
           }
+#endif
         }
 
+#ifdef FT_DEBUG_LEVEL_TRACE
         if ( !count )
           FT_TRACE7(( "      none\n" ));
 #endif
 
   Fail1:
     FT_FREE( points_org );
+    FT_FREE( points_out );
     FT_FREE( has_delta );
 
     return error;
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
+  /*    tt_get_var_blend                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An extended internal version of `TT_Get_MM_Blend' that returns     */
+  /*    pointers instead of copying data, without any initialization of    */
+  /*    the MM machinery in case it isn't loaded yet.                      */
+  /*                                                                       */
+  FT_LOCAL_DEF( FT_Error )
+  tt_get_var_blend( TT_Face      face,
+                    FT_UInt     *num_coords,
+                    FT_Fixed*   *coords,
+                    FT_Fixed*   *normalizedcoords,
+                    FT_MM_Var*  *mm_var )
+  {
+    if ( face->blend )
+    {
+      if ( num_coords )
+        *num_coords       = face->blend->num_axis;
+      if ( coords )
+        *coords           = face->blend->coords;
+      if ( normalizedcoords )
+        *normalizedcoords = face->blend->normalizedcoords;
+      if ( mm_var )
+        *mm_var           = face->blend->mmvar;
+    }
+    else
+    {
+      if ( num_coords )
+        *num_coords = 0;
+      if ( coords )
+        *coords     = NULL;
+      if ( mm_var )
+        *mm_var     = NULL;
+    }
+
+    return FT_Err_Ok;
+  }
+
+
+  static void
+  ft_var_done_item_variation_store( TT_Face          face,
+                                    GX_ItemVarStore  itemStore )
+  {
+    FT_Memory  memory = FT_FACE_MEMORY( face );
+    FT_UInt    i;
+
+
+    if ( itemStore->varData )
+    {
+      for ( i = 0; i < itemStore->dataCount; i++ )
+      {
+        FT_FREE( itemStore->varData[i].regionIndices );
+        FT_FREE( itemStore->varData[i].deltaSet );
+      }
+
+      FT_FREE( itemStore->varData );
+    }
+
+    if ( itemStore->varRegionList )
+    {
+      for ( i = 0; i < itemStore->regionCount; i++ )
+        FT_FREE( itemStore->varRegionList[i].axisList );
+
+      FT_FREE( itemStore->varRegionList );
+    }
+  }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
   /*    tt_done_blend                                                      */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Free the blend internal data structure.                            */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  tt_done_blend( FT_Memory  memory,
-                 GX_Blend   blend )
+  tt_done_blend( TT_Face  face )
   {
-    if ( blend != NULL )
+    FT_Memory  memory = FT_FACE_MEMORY( face );
+    GX_Blend   blend  = face->blend;
+
+
+    if ( blend )
     {
-      FT_UInt  i;
+      FT_UInt  i, num_axes;
+
 
+      /* blend->num_axis might not be set up yet */
+      num_axes = blend->mmvar->num_axis;
 
+      FT_FREE( blend->coords );
       FT_FREE( blend->normalizedcoords );
+      FT_FREE( blend->normalized_stylecoords );
       FT_FREE( blend->mmvar );
 
-      if ( blend->avar_segment != NULL )
+      if ( blend->avar_segment )
       {
-        for ( i = 0; i < blend->num_axis; i++ )
+        for ( i = 0; i < num_axes; i++ )
           FT_FREE( blend->avar_segment[i].correspondence );
         FT_FREE( blend->avar_segment );
       }
 
+      if ( blend->hvar_table )
+      {
+        ft_var_done_item_variation_store( face,
+                                          &blend->hvar_table->itemStore );
+
+        FT_FREE( blend->hvar_table->widthMap.innerIndex );
+        FT_FREE( blend->hvar_table->widthMap.outerIndex );
+        FT_FREE( blend->hvar_table );
+      }
+
+      if ( blend->vvar_table )
+      {
+        ft_var_done_item_variation_store( face,
+                                          &blend->vvar_table->itemStore );
+
+        FT_FREE( blend->vvar_table->widthMap.innerIndex );
+        FT_FREE( blend->vvar_table->widthMap.outerIndex );
+        FT_FREE( blend->vvar_table );
+      }
+
+      if ( blend->mvar_table )
+      {
+        ft_var_done_item_variation_store( face,
+                                          &blend->mvar_table->itemStore );
+
+        FT_FREE( blend->mvar_table->values );
+        FT_FREE( blend->mvar_table );
+      }
+
       FT_FREE( blend->tuplecoords );
       FT_FREE( blend->glyphoffsets );
       FT_FREE( blend );
     }
   }
 
-#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+#else /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _tt_gxvar_dummy;
+
+#endif /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */
 
 
 /* END */
index aa8f6ea..7e81719 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType GX Font Variation loader (specification)                    */
 /*                                                                         */
-/*  Copyright 2004-2016 by                                                 */
+/*  Copyright 2004-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, Werner Lemberg and George Williams.      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -61,6 +61,152 @@ FT_BEGIN_HEADER
   } GX_AVarSegmentRec, *GX_AVarSegment;
 
 
+  typedef struct  GX_ItemVarDataRec_
+  {
+    FT_UInt    itemCount;      /* number of delta sets per item         */
+    FT_UInt    regionIdxCount; /* number of region indices in this data */
+    FT_UInt*   regionIndices;  /* array of `regionCount' indices;       */
+                               /* these index `varRegionList'           */
+    FT_Short*  deltaSet;       /* array of `itemCount' deltas           */
+                               /* use `innerIndex' for this array       */
+
+  } GX_ItemVarDataRec, *GX_ItemVarData;
+
+
+  /* contribution of one axis to a region */
+  typedef struct  GX_AxisCoordsRec_
+  {
+    FT_Fixed  startCoord;
+    FT_Fixed  peakCoord;      /* zero means no effect (factor = 1) */
+    FT_Fixed  endCoord;
+
+  } GX_AxisCoordsRec, *GX_AxisCoords;
+
+
+  typedef struct  GX_VarRegionRec_
+  {
+    GX_AxisCoords  axisList;               /* array of axisCount records */
+
+  } GX_VarRegionRec, *GX_VarRegion;
+
+
+  /* item variation store */
+  typedef struct  GX_ItemVarStoreRec_
+  {
+    FT_UInt         dataCount;
+    GX_ItemVarData  varData;            /* array of dataCount records;     */
+                                        /* use `outerIndex' for this array */
+    FT_UShort     axisCount;
+    FT_UInt       regionCount;          /* total number of regions defined */
+    GX_VarRegion  varRegionList;
+
+  } GX_ItemVarStoreRec, *GX_ItemVarStore;
+
+
+  typedef struct  GX_DeltaSetIdxMapRec_
+  {
+    FT_UInt   mapCount;
+    FT_UInt*  outerIndex;             /* indices to item var data */
+    FT_UInt*  innerIndex;             /* indices to delta set     */
+
+  } GX_DeltaSetIdxMapRec, *GX_DeltaSetIdxMap;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    GX_HVVarTableRec                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Data from either the `HVAR' or `VVAR' table.                       */
+  /*                                                                       */
+  typedef struct  GX_HVVarTableRec_
+  {
+    GX_ItemVarStoreRec    itemStore;        /* Item Variation Store  */
+    GX_DeltaSetIdxMapRec  widthMap;         /* Advance Width Mapping */
+
+#if 0
+    GX_DeltaSetIdxMapRec  lsbMap;           /* not implemented */
+    GX_DeltaSetIdxMapRec  rsbMap;           /* not implemented */
+
+    GX_DeltaSetIdxMapRec  tsbMap;           /* not implemented */
+    GX_DeltaSetIdxMapRec  bsbMap;           /* not implemented */
+    GX_DeltaSetIdxMapRec  vorgMap;          /* not implemented */
+#endif
+
+  } GX_HVVarTableRec, *GX_HVVarTable;
+
+
+#define MVAR_TAG_GASP_0  FT_MAKE_TAG( 'g', 's', 'p', '0' )
+#define MVAR_TAG_GASP_1  FT_MAKE_TAG( 'g', 's', 'p', '1' )
+#define MVAR_TAG_GASP_2  FT_MAKE_TAG( 'g', 's', 'p', '2' )
+#define MVAR_TAG_GASP_3  FT_MAKE_TAG( 'g', 's', 'p', '3' )
+#define MVAR_TAG_GASP_4  FT_MAKE_TAG( 'g', 's', 'p', '4' )
+#define MVAR_TAG_GASP_5  FT_MAKE_TAG( 'g', 's', 'p', '5' )
+#define MVAR_TAG_GASP_6  FT_MAKE_TAG( 'g', 's', 'p', '6' )
+#define MVAR_TAG_GASP_7  FT_MAKE_TAG( 'g', 's', 'p', '7' )
+#define MVAR_TAG_GASP_8  FT_MAKE_TAG( 'g', 's', 'p', '8' )
+#define MVAR_TAG_GASP_9  FT_MAKE_TAG( 'g', 's', 'p', '9' )
+
+#define MVAR_TAG_CPHT  FT_MAKE_TAG( 'c', 'p', 'h', 't' )
+#define MVAR_TAG_HASC  FT_MAKE_TAG( 'h', 'a', 's', 'c' )
+#define MVAR_TAG_HCLA  FT_MAKE_TAG( 'h', 'c', 'l', 'a' )
+#define MVAR_TAG_HCLD  FT_MAKE_TAG( 'h', 'c', 'l', 'd' )
+#define MVAR_TAG_HCOF  FT_MAKE_TAG( 'h', 'c', 'o', 'f' )
+#define MVAR_TAG_HCRN  FT_MAKE_TAG( 'h', 'c', 'r', 'n' )
+#define MVAR_TAG_HCRS  FT_MAKE_TAG( 'h', 'c', 'r', 's' )
+#define MVAR_TAG_HDSC  FT_MAKE_TAG( 'h', 'd', 's', 'c' )
+#define MVAR_TAG_HLGP  FT_MAKE_TAG( 'h', 'l', 'g', 'p' )
+#define MVAR_TAG_SBXO  FT_MAKE_TAG( 's', 'b', 'x', 'o' )
+#define MVAR_TAG_SBXS  FT_MAKE_TAG( 's', 'b', 'x', 's' )
+#define MVAR_TAG_SBYO  FT_MAKE_TAG( 's', 'b', 'y', 'o' )
+#define MVAR_TAG_SBYS  FT_MAKE_TAG( 's', 'b', 'y', 's' )
+#define MVAR_TAG_SPXO  FT_MAKE_TAG( 's', 'p', 'x', 'o' )
+#define MVAR_TAG_SPXS  FT_MAKE_TAG( 's', 'p', 'x', 's' )
+#define MVAR_TAG_SPYO  FT_MAKE_TAG( 's', 'p', 'y', 'o' )
+#define MVAR_TAG_SPYS  FT_MAKE_TAG( 's', 'p', 'y', 's' )
+#define MVAR_TAG_STRO  FT_MAKE_TAG( 's', 't', 'r', 'o' )
+#define MVAR_TAG_STRS  FT_MAKE_TAG( 's', 't', 'r', 's' )
+#define MVAR_TAG_UNDO  FT_MAKE_TAG( 'u', 'n', 'd', 'o' )
+#define MVAR_TAG_UNDS  FT_MAKE_TAG( 'u', 'n', 'd', 's' )
+#define MVAR_TAG_VASC  FT_MAKE_TAG( 'v', 'a', 's', 'c' )
+#define MVAR_TAG_VCOF  FT_MAKE_TAG( 'v', 'c', 'o', 'f' )
+#define MVAR_TAG_VCRN  FT_MAKE_TAG( 'v', 'c', 'r', 'n' )
+#define MVAR_TAG_VCRS  FT_MAKE_TAG( 'v', 'c', 'r', 's' )
+#define MVAR_TAG_VDSC  FT_MAKE_TAG( 'v', 'd', 's', 'c' )
+#define MVAR_TAG_VLGP  FT_MAKE_TAG( 'v', 'l', 'g', 'p' )
+#define MVAR_TAG_XHGT  FT_MAKE_TAG( 'x', 'h', 'g', 't' )
+
+
+  typedef struct  GX_ValueRec_
+  {
+    FT_ULong   tag;
+    FT_UShort  outerIndex;
+    FT_UShort  innerIndex;
+
+    FT_Short  unmodified;  /* values are either FT_Short or FT_UShort */
+
+  } GX_ValueRec, *GX_Value;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    GX_MVarTableRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Data from the `MVAR' table.                                        */
+  /*                                                                       */
+  typedef struct  GX_MVarTableRec_
+  {
+    FT_UShort  valueCount;
+
+    GX_ItemVarStoreRec  itemStore;        /* Item Variation Store  */
+    GX_Value            values;           /* Value Records         */
+
+  } GX_MVarTableRec, *GX_MVarTable;
+
+
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
@@ -68,32 +214,120 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* <Description>                                                         */
   /*    Data for interpolating a font from a distortable font specified    */
-  /*    by the GX *var tables ([fgca]var).                                 */
+  /*    by the GX *var tables ([fgcahvm]var).                              */
   /*                                                                       */
   /* <Fields>                                                              */
-  /*    num_axis         :: The number of axes along which interpolation   */
-  /*                         may happen                                    */
+  /*    num_axis ::                                                        */
+  /*      The number of axes along which interpolation may happen.         */
+  /*                                                                       */
+  /*    coords ::                                                          */
+  /*      An array of design coordinates (in user space) indicating the    */
+  /*      contribution along each axis to the final interpolated font.     */
+  /*      `normalizedcoords' holds the same values.                        */
+  /*                                                                       */
+  /*    normalizedcoords ::                                                */
+  /*      An array of normalized values (between [-1,1]) indicating the    */
+  /*      contribution along each axis to the final interpolated font.     */
+  /*      `coords' holds the same values.                                  */
+  /*                                                                       */
+  /*    mmvar ::                                                           */
+  /*      Data from the `fvar' table.                                      */
+  /*                                                                       */
+  /*    mmvar_len ::                                                       */
+  /*      The length of the `mmvar' structure.                             */
+  /*                                                                       */
+  /*    normalized_stylecoords ::                                          */
+  /*      A two-dimensional array that holds the named instance data from  */
+  /*      `mmvar' as normalized values.                                    */
+  /*                                                                       */
+  /*    avar_loaded ::                                                     */
+  /*      A Boolean; if set, FreeType tried to load (and parse) the `avar' */
+  /*      table.                                                           */
+  /*                                                                       */
+  /*    avar_segment ::                                                    */
+  /*      Data from the `avar' table.                                      */
+  /*                                                                       */
+  /*    hvar_loaded ::                                                     */
+  /*      A Boolean; if set, FreeType tried to load (and parse) the `hvar' */
+  /*      table.                                                           */
+  /*                                                                       */
+  /*    hvar_checked ::                                                    */
+  /*      A Boolean; if set, FreeType successfully loaded and parsed the   */
+  /*      `hvar' table.                                                    */
+  /*                                                                       */
+  /*    hvar_error ::                                                      */
+  /*      If loading and parsing of the `hvar' table failed, this field    */
+  /*      holds the corresponding error code.                              */
+  /*                                                                       */
+  /*    hvar_table ::                                                      */
+  /*      Data from the `hvar' table.                                      */
+  /*                                                                       */
+  /*    vvar_loaded ::                                                     */
+  /*      A Boolean; if set, FreeType tried to load (and parse) the `vvar' */
+  /*      table.                                                           */
+  /*                                                                       */
+  /*    vvar_checked ::                                                    */
+  /*      A Boolean; if set, FreeType successfully loaded and parsed the   */
+  /*      `vvar' table.                                                    */
+  /*                                                                       */
+  /*    vvar_error ::                                                      */
+  /*      If loading and parsing of the `vvar' table failed, this field    */
+  /*      holds the corresponding error code.                              */
+  /*                                                                       */
+  /*    vvar_table ::                                                      */
+  /*      Data from the `vvar' table.                                      */
+  /*                                                                       */
+  /*    mvar_table ::                                                      */
+  /*      Data from the `mvar' table.                                      */
+  /*                                                                       */
+  /*    tuplecount ::                                                      */
+  /*      The number of shared tuples in the `gvar' table.                 */
+  /*                                                                       */
+  /*    tuplecoords ::                                                     */
+  /*      A two-dimensional array that holds the shared tuple coordinates  */
+  /*      in the `gvar' table.                                             */
   /*                                                                       */
-  /*    normalizedcoords :: A normalized value (between [-1,1]) indicating */
-  /*                        the contribution along each axis to the final  */
-  /*                        interpolated font.                             */
+  /*    gv_glyphcnt ::                                                     */
+  /*      The number of glyphs handled in the `gvar' table.                */
+  /*                                                                       */
+  /*    glyphoffsets ::                                                    */
+  /*      Offsets into the glyph variation data array.                     */
+  /*                                                                       */
+  /*    gvar_size ::                                                       */
+  /*      The size of the `gvar' table.                                    */
   /*                                                                       */
   typedef struct  GX_BlendRec_
   {
     FT_UInt         num_axis;
+    FT_Fixed*       coords;
     FT_Fixed*       normalizedcoords;
 
     FT_MM_Var*      mmvar;
     FT_Offset       mmvar_len;
 
-    FT_Bool         avar_checked;
-    GX_AVarSegment  avar_segment;
+    FT_Fixed*       normalized_stylecoords;
+                      /* normalized_stylecoords[num_namedstyles][num_axis] */
+
+    FT_Bool         avar_loaded;
+    GX_AVarSegment  avar_segment;                /* avar_segment[num_axis] */
+
+    FT_Bool         hvar_loaded;
+    FT_Bool         hvar_checked;
+    FT_Error        hvar_error;
+    GX_HVVarTable   hvar_table;
+
+    FT_Bool         vvar_loaded;
+    FT_Bool         vvar_checked;
+    FT_Error        vvar_error;
+    GX_HVVarTable   vvar_table;
 
-    FT_UInt         tuplecount;      /* shared tuples in `gvar'           */
-    FT_Fixed*       tuplecoords;     /* tuplecoords[tuplecount][num_axis] */
+    GX_MVarTable    mvar_table;
+
+    FT_UInt         tuplecount;
+    FT_Fixed*       tuplecoords;      /* tuplecoords[tuplecount][num_axis] */
 
     FT_UInt         gv_glyphcnt;
-    FT_ULong*       glyphoffsets;
+    FT_ULong*       glyphoffsets;         /* glyphoffsets[gv_glyphcnt + 1] */
 
     FT_ULong        gvar_size;
 
@@ -149,6 +383,11 @@ FT_BEGIN_HEADER
                    FT_Fixed*  coords );
 
   FT_LOCAL( FT_Error )
+  TT_Get_MM_Blend( TT_Face    face,
+                   FT_UInt    num_coords,
+                   FT_Fixed*  coords );
+
+  FT_LOCAL( FT_Error )
   TT_Set_Var_Design( TT_Face    face,
                      FT_UInt    num_coords,
                      FT_Fixed*  coords );
@@ -157,6 +396,10 @@ FT_BEGIN_HEADER
   TT_Get_MM_Var( TT_Face      face,
                  FT_MM_Var*  *master );
 
+  FT_LOCAL( FT_Error )
+  TT_Get_Var_Design( TT_Face    face,
+                     FT_UInt    num_coords,
+                     FT_Fixed*  coords );
 
   FT_LOCAL( FT_Error )
   tt_face_vary_cvt( TT_Face    face,
@@ -169,10 +412,28 @@ FT_BEGIN_HEADER
                               FT_Outline*  outline,
                               FT_UInt      n_points );
 
+  FT_LOCAL( FT_Error )
+  tt_hadvance_adjust( TT_Face  face,
+                      FT_UInt  gindex,
+                      FT_Int  *adelta );
+
+  FT_LOCAL( FT_Error )
+  tt_vadvance_adjust( TT_Face  face,
+                      FT_UInt  gindex,
+                      FT_Int  *adelta );
+
+  FT_LOCAL( void )
+  tt_apply_mvar( TT_Face  face );
+
+  FT_LOCAL( FT_Error )
+  tt_get_var_blend( TT_Face      face,
+                    FT_UInt     *num_coords,
+                    FT_Fixed*   *coords,
+                    FT_Fixed*   *normalizedcoords,
+                    FT_MM_Var*  *mm_var );
 
   FT_LOCAL( void )
-  tt_done_blend( FT_Memory  memory,
-                 GX_Blend   blend );
+  tt_done_blend( TT_Face  face );
 
 
 FT_END_HEADER
index 8fe83c5..af31408 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType bytecode interpreter (body).                                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 #include FT_TRIGONOMETRY_H
 #include FT_SYSTEM_H
 #include FT_TRUETYPE_DRIVER_H
+#include FT_MULTIPLE_MASTERS_H
 
 #include "ttinterp.h"
 #include "tterrors.h"
 #include "ttsubpix.h"
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include "ttgxvar.h"
+#endif
 
 
 #ifdef TT_USE_BYTECODE_INTERPRETER
 
     coderange = &exec->codeRangeTable[range - 1];
 
-    FT_ASSERT( coderange->base != NULL );
+    FT_ASSERT( coderange->base );
 
     /* NOTE: Because the last instruction of a program may be a CALL */
     /*       which will return to the first byte *after* the code    */
       exec->maxIDefs   = size->max_instruction_defs;
       exec->FDefs      = size->function_defs;
       exec->IDefs      = size->instruction_defs;
+      exec->pointSize  = size->point_size;
       exec->tt_metrics = size->ttmetrics;
-      exec->metrics    = size->metrics;
+      exec->metrics    = *size->metrics;
 
       exec->maxFunc    = size->max_func;
       exec->maxIns     = size->max_ins;
 
       /* In case of multi-threading it can happen that the old size object */
       /* no longer exists, thus we must clear all glyph zone references.   */
-      ft_memset( &exec->zp0, 0, sizeof ( exec->zp0 ) );
+      FT_ZERO( &exec->zp0 );
       exec->zp1 = exec->zp0;
       exec->zp2 = exec->zp0;
     }
 
     /*  IUP[0]    */  PACK( 0, 0 ),
     /*  IUP[1]    */  PACK( 0, 0 ),
-    /*  SHP[0]    */  PACK( 0, 0 ),
-    /*  SHP[1]    */  PACK( 0, 0 ),
+    /*  SHP[0]    */  PACK( 0, 0 ), /* loops */
+    /*  SHP[1]    */  PACK( 0, 0 ), /* loops */
     /*  SHC[0]    */  PACK( 1, 0 ),
     /*  SHC[1]    */  PACK( 1, 0 ),
     /*  SHZ[0]    */  PACK( 1, 0 ),
     /*  SHZ[1]    */  PACK( 1, 0 ),
-    /*  SHPIX     */  PACK( 1, 0 ),
-    /*  IP        */  PACK( 0, 0 ),
+    /*  SHPIX     */  PACK( 1, 0 ), /* loops */
+    /*  IP        */  PACK( 0, 0 ), /* loops */
     /*  MSIRP[0]  */  PACK( 2, 0 ),
     /*  MSIRP[1]  */  PACK( 2, 0 ),
-    /*  AlignRP   */  PACK( 0, 0 ),
+    /*  AlignRP   */  PACK( 0, 0 ), /* loops */
     /*  RTDG      */  PACK( 0, 0 ),
     /*  MIAP[0]   */  PACK( 2, 0 ),
     /*  MIAP[1]   */  PACK( 2, 0 ),
     /*  SANGW     */  PACK( 1, 0 ),
     /*  AA        */  PACK( 1, 0 ),
 
-    /*  FlipPT    */  PACK( 0, 0 ),
+    /*  FlipPT    */  PACK( 0, 0 ), /* loops */
     /*  FlipRgON  */  PACK( 2, 0 ),
     /*  FlipRgOFF */  PACK( 2, 0 ),
     /*  INS_$83   */  PACK( 0, 0 ),
     /*  INS_$8F   */  PACK( 0, 0 ),
 
     /*  INS_$90  */   PACK( 0, 0 ),
-    /*  INS_$91  */   PACK( 0, 0 ),
-    /*  INS_$92  */   PACK( 0, 0 ),
+    /*  GETVAR   */   PACK( 0, 0 ), /* will be handled specially */
+    /*  GETDATA  */   PACK( 0, 1 ),
     /*  INS_$93  */   PACK( 0, 0 ),
     /*  INS_$94  */   PACK( 0, 0 ),
     /*  INS_$95  */   PACK( 0, 0 ),
     "7 INS_$8F",
 
     "7 INS_$90",
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    "6 GETVAR",
+    "7 GETDATA",
+#else
     "7 INS_$91",
     "7 INS_$92",
+#endif
     "7 INS_$93",
     "7 INS_$94",
     "7 INS_$95",
 
     range = &exc->codeRangeTable[aRange - 1];
 
-    if ( range->base == NULL )     /* invalid coderange */
+    if ( !range->base )     /* invalid coderange */
     {
       exc->error = FT_THROW( Invalid_CodeRange );
       return FAILURE;
   /*    zone     :: The affected glyph zone.                               */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    See `ttinterp.h' for details on backwards compatibility mode.      */
+  /*    See `ttinterp.h' for details on backward compatibility mode.       */
   /*    `Touches' the point.                                               */
   /*                                                                       */
   static void
       /* Exception to the post-IUP curfew: Allow the x component of */
       /* diagonal moves, but only post-IUP.  DejaVu tries to adjust */
       /* diagonal stems like on `Z' and `z' post-IUP.               */
-      if ( SUBPIXEL_HINTING_MINIMAL && !exc->backwards_compatibility )
+      if ( SUBPIXEL_HINTING_MINIMAL && !exc->backward_compatibility )
         zone->cur[point].x += FT_MulDiv( distance, v, exc->F_dot_P );
       else
 #endif
     if ( v != 0 )
     {
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-      if ( !( SUBPIXEL_HINTING_MINIMAL     &&
-              exc->backwards_compatibility &&
-              exc->iupx_called             &&
-              exc->iupy_called             ) )
+      if ( !( SUBPIXEL_HINTING_MINIMAL    &&
+              exc->backward_compatibility &&
+              exc->iupx_called            &&
+              exc->iupy_called            ) )
 #endif
         zone->cur[point].y += FT_MulDiv( distance, v, exc->F_dot_P );
 
   /*                                                                       */
   /*   The following versions are used whenever both vectors are both      */
   /*   along one of the coordinate unit vectors, i.e. in 90% of the cases. */
-  /*   See `ttinterp.h' for details on backwards compatibility mode.       */
+  /*   See `ttinterp.h' for details on backward compatibility mode.        */
   /*                                                                       */
   /*************************************************************************/
 
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    if ( SUBPIXEL_HINTING_MINIMAL && !exc->backwards_compatibility )
+    if ( SUBPIXEL_HINTING_MINIMAL && !exc->backward_compatibility )
       zone->cur[point].x += distance;
     else
 #endif
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
     if ( !( SUBPIXEL_HINTING_MINIMAL             &&
-            exc->backwards_compatibility         &&
+            exc->backward_compatibility          &&
             exc->iupx_called && exc->iupy_called ) )
 #endif
       zone->cur[point].y += distance;
   Ins_MPS( TT_ExecContext  exc,
            FT_Long*        args )
   {
-    /* Note: The point size should be irrelevant in a given font program; */
-    /*       we thus decide to return only the PPEM value.                */
-#if 0
-    args[0] = exc->metrics.pointSize;
-#else
-    args[0] = exc->func_cur_ppem( exc );
-#endif
+    if ( NO_SUBPIXEL_HINTING )
+    {
+      /* Microsoft's GDI bytecode interpreter always returns value 12; */
+      /* we return the current PPEM value instead.                     */
+      args[0] = exc->func_cur_ppem( exc );
+    }
+    else
+    {
+      /* A possible practical application of the MPS instruction is to   */
+      /* implement optical scaling and similar features, which should be */
+      /* based on perceptual attributes, thus independent of the         */
+      /* resolution.                                                     */
+      args[0] = exc->pointSize;
+    }
   }
 
 
   /*                                                                       */
   /* NEG[]:        NEGate                                                  */
   /* Opcode range: 0x65                                                    */
-  /* Stack: f26.6 --> f26.6                                                */
+  /* Stack:        f26.6 --> f26.6                                         */
   /*                                                                       */
   static void
   Ins_NEG( FT_Long*  args )
   /*************************************************************************/
   /*                                                                       */
   /* MAX[]:        MAXimum                                                 */
-  /* Opcode range: 0x68                                                    */
+  /* Opcode range: 0x8B                                                    */
   /* Stack:        int32? int32? --> int32                                 */
   /*                                                                       */
   static void
   /*************************************************************************/
   /*                                                                       */
   /* MIN[]:        MINimum                                                 */
-  /* Opcode range: 0x69                                                    */
+  /* Opcode range: 0x8C                                                    */
   /* Stack:        int32? int32? --> int32                                 */
   /*                                                                       */
   static void
             FT_Long*        args )
   {
     if ( args[0] == 0 && exc->args == 0 )
+    {
       exc->error = FT_THROW( Bad_Argument );
+      return;
+    }
+
     exc->IP += args[0];
     if ( exc->IP < 0                                             ||
          ( exc->callTop > 0                                    &&
            exc->IP > exc->callStack[exc->callTop - 1].Def->end ) )
+    {
       exc->error = FT_THROW( Bad_Argument );
+      return;
+    }
+
     exc->step_ins = FALSE;
+
+    if ( args[0] < 0 )
+    {
+      if ( ++exc->neg_jump_counter > exc->neg_jump_counter_max )
+        exc->error = FT_THROW( Execution_Too_Long );
+    }
   }
 
 
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
 
 
+    /* FDEF is only allowed in `prep' or `fpgm' */
+    if ( exc->curRange == tt_coderange_glyph )
+    {
+      exc->error = FT_THROW( DEF_In_Glyf_Bytecode );
+      return;
+    }
+
     /* some font programs are broken enough to redefine functions! */
     /* We will then parse the current table.                       */
 
       Ins_Goto_CodeRange( exc, def->range, def->start );
 
       exc->step_ins = FALSE;
+
+      exc->loopcall_counter += (FT_ULong)args[0];
+      if ( exc->loopcall_counter > exc->loopcall_counter_max )
+        exc->error = FT_THROW( Execution_Too_Long );
     }
 
     return;
     TT_DefRecord*  limit;
 
 
+    /* we enable IDEF only in `prep' or `fpgm' */
+    if ( exc->curRange == tt_coderange_glyph )
+    {
+      exc->error = FT_THROW( DEF_In_Glyf_Bytecode );
+      return;
+    }
+
     /*  First of all, look for the same function in our table */
 
     def   = exc->IDefs;
         exc->error = FT_THROW( Nested_DEFS );
         return;
       case 0x2D:   /* ENDF */
+        def->end = exc->IP;
         return;
       }
     }
   /*                                                                       */
   /* FLIPOFF[]:    Set auto-FLIP to OFF                                    */
   /* Opcode range: 0x4E                                                    */
-  /* Stack: -->                                                            */
+  /* Stack:        -->                                                     */
   /*                                                                       */
   static void
   Ins_FLIPOFF( TT_ExecContext  exc )
 #endif
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-      /* Native ClearType fonts sign a waiver that turns off all backwards */
+      /* Native ClearType fonts sign a waiver that turns off all backward  */
       /* compatibility hacks and lets them program points to the grid like */
       /* it's 1996.  They might sign a waiver for just one glyph, though.  */
       if ( SUBPIXEL_HINTING_MINIMAL )
-        exc->backwards_compatibility = !FT_BOOL( L == 4 );
+        exc->backward_compatibility = !FT_BOOL( L == 4 );
 #endif
     }
   }
   /*                                                                       */
   /* SCANTYPE[]:   SCAN TYPE                                               */
   /* Opcode range: 0x8D                                                    */
-  /* Stack:        uint32? -->                                             */
+  /* Stack:        uint16 -->                                              */
   /*                                                                       */
   static void
   Ins_SCANTYPE( TT_ExecContext  exc,
                 FT_Long*        args )
   {
     if ( args[0] >= 0 )
-      exc->GS.scan_type = (FT_Int)args[0];
+      exc->GS.scan_type = (FT_Int)args[0] & 0xFFFF;
   }
 
 
 
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    /* See `ttinterp.h' for details on backwards compatibility mode. */
-    if ( SUBPIXEL_HINTING_MINIMAL     &&
-         exc->backwards_compatibility &&
-         exc->iupx_called             &&
-         exc->iupy_called             )
+    /* See `ttinterp.h' for details on backward compatibility mode. */
+    if ( SUBPIXEL_HINTING_MINIMAL    &&
+         exc->backward_compatibility &&
+         exc->iupx_called            &&
+         exc->iupy_called            )
       goto Fail;
 #endif
 
 
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    /* See `ttinterp.h' for details on backwards compatibility mode. */
-    if ( SUBPIXEL_HINTING_MINIMAL     &&
-         exc->backwards_compatibility &&
-         exc->iupx_called             &&
-         exc->iupy_called             )
+    /* See `ttinterp.h' for details on backward compatibility mode. */
+    if ( SUBPIXEL_HINTING_MINIMAL    &&
+         exc->backward_compatibility &&
+         exc->iupx_called            &&
+         exc->iupy_called            )
       return;
 #endif
 
 
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    /* See `ttinterp.h' for details on backwards compatibility mode. */
-    if ( SUBPIXEL_HINTING_MINIMAL     &&
-         exc->backwards_compatibility &&
-         exc->iupx_called             &&
-         exc->iupy_called             )
+    /* See `ttinterp.h' for details on backward compatibility mode. */
+    if ( SUBPIXEL_HINTING_MINIMAL    &&
+         exc->backward_compatibility &&
+         exc->iupx_called            &&
+         exc->iupy_called            )
       return;
 #endif
 
   }
 
 
-  /* See `ttinterp.h' for details on backwards compatibility mode. */
+  /* See `ttinterp.h' for details on backward compatibility mode. */
   static void
   Move_Zp2_Point( TT_ExecContext  exc,
                   FT_UShort       point,
     if ( exc->GS.freeVector.x != 0 )
     {
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-      if ( !( SUBPIXEL_HINTING_MINIMAL     &&
-              exc->backwards_compatibility ) )
+      if ( !( SUBPIXEL_HINTING_MINIMAL    &&
+              exc->backward_compatibility ) )
 #endif
         exc->zp2.cur[point].x += dx;
 
     if ( exc->GS.freeVector.y != 0 )
     {
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-      if ( !( SUBPIXEL_HINTING_MINIMAL     &&
-              exc->backwards_compatibility &&
-              exc->iupx_called             &&
-              exc->iupy_called             ) )
+      if ( !( SUBPIXEL_HINTING_MINIMAL    &&
+              exc->backward_compatibility &&
+              exc->iupx_called            &&
+              exc->iupy_called            ) )
 #endif
         exc->zp2.cur[point].y += dy;
 
     FT_Int      B1, B2;
 #endif
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    FT_Bool     in_twilight = exc->GS.gep0 == 0 || \
-                              exc->GS.gep1 == 0 || \
-                              exc->GS.gep2 == 0;
+    FT_Bool     in_twilight = FT_BOOL( exc->GS.gep0 == 0 ||
+                                       exc->GS.gep1 == 0 ||
+                                       exc->GS.gep2 == 0 );
 #endif
 
 
       else
 #endif
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-      if ( SUBPIXEL_HINTING_MINIMAL     &&
-           exc->backwards_compatibility )
+      if ( SUBPIXEL_HINTING_MINIMAL    &&
+           exc->backward_compatibility )
       {
         /* Special case: allow SHPIX to move points in the twilight zone.  */
         /* Otherwise, treat SHPIX the same as DELTAP.  Unbreaks various    */
         /* fonts such as older versions of Rokkitt and DTL Argo T Light    */
-        /* that would glitch severly after calling ALIGNRP after a blocked */
-        /* SHPIX.                                                          */
+        /* that would glitch severely after calling ALIGNRP after a        */
+        /* blocked SHPIX.                                                  */
         if ( in_twilight                                                ||
              ( !( exc->iupx_called && exc->iupy_called )              &&
                ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) ||
          exc->GS.freeVector.x != 0                          &&
          !( exc->sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) )
       control_value_cutin = minimum_distance = 0;
-    else
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
 
     /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */
       R.x = FT_MulDiv( val, dax, discriminant );
       R.y = FT_MulDiv( val, day, discriminant );
 
-      /* XXX: Block in backwards_compatibility and/or post-IUP? */
+      /* XXX: Block in backward_compatibility and/or post-IUP? */
       exc->zp2.cur[point].x = exc->zp1.cur[a0].x + R.x;
       exc->zp2.cur[point].y = exc->zp1.cur[a0].y + R.y;
     }
     {
       /* else, take the middle of the middles of A and B */
 
-      /* XXX: Block in backwards_compatibility and/or post-IUP? */
+      /* XXX: Block in backward_compatibility and/or post-IUP? */
       exc->zp2.cur[point].x = ( exc->zp1.cur[a0].x +
                                 exc->zp1.cur[a1].x +
                                 exc->zp0.cur[b0].x +
      * Otherwise, by definition, the value of exc->twilight.orus[n] is (0,0),
      * for every n.
      */
-    twilight = exc->GS.gep0 == 0 || exc->GS.gep1 == 0 || exc->GS.gep2 == 0;
+    twilight = ( exc->GS.gep0 == 0 ||
+                 exc->GS.gep1 == 0 ||
+                 exc->GS.gep2 == 0 );
 
     if ( BOUNDS( exc->GS.rp1, exc->zp0.n_points ) )
     {
       cur_range = PROJECT( &exc->zp1.cur[exc->GS.rp2], cur_base );
     }
 
-    for ( ; exc->GS.loop > 0; --exc->GS.loop )
+    for ( ; exc->GS.loop > 0; exc->GS.loop-- )
     {
       FT_UInt     point = (FT_UInt)exc->stack[--exc->args];
       FT_F26Dot6  org_dist, cur_dist, new_dist;
 
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    /* See `ttinterp.h' for details on backwards compatibility mode. */
+    /* See `ttinterp.h' for details on backward compatibility mode.  */
     /* Allow IUP until it has been called on both axes.  Immediately */
     /* return on subsequent ones.                                    */
-    if ( SUBPIXEL_HINTING_MINIMAL     &&
-         exc->backwards_compatibility )
+    if ( SUBPIXEL_HINTING_MINIMAL    &&
+         exc->backward_compatibility )
     {
       if ( exc->iupx_called && exc->iupy_called )
         return;
           {
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-            /* See `ttinterp.h' for details on backwards compatibility */
-            /* mode.                                                   */
-            if ( SUBPIXEL_HINTING_MINIMAL     &&
-                 exc->backwards_compatibility )
+            /* See `ttinterp.h' for details on backward compatibility */
+            /* mode.                                                  */
+            if ( SUBPIXEL_HINTING_MINIMAL    &&
+                 exc->backward_compatibility )
             {
               if ( !( exc->iupx_called && exc->iupy_called )              &&
                    ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) ||
     {
       if ( exc->ignore_x_mode )
       {
-        /* if in ClearType backwards compatibility mode,        */
+        /* if in ClearType backward compatibility mode,         */
         /* we sometimes change the TrueType version dynamically */
         K = exc->rasterizer_version;
         FT_TRACE6(( "Setting rasterizer version %d\n",
     /* Return Bit(s): 8             */
     /*                              */
     if ( ( args[0] & 2 ) != 0 && exc->tt_metrics.rotated )
-      K |= 0x80;
+      K |= 1 << 8;
 
     /********************************/
     /* GLYPH STRETCHED              */
     /* Return Bit(s): 9             */
     /*                              */
     if ( ( args[0] & 4 ) != 0 && exc->tt_metrics.stretched )
-      K |= 1 << 8;
+      K |= 1 << 9;
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    /********************************/
+    /* VARIATION GLYPH              */
+    /* Selector Bit:  3             */
+    /* Return Bit(s): 10            */
+    /*                              */
+    /* XXX: UNDOCUMENTED!           */
+    if ( (args[0] & 8 ) != 0 && exc->face->blend )
+      K |= 1 << 10;
+#endif
 
     /********************************/
     /* BI-LEVEL HINTING AND         */
   }
 
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* GETVARIATION[]: get normalized variation (blend) coordinates          */
+  /* Opcode range: 0x91                                                    */
+  /* Stack:        --> f2.14...                                            */
+  /*                                                                       */
+  /* XXX: UNDOCUMENTED!  There is no official documentation from Apple for */
+  /*      this bytecode instruction.  Active only if a font has GX         */
+  /*      variation axes.                                                  */
+  /*                                                                       */
+  static void
+  Ins_GETVARIATION( TT_ExecContext  exc,
+                    FT_Long*        args )
+  {
+    FT_UInt    num_axes = exc->face->blend->num_axis;
+    FT_Fixed*  coords   = exc->face->blend->normalizedcoords;
+
+    FT_UInt  i;
+
+
+    if ( BOUNDS( num_axes, exc->stackSize + 1 - exc->top ) )
+    {
+      exc->error = FT_THROW( Stack_Overflow );
+      return;
+    }
+
+    for ( i = 0; i < num_axes; i++ )
+      args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+  }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* GETDATA[]:    no idea what this is good for                           */
+  /* Opcode range: 0x92                                                    */
+  /* Stack:        --> 17                                                  */
+  /*                                                                       */
+  /* XXX: UNDOCUMENTED!  There is no documentation from Apple for this     */
+  /*      very weird bytecode instruction.                                 */
+  /*                                                                       */
+  static void
+  Ins_GETDATA( FT_Long*  args )
+  {
+    args[0] = 17;
+  }
+
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+
+
   static void
   Ins_UNKNOWN( TT_ExecContext  exc )
   {
   FT_EXPORT_DEF( FT_Error )
   TT_RunIns( TT_ExecContext  exc )
   {
-    FT_Long    ins_counter = 0;  /* executed instructions counter */
+    FT_ULong   ins_counter = 0;  /* executed instructions counter */
+    FT_ULong   num_twilight_points;
     FT_UShort  i;
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
 
 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
-    /* Toggle backwards compatibility according to what font says, except  */
+    /* Toggle backward compatibility according to what font says, except   */
     /* when it's a `tricky' font that heavily relies on the interpreter to */
-    /* render glyphs correctly, e.g. DFKai-SB.  Backwards compatibility    */
+    /* render glyphs correctly, e.g. DFKai-SB.  Backward compatibility     */
     /* hacks may break it.                                                 */
     if ( SUBPIXEL_HINTING_MINIMAL          &&
          !FT_IS_TRICKY( &exc->face->root ) )
-      exc->backwards_compatibility = !( exc->GS.instruct_control & 4 );
+      exc->backward_compatibility = !( exc->GS.instruct_control & 4 );
     else
-      exc->backwards_compatibility = FALSE;
+      exc->backward_compatibility = FALSE;
 
     exc->iupx_called = FALSE;
     exc->iupy_called = FALSE;
 #endif
 
+    /* We restrict the number of twilight points to a reasonable,     */
+    /* heuristic value to avoid slow execution of malformed bytecode. */
+    num_twilight_points = FT_MAX( 30,
+                                  2 * ( exc->pts.n_points + exc->cvtSize ) );
+    if ( exc->twilight.n_points > num_twilight_points )
+    {
+      if ( num_twilight_points > 0xFFFFU )
+        num_twilight_points = 0xFFFFU;
+
+      FT_TRACE5(( "TT_RunIns: Resetting number of twilight points\n"
+                  "           from %d to the more reasonable value %d\n",
+                  exc->twilight.n_points,
+                  num_twilight_points ));
+      exc->twilight.n_points = (FT_UShort)num_twilight_points;
+    }
+
+    /* Set up loop detectors.  We restrict the number of LOOPCALL loops */
+    /* and the number of JMPR, JROT, and JROF calls with a negative     */
+    /* argument to values that depend on various parameters like the    */
+    /* size of the CVT table or the number of points in the current     */
+    /* glyph (if applicable).                                           */
+    /*                                                                  */
+    /* The idea is that in real-world bytecode you either iterate over  */
+    /* all CVT entries (in the `prep' table), or over all points (or    */
+    /* contours, in the `glyf' table) of a glyph, and such iterations   */
+    /* don't happen very often.                                         */
+    exc->loopcall_counter = 0;
+    exc->neg_jump_counter = 0;
+
+    /* The maximum values are heuristic. */
+    if ( exc->pts.n_points )
+      exc->loopcall_counter_max = FT_MAX( 50,
+                                          10 * exc->pts.n_points ) +
+                                  FT_MAX( 50,
+                                          exc->cvtSize / 10 );
+    else
+      exc->loopcall_counter_max = FT_MAX( 100,
+                                          10 * exc->cvtSize );
+
+    /* as a protection against an unreasonable number of CVT entries  */
+    /* we assume at most 100 control values per glyph for the counter */
+    if ( exc->loopcall_counter_max >
+         100 * (FT_ULong)exc->face->root.num_glyphs )
+      exc->loopcall_counter_max = 100 * (FT_ULong)exc->face->root.num_glyphs;
+
+    FT_TRACE5(( "TT_RunIns: Limiting total number of loops in LOOPCALL"
+                " to %d\n", exc->loopcall_counter_max ));
+
+    exc->neg_jump_counter_max = exc->loopcall_counter_max;
+    FT_TRACE5(( "TT_RunIns: Limiting total number of backward jumps"
+                " to %d\n", exc->neg_jump_counter_max ));
+
     /* set PPEM and CVT functions */
     exc->tt_metrics.ratio = 0;
     if ( exc->metrics.x_ppem != exc->metrics.y_ppem )
         exc->args = 0;
       }
 
-      exc->new_top = exc->args + ( Pop_Push_Count[exc->opcode] & 15 );
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+      if ( exc->opcode == 0x91 )
+      {
+        /* this is very special: GETVARIATION returns */
+        /* a variable number of arguments             */
+
+        /* it is the job of the application to `activate' GX handling, */
+        /* this is, calling any of the GX API functions on the current */
+        /* font to select a variation instance                         */
+        if ( exc->face->blend )
+          exc->new_top = exc->args + exc->face->blend->num_axis;
+      }
+      else
+#endif
+        exc->new_top = exc->args + ( Pop_Push_Count[exc->opcode] & 15 );
 
       /* `new_top' is the new top of the stack, after the instruction's */
       /* execution.  `top' will be set to `new_top' after the `switch'  */
           Ins_ALIGNPTS( exc, args );
           break;
 
-        case 0x28:  /* ???? */
+        case 0x28:  /* RAW */
           Ins_UNKNOWN( exc );
           break;
 
           Ins_INSTCTRL( exc, args );
           break;
 
-        case 0x8F:
+        case 0x8F:  /* ADJUST */
+        case 0x90:  /* ADJUST */
           Ins_UNKNOWN( exc );
           break;
 
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+        case 0x91:
+          /* it is the job of the application to `activate' GX handling, */
+          /* this is, calling any of the GX API functions on the current */
+          /* font to select a variation instance                         */
+          if ( exc->face->blend )
+            Ins_GETVARIATION( exc, args );
+          else
+            Ins_UNKNOWN( exc );
+          break;
+
+        case 0x92:
+          /* there is at least one MS font (LaoUI.ttf version 5.01) that */
+          /* uses IDEFs for 0x91 and 0x92; for this reason we activate   */
+          /* GETDATA for GX fonts only, similar to GETVARIATION          */
+          if ( exc->face->blend )
+            Ins_GETDATA( args );
+          else
+            Ins_UNKNOWN( exc );
+          break;
+#endif
+
         default:
           if ( opcode >= 0xE0 )
             Ins_MIRP( exc, args );
     } while ( !exc->instruction_trap );
 
   LNo_Error_:
+    FT_TRACE4(( "  %d instructions executed\n", ins_counter ));
     return FT_Err_Ok;
 
   LErrorCodeOverflow_:
     exc->error = FT_THROW( Code_Overflow );
 
   LErrorLabel_:
-    /* If any errors have occurred, function tables may be broken. */
-    /* Force a re-execution of `prep' and `fpgm' tables if no      */
-    /* bytecode debugger is run.                                   */
-    if ( exc->error                          &&
-         !exc->instruction_trap              &&
-         exc->curRange == tt_coderange_glyph )
-    {
+    if ( exc->error && !exc->instruction_trap )
       FT_TRACE1(( "  The interpreter returned error 0x%x\n", exc->error ));
-      exc->size->bytecode_ready = -1;
-      exc->size->cvt_ready      = -1;
-    }
 
     return exc->error;
   }
 
+#else /* !TT_USE_BYTECODE_INTERPRETER */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _tt_interp_dummy;
 
-#endif /* TT_USE_BYTECODE_INTERPRETER */
+#endif /* !TT_USE_BYTECODE_INTERPRETER */
 
 
 /* END */
index df7ce51..55e4720 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType bytecode interpreter (specification).                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -170,6 +170,7 @@ FT_BEGIN_HEADER
                        pts,
                        twilight;
 
+    FT_Long            pointSize;  /* in 26.6 format */
     FT_Size_Metrics    metrics;
     TT_Size_Metrics    tt_metrics; /* size metrics */
 
@@ -255,7 +256,7 @@ FT_BEGIN_HEADER
      * Modern TrueType fonts are usually rendered through Microsoft's
      * collection of rendering techniques called ClearType (e.g., subpixel
      * rendering and subpixel hinting).  When ClearType was introduced, most
-     * fonts were not ready.  Microsoft decided to implement a backwards
+     * fonts were not ready.  Microsoft decided to implement a backward
      * compatibility mode that employed several simple to complicated
      * assumptions and tricks that modified the interpretation of the
      * bytecode contained in these fonts to make them look ClearType-y
@@ -315,12 +316,12 @@ FT_BEGIN_HEADER
      * very specific patterns (`superhinting') for pre-ClearType-displays,
      * the worse the results.
      *
-     * Microsoft defines a way to turn off backwards compatibility and
+     * Microsoft defines a way to turn off backward compatibility and
      * interpret instructions as before (called `native ClearType')[2][3].
      * The font designer then regains full control and is responsible for
      * making the font work correctly with ClearType without any
      * hand-holding by the interpreter or rasterizer[4].  The v40
-     * interpreter assumes backwards compatibility by default, which can be
+     * interpreter assumes backward compatibility by default, which can be
      * turned off the same way by executing the following in the control
      * program (cf. `Ins_INSTCTRL').
      *
@@ -330,7 +331,7 @@ FT_BEGIN_HEADER
      * [1] Tricky fonts as FreeType defines them rely on the bytecode
      *     interpreter to display correctly.  Hacks can interfere with them,
      *     so they get treated like native ClearType fonts (v40 with
-     *     backwards compatibility turned off).  Cf. `TT_RunIns'.
+     *     backward compatibility turned off).  Cf. `TT_RunIns'.
      *
      * [2] Proposed by Microsoft's Greg Hitchcock in
      *     https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
@@ -356,10 +357,10 @@ FT_BEGIN_HEADER
     /* is managed differently.                                            */
     FT_Bool            vertical_lcd_lean;
 
-    /* Default to backwards compatibility mode in v40 interpreter.  If  */
+    /* Default to backward compatibility mode in v40 interpreter.  If   */
     /* this is false, it implies the interpreter is in v35 or in native */
     /* ClearType mode.                                                  */
-    FT_Bool            backwards_compatibility;
+    FT_Bool            backward_compatibility;
 
     /* Useful for detecting and denying post-IUP trickery that is usually */
     /* used to fix pixel patterns (`superhinting').                       */
@@ -407,6 +408,14 @@ FT_BEGIN_HEADER
 
 #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
 
+    /* We maintain two counters (in addition to the instruction counter) */
+    /* that act as loop detectors for LOOPCALL and jump opcodes with     */
+    /* negative arguments.                                               */
+    FT_ULong           loopcall_counter;
+    FT_ULong           loopcall_counter_max;
+    FT_ULong           neg_jump_counter;
+    FT_ULong           neg_jump_counter_max;
+
   } TT_ExecContextRec;
 
 
index ed3be2d..4db0f28 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Objects manager (body).                                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     FT_Error  error;
 
 
-    FT_MEM_ZERO( zone, sizeof ( *zone ) );
+    FT_ZERO( zone );
     zone->memory = memory;
 
     if ( FT_NEW_ARRAY( zone->org,      maxPoints   ) ||
   {
 
 #define TRICK_NAMES_MAX_CHARACTERS  19
-#define TRICK_NAMES_COUNT            9
+#define TRICK_NAMES_COUNT           18
 
     static const char trick_names[TRICK_NAMES_COUNT]
                                  [TRICK_NAMES_MAX_CHARACTERS + 1] =
     {
+      /*
+         PostScript names are given in brackets if they differ from the
+         family name.  The version numbers, together with the copyright or
+         release year data, are taken from fonts available to the
+         developers.
+
+         Note that later versions of the fonts might be no longer tricky;
+         for example, `MingLiU' version 7.00 (file `mingliu.ttc' from
+         Windows 7) is an ordinary TTC with non-tricky subfonts.
+       */
+
+      "cpop",               /* dftt-p7.ttf; version 1.00, 1992 [DLJGyShoMedium] */
+      "DFGirl-W6-WIN-BF",   /* dftt-h6.ttf; version 1.00, 1993 */
       "DFKaiSho-SB",        /* dfkaisb.ttf */
       "DFKaiShu",
-      "DFKai-SB",           /* kaiu.ttf */
+      "DFKai-SB",           /* kaiu.ttf; version 3.00, 1998 [DFKaiShu-SB-Estd-BF] */
+      "DLC",                /* dftt-m7.ttf; version 1.00, 1993 [DLCMingBold] */
+                            /* dftt-f5.ttf; version 1.00, 1993 [DLCFongSung] */
+      "DLCHayMedium",       /* dftt-b5.ttf; version 1.00, 1993 */
+      "DLCHayBold",         /* dftt-b7.ttf; version 1.00, 1993 */
+      "DLCKaiMedium",       /* dftt-k5.ttf; version 1.00, 1992 */
+      "DLCLiShu",           /* dftt-l5.ttf; version 1.00, 1992 */
+      "DLCRoundBold",       /* dftt-r7.ttf; version 1.00, 1993 */
       "HuaTianKaiTi?",      /* htkt2.ttf */
       "HuaTianSongTi?",     /* htst3.ttf */
-      "Ming(for ISO10646)", /* hkscsiic.ttf & iicore.ttf */
-      "MingLiU",            /* mingliu.ttf & mingliu.ttc */
-      "PMingLiU",           /* mingliu.ttc */
-      "MingLi43",           /* mingli.ttf */
+      "Ming(for ISO10646)", /* hkscsiic.ttf; version 0.12, 2007 [Ming] */
+                            /* iicore.ttf; version 0.07, 2007 [Ming] */
+      "MingLiU",            /* mingliu.ttf */
+                            /* mingliu.ttc; version 3.21, 2001 */
+      "MingMedium",         /* dftt-m5.ttf; version 1.00, 1993 [DLCMingMedium] */
+      "PMingLiU",           /* mingliu.ttc; version 3.21, 2001 */
+      "MingLi43",           /* mingli.ttf; version 1.00, 1992 */
     };
 
     int  nn;
   tt_check_trickyness_sfnt_ids( TT_Face  face )
   {
 #define TRICK_SFNT_IDS_PER_FACE   3
-#define TRICK_SFNT_IDS_NUM_FACES  18
+#define TRICK_SFNT_IDS_NUM_FACES  19
 
     static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES]
                                        [TRICK_SFNT_IDS_PER_FACE] = {
         { 0x5A30CA3BUL, 0x00009063UL }, /* fpgm */
         { 0x13A42602UL, 0x0000007EUL }  /* prep */
       },
-      { /* DFKaiShu2 */
+      { /* DFKaiShu, variant */
         { 0x11E5EAD4UL, 0x00000350UL }, /* cvt  */
         { 0xA6E78C01UL, 0x00008998UL }, /* fpgm */
         { 0x13A42602UL, 0x0000007EUL }  /* prep */
         { 0x00000000UL, 0x00000000UL }, /* cvt  */
         { 0xF055FC48UL, 0x000001C2UL }, /* fpgm */
         { 0x3900DED3UL, 0x00001E18UL }  /* prep */
+      },
+        { /* MINGLI.TTF, 1992 */
+        { 0x00170003UL, 0x00000060UL }, /* cvt  */
+        { 0xDBB4306EUL, 0x000058AAUL }, /* fpgm */
+        { 0xD643482AUL, 0x00000035UL }  /* prep */
       }
     };
 
       goto Exit;
 
     /* check that we have a valid TrueType file */
+    FT_TRACE2(( "  " ));
     error = sfnt->init_face( stream, face, face_index, num_params, params );
 
     /* Stream may have changed. */
 
     if ( FT_IS_SCALABLE( ttface ) )
     {
-
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
-
       if ( !ttface->internal->incremental_interface )
-        error = tt_face_load_loca( face, stream );
-      if ( !error )
-        error = tt_face_load_cvt( face, stream );
-      if ( !error )
-        error = tt_face_load_fpgm( face, stream );
-      if ( !error )
-        error = tt_face_load_prep( face, stream );
-
-      /* Check the scalable flag based on `loca'. */
-      if ( !ttface->internal->incremental_interface &&
-           ttface->num_fixed_sizes                  &&
-           face->glyph_locations                    &&
-           tt_check_single_notdef( ttface )         )
+#endif
       {
-        FT_TRACE5(( "tt_face_init:"
-                    " Only the `.notdef' glyph has an outline.\n"
-                    "             "
-                    " Resetting scalable flag to FALSE.\n" ));
+        error = tt_face_load_loca( face, stream );
 
-        ttface->face_flags &= ~FT_FACE_FLAG_SCALABLE;
+        /* having a (non-zero) `glyf' table without */
+        /* a `loca' table is not valid              */
+        if ( face->glyf_len && FT_ERR_EQ( error, Table_Missing ) )
+          goto Exit;
+        if ( error )
+          goto Exit;
       }
 
-#else /* !FT_CONFIG_OPTION_INCREMENTAL */
+      /* `fpgm', `cvt', and `prep' are optional */
+      error = tt_face_load_cvt( face, stream );
+      if ( error && FT_ERR_NEQ( error, Table_Missing ) )
+        goto Exit;
 
-      if ( !error )
-        error = tt_face_load_loca( face, stream );
-      if ( !error )
-        error = tt_face_load_cvt( face, stream );
-      if ( !error )
-        error = tt_face_load_fpgm( face, stream );
-      if ( !error )
-        error = tt_face_load_prep( face, stream );
+      error = tt_face_load_fpgm( face, stream );
+      if ( error && FT_ERR_NEQ( error, Table_Missing ) )
+        goto Exit;
+
+      error = tt_face_load_prep( face, stream );
+      if ( error && FT_ERR_NEQ( error, Table_Missing ) )
+        goto Exit;
 
       /* Check the scalable flag based on `loca'. */
-      if ( ttface->num_fixed_sizes          &&
-           face->glyph_locations            &&
-           tt_check_single_notdef( ttface ) )
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+      if ( !ttface->internal->incremental_interface )
+#endif
       {
-        FT_TRACE5(( "tt_face_init:"
-                    " Only the `.notdef' glyph has an outline.\n"
-                    "             "
-                    " Resetting scalable flag to FALSE.\n" ));
+        if ( ttface->num_fixed_sizes          &&
+             face->glyph_locations            &&
+             tt_check_single_notdef( ttface ) )
+        {
+          FT_TRACE5(( "tt_face_init:"
+                      " Only the `.notdef' glyph has an outline.\n"
+                      "             "
+                      " Resetting scalable flag to FALSE.\n" ));
 
-        ttface->face_flags &= ~FT_FACE_FLAG_SCALABLE;
+          ttface->face_flags &= ~FT_FACE_FLAG_SCALABLE;
+        }
       }
-
-#endif /* !FT_CONFIG_OPTION_INCREMENTAL */
-
     }
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
                                      named_style->coords );
           if ( error )
             goto Exit;
+
+          tt_apply_mvar( face );
         }
       }
     }
     face->cvt_program_size  = 0;
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-    tt_done_blend( memory, face->blend );
+    tt_done_blend( face );
     face->blend = NULL;
 #endif
   }
     exec->pedantic_hinting = pedantic;
 
     {
-      FT_Size_Metrics*  metrics    = &exec->metrics;
-      TT_Size_Metrics*  tt_metrics = &exec->tt_metrics;
+      FT_Size_Metrics*  size_metrics = &exec->metrics;
+      TT_Size_Metrics*  tt_metrics   = &exec->tt_metrics;
 
 
-      metrics->x_ppem   = 0;
-      metrics->y_ppem   = 0;
-      metrics->x_scale  = 0;
-      metrics->y_scale  = 0;
+      size_metrics->x_ppem   = 0;
+      size_metrics->y_ppem   = 0;
+      size_metrics->x_scale  = 0;
+      size_metrics->y_scale  = 0;
 
       tt_metrics->ppem  = 0;
       tt_metrics->scale = 0;
 
       FT_TRACE4(( "Executing `fpgm' table.\n" ));
       error = face->interpreter( exec );
+#ifdef FT_DEBUG_LEVEL_TRACE
+      if ( error )
+        FT_TRACE4(( "  interpretation failed with error code 0x%x\n",
+                    error ));
+#endif
     }
     else
       error = FT_Err_Ok;
       TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
 
       FT_TRACE4(( "Executing `prep' table.\n" ));
-
       error = face->interpreter( exec );
+#ifdef FT_DEBUG_LEVEL_TRACE
+      if ( error )
+        FT_TRACE4(( "  interpretation failed with error code 0x%x\n",
+                    error ));
+#endif
     }
     else
       error = FT_Err_Ok;
 
     /* Set default metrics */
     {
-      TT_Size_Metrics*  metrics = &size->ttmetrics;
+      TT_Size_Metrics*  tt_metrics = &size->ttmetrics;
 
 
-      metrics->rotated   = FALSE;
-      metrics->stretched = FALSE;
+      tt_metrics->rotated   = FALSE;
+      tt_metrics->stretched = FALSE;
 
       /* set default engine compensation */
-      metrics->compensations[0] = 0;   /* gray     */
-      metrics->compensations[1] = 0;   /* black    */
-      metrics->compensations[2] = 0;   /* white    */
-      metrics->compensations[3] = 0;   /* reserved */
+      tt_metrics->compensations[0] = 0;   /* gray     */
+      tt_metrics->compensations[1] = 0;   /* black    */
+      tt_metrics->compensations[2] = 0;   /* white    */
+      tt_metrics->compensations[3] = 0;   /* reserved */
     }
 
     /* allocate function defs, instruction defs, cvt, and storage area */
 
     if ( size->bytecode_ready < 0 )
       error = tt_size_init_bytecode( (FT_Size)size, pedantic );
+    else
+      error = size->bytecode_ready;
 
-    if ( error || size->bytecode_ready )
+    if ( error )
       goto Exit;
 
     /* rescale CVT when needed */
 
       error = tt_size_run_prep( size, pedantic );
     }
+    else
+      error = size->cvt_ready;
 
   Exit:
     return error;
   /*    have been changed.                                                 */
   /*                                                                       */
   /* <Input>                                                               */
-  /*    size :: A handle to the target size object.                        */
+  /*    size        :: A handle to the target size object.                 */
+  /*                                                                       */
+  /*    only_height :: Only recompute ascender, descender, and height.     */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  tt_size_reset( TT_Size  size )
+  tt_size_reset( TT_Size  size,
+                 FT_Bool  only_height )
   {
     TT_Face           face;
-    FT_Error          error = FT_Err_Ok;
-    FT_Size_Metrics*  metrics;
-
+    FT_Size_Metrics*  size_metrics;
 
-    size->ttmetrics.valid = FALSE;
 
     face = (TT_Face)size->root.face;
 
-    metrics = &size->metrics;
+    /* nothing to do for CFF2 */
+    if ( face->is_cff2 )
+      return FT_Err_Ok;
+
+    size->ttmetrics.valid = FALSE;
+
+    size_metrics = &size->hinted_metrics;
 
     /* copy the result from base layer */
-    *metrics = size->root.metrics;
+    *size_metrics = size->root.metrics;
 
-    if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 )
+    if ( size_metrics->x_ppem < 1 || size_metrics->y_ppem < 1 )
       return FT_THROW( Invalid_PPem );
 
     /* This bit flag, if set, indicates that the ppems must be       */
     /*                                                               */
     if ( face->header.Flags & 8 )
     {
-      metrics->x_scale = FT_DivFix( metrics->x_ppem << 6,
-                                    face->root.units_per_EM );
-      metrics->y_scale = FT_DivFix( metrics->y_ppem << 6,
-                                    face->root.units_per_EM );
-
-      metrics->ascender =
-        FT_PIX_ROUND( FT_MulFix( face->root.ascender, metrics->y_scale ) );
-      metrics->descender =
-        FT_PIX_ROUND( FT_MulFix( face->root.descender, metrics->y_scale ) );
-      metrics->height =
-        FT_PIX_ROUND( FT_MulFix( face->root.height, metrics->y_scale ) );
-      metrics->max_advance =
-        FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width,
-                                 metrics->x_scale ) );
+      /* the TT spec always asks for ROUND, not FLOOR or CEIL */
+      size_metrics->ascender = FT_PIX_ROUND(
+                                 FT_MulFix( face->root.ascender,
+                                            size_metrics->y_scale ) );
+      size_metrics->descender = FT_PIX_ROUND(
+                                 FT_MulFix( face->root.descender,
+                                            size_metrics->y_scale ) );
+      size_metrics->height = FT_PIX_ROUND(
+                               FT_MulFix( face->root.height,
+                                          size_metrics->y_scale ) );
+    }
+
+    size->ttmetrics.valid = TRUE;
+
+    if ( only_height )
+      return FT_Err_Ok;
+
+    if ( face->header.Flags & 8 )
+    {
+      /* base scaling values on integer ppem values, */
+      /* as mandated by the TrueType specification   */
+      size_metrics->x_scale = FT_DivFix( size_metrics->x_ppem << 6,
+                                         face->root.units_per_EM );
+      size_metrics->y_scale = FT_DivFix( size_metrics->y_ppem << 6,
+                                         face->root.units_per_EM );
+
+      size_metrics->max_advance = FT_PIX_ROUND(
+                                    FT_MulFix( face->root.max_advance_width,
+                                               size_metrics->x_scale ) );
     }
 
     /* compute new transformation */
-    if ( metrics->x_ppem >= metrics->y_ppem )
+    if ( size_metrics->x_ppem >= size_metrics->y_ppem )
     {
-      size->ttmetrics.scale   = metrics->x_scale;
-      size->ttmetrics.ppem    = metrics->x_ppem;
+      size->ttmetrics.scale   = size_metrics->x_scale;
+      size->ttmetrics.ppem    = size_metrics->x_ppem;
       size->ttmetrics.x_ratio = 0x10000L;
-      size->ttmetrics.y_ratio = FT_DivFix( metrics->y_ppem,
-                                           metrics->x_ppem );
+      size->ttmetrics.y_ratio = FT_DivFix( size_metrics->y_ppem,
+                                           size_metrics->x_ppem );
     }
     else
     {
-      size->ttmetrics.scale   = metrics->y_scale;
-      size->ttmetrics.ppem    = metrics->y_ppem;
-      size->ttmetrics.x_ratio = FT_DivFix( metrics->x_ppem,
-                                           metrics->y_ppem );
+      size->ttmetrics.scale   = size_metrics->y_scale;
+      size->ttmetrics.ppem    = size_metrics->y_ppem;
+      size->ttmetrics.x_ratio = FT_DivFix( size_metrics->x_ppem,
+                                           size_metrics->y_ppem );
       size->ttmetrics.y_ratio = 0x10000L;
     }
 
+    size->metrics = size_metrics;
+
 #ifdef TT_USE_BYTECODE_INTERPRETER
     size->cvt_ready = -1;
 #endif /* TT_USE_BYTECODE_INTERPRETER */
 
-    if ( !error )
-      size->ttmetrics.valid = TRUE;
-
-    return error;
+    return FT_Err_Ok;
   }
 
 
index ed61a7d..cdacee7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Objects manager (specification).                                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -278,7 +278,8 @@ FT_BEGIN_HEADER
 
     /* we have our own copy of metrics so that we can modify */
     /* it without affecting auto-hinting (when used)         */
-    FT_Size_Metrics    metrics;
+    FT_Size_Metrics*   metrics;        /* for the current rendering mode */
+    FT_Size_Metrics    hinted_metrics; /* for the hinted rendering mode  */
 
     TT_Size_Metrics    ttmetrics;
 
@@ -286,6 +287,8 @@ FT_BEGIN_HEADER
 
 #ifdef TT_USE_BYTECODE_INTERPRETER
 
+    FT_Long            point_size;    /* for the `MPS' bytecode instruction */
+
     FT_UInt            num_function_defs; /* number of function definitions */
     FT_UInt            max_function_defs;
     TT_DefArray        function_defs;     /* table of function definitions  */
@@ -387,7 +390,8 @@ FT_BEGIN_HEADER
 #endif /* TT_USE_BYTECODE_INTERPRETER */
 
   FT_LOCAL( FT_Error )
-  tt_size_reset( TT_Size  size );
+  tt_size_reset( TT_Size  size,
+                 FT_Bool  only_height );
 
 
   /*************************************************************************/
index 54a5b8b..66bd7e1 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for truetype module. */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f725865..1410cd7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for truetype module. */
 /*                                                                         */
-/*  Copyright 2009-2016 by                                                 */
+/*  Copyright 2009-2017 by                                                 */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 #ifndef FT_CONFIG_OPTION_PIC
 
-#define TT_SERVICES_GET                  tt_services
-#define TT_SERVICE_GX_MULTI_MASTERS_GET  tt_service_gx_multi_masters
-#define TT_SERVICE_TRUETYPE_GLYF_GET     tt_service_truetype_glyf
-#define TT_SERVICE_PROPERTIES_GET        tt_service_properties
+#define TT_SERVICES_GET                    tt_services
+#define TT_SERVICE_GX_MULTI_MASTERS_GET    tt_service_gx_multi_masters
+#define TT_SERVICE_METRICS_VARIATIONS_GET  tt_service_metrics_variations
+#define TT_SERVICE_TRUETYPE_GLYF_GET       tt_service_truetype_glyf
+#define TT_SERVICE_PROPERTIES_GET          tt_service_properties
 
 #else /* FT_CONFIG_OPTION_PIC */
 
 #include FT_MULTIPLE_MASTERS_H
 #include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_METRICS_VARIATIONS_H
 #include FT_SERVICE_TRUETYPE_GLYF_H
 #include FT_SERVICE_PROPERTIES_H
 
@@ -42,12 +44,13 @@ FT_BEGIN_HEADER
 
   typedef struct  TTModulePIC_
   {
-    FT_ServiceDescRec*          tt_services;
+    FT_ServiceDescRec*               tt_services;
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-    FT_Service_MultiMastersRec  tt_service_gx_multi_masters;
+    FT_Service_MultiMastersRec       tt_service_gx_multi_masters;
+    FT_Service_MetricsVariationsRec  tt_service_metrics_variations;
 #endif
-    FT_Service_TTGlyfRec        tt_service_truetype_glyf;
-    FT_Service_PropertiesRec    tt_service_properties;
+    FT_Service_TTGlyfRec             tt_service_truetype_glyf;
+    FT_Service_PropertiesRec         tt_service_properties;
 
   } TTModulePIC;
 
@@ -56,6 +59,8 @@ FT_BEGIN_HEADER
           ( (TTModulePIC*)((lib)->pic_container.truetype) )
 #define TT_SERVICES_GET                       \
           ( GET_PIC( library )->tt_services )
+#define TT_SERVICE_METRICS_VARIATIONS_GET                       \
+          ( GET_PIC( library )->tt_service_metrics_variations )
 #define TT_SERVICE_GX_MULTI_MASTERS_GET                       \
           ( GET_PIC( library )->tt_service_gx_multi_masters )
 #define TT_SERVICE_TRUETYPE_GLYF_GET                       \
index ca158ac..70ac15d 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType-specific tables loader (body).                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     /* it is possible that a font doesn't have a glyf table at all */
     /* or its size is zero                                         */
     if ( FT_ERR_EQ( error, Table_Missing ) )
-      face->glyf_len = 0;
+    {
+      face->glyf_len    = 0;
+      face->glyf_offset = 0;
+    }
     else if ( error )
       goto Exit;
+    else
+    {
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+      if ( face->root.internal->incremental_interface )
+        face->glyf_offset = 0;
+      else
+#endif
+        face->glyf_offset = FT_STREAM_POS();
+    }
 
     FT_TRACE2(( "Locations " ));
     error = face->goto_table( face, TTAG_loca, stream, &table_len );
       if ( table_len >= 0x40000L )
       {
         FT_TRACE2(( "table too large\n" ));
-        error = FT_THROW( Invalid_Table );
-        goto Exit;
+        table_len = 0x3FFFFL;
       }
       face->num_locations = table_len >> shift;
     }
       if ( table_len >= 0x20000L )
       {
         FT_TRACE2(( "table too large\n" ));
-        error = FT_THROW( Invalid_Table );
-        goto Exit;
+        table_len = 0x1FFFFL;
       }
       face->num_locations = table_len >> shift;
     }
       }
     }
 
-    /* Check broken location data */
+    /* Check broken location data. */
     if ( pos1 > face->glyf_len )
     {
       FT_TRACE1(( "tt_face_get_location:"
-                  " too large offset=0x%08lx found for gid=0x%04lx,\n"
+                  " too large offset (0x%08lx) found for glyph index %ld,\n"
                   "                     "
-                  " exceeding the end of glyf table (0x%08lx)\n",
+                  " exceeding the end of `glyf' table (0x%08lx)\n",
                   pos1, gindex, face->glyf_len ));
       *asize = 0;
       return 0;
 
     if ( pos2 > face->glyf_len )
     {
-      FT_TRACE1(( "tt_face_get_location:"
-                  " too large offset=0x%08lx found for gid=0x%04lx,\n"
-                  "                     "
-                  " truncate at the end of glyf table (0x%08lx)\n",
-                  pos2, gindex + 1, face->glyf_len ));
-      pos2 = face->glyf_len;
+      /* We try to sanitize the last `loca' entry. */
+      if ( gindex == face->num_locations - 1 )
+      {
+        FT_TRACE1(( "tt_face_get_location:"
+                    " too large offset (0x%08lx) found for glyph index %ld,\n"
+                    "                     "
+                    " truncating at the end of `glyf' table (0x%08lx)\n",
+                    pos2, gindex + 1, face->glyf_len ));
+        pos2 = face->glyf_len;
+      }
+      else
+      {
+        FT_TRACE1(( "tt_face_get_location:"
+                    " too large offset (0x%08lx) found for glyph index %ld,\n"
+                    "                     "
+                    " exceeding the end of `glyf' table (0x%08lx)\n",
+                    pos2, gindex + 1, face->glyf_len ));
+        *asize = 0;
+        return 0;
+      }
     }
 
     /* The `loca' table must be ordered; it refers to the length of */
   {
     FT_Error   error;
     FT_Memory  memory = stream->memory;
-    FT_UInt    version, nn, num_records;
+    FT_UInt    nn, num_records;
     FT_ULong   table_size, record_size;
     FT_Byte*   p;
     FT_Byte*   limit;
     p     = face->hdmx_table;
     limit = p + table_size;
 
-    version     = FT_NEXT_USHORT( p );
+    /* Given that `hdmx' tables are losing its importance (for example, */
+    /* variation fonts introduced in OpenType 1.8 must not have this    */
+    /* table) we no longer test for a correct `version' field.          */
+    p          += 2;
     num_records = FT_NEXT_USHORT( p );
     record_size = FT_NEXT_ULONG( p );
 
       record_size &= 0xFFFFU;
 
     /* The limit for `num_records' is a heuristic value. */
-    if ( version != 0           ||
-         num_records > 255      ||
-         record_size > 0x10001L ||
-         record_size < 4        )
+    if ( num_records > 255              ||
+         ( num_records > 0            &&
+           ( record_size > 0x10001L ||
+             record_size < 4        ) ) )
     {
       error = FT_THROW( Invalid_File_Format );
       goto Fail;
index aa2e38e..79079f3 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType-specific tables loader (specification).                     */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 0395096..1c8cf01 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Subpixel Hinting.                                           */
 /*                                                                         */
-/*  Copyright 2010-2016 by                                                 */
+/*  Copyright 2010-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -27,7 +27,8 @@
 #include "ttsubpix.h"
 
 
-#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+#if defined( TT_USE_BYTECODE_INTERPRETER )            && \
+    defined( TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY )
 
   /*************************************************************************/
   /*                                                                       */
   {
     TT_Face     face   = loader->face;
     FT_String*  family = face->root.family_name;
-    FT_UInt     ppem   = loader->size->metrics.x_ppem;
+    FT_UInt     ppem   = loader->size->metrics->x_ppem;
     FT_String*  style  = face->root.style_name;
 
 
     }
   }
 
-#else /* !TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
+#else /* !(TT_USE_BYTECODE_INTERPRETER &&          */
+      /*   TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */
 
   /* ANSI C doesn't like empty source files */
   typedef int  _tt_subpix_dummy;
 
-#endif /* !TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
+#endif /* !(TT_USE_BYTECODE_INTERPRETER &&          */
+       /*   TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY) */
 
 
 /* END */
index 86844da..c68f97f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Subpixel Hinting.                                           */
 /*                                                                         */
-/*  Copyright 2010-2016 by                                                 */
+/*  Copyright 2010-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 948b408..6c10a31 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/type1 Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index d7ab520..f299d6f 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index bdec294..97bef28 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index bbd843c..11a2646 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    AFM support for Type 1 fonts (body).                                 */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -24,6 +24,8 @@
 #include "t1errors.h"
 
 
+#ifndef T1_CONFIG_OPTION_NO_AFM
+
   /*************************************************************************/
   /*                                                                       */
   /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
       kp++;
     }
 
-    if ( oldcharmap != NULL )
+    if ( oldcharmap )
       error = FT_Set_Charmap( t1_face, oldcharmap );
     if ( error )
       goto Exit;
       {
         t1_face->face_flags |= FT_FACE_FLAG_KERNING;
         face->afm_data       = fi;
-        fi = NULL;
+        fi                   = NULL;
       }
     }
 
     FT_FRAME_EXIT();
 
   Exit:
-    if ( fi != NULL )
+    if ( fi )
       T1_Done_Metrics( memory, fi );
 
     return error;
     return FT_Err_Ok;
   }
 
+#else /* T1_CONFIG_OPTION_NO_AFM */
+
+  /* ANSI C doesn't like empty source files */
+  typedef int  _t1_afm_dummy;
+
+#endif /* T1_CONFIG_OPTION_NO_AFM */
+
 
 /* END */
index 3a864f2..9f62cd0 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    AFM support for Type 1 fonts (specification).                        */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f1e60d4..c208994 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 driver interface (body).                                      */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     (FT_Get_MM_Func)        T1_Get_Multi_Master,   /* get_mm         */
     (FT_Set_MM_Design_Func) T1_Set_MM_Design,      /* set_mm_design  */
     (FT_Set_MM_Blend_Func)  T1_Set_MM_Blend,       /* set_mm_blend   */
+    (FT_Get_MM_Blend_Func)  T1_Get_MM_Blend,       /* get_mm_blend   */
     (FT_Get_MM_Var_Func)    T1_Get_MM_Var,         /* get_mm_var     */
-    (FT_Set_Var_Design_Func)T1_Set_Var_Design      /* set_var_design */
+    (FT_Set_Var_Design_Func)T1_Set_Var_Design,     /* set_var_design */
+    (FT_Get_Var_Design_Func)T1_Get_Var_Design,     /* get_var_design */
+
+    (FT_Get_Var_Blend_Func) NULL,                  /* get_var_blend  */
+    (FT_Done_Blend_Func)    T1_Done_Blend          /* done_blend     */
   };
 #endif
 
       0x10000L,
       0x20000L,
 
-      0,    /* module-specific interface */
+      NULL,    /* module-specific interface */
 
       T1_Driver_Init,           /* FT_Module_Constructor  module_init   */
       T1_Driver_Done,           /* FT_Module_Destructor   module_done   */
     T1_Load_Glyph,              /* FT_Slot_LoadFunc  load_glyph */
 
 #ifdef T1_CONFIG_OPTION_NO_AFM
-    0,                          /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_GetKerningFunc   get_kerning  */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
 #else
     Get_Kerning,                /* FT_Face_GetKerningFunc   get_kerning  */
     T1_Read_Metrics,            /* FT_Face_AttachFunc       attach_file  */
     T1_Get_Advances,            /* FT_Face_GetAdvancesFunc  get_advances */
 
     T1_Size_Request,            /* FT_Size_RequestFunc  request_size */
-    0                           /* FT_Size_SelectFunc   select_size  */
+    NULL                        /* FT_Size_SelectFunc   select_size  */
   };
 
 
index 78d8e38..2927864 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level Type 1 driver interface (specification).                  */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 9ba470e..492dbb4 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 error codes (specification only).                             */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index ea36f64..aaf19b6 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 Glyph Loader (body).                                          */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 975f227..cc4d5e7 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 Glyph Loader (specification).                                 */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index c981adc..f5c661f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 font loader (body).                                           */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     if ( ncv <= axismap->blend_points[0] )
       return INT_TO_FIXED( axismap->design_points[0] );
 
-    for ( j = 1; j < axismap->num_points; ++j )
+    for ( j = 1; j < axismap->num_points; j++ )
     {
       if ( ncv <= axismap->blend_points[j] )
         return INT_TO_FIXED( axismap->design_points[j - 1] ) +
 
     mmvar->num_axis        = mmaster.num_axis;
     mmvar->num_designs     = mmaster.num_designs;
-    mmvar->num_namedstyles = ~0U;                        /* Does not apply */
+    mmvar->num_namedstyles = 0;                           /* Not supported */
     mmvar->axis            = (FT_Var_Axis*)&mmvar[1];
                                       /* Point to axes after MM_Var struct */
     mmvar->namedstyle      = NULL;
 
-    for ( i = 0; i < mmaster.num_axis; ++i )
+    for ( i = 0; i < mmaster.num_axis; i++ )
     {
       mmvar->axis[i].name    = mmaster.axis[i].name;
       mmvar->axis[i].minimum = INT_TO_FIXED( mmaster.axis[i].minimum);
                         axiscoords,
                         blend->num_axis );
 
-      for ( i = 0; i < mmaster.num_axis; ++i )
+      for ( i = 0; i < mmaster.num_axis; i++ )
         mmvar->axis[i].def = mm_axis_unmap( &blend->design_map[i],
                                             axiscoords[i] );
     }
 
 
   FT_LOCAL_DEF( FT_Error )
+  T1_Get_MM_Blend( T1_Face    face,
+                   FT_UInt    num_coords,
+                   FT_Fixed*  coords )
+  {
+    PS_Blend  blend = face->blend;
+
+    FT_Fixed  axiscoords[4];
+    FT_UInt   i, nc;
+
+
+    if ( !blend )
+      return FT_THROW( Invalid_Argument );
+
+    mm_weights_unmap( blend->weight_vector,
+                      axiscoords,
+                      blend->num_axis );
+
+    nc = num_coords;
+    if ( num_coords > blend->num_axis )
+    {
+      FT_TRACE2(( "T1_Get_MM_Blend: only using first %d of %d coordinates\n",
+                  blend->num_axis, num_coords ));
+      nc = blend->num_axis;
+    }
+
+    for ( i = 0; i < nc; i++ )
+      coords[i] = axiscoords[i];
+    for ( ; i < num_coords; i++ )
+      coords[i] = 0x8000;
+
+    return FT_Err_Ok;
+  }
+
+
+  FT_LOCAL_DEF( FT_Error )
   T1_Set_MM_Design( T1_Face   face,
                     FT_UInt   num_coords,
                     FT_Long*  coords )
      if ( num_coords > T1_MAX_MM_AXIS )
        num_coords = T1_MAX_MM_AXIS;
 
-     for ( i = 0; i < num_coords; ++i )
+     for ( i = 0; i < num_coords; i++ )
        lcoords[i] = FIXED_TO_INT( coords[i] );
 
      return T1_Set_MM_Design( face, num_coords, lcoords );
   }
 
 
+  FT_LOCAL_DEF( FT_Error )
+  T1_Get_Var_Design( T1_Face    face,
+                     FT_UInt    num_coords,
+                     FT_Fixed*  coords )
+  {
+    PS_Blend  blend = face->blend;
+
+    FT_Fixed  axiscoords[4];
+    FT_UInt   i, nc;
+
+
+    if ( !blend )
+      return FT_THROW( Invalid_Argument );
+
+    mm_weights_unmap( blend->weight_vector,
+                      axiscoords,
+                      blend->num_axis );
+
+    nc = num_coords;
+    if ( num_coords > blend->num_axis )
+    {
+      FT_TRACE2(( "T1_Get_Var_Design:"
+                  " only using first %d of %d coordinates\n",
+                  blend->num_axis, num_coords ));
+      nc = blend->num_axis;
+    }
+
+    for ( i = 0; i < nc; i++ )
+      coords[i] = mm_axis_unmap( &blend->design_map[i], axiscoords[i] );
+    for ( ; i < num_coords; i++ )
+      coords[i] = 0;
+
+    return FT_Err_Ok;
+  }
+
+
   FT_LOCAL_DEF( void )
   T1_Done_Blend( T1_Face  face )
   {
     FT_Error   error;
     FT_Int     num_subrs;
     FT_UInt    count;
-    FT_Hash    hash = NULL;
 
     PSAux_Service  psaux = (PSAux_Service)face->psaux;
 
     }
 
     /* we certainly need more than 8 bytes per subroutine */
-    if ( parser->root.limit > parser->root.cursor                      &&
+    if ( parser->root.limit >= parser->root.cursor                     &&
          num_subrs > ( parser->root.limit - parser->root.cursor ) >> 3 )
     {
       /*
                   ( parser->root.limit - parser->root.cursor ) >> 3 ));
       num_subrs = ( parser->root.limit - parser->root.cursor ) >> 3;
 
-      if ( !hash )
+      if ( !loader->subrs_hash )
       {
-        if ( FT_NEW( hash ) )
+        if ( FT_NEW( loader->subrs_hash ) )
           goto Fail;
 
-        loader->subrs_hash = hash;
-
-        error = ft_hash_num_init( hash, memory );
+        error = ft_hash_num_init( loader->subrs_hash, memory );
         if ( error )
           goto Fail;
       }
 
       /* if we use a hash, the subrs index is the key, and a running */
       /* counter specified for `T1_Add_Table' acts as the value      */
-      if ( hash )
+      if ( loader->subrs_hash )
       {
-        ft_hash_num_insert( idx, count, hash, memory );
+        ft_hash_num_insert( idx, count, loader->subrs_hash, memory );
         idx = count;
       }
 
       }
     }
 
+    if ( !n )
+    {
+      error = FT_THROW( Invalid_File_Format );
+      goto Fail;
+    }
+
     loader->num_glyphs = n;
 
     /* if /.notdef is found but does not occupy index 0, do our magic. */
                 parser->root.error = t1_load_keyword( face,
                                                       loader,
                                                       keyword );
-                if ( parser->root.error != FT_Err_Ok )
+                if ( parser->root.error )
                 {
                   if ( FT_ERR_EQ( parser->root.error, Ignore ) )
                     parser->root.error = FT_Err_Ok;
   {
     FT_UNUSED( face );
 
-    FT_MEM_ZERO( loader, sizeof ( *loader ) );
+    FT_ZERO( loader );
   }
 
 
index b96fe5a..2d86984 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 font loader (specification).                                  */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -70,7 +70,7 @@ FT_BEGIN_HEADER
   T1_Get_Multi_Master( T1_Face           face,
                        FT_Multi_Master*  master );
 
-  FT_LOCAL_DEF( FT_Error )
+  FT_LOCAL( FT_Error )
   T1_Get_MM_Var( T1_Face      face,
                  FT_MM_Var*  *master );
 
@@ -80,11 +80,21 @@ FT_BEGIN_HEADER
                    FT_Fixed*  coords );
 
   FT_LOCAL( FT_Error )
+  T1_Get_MM_Blend( T1_Face    face,
+                   FT_UInt    num_coords,
+                   FT_Fixed*  coords );
+
+  FT_LOCAL( FT_Error )
   T1_Set_MM_Design( T1_Face   face,
                     FT_UInt   num_coords,
                     FT_Long*  coords );
 
-  FT_LOCAL_DEF( FT_Error )
+  FT_LOCAL( FT_Error )
+  T1_Get_Var_Design( T1_Face    face,
+                     FT_UInt    num_coords,
+                     FT_Fixed*  coords );
+
+  FT_LOCAL( FT_Error )
   T1_Set_Var_Design( T1_Face    face,
                      FT_UInt    num_coords,
                      FT_Fixed*  coords );
index a009117..97c16b0 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 objects manager (body).                                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -49,9 +49,6 @@
   /*                                                                       */
   /*                            SIZE FUNCTIONS                             */
   /*                                                                       */
-  /*  note that we store the global hints in the size's "internal" root    */
-  /*  field                                                                */
-  /*                                                                       */
   /*************************************************************************/
 
 
     T1_Size  size = (T1_Size)t1size;
 
 
-    if ( size->root.internal )
+    if ( t1size->internal->module_data )
     {
       PSH_Globals_Funcs  funcs;
 
 
       funcs = T1_Size_Get_Globals_Funcs( size );
       if ( funcs )
-        funcs->destroy( (PSH_Globals)size->root.internal );
+        funcs->destroy( (PSH_Globals)t1size->internal->module_data );
 
-      size->root.internal = NULL;
+      t1size->internal->module_data = NULL;
     }
   }
 
       error = funcs->create( size->root.face->memory,
                              &face->type1.private_dict, &globals );
       if ( !error )
-        size->root.internal = (FT_Size_Internal)(void*)globals;
+        t1size->internal->module_data = globals;
     }
 
     return error;
     FT_Request_Metrics( size->root.face, req );
 
     if ( funcs )
-      funcs->set_scale( (PSH_Globals)size->root.internal,
+      funcs->set_scale( (PSH_Globals)t1size->internal->module_data,
                         size->root.metrics.x_scale,
                         size->root.metrics.y_scale,
                         0, 0 );
index 94fbdee..39d26bf 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 objects manager (specification).                              */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 563d9f3..18dd264 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 parser (body).                                                */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
                 *cur == '\t'               ||
                 (test_cr && *cur == '\r' ) ||
                 *cur == '\n'               ) )
-        ++cur;
+        cur++;
       if ( cur >= limit )
       {
         FT_ERROR(( "T1_Get_Private_Dict:"
index affa818..3396680 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 parser (specification).                                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index a84f291..ca0c55f 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 tokenizer (specification).                                    */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index bb8aca9..8179537 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Type 1 driver component (body only).                        */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 
 
 #define FT_MAKE_OPTION_SINGLE_OBJECT
-
 #include <ft2build.h>
-#include "t1parse.c"
-#include "t1load.c"
-#include "t1objs.c"
-#include "t1driver.c"
-#include "t1gload.c"
 
-#ifndef T1_CONFIG_OPTION_NO_AFM
 #include "t1afm.c"
-#endif
+#include "t1driver.c"
+#include "t1gload.c"
+#include "t1load.c"
+#include "t1objs.c"
+#include "t1parse.c"
 
 
 /* END */
index a504ad1..b826bbc 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/type42 Jamfile
 #
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index a7e27b7..2f52806 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 80710ef..d7e8965 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 2002-2016 by
+# Copyright 2002-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index c63ed0c..366cfb3 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level Type 42 driver interface (body).                          */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -81,7 +81,8 @@
 
 
       if ( glyph_name[0] == gname[0] && !ft_strcmp( glyph_name, gname ) )
-        return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] );
+        return (FT_UInt)ft_strtol( (const char *)face->type1.charstrings[i],
+                                   NULL, 10 );
     }
 
     return 0;
       0x10000L,
       0x20000L,
 
-      0,    /* module-specific interface */
+      NULL,    /* module-specific interface */
 
       T42_Driver_Init,          /* FT_Module_Constructor  module_init   */
       T42_Driver_Done,          /* FT_Module_Destructor   module_done   */
 
     T42_GlyphSlot_Load,         /* FT_Slot_LoadFunc  load_glyph */
 
-    0,                          /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
-    0,                          /* FT_Face_GetAdvancesFunc  get_advances */
+    NULL,                       /* FT_Face_GetKerningFunc   get_kerning  */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_GetAdvancesFunc  get_advances */
 
     T42_Size_Request,           /* FT_Size_RequestFunc  request_size */
     T42_Size_Select             /* FT_Size_SelectFunc   select_size  */
index 6ddfb63..1ac4a0a 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level Type 42 driver interface (specification).                 */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index e1097cc..fda92ab 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 42 error codes (specification only).                            */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 4672c6e..87e5206 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 42 objects manager (body).                                      */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
     FT_Error       error   = FT_Err_Ok;
 
 
-    if ( face->glyph == NULL )
+    if ( !face->glyph )
     {
       /* First glyph slot for this face */
       slot->ttslot = t42face->ttf_face->glyph;
     FT_TRACE1(( "T42_GlyphSlot_Load: glyph index %d\n", glyph_index ));
 
     /* map T42 glyph index to embedded TTF's glyph index */
-    glyph_index = (FT_UInt)ft_atol(
-                    (const char *)t42face->type1.charstrings[glyph_index] );
+    glyph_index = (FT_UInt)ft_strtol(
+                    (const char *)t42face->type1.charstrings[glyph_index],
+                    NULL, 10 );
 
     t42_glyphslot_clear( t42slot->ttslot );
     error = ttclazz->load_glyph( t42slot->ttslot,
index 87a4045..eb4c5bf 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 42 objects manager (specification).                             */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index f948916..e7c6770 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 42 font parser (body).                                          */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
       if ( *cur == '/' || *cur == '(' )
       {
         FT_UInt  len;
-        FT_Bool  have_literal = ( *cur == '(' );
+        FT_Bool  have_literal = FT_BOOL( *cur == '(' );
 
 
         if ( cur + ( have_literal ? 3 : 2 ) >= limit )
   {
     FT_UNUSED( face );
 
-    FT_MEM_ZERO( loader, sizeof ( *loader ) );
+    FT_ZERO( loader );
     loader->num_glyphs = 0;
     loader->num_chars  = 0;
 
index ba9e857..7a68606 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 42 font parser (specification).                                 */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 850a156..2306ab6 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 42 font data types (specification only).                        */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  Roberto Alameda.                                                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 0d17a9b..ae8ac26 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType Type 42 driver component.                                   */
 /*                                                                         */
-/*  Copyright 2002-2016 by                                                 */
+/*  Copyright 2002-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
 /*                                                                         */
 /***************************************************************************/
 
-#define FT_MAKE_OPTION_SINGLE_OBJECT
 
+#define FT_MAKE_OPTION_SINGLE_OBJECT
 #include <ft2build.h>
+
+#include "t42drivr.c"
 #include "t42objs.c"
 #include "t42parse.c"
-#include "t42drivr.c"
+
 
 /* END */
index d81165e..52aa7f9 100644 (file)
@@ -1,6 +1,6 @@
 # FreeType 2 src/winfonts Jamfile
 #
-# Copyright 2001-2016 by
+# Copyright 2001-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 6835d3e..4251021 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Win FNT/FON error codes (specification only).                        */
 /*                                                                         */
-/*  Copyright 2001-2016 by                                                 */
+/*  Copyright 2001-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
index 83da573..ffc53a1 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 2fd7b82..73e825d 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2016 by
+# Copyright 1996-2017 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
index 1c74ccd..9811fbb 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType font driver for Windows FNT/FON files                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  Copyright 2003 Huw D M Davies for Codeweavers                          */
 /*  Copyright 2007 Dmitry Timoshkov for Codeweavers                        */
                   error = fnt_font_load( face->font, stream );
                   if ( error )
                   {
-                    FT_TRACE2(( "font #%lu load error %d\n",
+                    FT_TRACE2(( "font #%lu load error 0x%x\n",
                                 dir_entry2.name, error ));
                     goto Fail;
                   }
     if ( error )
       goto Fail;
 
+    /* sanity check */
+    if ( !face->font->header.pixel_height )
+    {
+      FT_TRACE2(( "invalid pixel height\n" ));
+      error = FT_THROW( Invalid_File_Format );
+      goto Fail;
+    }
+
     /* we now need to fill the root FT_Face fields */
     /* with relevant information                   */
     {
     FT_ULong    offset;
     FT_Bool     new_format;
 
-    FT_UNUSED( load_flags );
-
 
     if ( !face )
     {
       goto Exit;
     }
 
+    bitmap->rows       = font->header.pixel_height;
+    bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
+
+    slot->bitmap_left     = 0;
+    slot->bitmap_top      = font->header.ascent;
+    slot->format          = FT_GLYPH_FORMAT_BITMAP;
+
+    /* now set up metrics */
+    slot->metrics.width        = (FT_Pos)( bitmap->width << 6 );
+    slot->metrics.height       = (FT_Pos)( bitmap->rows << 6 );
+    slot->metrics.horiAdvance  = (FT_Pos)( bitmap->width << 6 );
+    slot->metrics.horiBearingX = 0;
+    slot->metrics.horiBearingY = slot->bitmap_top << 6;
+
+    ft_synthesize_vertical_metrics( &slot->metrics,
+                                    (FT_Pos)( bitmap->rows << 6 ) );
+
+    if ( load_flags & FT_LOAD_BITMAP_METRICS_ONLY )
+      goto Exit;
+
     /* jump to glyph data */
     p = font->fnt_frame + /* font->header.bits_offset */ + offset;
 
       FT_Byte*   write;
 
 
-      bitmap->pitch      = (int)pitch;
-      bitmap->rows       = font->header.pixel_height;
-      bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
-
-      if ( offset + pitch * bitmap->rows > font->header.file_size )
+      bitmap->pitch = (int)pitch;
+      if ( !pitch                                                 ||
+           offset + pitch * bitmap->rows > font->header.file_size )
       {
         FT_TRACE2(( "invalid bitmap width\n" ));
         error = FT_THROW( Invalid_File_Format );
         for ( write = column; p < limit; p++, write += bitmap->pitch )
           *write = *p;
       }
-    }
 
-    slot->internal->flags = FT_GLYPH_OWN_BITMAP;
-    slot->bitmap_left     = 0;
-    slot->bitmap_top      = font->header.ascent;
-    slot->format          = FT_GLYPH_FORMAT_BITMAP;
-
-    /* now set up metrics */
-    slot->metrics.width        = (FT_Pos)( bitmap->width << 6 );
-    slot->metrics.height       = (FT_Pos)( bitmap->rows << 6 );
-    slot->metrics.horiAdvance  = (FT_Pos)( bitmap->width << 6 );
-    slot->metrics.horiBearingX = 0;
-    slot->metrics.horiBearingY = slot->bitmap_top << 6;
-
-    ft_synthesize_vertical_metrics( &slot->metrics,
-                                    (FT_Pos)( bitmap->rows << 6 ) );
+      slot->internal->flags = FT_GLYPH_OWN_BITMAP;
+    }
 
   Exit:
     return error;
       0x10000L,
       0x20000L,
 
-      0,    /* module-specific interface */
+      NULL, /* module-specific interface */
 
-      0,                        /* FT_Module_Constructor  module_init   */
-      0,                        /* FT_Module_Destructor   module_done   */
+      NULL,                     /* FT_Module_Constructor  module_init   */
+      NULL,                     /* FT_Module_Destructor   module_done   */
       winfnt_get_service        /* FT_Module_Requester    get_interface */
     },
 
 
     FNT_Face_Init,              /* FT_Face_InitFunc  init_face */
     FNT_Face_Done,              /* FT_Face_DoneFunc  done_face */
-    0,                          /* FT_Size_InitFunc  init_size */
-    0,                          /* FT_Size_DoneFunc  done_size */
-    0,                          /* FT_Slot_InitFunc  init_slot */
-    0,                          /* FT_Slot_DoneFunc  done_slot */
+    NULL,                       /* FT_Size_InitFunc  init_size */
+    NULL,                       /* FT_Size_DoneFunc  done_size */
+    NULL,                       /* FT_Slot_InitFunc  init_slot */
+    NULL,                       /* FT_Slot_DoneFunc  done_slot */
 
     FNT_Load_Glyph,             /* FT_Slot_LoadFunc  load_glyph */
 
-    0,                          /* FT_Face_GetKerningFunc   get_kerning  */
-    0,                          /* FT_Face_AttachFunc       attach_file  */
-    0,                          /* FT_Face_GetAdvancesFunc  get_advances */
+    NULL,                       /* FT_Face_GetKerningFunc   get_kerning  */
+    NULL,                       /* FT_Face_AttachFunc       attach_file  */
+    NULL,                       /* FT_Face_GetAdvancesFunc  get_advances */
 
     FNT_Size_Request,           /* FT_Size_RequestFunc  request_size */
     FNT_Size_Select             /* FT_Size_SelectFunc   select_size  */
index 9a4f32d..884b645 100644 (file)
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType font driver for Windows FNT/FON files                       */
 /*                                                                         */
-/*  Copyright 1996-2016 by                                                 */
+/*  Copyright 1996-2017 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*  Copyright 2007 Dmitry Timoshkov for Codeweavers                        */
 /*                                                                         */
index be8c615..ea56318 100644 (file)
@@ -1,6 +1,6 @@
 $! make Freetype2 under OpenVMS
 $!
-$! Copyright 2003-2016 by
+$! Copyright 2003-2017 by
 $! David Turner, Robert Wilhelm, and Werner Lemberg.
 $!
 $! This file is part of the FreeType project, and may only be used, modified,