Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-07-13 09:56:24 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:20:32 +0300
commitb6a6f46f5bfd2ee1f0871d5480e2b7e70afab648 (patch)
tree7f43a391f011bc63f9aeee3e82ef0b56d27cac49 /3party/freetype
parenta68488731fe254b5449c20581aed5916e039a18e (diff)
Updated freetype to 2.4.5
Removed hardcoded Stroked cached glyphs patch
Diffstat (limited to '3party/freetype')
-rw-r--r--3party/freetype/.gitignore1
-rw-r--r--3party/freetype/ChangeLog2724
-rw-r--r--3party/freetype/ChangeLog.202613
-rw-r--r--3party/freetype/ChangeLog.219439
-rw-r--r--3party/freetype/ChangeLog.222837
-rw-r--r--3party/freetype/ChangeLog.237948
-rw-r--r--3party/freetype/Jamfile195
-rw-r--r--3party/freetype/Jamrules71
-rw-r--r--3party/freetype/README64
-rw-r--r--3party/freetype/README.git46
-rw-r--r--3party/freetype/autofit/afcjk.h57
-rw-r--r--3party/freetype/autogen.sh166
-rw-r--r--3party/freetype/builds/amiga/README110
-rw-r--r--3party/freetype/builds/amiga/include/freetype/config/ftconfig.h55
-rw-r--r--3party/freetype/builds/amiga/include/freetype/config/ftmodule.h160
-rw-r--r--3party/freetype/builds/amiga/makefile299
-rw-r--r--3party/freetype/builds/amiga/makefile.os4303
-rw-r--r--3party/freetype/builds/amiga/smakefile303
-rw-r--r--3party/freetype/builds/amiga/src/base/ftdebug.c279
-rw-r--r--3party/freetype/builds/amiga/src/base/ftsystem.c530
-rw-r--r--3party/freetype/builds/ansi/ansi-def.mk74
-rw-r--r--3party/freetype/builds/ansi/ansi.mk21
-rw-r--r--3party/freetype/builds/atari/ATARI.H20
-rw-r--r--3party/freetype/builds/atari/FNames.SIC37
-rw-r--r--3party/freetype/builds/atari/FREETYPE.PRJ32
-rw-r--r--3party/freetype/builds/atari/README.TXT51
-rw-r--r--3party/freetype/builds/atari/deflinejoiner.awk181
-rwxr-xr-x3party/freetype/builds/atari/gen-purec-patch.sh40
-rw-r--r--3party/freetype/builds/beos/beos-def.mk76
-rw-r--r--3party/freetype/builds/beos/beos.mk19
-rw-r--r--3party/freetype/builds/beos/detect.mk41
-rw-r--r--3party/freetype/builds/compiler/ansi-cc.mk80
-rw-r--r--3party/freetype/builds/compiler/bcc-dev.mk86
-rw-r--r--3party/freetype/builds/compiler/bcc.mk86
-rw-r--r--3party/freetype/builds/compiler/emx.mk77
-rw-r--r--3party/freetype/builds/compiler/gcc-dev.mk95
-rw-r--r--3party/freetype/builds/compiler/gcc.mk77
-rw-r--r--3party/freetype/builds/compiler/intelc.mk85
-rw-r--r--3party/freetype/builds/compiler/unix-lcc.mk83
-rw-r--r--3party/freetype/builds/compiler/visualage.mk76
-rw-r--r--3party/freetype/builds/compiler/visualc.mk82
-rw-r--r--3party/freetype/builds/compiler/watcom.mk81
-rw-r--r--3party/freetype/builds/compiler/win-lcc.mk81
-rw-r--r--3party/freetype/builds/detect.mk154
-rw-r--r--3party/freetype/builds/dos/detect.mk142
-rw-r--r--3party/freetype/builds/dos/dos-def.mk45
-rw-r--r--3party/freetype/builds/dos/dos-emx.mk21
-rw-r--r--3party/freetype/builds/dos/dos-gcc.mk21
-rw-r--r--3party/freetype/builds/dos/dos-wat.mk20
-rw-r--r--3party/freetype/builds/exports.mk76
-rw-r--r--3party/freetype/builds/freetype.mk361
-rw-r--r--3party/freetype/builds/link_dos.mk42
-rw-r--r--3party/freetype/builds/link_std.mk42
-rw-r--r--3party/freetype/builds/mac/FreeType.m68k_cfm.make.txt211
-rw-r--r--3party/freetype/builds/mac/FreeType.m68k_far.make.txt210
-rw-r--r--3party/freetype/builds/mac/FreeType.ppc_carbon.make.txt214
-rw-r--r--3party/freetype/builds/mac/FreeType.ppc_classic.make.txt215
-rw-r--r--3party/freetype/builds/mac/README403
-rwxr-xr-x3party/freetype/builds/mac/ascii2mpw.py24
-rw-r--r--3party/freetype/builds/mac/ftlib.prj.xml1194
-rw-r--r--3party/freetype/builds/mac/ftmac.c1531
-rw-r--r--3party/freetype/builds/modules.mk79
-rw-r--r--3party/freetype/builds/newline1
-rw-r--r--3party/freetype/builds/os2/detect.mk73
-rw-r--r--3party/freetype/builds/os2/os2-def.mk44
-rw-r--r--3party/freetype/builds/os2/os2-dev.mk30
-rw-r--r--3party/freetype/builds/os2/os2-gcc.mk26
-rw-r--r--3party/freetype/builds/toplevel.mk256
-rw-r--r--3party/freetype/builds/unix/.gitignore17
-rw-r--r--3party/freetype/builds/unix/configure.raw707
-rw-r--r--3party/freetype/builds/unix/detect.mk91
-rw-r--r--3party/freetype/builds/unix/freetype-config.in160
-rw-r--r--3party/freetype/builds/unix/freetype2.in12
-rw-r--r--3party/freetype/builds/unix/freetype2.m4194
-rw-r--r--3party/freetype/builds/unix/ft-munmap.m432
-rw-r--r--3party/freetype/builds/unix/ft2unix.h61
-rw-r--r--3party/freetype/builds/unix/ftconfig.in551
-rw-r--r--3party/freetype/builds/unix/ftsystem.c419
-rw-r--r--3party/freetype/builds/unix/install.mk97
-rwxr-xr-x3party/freetype/builds/unix/mkinstalldirs161
-rw-r--r--3party/freetype/builds/unix/unix-cc.in114
-rw-r--r--3party/freetype/builds/unix/unix-def.in85
-rw-r--r--3party/freetype/builds/unix/unix-dev.mk26
-rw-r--r--3party/freetype/builds/unix/unix-lcc.mk24
-rw-r--r--3party/freetype/builds/unix/unix.mk62
-rw-r--r--3party/freetype/builds/unix/unixddef.mk45
-rw-r--r--3party/freetype/builds/vms/ftconfig.h351
-rw-r--r--3party/freetype/builds/vms/ftsystem.c328
-rw-r--r--3party/freetype/builds/win32/.gitignore5
-rw-r--r--3party/freetype/builds/win32/detect.mk183
-rw-r--r--3party/freetype/builds/win32/ftdebug.c214
-rw-r--r--3party/freetype/builds/win32/vc2005/index.html37
-rw-r--r--3party/freetype/builds/win32/vc2008/index.html37
-rw-r--r--3party/freetype/builds/win32/vc2010/index.html37
-rw-r--r--3party/freetype/builds/win32/visualc/freetype.dsp400
-rw-r--r--3party/freetype/builds/win32/visualc/freetype.dsw29
-rw-r--r--3party/freetype/builds/win32/visualc/index.html37
-rw-r--r--3party/freetype/builds/win32/visualce/freetype.dsp400
-rw-r--r--3party/freetype/builds/win32/visualce/freetype.dsw29
-rw-r--r--3party/freetype/builds/win32/visualce/index.html47
-rw-r--r--3party/freetype/builds/win32/w32-bcc.mk28
-rw-r--r--3party/freetype/builds/win32/w32-bccd.mk26
-rw-r--r--3party/freetype/builds/win32/w32-dev.mk32
-rw-r--r--3party/freetype/builds/win32/w32-gcc.mk31
-rw-r--r--3party/freetype/builds/win32/w32-icc.mk28
-rw-r--r--3party/freetype/builds/win32/w32-intl.mk28
-rw-r--r--3party/freetype/builds/win32/w32-lcc.mk24
-rw-r--r--3party/freetype/builds/win32/w32-mingw32.mk33
-rw-r--r--3party/freetype/builds/win32/w32-vcc.mk28
-rw-r--r--3party/freetype/builds/win32/w32-wat.mk28
-rw-r--r--3party/freetype/builds/win32/win32-def.mk47
-rw-r--r--3party/freetype/builds/wince/ftdebug.c236
-rw-r--r--3party/freetype/builds/wince/vc2005-ce/index.html47
-rw-r--r--3party/freetype/builds/wince/vc2008-ce/index.html47
-rwxr-xr-x3party/freetype/configure125
-rw-r--r--3party/freetype/custom/ftmodule.h32
-rw-r--r--3party/freetype/devel/ft2build.h (renamed from 3party/freetype/custom/ft2build.h)31
-rw-r--r--3party/freetype/devel/ftoption.h (renamed from 3party/freetype/custom/ftoption.h)162
-rw-r--r--3party/freetype/docs/CHANGES3545
-rw-r--r--3party/freetype/docs/CUSTOMIZE150
-rw-r--r--3party/freetype/docs/DEBUG202
-rw-r--r--3party/freetype/docs/FTL.TXT169
-rw-r--r--3party/freetype/docs/GPLv2.TXT340
-rw-r--r--3party/freetype/docs/INSTALL83
-rw-r--r--3party/freetype/docs/INSTALL.ANY156
-rw-r--r--3party/freetype/docs/INSTALL.CROSS135
-rw-r--r--3party/freetype/docs/INSTALL.GNU159
-rw-r--r--3party/freetype/docs/INSTALL.MAC32
-rw-r--r--3party/freetype/docs/INSTALL.UNIX96
-rw-r--r--3party/freetype/docs/INSTALL.VMS62
-rw-r--r--3party/freetype/docs/LICENSE.TXT34
-rw-r--r--3party/freetype/docs/MAKEPP5
-rw-r--r--3party/freetype/docs/PROBLEMS90
-rw-r--r--3party/freetype/docs/TODO40
-rw-r--r--3party/freetype/docs/UPGRADE.UNIX137
-rw-r--r--3party/freetype/docs/VERSION.DLL144
-rw-r--r--3party/freetype/docs/formats.txt174
-rw-r--r--3party/freetype/docs/raster.txt635
-rw-r--r--3party/freetype/docs/reference/.gitignore1
-rw-r--r--3party/freetype/docs/reference/README5
-rw-r--r--3party/freetype/docs/release195
-rw-r--r--3party/freetype/freetype.pro588
-rw-r--r--3party/freetype/include/freetype/config/ftconfig.h98
-rw-r--r--3party/freetype/include/freetype/config/ftheader.h15
-rw-r--r--3party/freetype/include/freetype/config/ftoption.h142
-rw-r--r--3party/freetype/include/freetype/freetype.h80
-rw-r--r--3party/freetype/include/freetype/ftbbox.h10
-rw-r--r--3party/freetype/include/freetype/ftbzip2.h102
-rw-r--r--3party/freetype/include/freetype/ftcache.h35
-rw-r--r--3party/freetype/include/freetype/ftchapters.h1
-rw-r--r--3party/freetype/include/freetype/fterrdef.h20
-rw-r--r--3party/freetype/include/freetype/ftgasp.h18
-rw-r--r--3party/freetype/include/freetype/ftglyph.h11
-rw-r--r--3party/freetype/include/freetype/ftimage.h50
-rw-r--r--3party/freetype/include/freetype/ftincrem.h8
-rw-r--r--3party/freetype/include/freetype/ftlcdfil.h45
-rw-r--r--3party/freetype/include/freetype/ftlist.h6
-rw-r--r--3party/freetype/include/freetype/ftmodapi.h44
-rw-r--r--3party/freetype/include/freetype/ftmoderr.h39
-rw-r--r--3party/freetype/include/freetype/ftoutln.h12
-rw-r--r--3party/freetype/include/freetype/ftrender.h14
-rw-r--r--3party/freetype/include/freetype/ftsnames.h31
-rw-r--r--3party/freetype/include/freetype/ftsystem.h7
-rw-r--r--3party/freetype/include/freetype/internal/ftmemory.h22
-rw-r--r--3party/freetype/include/freetype/internal/ftobjs.h31
-rw-r--r--3party/freetype/include/freetype/internal/ftstream.h114
-rw-r--r--3party/freetype/include/freetype/internal/fttrace.h7
-rw-r--r--3party/freetype/include/freetype/internal/pcftypes.h56
-rw-r--r--3party/freetype/include/freetype/ttnameid.h2
-rw-r--r--3party/freetype/include/freetype/tttables.h29
-rw-r--r--3party/freetype/modules.cfg255
-rw-r--r--3party/freetype/objs/.gitignore14
-rw-r--r--3party/freetype/objs/README2
-rw-r--r--3party/freetype/src/Jamfile25
-rw-r--r--3party/freetype/src/autofit/Jamfile (renamed from 3party/freetype/autofit/Jamfile)0
-rw-r--r--3party/freetype/src/autofit/afangles.c (renamed from 3party/freetype/autofit/afangles.c)4
-rw-r--r--3party/freetype/src/autofit/afangles.h (renamed from 3party/freetype/autofit/afangles.h)0
-rw-r--r--3party/freetype/src/autofit/afcjk.c (renamed from 3party/freetype/autofit/afcjk.c)837
-rw-r--r--3party/freetype/src/autofit/afcjk.h141
-rw-r--r--3party/freetype/src/autofit/afdummy.c (renamed from 3party/freetype/autofit/afdummy.c)9
-rw-r--r--3party/freetype/src/autofit/afdummy.h (renamed from 3party/freetype/autofit/afdummy.h)4
-rw-r--r--3party/freetype/src/autofit/aferrors.h (renamed from 3party/freetype/autofit/aferrors.h)0
-rw-r--r--3party/freetype/src/autofit/afglobal.c (renamed from 3party/freetype/autofit/afglobal.c)23
-rw-r--r--3party/freetype/src/autofit/afglobal.h (renamed from 3party/freetype/autofit/afglobal.h)8
-rw-r--r--3party/freetype/src/autofit/afhints.c (renamed from 3party/freetype/autofit/afhints.c)370
-rw-r--r--3party/freetype/src/autofit/afhints.h (renamed from 3party/freetype/autofit/afhints.h)220
-rw-r--r--3party/freetype/src/autofit/afindic.c (renamed from 3party/freetype/autofit/afindic.c)55
-rw-r--r--3party/freetype/src/autofit/afindic.h (renamed from 3party/freetype/autofit/afindic.h)0
-rw-r--r--3party/freetype/src/autofit/aflatin.c (renamed from 3party/freetype/autofit/aflatin.c)512
-rw-r--r--3party/freetype/src/autofit/aflatin.h (renamed from 3party/freetype/autofit/aflatin.h)25
-rw-r--r--3party/freetype/src/autofit/aflatin2.c (renamed from 3party/freetype/autofit/aflatin2.c)242
-rw-r--r--3party/freetype/src/autofit/aflatin2.h (renamed from 3party/freetype/autofit/aflatin2.h)0
-rw-r--r--3party/freetype/src/autofit/afloader.c (renamed from 3party/freetype/autofit/afloader.c)32
-rw-r--r--3party/freetype/src/autofit/afloader.h (renamed from 3party/freetype/autofit/afloader.h)8
-rw-r--r--3party/freetype/src/autofit/afmodule.c (renamed from 3party/freetype/autofit/afmodule.c)17
-rw-r--r--3party/freetype/src/autofit/afmodule.h (renamed from 3party/freetype/autofit/afmodule.h)0
-rw-r--r--3party/freetype/src/autofit/afpic.c (renamed from 3party/freetype/autofit/afpic.c)62
-rw-r--r--3party/freetype/src/autofit/afpic.h (renamed from 3party/freetype/autofit/afpic.h)27
-rw-r--r--3party/freetype/src/autofit/aftypes.h (renamed from 3party/freetype/autofit/aftypes.h)129
-rw-r--r--3party/freetype/src/autofit/afwarp.c (renamed from 3party/freetype/autofit/afwarp.c)62
-rw-r--r--3party/freetype/src/autofit/afwarp.h (renamed from 3party/freetype/autofit/afwarp.h)0
-rw-r--r--3party/freetype/src/autofit/autofit.c (renamed from 3party/freetype/autofit/autofit.c)4
-rw-r--r--3party/freetype/src/autofit/module.mk23
-rw-r--r--3party/freetype/src/autofit/rules.mk79
-rw-r--r--3party/freetype/src/base/Jamfile (renamed from 3party/freetype/base/Jamfile)0
-rw-r--r--3party/freetype/src/base/basepic.c (renamed from 3party/freetype/base/basepic.c)0
-rw-r--r--3party/freetype/src/base/basepic.h (renamed from 3party/freetype/base/basepic.h)0
-rw-r--r--3party/freetype/src/base/ftadvanc.c (renamed from 3party/freetype/base/ftadvanc.c)0
-rw-r--r--3party/freetype/src/base/ftapi.c (renamed from 3party/freetype/base/ftapi.c)0
-rw-r--r--3party/freetype/src/base/ftbase.c (renamed from 3party/freetype/base/ftbase.c)0
-rw-r--r--3party/freetype/src/base/ftbase.h (renamed from 3party/freetype/base/ftbase.h)17
-rw-r--r--3party/freetype/src/base/ftbbox.c (renamed from 3party/freetype/base/ftbbox.c)6
-rw-r--r--3party/freetype/src/base/ftbdf.c (renamed from 3party/freetype/base/ftbdf.c)0
-rw-r--r--3party/freetype/src/base/ftbitmap.c (renamed from 3party/freetype/base/ftbitmap.c)2
-rw-r--r--3party/freetype/src/base/ftcalc.c (renamed from 3party/freetype/base/ftcalc.c)0
-rw-r--r--3party/freetype/src/base/ftcid.c (renamed from 3party/freetype/base/ftcid.c)0
-rw-r--r--3party/freetype/src/base/ftdbgmem.c (renamed from 3party/freetype/base/ftdbgmem.c)8
-rw-r--r--3party/freetype/src/base/ftdebug.c (renamed from 3party/freetype/base/ftdebug.c)0
-rw-r--r--3party/freetype/src/base/ftfstype.c (renamed from 3party/freetype/base/ftfstype.c)0
-rw-r--r--3party/freetype/src/base/ftgasp.c (renamed from 3party/freetype/base/ftgasp.c)0
-rw-r--r--3party/freetype/src/base/ftgloadr.c (renamed from 3party/freetype/base/ftgloadr.c)4
-rw-r--r--3party/freetype/src/base/ftglyph.c (renamed from 3party/freetype/base/ftglyph.c)10
-rw-r--r--3party/freetype/src/base/ftgxval.c (renamed from 3party/freetype/base/ftgxval.c)17
-rw-r--r--3party/freetype/src/base/ftinit.c (renamed from 3party/freetype/base/ftinit.c)7
-rw-r--r--3party/freetype/src/base/ftlcdfil.c (renamed from 3party/freetype/base/ftlcdfil.c)37
-rw-r--r--3party/freetype/src/base/ftmac.c (renamed from 3party/freetype/base/ftmac.c)0
-rw-r--r--3party/freetype/src/base/ftmm.c (renamed from 3party/freetype/base/ftmm.c)0
-rw-r--r--3party/freetype/src/base/ftobjs.c (renamed from 3party/freetype/base/ftobjs.c)319
-rw-r--r--3party/freetype/src/base/ftotval.c (renamed from 3party/freetype/base/ftotval.c)9
-rw-r--r--3party/freetype/src/base/ftoutln.c (renamed from 3party/freetype/base/ftoutln.c)11
-rw-r--r--3party/freetype/src/base/ftpatent.c (renamed from 3party/freetype/base/ftpatent.c)9
-rw-r--r--3party/freetype/src/base/ftpfr.c (renamed from 3party/freetype/base/ftpfr.c)7
-rw-r--r--3party/freetype/src/base/ftpic.c (renamed from 3party/freetype/base/ftpic.c)0
-rw-r--r--3party/freetype/src/base/ftrfork.c (renamed from 3party/freetype/base/ftrfork.c)92
-rw-r--r--3party/freetype/src/base/ftsnames.c (renamed from 3party/freetype/base/ftsnames.c)0
-rw-r--r--3party/freetype/src/base/ftstream.c (renamed from 3party/freetype/base/ftstream.c)86
-rw-r--r--3party/freetype/src/base/ftstroke.c (renamed from 3party/freetype/base/ftstroke.c)17
-rw-r--r--3party/freetype/src/base/ftsynth.c (renamed from 3party/freetype/base/ftsynth.c)8
-rw-r--r--3party/freetype/src/base/ftsystem.c (renamed from 3party/freetype/base/ftsystem.c)26
-rw-r--r--3party/freetype/src/base/fttrigon.c (renamed from 3party/freetype/base/fttrigon.c)0
-rw-r--r--3party/freetype/src/base/fttype1.c (renamed from 3party/freetype/base/fttype1.c)0
-rw-r--r--3party/freetype/src/base/ftutil.c (renamed from 3party/freetype/base/ftutil.c)0
-rw-r--r--3party/freetype/src/base/ftwinfnt.c (renamed from 3party/freetype/base/ftwinfnt.c)0
-rw-r--r--3party/freetype/src/base/ftxf86.c (renamed from 3party/freetype/base/ftxf86.c)0
-rw-r--r--3party/freetype/src/base/rules.mk96
-rw-r--r--3party/freetype/src/bdf/Jamfile (renamed from 3party/freetype/bdf/Jamfile)0
-rw-r--r--3party/freetype/src/bdf/README (renamed from 3party/freetype/bdf/README)4
-rw-r--r--3party/freetype/src/bdf/bdf.c (renamed from 3party/freetype/bdf/bdf.c)0
-rw-r--r--3party/freetype/src/bdf/bdf.h (renamed from 3party/freetype/bdf/bdf.h)0
-rw-r--r--3party/freetype/src/bdf/bdfdrivr.c (renamed from 3party/freetype/bdf/bdfdrivr.c)14
-rw-r--r--3party/freetype/src/bdf/bdfdrivr.h (renamed from 3party/freetype/bdf/bdfdrivr.h)0
-rw-r--r--3party/freetype/src/bdf/bdferror.h (renamed from 3party/freetype/bdf/bdferror.h)0
-rw-r--r--3party/freetype/src/bdf/bdflib.c (renamed from 3party/freetype/bdf/bdflib.c)91
-rw-r--r--3party/freetype/src/bdf/module.mk34
-rw-r--r--3party/freetype/src/bdf/rules.mk81
-rw-r--r--3party/freetype/src/bzip2/Jamfile19
-rw-r--r--3party/freetype/src/bzip2/ftbzip2.c510
-rw-r--r--3party/freetype/src/bzip2/rules.mk63
-rw-r--r--3party/freetype/src/cache/Jamfile (renamed from 3party/freetype/cache/Jamfile)0
-rw-r--r--3party/freetype/src/cache/ftcache.c (renamed from 3party/freetype/cache/ftcache.c)0
-rw-r--r--3party/freetype/src/cache/ftcbasic.c (renamed from 3party/freetype/cache/ftcbasic.c)108
-rw-r--r--3party/freetype/src/cache/ftccache.c (renamed from 3party/freetype/cache/ftccache.c)113
-rw-r--r--3party/freetype/src/cache/ftccache.h (renamed from 3party/freetype/cache/ftccache.h)79
-rw-r--r--3party/freetype/src/cache/ftccback.h (renamed from 3party/freetype/cache/ftccback.h)8
-rw-r--r--3party/freetype/src/cache/ftccmap.c (renamed from 3party/freetype/cache/ftccmap.c)45
-rw-r--r--3party/freetype/src/cache/ftcerror.h (renamed from 3party/freetype/cache/ftcerror.h)0
-rw-r--r--3party/freetype/src/cache/ftcglyph.c (renamed from 3party/freetype/cache/ftcglyph.c)24
-rw-r--r--3party/freetype/src/cache/ftcglyph.h (renamed from 3party/freetype/cache/ftcglyph.h)14
-rw-r--r--3party/freetype/src/cache/ftcimage.c (renamed from 3party/freetype/cache/ftcimage.c)4
-rw-r--r--3party/freetype/src/cache/ftcimage.h (renamed from 3party/freetype/cache/ftcimage.h)0
-rw-r--r--3party/freetype/src/cache/ftcmanag.c (renamed from 3party/freetype/cache/ftcmanag.c)4
-rw-r--r--3party/freetype/src/cache/ftcmanag.h (renamed from 3party/freetype/cache/ftcmanag.h)4
-rw-r--r--3party/freetype/src/cache/ftcmru.c (renamed from 3party/freetype/cache/ftcmru.c)12
-rw-r--r--3party/freetype/src/cache/ftcmru.h (renamed from 3party/freetype/cache/ftcmru.h)4
-rw-r--r--3party/freetype/src/cache/ftcsbits.c (renamed from 3party/freetype/cache/ftcsbits.c)33
-rw-r--r--3party/freetype/src/cache/ftcsbits.h (renamed from 3party/freetype/cache/ftcsbits.h)9
-rw-r--r--3party/freetype/src/cache/rules.mk80
-rw-r--r--3party/freetype/src/cff/Jamfile (renamed from 3party/freetype/cff/Jamfile)0
-rw-r--r--3party/freetype/src/cff/cff.c (renamed from 3party/freetype/cff/cff.c)0
-rw-r--r--3party/freetype/src/cff/cffcmap.c (renamed from 3party/freetype/cff/cffcmap.c)31
-rw-r--r--3party/freetype/src/cff/cffcmap.h (renamed from 3party/freetype/cff/cffcmap.h)0
-rw-r--r--3party/freetype/src/cff/cffdrivr.c (renamed from 3party/freetype/cff/cffdrivr.c)83
-rw-r--r--3party/freetype/src/cff/cffdrivr.h (renamed from 3party/freetype/cff/cffdrivr.h)0
-rw-r--r--3party/freetype/src/cff/cfferrs.h (renamed from 3party/freetype/cff/cfferrs.h)0
-rw-r--r--3party/freetype/src/cff/cffgload.c (renamed from 3party/freetype/cff/cffgload.c)315
-rw-r--r--3party/freetype/src/cff/cffgload.h (renamed from 3party/freetype/cff/cffgload.h)8
-rw-r--r--3party/freetype/src/cff/cffload.c (renamed from 3party/freetype/cff/cffload.c)245
-rw-r--r--3party/freetype/src/cff/cffload.h (renamed from 3party/freetype/cff/cffload.h)16
-rw-r--r--3party/freetype/src/cff/cffobjs.c (renamed from 3party/freetype/cff/cffobjs.c)201
-rw-r--r--3party/freetype/src/cff/cffobjs.h (renamed from 3party/freetype/cff/cffobjs.h)0
-rw-r--r--3party/freetype/src/cff/cffparse.c (renamed from 3party/freetype/cff/cffparse.c)25
-rw-r--r--3party/freetype/src/cff/cffparse.h (renamed from 3party/freetype/cff/cffparse.h)0
-rw-r--r--3party/freetype/src/cff/cffpic.c (renamed from 3party/freetype/cff/cffpic.c)16
-rw-r--r--3party/freetype/src/cff/cffpic.h (renamed from 3party/freetype/cff/cffpic.h)0
-rw-r--r--3party/freetype/src/cff/cfftoken.h (renamed from 3party/freetype/cff/cfftoken.h)0
-rw-r--r--3party/freetype/src/cff/cfftypes.h (renamed from 3party/freetype/cff/cfftypes.h)24
-rw-r--r--3party/freetype/src/cff/module.mk23
-rw-r--r--3party/freetype/src/cff/rules.mk73
-rw-r--r--3party/freetype/src/cid/Jamfile (renamed from 3party/freetype/cid/Jamfile)0
-rw-r--r--3party/freetype/src/cid/ciderrs.h (renamed from 3party/freetype/cid/ciderrs.h)0
-rw-r--r--3party/freetype/src/cid/cidgload.c (renamed from 3party/freetype/cid/cidgload.c)22
-rw-r--r--3party/freetype/src/cid/cidgload.h (renamed from 3party/freetype/cid/cidgload.h)0
-rw-r--r--3party/freetype/src/cid/cidload.c (renamed from 3party/freetype/cid/cidload.c)0
-rw-r--r--3party/freetype/src/cid/cidload.h (renamed from 3party/freetype/cid/cidload.h)0
-rw-r--r--3party/freetype/src/cid/cidobjs.c (renamed from 3party/freetype/cid/cidobjs.c)13
-rw-r--r--3party/freetype/src/cid/cidobjs.h (renamed from 3party/freetype/cid/cidobjs.h)0
-rw-r--r--3party/freetype/src/cid/cidparse.c (renamed from 3party/freetype/cid/cidparse.c)0
-rw-r--r--3party/freetype/src/cid/cidparse.h (renamed from 3party/freetype/cid/cidparse.h)0
-rw-r--r--3party/freetype/src/cid/cidriver.c (renamed from 3party/freetype/cid/cidriver.c)0
-rw-r--r--3party/freetype/src/cid/cidriver.h (renamed from 3party/freetype/cid/cidriver.h)0
-rw-r--r--3party/freetype/src/cid/cidtoken.h (renamed from 3party/freetype/cid/cidtoken.h)2
-rw-r--r--3party/freetype/src/cid/module.mk23
-rw-r--r--3party/freetype/src/cid/rules.mk70
-rw-r--r--3party/freetype/src/cid/type1cid.c (renamed from 3party/freetype/cid/type1cid.c)0
-rw-r--r--3party/freetype/src/gxvalid/Jamfile (renamed from 3party/freetype/gxvalid/Jamfile)0
-rw-r--r--3party/freetype/src/gxvalid/README (renamed from 3party/freetype/gxvalid/README)0
-rw-r--r--3party/freetype/src/gxvalid/gxvalid.c (renamed from 3party/freetype/gxvalid/gxvalid.c)0
-rw-r--r--3party/freetype/src/gxvalid/gxvalid.h (renamed from 3party/freetype/gxvalid/gxvalid.h)0
-rw-r--r--3party/freetype/src/gxvalid/gxvbsln.c (renamed from 3party/freetype/gxvalid/gxvbsln.c)0
-rw-r--r--3party/freetype/src/gxvalid/gxvcommn.c (renamed from 3party/freetype/gxvalid/gxvcommn.c)49
-rw-r--r--3party/freetype/src/gxvalid/gxvcommn.h (renamed from 3party/freetype/gxvalid/gxvcommn.h)16
-rw-r--r--3party/freetype/src/gxvalid/gxverror.h (renamed from 3party/freetype/gxvalid/gxverror.h)0
-rw-r--r--3party/freetype/src/gxvalid/gxvfeat.c (renamed from 3party/freetype/gxvalid/gxvfeat.c)25
-rw-r--r--3party/freetype/src/gxvalid/gxvfeat.h (renamed from 3party/freetype/gxvalid/gxvfeat.h)0
-rw-r--r--3party/freetype/src/gxvalid/gxvfgen.c (renamed from 3party/freetype/gxvalid/gxvfgen.c)4
-rw-r--r--3party/freetype/src/gxvalid/gxvjust.c (renamed from 3party/freetype/gxvalid/gxvjust.c)107
-rw-r--r--3party/freetype/src/gxvalid/gxvkern.c (renamed from 3party/freetype/gxvalid/gxvkern.c)66
-rw-r--r--3party/freetype/src/gxvalid/gxvlcar.c (renamed from 3party/freetype/gxvalid/gxvlcar.c)0
-rw-r--r--3party/freetype/src/gxvalid/gxvmod.c (renamed from 3party/freetype/gxvalid/gxvmod.c)0
-rw-r--r--3party/freetype/src/gxvalid/gxvmod.h (renamed from 3party/freetype/gxvalid/gxvmod.h)0
-rw-r--r--3party/freetype/src/gxvalid/gxvmort.c (renamed from 3party/freetype/gxvalid/gxvmort.c)23
-rw-r--r--3party/freetype/src/gxvalid/gxvmort.h (renamed from 3party/freetype/gxvalid/gxvmort.h)0
-rw-r--r--3party/freetype/src/gxvalid/gxvmort0.c (renamed from 3party/freetype/gxvalid/gxvmort0.c)16
-rw-r--r--3party/freetype/src/gxvalid/gxvmort1.c (renamed from 3party/freetype/gxvalid/gxvmort1.c)27
-rw-r--r--3party/freetype/src/gxvalid/gxvmort2.c (renamed from 3party/freetype/gxvalid/gxvmort2.c)37
-rw-r--r--3party/freetype/src/gxvalid/gxvmort4.c (renamed from 3party/freetype/gxvalid/gxvmort4.c)0
-rw-r--r--3party/freetype/src/gxvalid/gxvmort5.c (renamed from 3party/freetype/gxvalid/gxvmort5.c)9
-rw-r--r--3party/freetype/src/gxvalid/gxvmorx.c (renamed from 3party/freetype/gxvalid/gxvmorx.c)15
-rw-r--r--3party/freetype/src/gxvalid/gxvmorx.h (renamed from 3party/freetype/gxvalid/gxvmorx.h)0
-rw-r--r--3party/freetype/src/gxvalid/gxvmorx0.c (renamed from 3party/freetype/gxvalid/gxvmorx0.c)8
-rw-r--r--3party/freetype/src/gxvalid/gxvmorx1.c (renamed from 3party/freetype/gxvalid/gxvmorx1.c)7
-rw-r--r--3party/freetype/src/gxvalid/gxvmorx2.c (renamed from 3party/freetype/gxvalid/gxvmorx2.c)40
-rw-r--r--3party/freetype/src/gxvalid/gxvmorx4.c (renamed from 3party/freetype/gxvalid/gxvmorx4.c)0
-rw-r--r--3party/freetype/src/gxvalid/gxvmorx5.c (renamed from 3party/freetype/gxvalid/gxvmorx5.c)8
-rw-r--r--3party/freetype/src/gxvalid/gxvopbd.c (renamed from 3party/freetype/gxvalid/gxvopbd.c)0
-rw-r--r--3party/freetype/src/gxvalid/gxvprop.c (renamed from 3party/freetype/gxvalid/gxvprop.c)30
-rw-r--r--3party/freetype/src/gxvalid/gxvtrak.c (renamed from 3party/freetype/gxvalid/gxvtrak.c)19
-rw-r--r--3party/freetype/src/gxvalid/module.mk23
-rw-r--r--3party/freetype/src/gxvalid/rules.mk94
-rw-r--r--3party/freetype/src/gzip/Jamfile (renamed from 3party/freetype/gzip/Jamfile)0
-rw-r--r--3party/freetype/src/gzip/adler32.c (renamed from 3party/freetype/gzip/adler32.c)0
-rw-r--r--3party/freetype/src/gzip/ftgzip.c (renamed from 3party/freetype/gzip/ftgzip.c)14
-rw-r--r--3party/freetype/src/gzip/infblock.c (renamed from 3party/freetype/gzip/infblock.c)0
-rw-r--r--3party/freetype/src/gzip/infblock.h (renamed from 3party/freetype/gzip/infblock.h)0
-rw-r--r--3party/freetype/src/gzip/infcodes.c (renamed from 3party/freetype/gzip/infcodes.c)0
-rw-r--r--3party/freetype/src/gzip/infcodes.h (renamed from 3party/freetype/gzip/infcodes.h)0
-rw-r--r--3party/freetype/src/gzip/inffixed.h (renamed from 3party/freetype/gzip/inffixed.h)0
-rw-r--r--3party/freetype/src/gzip/inflate.c (renamed from 3party/freetype/gzip/inflate.c)0
-rw-r--r--3party/freetype/src/gzip/inftrees.c (renamed from 3party/freetype/gzip/inftrees.c)0
-rw-r--r--3party/freetype/src/gzip/inftrees.h (renamed from 3party/freetype/gzip/inftrees.h)0
-rw-r--r--3party/freetype/src/gzip/infutil.c (renamed from 3party/freetype/gzip/infutil.c)0
-rw-r--r--3party/freetype/src/gzip/infutil.h (renamed from 3party/freetype/gzip/infutil.h)0
-rw-r--r--3party/freetype/src/gzip/rules.mk75
-rw-r--r--3party/freetype/src/gzip/zconf.h (renamed from 3party/freetype/gzip/zconf.h)0
-rw-r--r--3party/freetype/src/gzip/zlib.h (renamed from 3party/freetype/gzip/zlib.h)0
-rw-r--r--3party/freetype/src/gzip/zutil.c (renamed from 3party/freetype/gzip/zutil.c)0
-rw-r--r--3party/freetype/src/gzip/zutil.h (renamed from 3party/freetype/gzip/zutil.h)0
-rw-r--r--3party/freetype/src/lzw/Jamfile (renamed from 3party/freetype/lzw/Jamfile)0
-rw-r--r--3party/freetype/src/lzw/ftlzw.c (renamed from 3party/freetype/lzw/ftlzw.c)16
-rw-r--r--3party/freetype/src/lzw/ftzopen.c (renamed from 3party/freetype/lzw/ftzopen.c)0
-rw-r--r--3party/freetype/src/lzw/ftzopen.h (renamed from 3party/freetype/lzw/ftzopen.h)0
-rw-r--r--3party/freetype/src/lzw/rules.mk70
-rw-r--r--3party/freetype/src/otvalid/Jamfile (renamed from 3party/freetype/otvalid/Jamfile)0
-rw-r--r--3party/freetype/src/otvalid/module.mk23
-rw-r--r--3party/freetype/src/otvalid/otvalid.c (renamed from 3party/freetype/otvalid/otvalid.c)0
-rw-r--r--3party/freetype/src/otvalid/otvalid.h (renamed from 3party/freetype/otvalid/otvalid.h)0
-rw-r--r--3party/freetype/src/otvalid/otvbase.c (renamed from 3party/freetype/otvalid/otvbase.c)0
-rw-r--r--3party/freetype/src/otvalid/otvcommn.c (renamed from 3party/freetype/otvalid/otvcommn.c)0
-rw-r--r--3party/freetype/src/otvalid/otvcommn.h (renamed from 3party/freetype/otvalid/otvcommn.h)0
-rw-r--r--3party/freetype/src/otvalid/otverror.h (renamed from 3party/freetype/otvalid/otverror.h)0
-rw-r--r--3party/freetype/src/otvalid/otvgdef.c (renamed from 3party/freetype/otvalid/otvgdef.c)0
-rw-r--r--3party/freetype/src/otvalid/otvgpos.c (renamed from 3party/freetype/otvalid/otvgpos.c)0
-rw-r--r--3party/freetype/src/otvalid/otvgpos.h (renamed from 3party/freetype/otvalid/otvgpos.h)0
-rw-r--r--3party/freetype/src/otvalid/otvgsub.c (renamed from 3party/freetype/otvalid/otvgsub.c)0
-rw-r--r--3party/freetype/src/otvalid/otvjstf.c (renamed from 3party/freetype/otvalid/otvjstf.c)0
-rw-r--r--3party/freetype/src/otvalid/otvmath.c (renamed from 3party/freetype/otvalid/otvmath.c)3
-rw-r--r--3party/freetype/src/otvalid/otvmod.c (renamed from 3party/freetype/otvalid/otvmod.c)4
-rw-r--r--3party/freetype/src/otvalid/otvmod.h (renamed from 3party/freetype/otvalid/otvmod.h)0
-rw-r--r--3party/freetype/src/otvalid/rules.mk78
-rw-r--r--3party/freetype/src/pcf/Jamfile (renamed from 3party/freetype/pcf/Jamfile)0
-rw-r--r--3party/freetype/src/pcf/README (renamed from 3party/freetype/pcf/README)26
-rw-r--r--3party/freetype/src/pcf/module.mk34
-rw-r--r--3party/freetype/src/pcf/pcf.c (renamed from 3party/freetype/pcf/pcf.c)0
-rw-r--r--3party/freetype/src/pcf/pcf.h (renamed from 3party/freetype/pcf/pcf.h)6
-rw-r--r--3party/freetype/src/pcf/pcfdrivr.c (renamed from 3party/freetype/pcf/pcfdrivr.c)57
-rw-r--r--3party/freetype/src/pcf/pcfdrivr.h (renamed from 3party/freetype/pcf/pcfdrivr.h)0
-rw-r--r--3party/freetype/src/pcf/pcferror.h (renamed from 3party/freetype/pcf/pcferror.h)0
-rw-r--r--3party/freetype/src/pcf/pcfread.c (renamed from 3party/freetype/pcf/pcfread.c)18
-rw-r--r--3party/freetype/src/pcf/pcfread.h (renamed from 3party/freetype/pcf/pcfread.h)0
-rw-r--r--3party/freetype/src/pcf/pcfutil.c (renamed from 3party/freetype/pcf/pcfutil.c)0
-rw-r--r--3party/freetype/src/pcf/pcfutil.h (renamed from 3party/freetype/pcf/pcfutil.h)0
-rw-r--r--3party/freetype/src/pcf/rules.mk79
-rw-r--r--3party/freetype/src/pfr/Jamfile (renamed from 3party/freetype/pfr/Jamfile)0
-rw-r--r--3party/freetype/src/pfr/module.mk23
-rw-r--r--3party/freetype/src/pfr/pfr.c (renamed from 3party/freetype/pfr/pfr.c)0
-rw-r--r--3party/freetype/src/pfr/pfrcmap.c (renamed from 3party/freetype/pfr/pfrcmap.c)0
-rw-r--r--3party/freetype/src/pfr/pfrcmap.h (renamed from 3party/freetype/pfr/pfrcmap.h)0
-rw-r--r--3party/freetype/src/pfr/pfrdrivr.c (renamed from 3party/freetype/pfr/pfrdrivr.c)4
-rw-r--r--3party/freetype/src/pfr/pfrdrivr.h (renamed from 3party/freetype/pfr/pfrdrivr.h)0
-rw-r--r--3party/freetype/src/pfr/pfrerror.h (renamed from 3party/freetype/pfr/pfrerror.h)0
-rw-r--r--3party/freetype/src/pfr/pfrgload.c (renamed from 3party/freetype/pfr/pfrgload.c)42
-rw-r--r--3party/freetype/src/pfr/pfrgload.h (renamed from 3party/freetype/pfr/pfrgload.h)0
-rw-r--r--3party/freetype/src/pfr/pfrload.c (renamed from 3party/freetype/pfr/pfrload.c)18
-rw-r--r--3party/freetype/src/pfr/pfrload.h (renamed from 3party/freetype/pfr/pfrload.h)0
-rw-r--r--3party/freetype/src/pfr/pfrobjs.c (renamed from 3party/freetype/pfr/pfrobjs.c)20
-rw-r--r--3party/freetype/src/pfr/pfrobjs.h (renamed from 3party/freetype/pfr/pfrobjs.h)0
-rw-r--r--3party/freetype/src/pfr/pfrsbit.c (renamed from 3party/freetype/pfr/pfrsbit.c)10
-rw-r--r--3party/freetype/src/pfr/pfrsbit.h (renamed from 3party/freetype/pfr/pfrsbit.h)0
-rw-r--r--3party/freetype/src/pfr/pfrtypes.h (renamed from 3party/freetype/pfr/pfrtypes.h)0
-rw-r--r--3party/freetype/src/pfr/rules.mk73
-rw-r--r--3party/freetype/src/psaux/Jamfile (renamed from 3party/freetype/psaux/Jamfile)0
-rw-r--r--3party/freetype/src/psaux/afmparse.c (renamed from 3party/freetype/psaux/afmparse.c)4
-rw-r--r--3party/freetype/src/psaux/afmparse.h (renamed from 3party/freetype/psaux/afmparse.h)3
-rw-r--r--3party/freetype/src/psaux/module.mk23
-rw-r--r--3party/freetype/src/psaux/psaux.c (renamed from 3party/freetype/psaux/psaux.c)0
-rw-r--r--3party/freetype/src/psaux/psauxerr.h (renamed from 3party/freetype/psaux/psauxerr.h)0
-rw-r--r--3party/freetype/src/psaux/psauxmod.c (renamed from 3party/freetype/psaux/psauxmod.c)0
-rw-r--r--3party/freetype/src/psaux/psauxmod.h (renamed from 3party/freetype/psaux/psauxmod.h)0
-rw-r--r--3party/freetype/src/psaux/psconv.c (renamed from 3party/freetype/psaux/psconv.c)0
-rw-r--r--3party/freetype/src/psaux/psconv.h (renamed from 3party/freetype/psaux/psconv.h)0
-rw-r--r--3party/freetype/src/psaux/psobjs.c (renamed from 3party/freetype/psaux/psobjs.c)21
-rw-r--r--3party/freetype/src/psaux/psobjs.h (renamed from 3party/freetype/psaux/psobjs.h)0
-rw-r--r--3party/freetype/src/psaux/rules.mk73
-rw-r--r--3party/freetype/src/psaux/t1cmap.c (renamed from 3party/freetype/psaux/t1cmap.c)0
-rw-r--r--3party/freetype/src/psaux/t1cmap.h (renamed from 3party/freetype/psaux/t1cmap.h)0
-rw-r--r--3party/freetype/src/psaux/t1decode.c (renamed from 3party/freetype/psaux/t1decode.c)104
-rw-r--r--3party/freetype/src/psaux/t1decode.h (renamed from 3party/freetype/psaux/t1decode.h)0
-rw-r--r--3party/freetype/src/pshinter/Jamfile (renamed from 3party/freetype/pshinter/Jamfile)0
-rw-r--r--3party/freetype/src/pshinter/module.mk23
-rw-r--r--3party/freetype/src/pshinter/pshalgo.c (renamed from 3party/freetype/pshinter/pshalgo.c)16
-rw-r--r--3party/freetype/src/pshinter/pshalgo.h (renamed from 3party/freetype/pshinter/pshalgo.h)0
-rw-r--r--3party/freetype/src/pshinter/pshglob.c (renamed from 3party/freetype/pshinter/pshglob.c)4
-rw-r--r--3party/freetype/src/pshinter/pshglob.h (renamed from 3party/freetype/pshinter/pshglob.h)0
-rw-r--r--3party/freetype/src/pshinter/pshinter.c (renamed from 3party/freetype/pshinter/pshinter.c)0
-rw-r--r--3party/freetype/src/pshinter/pshmod.c (renamed from 3party/freetype/pshinter/pshmod.c)0
-rw-r--r--3party/freetype/src/pshinter/pshmod.h (renamed from 3party/freetype/pshinter/pshmod.h)0
-rw-r--r--3party/freetype/src/pshinter/pshnterr.h (renamed from 3party/freetype/pshinter/pshnterr.h)0
-rw-r--r--3party/freetype/src/pshinter/pshpic.c (renamed from 3party/freetype/pshinter/pshpic.c)16
-rw-r--r--3party/freetype/src/pshinter/pshpic.h (renamed from 3party/freetype/pshinter/pshpic.h)0
-rw-r--r--3party/freetype/src/pshinter/pshrec.c (renamed from 3party/freetype/pshinter/pshrec.c)0
-rw-r--r--3party/freetype/src/pshinter/pshrec.h (renamed from 3party/freetype/pshinter/pshrec.h)0
-rw-r--r--3party/freetype/src/pshinter/rules.mk73
-rw-r--r--3party/freetype/src/psnames/Jamfile (renamed from 3party/freetype/psnames/Jamfile)0
-rw-r--r--3party/freetype/src/psnames/module.mk23
-rw-r--r--3party/freetype/src/psnames/psmodule.c (renamed from 3party/freetype/psnames/psmodule.c)9
-rw-r--r--3party/freetype/src/psnames/psmodule.h (renamed from 3party/freetype/psnames/psmodule.h)0
-rw-r--r--3party/freetype/src/psnames/psnamerr.h (renamed from 3party/freetype/psnames/psnamerr.h)0
-rw-r--r--3party/freetype/src/psnames/psnames.c (renamed from 3party/freetype/psnames/psnames.c)0
-rw-r--r--3party/freetype/src/psnames/pspic.c (renamed from 3party/freetype/psnames/pspic.c)14
-rw-r--r--3party/freetype/src/psnames/pspic.h (renamed from 3party/freetype/psnames/pspic.h)0
-rw-r--r--3party/freetype/src/psnames/pstables.h (renamed from 3party/freetype/psnames/pstables.h)0
-rw-r--r--3party/freetype/src/psnames/rules.mk71
-rw-r--r--3party/freetype/src/raster/Jamfile (renamed from 3party/freetype/raster/Jamfile)0
-rw-r--r--3party/freetype/src/raster/ftmisc.h (renamed from 3party/freetype/raster/ftmisc.h)16
-rw-r--r--3party/freetype/src/raster/ftraster.c (renamed from 3party/freetype/raster/ftraster.c)82
-rw-r--r--3party/freetype/src/raster/ftraster.h (renamed from 3party/freetype/raster/ftraster.h)0
-rw-r--r--3party/freetype/src/raster/ftrend1.c (renamed from 3party/freetype/raster/ftrend1.c)8
-rw-r--r--3party/freetype/src/raster/ftrend1.h (renamed from 3party/freetype/raster/ftrend1.h)0
-rw-r--r--3party/freetype/src/raster/module.mk23
-rw-r--r--3party/freetype/src/raster/raster.c (renamed from 3party/freetype/raster/raster.c)0
-rw-r--r--3party/freetype/src/raster/rasterrs.h (renamed from 3party/freetype/raster/rasterrs.h)0
-rw-r--r--3party/freetype/src/raster/rastpic.c (renamed from 3party/freetype/raster/rastpic.c)13
-rw-r--r--3party/freetype/src/raster/rastpic.h (renamed from 3party/freetype/raster/rastpic.h)0
-rw-r--r--3party/freetype/src/raster/rules.mk70
-rw-r--r--3party/freetype/src/sfnt/Jamfile (renamed from 3party/freetype/sfnt/Jamfile)0
-rw-r--r--3party/freetype/src/sfnt/module.mk23
-rw-r--r--3party/freetype/src/sfnt/rules.mk80
-rw-r--r--3party/freetype/src/sfnt/sfdriver.c (renamed from 3party/freetype/sfnt/sfdriver.c)35
-rw-r--r--3party/freetype/src/sfnt/sfdriver.h (renamed from 3party/freetype/sfnt/sfdriver.h)0
-rw-r--r--3party/freetype/src/sfnt/sferrors.h (renamed from 3party/freetype/sfnt/sferrors.h)0
-rw-r--r--3party/freetype/src/sfnt/sfnt.c (renamed from 3party/freetype/sfnt/sfnt.c)0
-rw-r--r--3party/freetype/src/sfnt/sfntpic.c (renamed from 3party/freetype/sfnt/sfntpic.c)13
-rw-r--r--3party/freetype/src/sfnt/sfntpic.h (renamed from 3party/freetype/sfnt/sfntpic.h)0
-rw-r--r--3party/freetype/src/sfnt/sfobjs.c (renamed from 3party/freetype/sfnt/sfobjs.c)60
-rw-r--r--3party/freetype/src/sfnt/sfobjs.h (renamed from 3party/freetype/sfnt/sfobjs.h)0
-rw-r--r--3party/freetype/src/sfnt/ttbdf.c (renamed from 3party/freetype/sfnt/ttbdf.c)16
-rw-r--r--3party/freetype/src/sfnt/ttbdf.h (renamed from 3party/freetype/sfnt/ttbdf.h)0
-rw-r--r--3party/freetype/src/sfnt/ttcmap.c (renamed from 3party/freetype/sfnt/ttcmap.c)31
-rw-r--r--3party/freetype/src/sfnt/ttcmap.h (renamed from 3party/freetype/sfnt/ttcmap.h)0
-rw-r--r--3party/freetype/src/sfnt/ttcmapc.h (renamed from 3party/freetype/sfnt/ttcmapc.h)0
-rw-r--r--3party/freetype/src/sfnt/ttkern.c (renamed from 3party/freetype/sfnt/ttkern.c)6
-rw-r--r--3party/freetype/src/sfnt/ttkern.h (renamed from 3party/freetype/sfnt/ttkern.h)0
-rw-r--r--3party/freetype/src/sfnt/ttload.c (renamed from 3party/freetype/sfnt/ttload.c)38
-rw-r--r--3party/freetype/src/sfnt/ttload.h (renamed from 3party/freetype/sfnt/ttload.h)0
-rw-r--r--3party/freetype/src/sfnt/ttmtx.c (renamed from 3party/freetype/sfnt/ttmtx.c)4
-rw-r--r--3party/freetype/src/sfnt/ttmtx.h (renamed from 3party/freetype/sfnt/ttmtx.h)0
-rw-r--r--3party/freetype/src/sfnt/ttpost.c (renamed from 3party/freetype/sfnt/ttpost.c)60
-rw-r--r--3party/freetype/src/sfnt/ttpost.h (renamed from 3party/freetype/sfnt/ttpost.h)0
-rw-r--r--3party/freetype/src/sfnt/ttsbit.c (renamed from 3party/freetype/sfnt/ttsbit.c)7
-rw-r--r--3party/freetype/src/sfnt/ttsbit.h (renamed from 3party/freetype/sfnt/ttsbit.h)0
-rw-r--r--3party/freetype/src/sfnt/ttsbit0.c (renamed from 3party/freetype/sfnt/ttsbit0.c)0
-rw-r--r--3party/freetype/src/smooth/Jamfile (renamed from 3party/freetype/smooth/Jamfile)0
-rw-r--r--3party/freetype/src/smooth/ftgrays.c (renamed from 3party/freetype/smooth/ftgrays.c)313
-rw-r--r--3party/freetype/src/smooth/ftgrays.h (renamed from 3party/freetype/smooth/ftgrays.h)0
-rw-r--r--3party/freetype/src/smooth/ftsmerrs.h (renamed from 3party/freetype/smooth/ftsmerrs.h)0
-rw-r--r--3party/freetype/src/smooth/ftsmooth.c (renamed from 3party/freetype/smooth/ftsmooth.c)35
-rw-r--r--3party/freetype/src/smooth/ftsmooth.h (renamed from 3party/freetype/smooth/ftsmooth.h)0
-rw-r--r--3party/freetype/src/smooth/ftspic.c (renamed from 3party/freetype/smooth/ftspic.c)13
-rw-r--r--3party/freetype/src/smooth/ftspic.h (renamed from 3party/freetype/smooth/ftspic.h)0
-rw-r--r--3party/freetype/src/smooth/module.mk27
-rw-r--r--3party/freetype/src/smooth/rules.mk70
-rw-r--r--3party/freetype/src/smooth/smooth.c (renamed from 3party/freetype/smooth/smooth.c)0
-rw-r--r--3party/freetype/src/tools/Jamfile (renamed from 3party/freetype/tools/Jamfile)0
-rw-r--r--3party/freetype/src/tools/apinames.c (renamed from 3party/freetype/tools/apinames.c)22
-rwxr-xr-x3party/freetype/src/tools/chktrcmp.py (renamed from 3party/freetype/tools/chktrcmp.py)0
-rw-r--r--3party/freetype/src/tools/cordic.py (renamed from 3party/freetype/tools/cordic.py)0
-rw-r--r--3party/freetype/src/tools/docmaker/.gitignore1
-rw-r--r--3party/freetype/src/tools/docmaker/content.py (renamed from 3party/freetype/tools/docmaker/content.py)0
-rw-r--r--3party/freetype/src/tools/docmaker/docbeauty.py (renamed from 3party/freetype/tools/docmaker/docbeauty.py)0
-rw-r--r--3party/freetype/src/tools/docmaker/docmaker.py (renamed from 3party/freetype/tools/docmaker/docmaker.py)0
-rw-r--r--3party/freetype/src/tools/docmaker/formatter.py (renamed from 3party/freetype/tools/docmaker/formatter.py)0
-rw-r--r--3party/freetype/src/tools/docmaker/sources.py (renamed from 3party/freetype/tools/docmaker/sources.py)0
-rw-r--r--3party/freetype/src/tools/docmaker/tohtml.py (renamed from 3party/freetype/tools/docmaker/tohtml.py)0
-rw-r--r--3party/freetype/src/tools/docmaker/utils.py (renamed from 3party/freetype/tools/docmaker/utils.py)0
-rw-r--r--3party/freetype/src/tools/ftrandom/README (renamed from 3party/freetype/tools/ftrandom/README)0
-rw-r--r--3party/freetype/src/tools/ftrandom/ftrandom.c (renamed from 3party/freetype/tools/ftrandom/ftrandom.c)0
-rw-r--r--3party/freetype/src/tools/glnames.py (renamed from 3party/freetype/tools/glnames.py)7
-rw-r--r--3party/freetype/src/tools/test_afm.c (renamed from 3party/freetype/tools/test_afm.c)0
-rw-r--r--3party/freetype/src/tools/test_bbox.c (renamed from 3party/freetype/tools/test_bbox.c)0
-rw-r--r--3party/freetype/src/tools/test_trig.c (renamed from 3party/freetype/tools/test_trig.c)0
-rw-r--r--3party/freetype/src/truetype/Jamfile (renamed from 3party/freetype/truetype/Jamfile)0
-rw-r--r--3party/freetype/src/truetype/module.mk23
-rw-r--r--3party/freetype/src/truetype/rules.mk73
-rw-r--r--3party/freetype/src/truetype/truetype.c (renamed from 3party/freetype/truetype/truetype.c)0
-rw-r--r--3party/freetype/src/truetype/ttdriver.c (renamed from 3party/freetype/truetype/ttdriver.c)23
-rw-r--r--3party/freetype/src/truetype/ttdriver.h (renamed from 3party/freetype/truetype/ttdriver.h)0
-rw-r--r--3party/freetype/src/truetype/tterrors.h (renamed from 3party/freetype/truetype/tterrors.h)0
-rw-r--r--3party/freetype/src/truetype/ttgload.c (renamed from 3party/freetype/truetype/ttgload.c)329
-rw-r--r--3party/freetype/src/truetype/ttgload.h (renamed from 3party/freetype/truetype/ttgload.h)4
-rw-r--r--3party/freetype/src/truetype/ttgxvar.c (renamed from 3party/freetype/truetype/ttgxvar.c)35
-rw-r--r--3party/freetype/src/truetype/ttgxvar.h (renamed from 3party/freetype/truetype/ttgxvar.h)0
-rw-r--r--3party/freetype/src/truetype/ttinterp.c (renamed from 3party/freetype/truetype/ttinterp.c)644
-rw-r--r--3party/freetype/src/truetype/ttinterp.h (renamed from 3party/freetype/truetype/ttinterp.h)12
-rw-r--r--3party/freetype/src/truetype/ttobjs.c (renamed from 3party/freetype/truetype/ttobjs.c)297
-rw-r--r--3party/freetype/src/truetype/ttobjs.h (renamed from 3party/freetype/truetype/ttobjs.h)11
-rw-r--r--3party/freetype/src/truetype/ttpic.c (renamed from 3party/freetype/truetype/ttpic.c)14
-rw-r--r--3party/freetype/src/truetype/ttpic.h (renamed from 3party/freetype/truetype/ttpic.h)0
-rw-r--r--3party/freetype/src/truetype/ttpload.c (renamed from 3party/freetype/truetype/ttpload.c)41
-rw-r--r--3party/freetype/src/truetype/ttpload.h (renamed from 3party/freetype/truetype/ttpload.h)0
-rw-r--r--3party/freetype/src/type1/Jamfile (renamed from 3party/freetype/type1/Jamfile)0
-rw-r--r--3party/freetype/src/type1/module.mk23
-rw-r--r--3party/freetype/src/type1/rules.mk73
-rw-r--r--3party/freetype/src/type1/t1afm.c (renamed from 3party/freetype/type1/t1afm.c)25
-rw-r--r--3party/freetype/src/type1/t1afm.h (renamed from 3party/freetype/type1/t1afm.h)0
-rw-r--r--3party/freetype/src/type1/t1driver.c (renamed from 3party/freetype/type1/t1driver.c)0
-rw-r--r--3party/freetype/src/type1/t1driver.h (renamed from 3party/freetype/type1/t1driver.h)0
-rw-r--r--3party/freetype/src/type1/t1errors.h (renamed from 3party/freetype/type1/t1errors.h)0
-rw-r--r--3party/freetype/src/type1/t1gload.c (renamed from 3party/freetype/type1/t1gload.c)40
-rw-r--r--3party/freetype/src/type1/t1gload.h (renamed from 3party/freetype/type1/t1gload.h)0
-rw-r--r--3party/freetype/src/type1/t1load.c (renamed from 3party/freetype/type1/t1load.c)20
-rw-r--r--3party/freetype/src/type1/t1load.h (renamed from 3party/freetype/type1/t1load.h)0
-rw-r--r--3party/freetype/src/type1/t1objs.c (renamed from 3party/freetype/type1/t1objs.c)22
-rw-r--r--3party/freetype/src/type1/t1objs.h (renamed from 3party/freetype/type1/t1objs.h)0
-rw-r--r--3party/freetype/src/type1/t1parse.c (renamed from 3party/freetype/type1/t1parse.c)21
-rw-r--r--3party/freetype/src/type1/t1parse.h (renamed from 3party/freetype/type1/t1parse.h)0
-rw-r--r--3party/freetype/src/type1/t1tokens.h (renamed from 3party/freetype/type1/t1tokens.h)0
-rw-r--r--3party/freetype/src/type1/type1.c (renamed from 3party/freetype/type1/type1.c)0
-rw-r--r--3party/freetype/src/type42/Jamfile (renamed from 3party/freetype/type42/Jamfile)0
-rw-r--r--3party/freetype/src/type42/module.mk23
-rw-r--r--3party/freetype/src/type42/rules.mk70
-rw-r--r--3party/freetype/src/type42/t42drivr.c (renamed from 3party/freetype/type42/t42drivr.c)0
-rw-r--r--3party/freetype/src/type42/t42drivr.h (renamed from 3party/freetype/type42/t42drivr.h)0
-rw-r--r--3party/freetype/src/type42/t42error.h (renamed from 3party/freetype/type42/t42error.h)0
-rw-r--r--3party/freetype/src/type42/t42objs.c (renamed from 3party/freetype/type42/t42objs.c)22
-rw-r--r--3party/freetype/src/type42/t42objs.h (renamed from 3party/freetype/type42/t42objs.h)0
-rw-r--r--3party/freetype/src/type42/t42parse.c (renamed from 3party/freetype/type42/t42parse.c)19
-rw-r--r--3party/freetype/src/type42/t42parse.h (renamed from 3party/freetype/type42/t42parse.h)0
-rw-r--r--3party/freetype/src/type42/t42types.h (renamed from 3party/freetype/type42/t42types.h)0
-rw-r--r--3party/freetype/src/type42/type42.c (renamed from 3party/freetype/type42/type42.c)0
-rw-r--r--3party/freetype/src/winfonts/Jamfile (renamed from 3party/freetype/winfonts/Jamfile)0
-rw-r--r--3party/freetype/src/winfonts/fnterrs.h (renamed from 3party/freetype/winfonts/fnterrs.h)0
-rw-r--r--3party/freetype/src/winfonts/module.mk23
-rw-r--r--3party/freetype/src/winfonts/rules.mk65
-rw-r--r--3party/freetype/src/winfonts/winfnt.c (renamed from 3party/freetype/winfonts/winfnt.c)24
-rw-r--r--3party/freetype/src/winfonts/winfnt.h (renamed from 3party/freetype/winfonts/winfnt.h)0
-rw-r--r--3party/freetype/version.sed5
-rw-r--r--3party/freetype/vms_make.com1286
587 files changed, 58629 insertions, 3475 deletions
diff --git a/3party/freetype/.gitignore b/3party/freetype/.gitignore
new file mode 100644
index 0000000000..aee2e4ce16
--- /dev/null
+++ b/3party/freetype/.gitignore
@@ -0,0 +1 @@
+config.mk
diff --git a/3party/freetype/ChangeLog b/3party/freetype/ChangeLog
new file mode 100644
index 0000000000..ef582eb018
--- /dev/null
+++ b/3party/freetype/ChangeLog
@@ -0,0 +1,2724 @@
+2011-06-24 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.5 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-5'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.5
+
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/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.4.4/2.4.5/, s/244/245/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
+
+ * builds/unix/configure.raw (version_info): Set to 13:0:7.
+
+2011-06-20 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix change
+ from 2011-05-04.
+
+2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] make the `prop' validation tracing verbose.
+
+ * src/gxvalid/gxvprop.c: Add tracing messages for errors.
+
+2011-06-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [autogen.sh] Reflect environment variable LIBTOOLIZE.
+
+2011-06-18 Werner Lemberg <wl@gnu.org>
+
+ Update license documentation.
+
+ * docs/GPL.TXT: Renamed to...
+ * docs/GPLv2.TXT: This.
+
+ * docs/LICENSE.TXT: Updated.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix g++4.6 compiler warnings in module drivers.
+
+ The background is same with previous commit.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints):
+ Init `points'. (TT_Vary_Get_Glyph_Deltas): Init
+ `delta_xy'. (TT_Get_MM_Var): Init `mmvar'.
+ * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
+ * src/cff/cffdrivr.c (cff_ps_get_font_info): Init
+ `font_info'.
+ * src/cff/cffload.c (cff_index_get_pointers): Init `t'.
+ (cff_font_load): Init `sub'.
+ * src/cff/cffobjs.c (cff_size_init): Init `internal'.
+ (cff_face_init): Init `cff'.
+ * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps):
+ Init `snaps'.
+ * src/pcf/pcfread.c (pcf_get_properties): Init `properties'.
+ (pcf_get_bitmaps): Init `offsets'. (pcf_get_encodings):
+ Init `tmpEncoding'.
+ * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'.
+ * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'.
+ * src/cache/ftcmru.c (FTC_MruList_New): Init `node'.
+ * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and
+ `zip_buff'.
+ * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'.
+ * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [base] Fix g++4.6 compiler warnings in src/base/*.c.
+
+ Passing uninitialized pointer to FT_NEW() families is
+ not problematic theoretically (as far as the returned
+ pointer is checked before writing), but g++4.6 dislikes
+ it and warns by -Wuninitialized. Initialize them by NULL.
+
+ * src/base/ftobjs.c (FT_Stream_New): Init `stream'.
+ (new_memory_stream): Ditto.
+ (FT_New_GlyphSlot): Init `slot'.
+ (FT_CMap_New): Init `cmap'.
+ (open_face_PS_from_sfnt_stream): Init `sfnt_ps'.
+ (Mac_Read_POST_Resource): Init `pfb_data'.
+ (Mac_Read_sfnt_Resource): Init `sfnt_data'.
+ * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets):
+ Init `offsets_internal' and `ref'.
+ (raccess_guess_darwin_hfsplus): Init `newpath'.
+ (raccess_guess_darwin_newvfs): Ditto.
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer):
+ Init `buffer'.
+ * src/base/ftstroke.c (FT_Stroker_New): Init `stroker'.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Cleanup.
+
+ Some invalid, overrunning, unrecommended non-zero values
+ are cared in paranoid validation mode only. There are
+ many lines looking like:
+
+ if ( valid->root->level >= FT_VALIDATE_PARANOID )
+ FT_INVALID_xxx;
+
+ To simplify them, GXV_SET_ERR_IF_PARANOID( err ) is
+ introduced for more paranoid validation in future.
+
+ * src/gxvalid/gxvcommn.h (IS_PARANOID_VALIDATION):
+ New macro to assure valid->root->level is more or
+ equal to FT_VALIDATE_PARANOID. (GXV_SET_ERR_IF_PARANOID):
+ New macro to raise an error if in paranoid validation.
+ * src/gxvalid/gxvcommn.c: Use GXV_SET_ERR_IF_PARANOID().
+ * src/gxvalid/gxvfeat.c: Ditto.
+ * src/gxvalid/gxvjust.c: Ditto.
+ * src/gxvalid/gxvkern.c: Ditto.
+ * src/gxvalid/gxvmort.c: Ditto.
+ * src/gxvalid/gxvmort0.c: Ditto.
+ * src/gxvalid/gxvmort1.c: Ditto.
+ * src/gxvalid/gxvmort2.c: Ditto.
+ * src/gxvalid/gxvmorx1.c: Ditto.
+ * src/gxvalid/gxvmorx2.c: Ditto.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c.
+
+ * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate):
+ Check different entries pointing same traking value.
+ (gxv_trak_validate): Remove unused variable `table_size'.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Fix gcc4.6 compiler warnings in gxvmorx*.c.
+
+ * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
+ Conditionalize unvalidated variable `subFeatureFlags'.
+ (gxv_morx_chain_validate): Conditionalize unvalidated
+ variable `defaultFlags'.
+
+ * src/gxvalid/gxmorx0.c
+ (gxv_morx_subtable_type0_entry_validate):
+ Conditionalize unvalidated variables; `markFirst',
+ `dontAdvance', `markLast', `verb'.
+
+ * src/gxvalid/gxmorx1.c
+ (gxv_morx_subtable_type1_entry_validate): Conditionalize
+ unvalidated variables; `setMark', `dontAdvance'.
+
+ * src/gxvalid/gxvmorx2.c
+ (gxv_morx_subtable_type2_ligActionOffset_validate):
+ Conditionalize unvalidated variables; `last', `store'.
+ Checking for overrunning offset is added.
+ (gxv_morx_subtable_type2_entry_validate):
+ Conditionalize unvalidated variables; `setComponent',
+ `dontAdvance', `performAction'.
+ (gxv_morx_subtable_type2_ligatureTable_validate):
+ Check if the GID for ligature does not exceed the
+ max GID in `maxp' table.
+
+ * src/gxvalid/gxvmort5.c
+ (gxv_morx_subtable_type5_InsertList_validate):
+ Conditionalize unvalidated loading of `insert_glyphID'
+ array. (gxv_morx_subtable_type5_entry_validate):
+ Conditionalize unvalidated variables; `setMark',
+ `dontAdvance', `currentIsKashidaLike',
+ `markedIsKashidaLike', `currentInsertBefore',
+ `markedInsertBefore'.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Fix gcc4.6 compiler warnings in gxvmort*.c.
+
+ * src/gxvalid/gxvmort.c (gxv_mort_subtables_validate):
+ Conditionalize unvalidated variable `subFeatureFlags'.
+ (gxv_mort_chain_validate): Conditionalize unvalidated
+ variable `defaultFlags'.
+
+ * src/gxvalid/gxmort0.c
+ (gxv_mort_subtable_type0_entry_validate): Check the
+ conflict of the marks for the glyphs.
+
+ * src/gxvalid/gxmort1.c
+ (gxv_mort_subtable_type1_offset_to_subst_validate):
+ Local variables `min_gid', `max_gid' are replaced by
+ variables in the validator.
+ (gxv_mort_subtable_type1_entry_validate): Conditionalize
+ unvalidated variables; `setMark', `dontAdvance'.
+ (gxv_mort_subtable_type1_substTable_validate):
+ Validate the GID by the min/max GIDs in the validator.
+
+ * src/gxvalid/gxvmort2.c
+ (gxv_mort_subtable_type2_ligActionOffset_validate):
+ Conditionalize unvalidated variables; `last', `store'.
+ Checking for overrunning offset is added.
+ (gxv_mort_subtable_type2_entry_validate):
+ Conditionalize unvalidated variables; `setComponent',
+ `dontAdvance'.
+ (gxv_mort_subtable_type2_ligatureTable_validate):
+ Check if the GID for ligature does not exceed the
+ max GID in `maxp' table.
+
+ * src/gxvalid/gxvmort5.c
+ (gxv_mort_subtable_type5_InsertList_validate):
+ Conditionalize unvalidated loading of `insert_glyphID'
+ array. (gxv_mort_subtable_type5_entry_validate):
+ Conditionalize unvalidated variables; `setMark',
+ `dontAdvance', `currentIsKashidaLike',
+ `markedIsKashidaLike', `currentInsertBefore',
+ `markedInsertBefore'.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Fix gcc4.6 compiler warnings in gxvkern.c.
+
+ * src/gxvalid/gxvkern.c
+ (gxv_kern_subtable_fmt0_pairs_validate): Conditionalize
+ unvalidated variable `kernValue'.
+ (gxv_kern_subtable_fmt1_entry_validate): Conditionalize
+ unvalidated variables; `push', `dontAdvance', `kernAction',
+ `kernValue'.
+ (gxv_kern_coverage_new_apple_validate): Conditionalize
+ trace-only variables; `kernVertical', `kernCrossStream',
+ `kernVariation'.
+ (gxv_kern_coverage_classic_apple_validate): Conditionalize
+ trace-only variables; `horizontal', `cross_stream'.
+ (gxv_kern_coverage_classic_microsoft_validate):
+ Conditionalize trace-only variables; `horizontal',
+ `minimum', `cross_stream', `override'.
+ (gxv_kern_subtable_validate): Conditionalize trace-only
+ variables; `version', `tupleIndex'.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Fix gcc4.6 compiler warnings in gxvjust.c.
+
+ * src/gxvalid/gxvjust.c (gxv_just_check_max_gid):
+ New function to unify the checks of too large GID.
+ (gxv_just_wdp_entry_validate): Conditionalize unvalidated
+ variables; `beforeGrowLimit', `beforeShrinkGrowLimit',
+ `afterGrowLimit', `afterShrinkGrowLimit', `growFlags',
+ `shrinkFlags'. Additional check for non-zero values in
+ unused storage `justClass' is added.
+ (gxv_just_actSubrecord_type0_validate): Conditionalize
+ unvalidated variable `order'. GID is checked by
+ gxv_just_check_max_gid(). Additional check for upside-down
+ relationship between `lowerLimit' and `upperLimit' is added.
+ (gxv_just_actSubrecord_type1_validate): GID is checked by
+ gxv_just_check_max_gid().
+ (gxv_just_actSubrecord_type2_validate): Conditionalize
+ unvalidated variable `substThreshhold'. GID is checked by
+ gxv_just_check_max_gid().
+ (gxv_just_actSubrecord_type5_validate): GID is checked by
+ gxv_just_check_max_gid().
+ (gxv_just_classTable_entry_validate): Conditionalize
+ unvalidated variables; `setMark', `dontAdvance',
+ `markClass', `currentClass'.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [gxvalid] Preparation to fix gcc4.6 compiler warnings.
+
+ * src/gxvalid/gxvcommn.h (GXV_LOAD_TRACE_VARS): New macro to
+ conditionalize the variable which is only used for trace messages.
+ Automatically set by FT_DEBUG_LEVEL_TRACE.
+ (GXV_LOAD_UNUSED_VARS): New macro to conditionalize the loading of
+ unvalidated variables. Undefined by default to calm gcc4.6 warning.
+ (GXV_ValidatorRec.{min_gid,max_gid}): New variables to hold defined
+ GID ranges, for the comparison of GID ranges in different subtables.
+
+2011-06-08 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Remove unused structure member.
+
+ * src/autofit/afhints.h (AF_SegmentRec): Remove `contour'.
+ * src/autofit/aflatin.c (af_latin_hints_compute_segments),
+ src/autofit/aflatin2.c (af_latin2_hints_compute_segments): Updated.
+
+2011-05-30 Werner Lemberg <wl@gnu.org>
+
+ Fix g++ 4.6 compilation.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_segments,
+ af_glyph_hints_dump_edges): Use cast.
+
+2011-05-30 Werner Lemberg <wl@gnu.org>
+
+ Fix gcc 4.6 compiler warnings.
+
+ * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and
+ remove unused variables.
+ * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out
+ `up_dir'.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org'
+ and `width_org' conditionalized.
+
+2011-05-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [mac] Conditionalize the inclusion of `AvailabilityMacros.h'.
+
+ The native SDK on earliest Mac OS X (10.0-10.1) did not have
+ `AvailabilityMacros.h'. To prevent the inclusion of missing
+ header file, ECANCELED (introduced in 10.2) in POSIX header
+ file <errno.h> is checked to detect the system version.
+
+ * include/freetype/config/ftconfig.h: Conditionalize the
+ inclusion of `AvailabilityMacros.h'.
+ * builds/unix/ftconfig.in: Ditto.
+ * builds/vms/ftconfig.h: Ditto.
+
+2011-05-27 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve tracing of hinting process.
+
+ * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message
+ `ADJUST'.
+
+2011-05-26 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix trace message.
+
+ * src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in
+ tracing message.
+
+2011-05-24 Daniel Zimmermann <netzimme@googlemail.com>
+
+ Reduce warnings for MS Visual Studio 2010.
+
+ * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
+ af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide
+ return value.
+ * src/cff/cffgload.c (cff_slot_load): Add cast.
+ * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper
+ loop variable type.
+
+2011-05-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Automake component `builds/unix/install-sh' is removed.
+
+ * builds/unix/install-sh: Removed. It is not needed to
+ include repository, because autogen.sh installs it.
+ * builds/unix/.gitignore: Register install-sh.
+
+2011-05-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [autofit] Make trace message for CJK bluezone more verbose.
+
+2011-05-08 Just Fill Bugs <mozbugbox@yahoo.com.au>
+ suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [autofit] Add bluezones for CJK Ideographs.
+
+ To remove extremas of vertical strokes of CJK Ideographs at
+ low resolution and make the top and bottom horizontal stems
+ aligned, bluezones for CJK Ideographs are calculated from
+ sample glyphs. At present, vertical bluezones (bluezones
+ to align vertical stems) are disabled by default. For detail, see
+ http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
+ http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
+ http://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
+
+ * include/freetype/internal/fttrace.h: New trace component `afcjk'.
+ * src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version
+ for AF_Latin{Blue,Axis,Metric}Rec.
+ (af_cjk_metrics_check_digits): Ditto, shared with Indic module.
+ (af_cjk_metrics_init_widths): Ditto.
+ (af_cjk_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric.
+ (af_cjk_metrics_scale): Ditto (declaration).
+ (af_cjk_hints_init): Ditto (declaration).
+ (af_cjk_hints_apply): Ditto (declaration).
+ * src/autofit/afcjk.c (af_cjk_metrics_scale): Ditto (body).
+ (af_cjk_hints_init): Ditto (body).
+ (af_cjk_hints_apply): Ditto (body).
+ (af_cjk_metrics_init_widths): Duplicate af_latin_metrics_init_widths.
+ (af_cjk_metrics_check_digits): Duplicate af_latin_metrics_check_digits.
+ (af_cjk_metrics_init): Call CJK bluezone initializer.
+ (af_cjk_metrics_scale_dim): Add code to scale bluezones.
+ (af_cjk_hints_compute_blue_edges): New function, CJK version of
+ 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.
+
+ * src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
+ instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
+ However bluezones are not initialized.
+ (af_indic_metrics_scale): Take AF_CJKMetric instead of AF_LatinMetric.
+ (af_indic_hints_init): Ditto.
+ (af_indic_hints_apply): Ditto.
+
+ * docs/CHANGES: Note about CJK bluezone support.
+
+2011-05-06 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Remove unused struct member.
+
+ * src/autofit/aflatin.h (AF_LatinAxis): Remove `control_overshoot'.
+
+2011-05-04 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Simplify.
+
+2011-05-01 Just Fill Bugs <mozbugbox@yahoo.com.au>
+ Werner Lemberg <wl@gnu.org>
+
+ [autofit] Add more debugging functions.
+
+ * src/autofit/afhints.c (af_glyph_hints_get_num_segments,
+ af_glyph_hints_get_segment_offset): New functions.
+
+2011-05-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Add new option `--disable-mmap' to configure script.
+
+ * builds/unix/configure.raw: New option `--disable-mmap'
+ is added. It is for the developers to simulate the systems
+ without mmap() (like 4.3BSD, minix etc) on POSIX systems.
+
+2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Always recalculate the sfnt table checksum.
+
+ * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Recalculate
+ the sfnt table checksum even if non-zero value is written in
+ the TrueType font header. Some bad PDF generators write
+ wrong values. For details see examples and benchmark tests
+ of the latency by recalculation:
+ http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html
+ http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
+
+2011-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Register a set of tricky fonts, NEC FA family.
+
+ * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids):
+ Add 8 checksum sets for NEC FA family. For the tricky fonts
+ without some tables (e.g. NEC FA fonts lack cvt table),
+ extra check is added to assure that a zero-length table in the
+ registry is not included in the font.
+
+2011-04-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Fix a bug in the sfnt table checksum getter.
+
+ * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Check the
+ return value of face->goto_table() correctly.
+
+2011-04-28 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve tracing messages.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues,
+ af_latin_align_linked_edge, af_latin_hint_edges): Do it.
+
+2011-04-25 Kan-Ru Chen <kanru@kanru.info>
+
+ [truetype] Always check the checksum to identify tricky fonts.
+
+ Because some PDF generators mangle the family name badly,
+ the trickyness check by the checksum should be invoked always.
+ For sample PDF, see
+ http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html
+
+ * src/truetype/ttobjs.c (tt_check_trickyness): Even when
+ tt_check_trickyness_family() finds no trickyness,
+ tt_check_trickyness_sfnt_ids() is invoked.
+
+2011-04-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [autofit] Add more Indic scripts with hanging baseline.
+
+ * src/autofit/afindic.c (af_indic_uniranges): Tibetan, Limbu,
+ Sundanese, Meetei Mayak, Syloti Nagri and Sharada scripts are
+ added.
+
+2011-04-21 Behdad Esfahbod <behdad@behdad.org>
+
+ Always ignore global advance.
+
+ This makes FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH redundant,
+ deprecated, and ignored. The new behavior is what every major user
+ of FreeType has been requesting. Global advance is broken in many
+ CJK fonts. Just ignoring it by default makes most sense.
+
+ * src/truetype/ttdriver.c (tt_get_advances),
+ src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics,
+ tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph),
+ src/truetype/ttgload.h: Implement it.
+
+ * docs/CHANGES: Updated.
+
+2011-04-21 rainy6144 <rainy6144@gmail.com>
+
+ [autofit] Blur CJK stems if too many to preserve their gaps.
+
+ When there are too many stems to preserve their gaps in the
+ rasterization of CJK Ideographs at a low resolution, blur the
+ stems instead of showing clumped stems. See
+ http://lists.gnu.org/archive/html/freetype-devel/2011-02/msg00011.html
+ http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00046.html
+ for details.
+
+ * src/autofit/afcjk.c (af_cjk_hint_edges): Store the position of
+ the previous stem by `has_last_stem' and `last_stem_pos', and skip
+ a stem if the current and previous stem are too near to preserve
+ the gap.
+
+2011-04-18 Werner Lemberg <wl@gnu.org>
+
+ Integrate autofitter debugging stuff.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (FT_DEBUG_AUTOFIT): New macro.
+
+ * include/freetype/internal/fttrace.h: Add trace components for
+ autofitter.
+
+ * src/autofit/aftypes.h (AF_LOG): Removed.
+ (_af_debug): Removed.
+
+ * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/.
+ s/AF_LOG/FT_TRACE5/.
+ Define FT_COMPONENT where necessary.
+
+2011-04-18 Werner Lemberg <wl@gnu.org>
+
+ Synchronize config files.
+
+ * builds/unix/ftconfig.in: Copy missing assembler routines from
+ include/freetype/config/ftconfig.h.
+
+2011-04-13 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #33047.
+
+ Patch submitted by anonymous reporter.
+
+ * src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer
+ difference.
+
+2011-04-11 Kan-Ru Chen <kanru@kanru.info>
+
+ Fix reading of signed integers from files on 64bit platforms.
+
+ Previously, signed integers were converted to unsigned integers, but
+ this can fail because of sign extension. For example, 0xa344a1eb
+ becomes 0xffffffffa344a1eb.
+
+ We now do the reverse which is always correct because the integer
+ size is the same during the cast from unsigned to signed.
+
+ * include/freetype/internal/ftstream.h, src/base/ftstream.c
+ (FT_Stream_Get*): Replace with...
+ (FT_Stream_GetU*): Functions which read unsigned integers.
+ Update all macros accordingly.
+
+ * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated.
+
+2011-04-07 Werner Lemberg <wl@gnu.org>
+
+ Update Unicode ranges for CJK autofitter; in particular, add Hangul.
+
+ * src/autofit/afcjk.c (af_cjk_uniranges): Update to Unicode 6.0.
+
+2011-04-04 Werner Lemberg <wl@gnu.org>
+
+ Fix formatting of autofit debug dumps.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_points,
+ af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust
+ column widths.
+
+2011-03-30 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aftypes.h (AF_OutlineRec): Removed, unused.
+
+2011-03-24 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 256.
+ This limit is given on p. 37 of Adobe Technical Note #5014.
+
+2011-03-23 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_load_loca): Fix mismatch warning.
+
+2011-03-20 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts.
+
+2011-03-19 Werner Lemberg <wl@gnu.org>
+
+ More C++ compilation fixes.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_points,
+ af_glyph_hints_dump_segments, af_glyph_hints_dump_edges)
+ [__cplusplus]: Protect with `extern "C"'.
+
+2011-03-18 Werner Lemberg <wl@gnu.org>
+
+ C++ compilation fixes.
+
+ * src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c
+ (af_cjk_hints_apply): Use cast for `dim'.
+
+2011-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ A better fix for Savannah bug #32671.
+
+ * src/smooth/ftgrays.c (gray_render_conic): Clean up code and
+ replace WHILE loop with a more natural DO-WHILE construct.
+
+2011-03-16 Werner Lemberg <wl@gnu.org>.
+
+ * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field.
+ Suggested by Graham Asher.
+
+2011-03-09 Werner Lemberg <wl@gnu.org>
+
+ Make FT_Sfnt_Table_Info return the number of SFNT tables.
+
+ * src/sfnt/sfdriver.c (sfnt_table_info): Implement it.
+ * include/freetype/tttables.h: Update documentation.
+ * docs/CHANGES: Updated.
+
+2011-03-07 Bram Tassyns <bramt@enfocus.be>
+
+ Fix Savannah bug #27988.
+
+ * src/cff/cffobjs.c (remove_style): New function.
+ (cff_face_init): Use it to strip off the style part of the family
+ name.
+
+2011-03-07 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2011-03-07 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Quick fix for Savannah bug #32671.
+
+ This isn't the optimal solution yet, but it restores the previous
+ rendering quality (more or less).
+
+ * src/smooth/ftgrays.c (gray_render_conic): Do more splitting.
+
+2011-03-06 Werner Lemberg <wl@gnu.org>
+
+ Fix autohinting fallback.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs,
+ ignoring CFF-based OTFs.
+
+2011-02-27 Werner Lemberg <wl@gnu.org>
+
+ Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (AF_CONFIG_OPTION_USE_WARPER): New macro.
+ * src/autofit/aftypes.h (AF_USE_WARPER): Remove.
+
+ * src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/.
+
+ * src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy
+ variable assignment with a typedef.
+
+2011-02-26 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Slight simplifications.
+
+ * src/autofit/aflatin.c (af_latin_hints_link_segments): Remove
+ test which always returns false.
+ (af_latin_hints_compute_blue_edges): Remove redundant assignment.
+
+2011-02-24 Werner Lemberg <wl@gnu.org>
+
+ * docs/PROBLEMS: Mention rendering differences on different
+ platforms.
+ Suggested and worded by Jason Owen <jason.a.owen@gmail.com>.
+
+2011-02-24 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Comment out unused code.
+
+ * src/autofit/aflatin.c, src/autofit/aflatin2.c
+ (af_latin_hints_compute_edges): Do it.
+
+2011-02-24 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afhints.h (AF_GlyphHints): Remove unused field.
+
+2011-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Fix an off-by-one bug in `FTC_Manager_RemoveFaceID'.
+ Found by <ychen1392001@yahoo.com.cn>, see detail in
+
+ http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html
+
+ * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node
+ buckets[cache->p + cache->mask] too.
+
+2011-02-19 Kevin Kofler <kevin.kofler@chello.at>
+
+ Fall back to autohinting if a TTF/OTF doesn't contain any bytecode.
+ This is Savannah patch #7471.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Implement it.
+
+2011-02-19 John Tytgat <John.Tytgat@esko.com>
+
+ [cff] Fix subset prefix removal.
+ This is Savannah patch #7465.
+
+ * src/cff/cffobjs.c (remove_subset_prefix): Update length after
+ subset prefix removal.
+
+2011-02-13 Bradley Grainger <bgrainger@logos.com>
+
+ Add inline assembly version of FT_MulFix for MSVC.
+
+ * include/freetype/config/ftconfig.h: Ported the FT_MulFix_i386
+ function from GNU inline assembly syntax (see #ifdef __GNUC__ block
+ above) to MASM syntax for Microsoft Visual C++.
+
+2011-02-13 Bradley Grainger <bgrainger@logos.com>
+
+ Add project and solution files in Visual Studio 2010 format.
+
+ * builds/win32/.gitignore: Ignore user-specific cache files.
+ * builds/win32/vc2010/: Add VS2010 project & solution files, created
+ by upgrading builds/win32/vc2008/freetype.vcproj.
+ * objs/.gitignore: Ignore Visual Studio output files.
+
+2011-02-01 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afdummy.c: Include `aferrors.h'.
+ Problem reported by Chris Liddell <chris.liddell@artifex.com>.
+
+2011-02-01 Werner Lemberg <wl@gnu.org>
+
+ [cff] Ignore unknown operators in charstrings.
+ Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing
+ message for unknown operators and continue instead of exiting with a
+ syntax error.
+
+2011-02-01 Werner Lemberg <wl@gnu.org>
+
+ [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also.
+
+ * src/truetype/ttgload.c (tt_loader_init): Handle
+ `FT_LOAD_PEDANTIC'.
+ * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep,
+ tt_size_init_bytecode, tt_size_ready_bytecode): New argument to
+ handle pedantic mode.
+ * src/truetype/ttobjs.h: Updated.
+
+2011-01-31 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Protect jump instructions against endless loops.
+
+ * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error
+ if offset is zero.
+
+2011-01-31 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Improve handling of invalid references.
+
+ * src/truetype/interp.c: Set even more TT_Err_Invalid_Reference
+ error codes only if pedantic hinting is active. At the same time,
+ try to provide sane values which hopefully allow useful
+ continuation. Exception to this is CALL and LOOPCALL – due to
+ possible stack corruption it is necessary to bail out.
+
+2011-01-31 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Improve handling of stack underflow.
+
+ * src/truetype/ttinterp.c (TT_RunIns, Ins_FLIPPT, Ins_DELTAP,
+ Ins_DELTAC): Exit with error only if `pedantic_hinting' is set.
+ Otherwise, try to do something sane.
+
+2011-01-30 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message.
+
+2011-01-30 LIU Sun-Liang <sunliang_liu@foxitsoftware.com>
+
+ [truetype]: Fix behaviour of MIAP for invalid arguments.
+
+ * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in
+ case of error.
+
+2011-01-18 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix handling of MIRP instruction.
+
+ Thanks to Greg Hitchcock who explained the issue.
+
+ * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with
+ `>' since the description in the specification is incorrect.
+ This fixes, for example, glyph `two' in font `Helvetica Neue LT Com
+ 65 medium' at 15ppem.
+
+2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix ARM assembly code in include/freetype/config/ftconfig.h.
+
+ * include/freetype/config/ftconfig.h (FT_MulFix_arm):
+ Copy the maintained code from builds/unix/ftconfig.in.
+ Old GNU binutils could not accept the reduced syntax
+ `orr %0, %2, lsl #16'. Un-omitted syntax like RVCT,
+ `orr %0, %0, %2, lsl #16' is better. Reported by
+ Johnson Y. Yan. The bug report by Qt developers is
+ considered too.
+
+ http://bugreports.qt.nokia.com/browse/QTBUG-6521
+
+2011-01-15 Werner Lemberg <wl@gnu.org>
+
+ [raster] Make bbox handling the same as with Microsoft's rasterizer.
+
+ Right before B/W rasterizing, the bbox gets simply rounded to
+ integers. This fixes, for example, glyph `three' in font `Helvetica
+ Neue LT Com 65 Medium' at 11ppem.
+
+ Thanks to Greg Hitchcock who explained this behaviour.
+
+ * src/raster/ftrend1.c (ft_raster1_render): Implement it.
+
+2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Copy -mcpu=* & -march=* options from CFLAGS to LDFLAGS.
+
+ * builds/unix/configure.raw: Consider recent gcc-standard
+ flags to specify architecture in CFLAGS & LDFLAGS
+ harmonization. Requested by Savannah bug #32114, to
+ support multilib feature of BuildRoot SDK correctly.
+
+2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix off-by-one bug in CFLAGS & LDFLAGS harmonizer.
+
+ * builds/unix/configure.raw: Some important options that
+ included in CFLAGS but not in LDFLAGS are copied to
+ LDFLAGS, but the last option in CFLAGS was not checked.
+
+2011-01-13 Werner Lemberg <wl@gnu.org>
+
+ [raster] Add undocumented drop-out rule to the other bbox side also.
+
+ * src/raster/ftraster.c (Vertical_Sweep_Drop,
+ Horizontal_Sweep_Drop): Implement it.
+
+2011-01-13 Werner Lemberg <wl@gnu.org>
+
+ [raster] Reduce jitter value.
+
+ This catches a rendering problem with glyph `x' from Tahoma at
+ 10ppem. It seems that the increase of the precision in the change
+ from 2009-06-11 makes a larger jitter value unnecessary.
+
+ * src/raster/ftraster.c (Set_High_Precision): Implement it.
+
+2011-01-13 Werner Lemberg <wl@gnu.org>
+
+ [raster] Handle drop-outs at glyph borders according to Microsoft.
+
+ If a drop-out rule would switch on a pixel outside of the glyph's
+ bounding box, use the right (or top) pixel instead. This is an
+ undocumented feature, but some fonts like `Helvetica Neue LT Com 65
+ Medium' heavily rely on it.
+
+ Thanks to Greg Hitchcock who explained this behaviour.
+
+ * src/raster/ftraster.c (Vertical_Sweep_Drop,
+ Horizontal_Sweep_Drop): Implement it.
+
+2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Fix Savannah bug #31923, patch drafted by Harsha.
+
+ When a node comparator changes the cached nodes during the
+ search of a node matching with queried properties, the
+ pointers obtained before the function should be updated to
+ prevent the dereference to freed or reallocated nodes.
+ To minimize the rescan of the linked list, the update is
+ executed when the comparator notifies the change of cached
+ nodes. This change depends previous change:
+ 38b272ffbbdaae276d636aec4ef84af407d16181
+
+ * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Rescan the
+ top node if the cached nodes are changed.
+ * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto.
+
+2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Notice if a cache query induced the node list change.
+
+ Some node comparators (comparing the cache node contents and the
+ properties specified by the query) can flush the cache node to
+ prevent the cache inflation. The change may invalidate the pointers
+ to the node obtained before the node comparison, so it should be
+ noticed to the caller. The problem caused by the cache node
+ changing is reported by Harsha, see Savannah bug #31923.
+
+ * src/cache/ftccache.h (FTC_Node_CompareFunc): Add new argument
+ `FT_Bool* list_changed' to indicate the change of the cached nodes
+ to the caller.
+ (FTC_CACHE_LOOKUP_CMP): Watch the change of the cached nodes by
+ `_list_changed'.
+ (FTC_CACHE_TRYLOOP_END): Take new macro argument `_list_changed'
+ and update it when `FTC_Manager_FlushN' flushes any nodes.
+
+ * src/cache/ftccback.h (ftc_snode_compare): Updated to fit with new
+ FTC_Node_CompareFunc type.
+ (ftc_gnode_compare): Ditto.
+
+ * src/cache/ftcbasic.c: Include FT_INTERNAL_OBJECTS_H to use
+ TRUE/FALSE macros.
+ (ftc_basic_gnode_compare_faceid): New argument `FT_Bool*
+ list_changed' to indicate the change of the cache nodes (anyway, it
+ is always FALSE).
+
+ * src/cache/ftccmap.c: Include FT_INTERNAL_OBJECTS_H to use
+ TRUE/FALSE macros.
+ (ftc_cmap_node_compare): New argument `FT_Bool* list_changed' to
+ indicate the change of the cache nodes (anyway, it is always FALSE).
+ (ftc_cmap_node_remove_faceid): Ditto.
+
+ * src/cache/ftccache.c (FTC_Cache_NewNode): Pass a NULL pointer to
+ `FTC_CACHE_TRYLOOP_END', because the result is not needed.
+ (FTC_Cache_Lookup): Watch the change of the cache nodes by
+ `list_changed'.
+ (FTC_Cache_RemoveFaceID): Ditto.
+
+ * src/cache/ftcglyph.c: Include FT_INTERNAL_OBJECTS_H to use
+ TRUE/FALSE macros.
+ (ftc_gnode_compare): New argument `FT_Bool* list_changed' to
+ indicate the change of the cache nodes (anyway, it is always FALSE).
+ (FTC_GNode_Compare): New argument `FT_Bool* list_changed' to be
+ passed to `ftc_gnode_compare'.
+ * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
+
+ * src/cache/ftcsbits.c (ftc_snode_compare): New argument `FT_Bool*
+ list_changed' to indicate the change of the cache nodes, anyway. It
+ is updated by `FTC_CACHE_TRYLOOP'.
+ (FTC_SNode_Compare): New argument `FT_Bool* list_changed' to be
+ passed to `ftc_snode_compare'.
+ * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
+
+2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Fit `FTC_GNode_Compare' to `FTC_Node_CompareFunc'.
+
+ * src/cache/ftcglyph.h (FTC_GNode_Compare): Add the 3rd
+ argument `FTC_Cache cache' to fit FTC_Node_CompareFunc
+ prototype.
+ * src/cache/ftcglyph.c (FTC_GNode_Compare): Ditto. Anyway,
+ `cache' is not used by its child `ftc_gnode_compare'.
+
+2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Deduplicate the code to get the top node by a hash.
+
+ There are several duplicated code fragments getting the top node
+ from a cache by a given hash, like:
+
+ idx = hash & cache->mask;
+ if ( idx < cache->p )
+ idx = hash & ( cache->mask * 2 + 1 );
+ pnode = cache->buckets + idx;
+
+ To remove duplication, a cpp-macro to do same work
+ `FTC_NODE__TOP_FOR_HASH' is introduced. For non-inlined
+ configuration, non-`ftc_get_top_node_for_hash' is also introduced.
+
+ * src/cache/ftccache.h (FTC_NODE__TOP_FOR_HASH): Declare
+ and implement inlined version.
+ (FTC_CACHE_LOOKUP_CMP): Use `FTC_NODE__TOP_FOR_HASH'.
+ * src/cache/ftccache.c (ftc_get_top_node_for_hash): Non-inlined
+ version.
+ (ftc_node_hash_unlink): Use `FTC_NODE__TOP_FOR_HASH'.
+ (ftc_node_hash_link): Ditto.
+ (FTC_Cache_Lookup): Ditto.
+
+2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] inline-specific functions are conditionalized.
+
+ * src/cache/ftcglyph.c (FTC_GNode_Compare): Conditionalized for
+ inlined configuration. This function is a thin wrapper of
+ `ftc_gnode_compare' for inlined `FTC_CACHE_LOOKUP_CMP' (see
+ `nodecmp' argument). Under non-inlined configuration,
+ `ftc_gnode_compare' is invoked by `FTC_Cache_Lookup', via
+ `FTC_Cache->clazz.node_compare'.
+
+ * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto.
+ * src/cache/ftcsbits.c (FTC_SNode_Compare): Ditto, for
+ `ftc_snode_compare'.
+ * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
+
+2011-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Correct a type mismatch under non-inlined config.
+
+ * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): `FTC_GCache_Lookup'
+ takes the node via a pointer `FTC_Node*', differently from cpp-macro
+ `FTC_CACHE_LOOKUP_CMP'.
+
+2011-01-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Update Jamfile to include Bzip2 support.
+
+ * Jamfile: Include src/bzip2 to project.
+ Comments for lzw, gzip, bzip2 are changed to clarify that
+ they are for compressed PCF fonts, not others.
+ (e.g. compressed BDF fonts are not supported yet)
+
+2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Update Symbian project files to include Bzip2 support.
+
+ Currently, it provides `FT_Stream_OpenBzip2' that returns
+ unimplemented error always, to prevent unresolved symbol
+ error for the applications designed for Unix systems.
+
+ * builds/symbian/bld.inf: Include ftbzip2.h.
+ * builds/symbian/freetype.mmp: Include ftbzip2.c.
+
+2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Update classic MacOS makefiles to include Bzip2 support.
+
+ Currently, it provides `FT_Stream_OpenBzip2' that returns
+ unimplemented error always, to prevent unresolved symbol
+ error for the applications designed for Unix systems.
+
+ * builds/mac/FreeType.m68k_cfm.make.txt: Include ftbzip2.c.o.
+ * builds/mac/FreeType.m68k_far.make.txt: Ditto.
+ * builds/mac/FreeType.ppc_carbon.make.txt: Include ftbzip2.c.x.
+ * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
+
+2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Update Amiga makefiles to include Bzip2 support.
+
+ Currently, it provides `FT_Stream_OpenBzip2' that returns
+ unimplemented error always, to prevent unresolved symbol
+ error for the applications designed for Unix systems.
+
+ * builds/amiga/makefile: Include bzip2.ppc.o built from ftbzip2.c.
+ * builds/amiga/makefile.os4: Include bzip2.o built from ftbzip2.c.
+ * builds/amiga/smakefile: Ditto.
+
+2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Update pkg-config tools to reflect Bzip2 support.
+
+ * builds/unix/freetype-config.in: Include `-lbz2' to
+ --libs output, if built with Bzip2 support.
+ * builds/unix/freetype2.in: Ditto.
+
+2011-01-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: Remove `SYSTEM_BZ2LIB' macro.
+
+ SYSTEM_ZLIB is used to switch the builtin zlib source
+ or system zlib source out of FreeType2. But ftbzip2
+ module has no builtin bzip2 library and always requires
+ system bzip2 library. Thus SYSTEM_BZ2LIB is always yes,
+ it is not used.
+
+2011-01-03 Werner Lemberg <wl@gnu.org>
+
+ */rules.mk: Handle `*pic.c' files.
+
+2010-12-31 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64.
+ Problem reported by Tom Bishop <wenlin@wenlin.com>.
+
+2010-12-31 Werner Lemberg <wl@gnu.org>
+
+ Improve bzip2 support.
+
+ * include/freetype/ftmoderr.h: Add bzip2.
+
+ * docs/INSTALL.ANY, docs/CHANGES: Updated.
+
+ * src/pcf/README: Updated.
+ * include/freetype/internal/pcftypes.h: Obsolete, removed.
+
+2010-12-31 Joel Klinghed <the_jk@yahoo.com>
+
+ Add bzip2 compression support to handle *.pcf.bz2 files.
+
+ * builds/unix/configure.raw: Test for libbz2 library.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (FT_CONFIG_OPTION_USE_BZIP2): Define.
+ * include/freetype/config/ftheader.h (FT_BZIP2_H): Define.
+
+ * include/freetype/ftbzip2.h: New file.
+
+ * src/bzip2/*: New files.
+
+ * src/pcf/pcf.h: s/gzip_/comp_/.
+ * src/pcf/pcfdrvr.c: Include FT_BZIP2_H.
+ s/gzip_/comp_/.
+ (PCF_Face_Init): Handle bzip2 compressed files.
+
+ * docs/formats.txt, modules.cfg: Updated.
+
+2010-12-25 Harsha <mm.harsha@gmail.com>
+
+ Apply Savannah patch #7422.
+
+ If we encounter a space in a string then the sbit buffer is NULL,
+ height and width are 0s. So the check in ftc_snode_compare will
+ always pass for spaces (comparision with 255). Here the comments
+ above the condition are proper but the implementation is not. When
+ we create an snode I think it is the proper way to initialize the
+ width to 255 and then put a check for being equal to 255 in snode
+ compare function.
+
+ * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with
+ value 255.
+ (ftc_snode_compare): Fix condition.
+
+2010-12-13 Werner Lemberg <wl@gnu.org>
+
+ Fix parameter handling of `FT_Set_Renderer'.
+ Reported by Kirill Tishin <siege@bk.ru>.
+
+ * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'.
+
+2010-12-09 Werner Lemberg <wl@gnu.org>
+
+ [cff] Allow `hlineto' and `vlineto' without arguments.
+
+ We simply ignore such instructions. This is invalid, but it doesn't
+ harm; and indeed, there exist such subsetted fonts in PDFs.
+
+ Reported by Albert Astals Cid <aacid@kde.org>.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ [cff_op_hlineto]: Ignore instruction if there aren't any arguments
+ on the stack.
+
+2010-11-28 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.4 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-4'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.4
+
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/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.4.3/2.4.4/, s/243/244/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
+
+ * builds/unix/configure.raw (version_info): Set to 12:2:6.
+
+2010-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [ftsmooth]: Minor code simplification.
+
+ * src/smooth/ftgrays (gray_render_cubic): Do only one comparison
+ instead of two.
+
+2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
+
+ [truetype] Better multi-threading support.
+
+ * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
+ references.
+
+2010-11-23 John Tytgat <John.Tytgat@esko.com>
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
+ start_point, check_points, add_point, add_point1, close_contour
+ macros.
+ Remove add_contour macro.
+ Return error code from t1_builder_start_point and
+ t1_builder_check_points when there was one (instead of returning 0).
+
+2010-11-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums.
+ Some Latin TrueType fonts are still expected to be unhinted.
+ Fix Savannah bug #31645.
+
+ * src/truetype/ttobjs.c (tt_check_trickyness): Divided to...
+ (tt_check_trickyness_family): this checking family name, and
+ (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep.
+ (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum
+ for specified subtable even if cleared by lazy PDF generators.
+ (tt_synth_sfnt_checksum): Function to calculate the checksum.
+
+2010-11-18 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix `loca' handling for inconsistent number of glyphs.
+ Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
+
+ * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing,
+ handle case where `loca' is the last table in the font.
+
+2010-11-18 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] Ignore all errors while loading `OS/2' table.
+ Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
+
+2010-11-18 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
+
+ [type1] Fix matrix normalization.
+
+ * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling
+ factor.
+
+2010-11-18 Werner Lemberg <wl@gnu.org>
+
+ [type1] Improve guard against malformed data.
+ Based on a patch submitted by Johnson Y. Yan
+ <yinsen_yan@foxitsoftware.com>
+
+ * src/type1/t1load.c (read_binary_data): Check `size'.
+
+2010-11-17 Werner Lemberg <wl@gnu.org>
+
+ [sfnt] While tracing, output table checksums also.
+
+ * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
+
+2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [UVS] Fix `find_variant_selector_charmap', Savannah bug #31545.
+
+ Since 2010-07-04, `find_variant_selector_charmap' returns
+ the first cmap subtable always under rogue-compatible
+ configuration, it causes NULL pointer dereference and
+ make UVS-related functions crashed.
+
+ * src/base/ftobjs.c (Fix find_variant_selector_charmap):
+ Returns UVS cmap correctly.
+
+2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [ftsmooth] Improve rendering.
+
+ * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3,
+ cubic deviations have been estimated _after_ UPSCALE, whereas
+ conic ones have been evaluated _before_ UPSCALE, which produces
+ inferior rendering results. Fix this.
+ Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has
+ been tested with demo images sent to the mailing list. See
+
+ http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html
+
+ and later mails in this thread.
+
+2010-10-28 Werner Lemberg <wl@gnu.org>
+
+ [ftraster] Minor fixes.
+
+ Reported by Tom Bishop <wenlin@wenlin.com>.
+
+ * src/raster/ftraster.c (ULong): Remove unused typedef.
+ (TWorker): Remove unused variable `precision_mask'.
+
+2010-10-28 Werner Lemberg <wl@gnu.org>
+
+ [ftraster] Fix rendering.
+
+ Problem reported by Tom Bishop <wenlin@wenlin.com>; see
+ thread starting with
+
+ http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
+
+ * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
+ since the involved multiplication exceeds 32 bits.
+
+2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Revert a change of `_idx' type in `FTC_CACHE_LOOKUP_CMP'.
+
+ * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Revert
+ the type of `_idx' from FT_PtrDist (by previous change)
+ to original FT_UFast, to match with FT_CacheRec.
+
+2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Change the hash types to FT_PtrDist.
+
+ On LLP64 platforms (e.g. Win64), FT_ULong (32-bit)
+ variables are inappropriate to calculate hash values
+ from the memory address (64-bit). The hash variables
+ are extended from FT_ULong to FT_PtrDist and new
+ hashing macro functions are introduced. The hash
+ values on 16-bit memory platforms are changed, but
+ ILP32 and LP64 are not changed. The hash value in
+ the cache subsystem is not reverted to the memory
+ address, so using signed type FT_PtrDist is safe.
+
+ * src/cache/ftccache.h (_FTC_FACE_ID_HASH): New hash
+ function to replace `FTC_FACE_ID_HASH' for portability.
+ * src/cache/ftcmanag.h (FTC_SCALER_HASH): Replace
+ `FTC_FACE_ID_HASH' by `_FTC_FACE_ID_HASH'.
+ * src/cache/ftccmap.c (FTC_CMAP_HASH): Ditto.
+
+ * src/cache/ftccache.h (FTC_NodeRec): The type of the
+ member `hash' is changed from FT_UInt32 to FT_PtrDist.
+
+ * src/cache/ftccache.h (FTC_Cache_Lookup): The type of the
+ argument `hash' is changed from FT_UInt32 to FT_PtrDist.
+ (FTC_Cache_NewNode): Ditto.
+ * src/cache/ftccache.c (ftc_cache_add): Ditto.
+ (FTC_Cache_Lookup): Ditto. (FTC_Cache_NewNode): Ditto.
+ * src/cache/ftcglyph.h (FTC_GCache_Lookup): Ditto.
+ * src/cache/ftcglyph.c (FTC_GCache_Lookup): Ditto.
+
+ * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): The type
+ of the internal variable `hash' is changed to FT_PtrDist
+ from FT_UInt32. (FTC_ImageCache_LookupScaler): Ditto.
+ (FTC_SBitCache_Lookup): Ditto.
+ (FTC_SBitCache_LookupScaler): Ditto.
+ * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto.
+ * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Ditto.
+ Also the type of the internal variable `_idx' is changed to
+ FT_PtrDist from FT_UFast for better pointer calculation.
+
+2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Hide internal macros incompatible with LLP64.
+
+ `FT_POINTER_TO_ULONG', `FTC_FACE_ID_HASH', and
+ `FTC_IMAGE_TYPE_HASH' are enclosed by
+ FT_CONFIG_OPTION_OLD_INTERNALS and hidden from
+ normal clients.
+
+ For the history of these macros, see the investigation:
+ http://lists.gnu.org/archive/html/freetype/2010-10/msg00022.html
+
+2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Change the type of `FT_MEM_VAL' from FT_ULong to FT_PtrDist.
+
+ On LLP64 platforms (e.g. Win64), unsigned long (32-bit)
+ cannot cover the memory address (64-bit). `FT_MEM_VAL' is
+ used for hashing only and not dereferred, so using signed
+ type FT_PtrDist is safe.
+
+ * src/base/ftdbgmem.c (FT_MEM_VAL): Change the type of the
+ return value from FT_ULong to FT_PtrDist.
+ (ft_mem_table_resize): The type of hash is changed to
+ FT_PtrDist. (ft_mem_table_get_nodep): Ditto.
+
+2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Replace "%lx" for memory address by "%p", LLP64 platforms.
+
+ On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover
+ the memory address (64-bit). Also the casts from the pointer
+ type to long int should be removed to preserve the address
+ correctly.
+
+ * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
+ (End_Profile) Ditto.
+ * src/truetype/ttinterp.c (Init_Context): Ditto.
+
+2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Fix thinko in spline flattening.
+
+ FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL.
+
+ * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and
+ replace it everywhere with ONE_PIXEL/8.
+
+2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [raccess] Skip unrequired resource access rules by Darwin VFS.
+
+ When a resource fork access rule by Darwin VFS could open the
+ resource fork but no font is found in it, the rest of rules
+ by Darwin VFS are skipped. It reduces the warnings of the
+ deprecated resource fork access method by recent Darwin kernel.
+ Fix MacPorts ticket #18859:
+ http://trac.macports.org/ticket/18859
+
+ * src/base/ftobjs.c (load_face_in_embedded_rfork):
+ When `FT_Stream_New' returns FT_Err_Cannot_Open_Stream, it
+ means that the file is possible to be `fopen'-ed but zero-sized.
+ Also there is a case that the resource fork is not zero-sized,
+ but no supported font exists in it. If a rule by Darwin VFS
+ falls into such cases, there is no need to try other Darwin VFS
+ rules anymore. Such cases are marked by vfs_rfork_has_no_font.
+ If it is TRUE, the Darwin VFS rules are skipped.
+
+2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [raccess] Grouping resource access rules based on Darwin VFS.
+
+ MacOS X/Darwin kernel supports a few tricky methods to access
+ a resource fork via ANSI C or POSIX interface. Current resource
+ fork accessor tries all possible methods to support all kernels.
+ But if a method could open a resource fork but no font is found,
+ there is no need to try other methods older than tested method.
+ To determine whether the rule index is for Darwin VFS, a local
+ function `ftrfork.c::raccess_rule_by_darwin_vfs' is introduced.
+ To use this function in ftobjs.c etc but it should be inlined,
+ it is exposed by ftbase.h.
+
+ * src/base/ftrfork.c (FT_RFork_Rule): New enum type to identify
+ the rules to access the resource fork.
+ (raccess_guess_rec): New structure to bind the rule function and
+ rule enum type.
+ (FT_Raccess_Guess): The list of the rule functions is replaced by
+ (raccess_guess_table): This. This is exposed to be used by other
+ intra module functions.
+ (raccess_rule_by_darwin_vfs): A function to return a boolean
+ if the rule specified by the rule index is based on Darwin VFS.
+
+2010-10-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Prevent to open a FT_Stream for zero-sized file on non-Unix.
+
+ builds/unix/ftsystem.c prevents to open an useless stream from
+ zero-sized file and returns FT_Err_Cannot_Open_Stream, but the
+ stream drivers for ANSI C, Amiga and VMS return useless streams.
+ For cross-platform consistency, all stream drivers should act
+ same.
+
+ * src/base/ftsystem.c (FT_Stream_Open): If the size of the opened
+ file is zero, FT_Err_Cannot_Open_Stream is returned.
+ * builds/amiga/src/base/ftsystem.c (FT_Stream_Open): Ditto.
+ * src/vms/ftsystem.c (FT_Stream_Open): Ditto.
+
+2010-10-12 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #31310.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
+ invalid `runcnt' values.
+
+2010-10-08 Chris Liddell <chris.liddell@artifex.com>
+
+ Fix Savannah bug #31275.
+
+ * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
+
+2010-10-06 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Improve error handling of `SHZ' bytecode instruction.
+ Problem reported by Chris Evans <scarybeasts@gmail.com>.
+
+ * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
+
+2010-10-05 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #31253.
+ Patch submitted by an anonymous reporter.
+
+ * configure: Use `awk' instead of `sed' to manipulate output of `ls
+ -id'.
+
+2010-10-03 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.3 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-3'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.3
+
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/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.4.2/2.4.3/, s/242/243/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
+
+ * builds/unix/configure.raw (version_info): Set to 12:1:6.
+
+2010-10-03 Werner Lemberg <wl@gnu.org>
+
+ Avoid `configure' issues with symbolic links.
+ Based on a patch from Alexander Stohr <Alexander.Stohr@gmx.de>.
+
+ * configure: Compare directories using `ls -id'.
+ Check existence of `reference' subdirectory before creating it.
+
+2010-10-02 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #31088 (sort of).
+
+ * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64
+ function entries.
+
+2010-10-02 Werner Lemberg <wl@gnu.org>
+
+ [smooth] Fix splitting of cubics for negative values.
+
+ Reported by Róbert Márki <gsmiko@gmail.com>; see
+ http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html.
+
+ * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
+
+2010-10-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #31040.
+
+ * src/truetype/ttinterp.c (free_buffer_in_size): Remove.
+ (TT_RunIns): Updated.
+
+2010-09-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [sfnt] Make error message filling NULL names less verbose.
+
+ * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message
+ when we fill `post' names by NULL, instead of per-entry message.
+
+2010-09-20 Graham Asher <graham.asher@btinternet.com>
+ David Bevan <david.bevan@pb.com>
+
+ [smooth] Fix and improve spline flattening.
+
+ This fixes the flattening of cubic, S-shaped curves and speeds up
+ the handling of both the conic and cubic arcs.
+
+ See the discussions on the freetype-devel mailing list in late
+ August and September 2010 for details.
+
+ * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro.
+ (TWorker): Remove `conic_level' and `cubic_level' elements.
+ (gray_render_conic): Simplify algorithm.
+ (gray_render_cubic): New algorithm; details are given in the code
+ comments.
+ (gray_convert_glyph): Remove heuristics.
+
+2010-09-19 Werner Lemberg <wl@gnu.org>
+
+ Minor fixes.
+
+ * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]'
+ is `FT_UShort'.
+ (cff_index_access_element): Don't use additions in comparison.
+ * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type
+ `FT_Long'.
+ Don't use additions in comparison.
+ Improve tracing messages.
+ (load_format_25, load_post_names): Make `post_limit' of type
+ `FT_Long'.
+
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cff] Truncate the element length at the end of the stream.
+ See Savannah bug #30975.
+
+ * src/cff/cffload.c (cff_index_access_element): `off2', the offset
+ to the next element is truncated at the end of the stream to prevent
+ invalid I/O. As `off1', the offset to the requested element has
+ been checked by `FT_STREAM_SEEK', `off2' should be checked
+ similarly.
+
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cff] Ignore CID > 0xFFFFU.
+ See Savannah bug #30975.
+
+ * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if
+ greater than 0xFFFFU. CFF font spec does not mention maximum CID in
+ the font, but PostScript and PDF spec define that maximum CID is
+ 0xFFFFU.
+
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cff] Make trace message in` cff_charset_load' verbose.
+ See Savannah bug #30975.
+
+ * src/cff/cffload.c (cff_charset_load): Report the original `nleft'
+ and truncated `nleft'.
+
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cff] Correct `max_cid' from CID array length to max CID.
+ See Savannah bug #30975.
+
+ * src/cff/cffload.c (cff_charset_compute_cids): Don't increment
+ max_cid after detecting max CID. The array CFF_Charset->cids is
+ allocated by max_cid + 1.
+ (cff_charset_cid_to_gindex): Permit CID is less than or equal to
+ CFF_Charset->max_cid.
+ * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is
+ calculated as CFF_Charset->max_cid + 1.
+
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Sanitize the broken offsets in `loca'.
+ See Savannah bug #31040.
+
+ * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the
+ offset to the requested entry in `glyf' exceeds the end of the
+ table, return offset=0, length=0. If `pos2', the offset to the next
+ entry in `glyf' exceeds the end of the table, truncate the entry
+ length at the end of `glyf' table.
+
+2010-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [sfnt] Prevent overrunning in `post' table parser.
+ See Savannah bug #31040.
+
+ * src/sfnt/ttpost.c (load_post_names): Get the length of `post'
+ table and pass the limit of `post' table to `load_format_20' and
+ `load_format_25'.
+ (load_format_20): Stop the parsing when we reached at the limit of
+ `post' table. If more glyph names are required, they are filled by
+ NULL names.
+
+2010-09-17 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Don't duplicate size->twilight structure to be freed.
+ See Savannah bug #31040 for detail.
+
+ * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate
+ FT_GlyphZoneRec size->twilight to be freed. If duplicated,
+ `FT_FREE' erases the duplicated pointers only and leave original
+ pointers. They can cause the double-free crash when the burst
+ errors occur in TrueType interpreter and `free_buffer_in_size' is
+ invoked repeatedly.
+
+2010-09-15 Werner Lemberg <wl@gnu.org>
+
+ Make bytecode debugging with FontForge work again.
+
+ * src/truetype/ttinterp.c (TT_RunIns): Don't call
+ `free_buffer_in_size' in case of error if a debugger is active.
+
+2010-09-14 Werner Lemberg <wl@gnu.org>
+
+ Improve tracing messages.
+
+ * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
+ message.
+ * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
+ tracing message.
+ * src/truetype/ttgload.c (tt_loader_init): Add tracing message.
+ * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if
+ glyph doesn't fit into a small bitmap container.
+
+2010-09-13 Werner Lemberg <wl@gnu.org>
+
+ Fix minor issues reported by <muktha.narayan@wipro.com>.
+
+ * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove
+ redundant conditional check.
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto.
+ * src/cff/cffload.c (cff_encoding_load): Remove conditional check
+ which always evaluates to `true'.
+ * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points):
+ Ditto.
+ * src/truetype/ttinterp.c (Ins_IUP): Ditto.
+ * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if
+ value is already dereferenced.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
+
+2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Ignore the environmental setting of LIBTOOL.
+ Patch is suggested by Adrian Bunk, to prevent unexpected
+ reflection of environmental LIBTOOL. See:
+ http://savannah.nongnu.org/patch/?7290
+
+ * builds/unix/unix-cc.in: LIBTOOL is unconditionally set to
+ $(FT_LIBTOOL_DIR)/libtool. FT_LIBTOOL_DIR is set to $(BUILD_DIR)
+ by default.
+ * configure: When configured for the building out of source tee,
+ FT_LIBTOOL_DIR is set to $(OBJ_DIR).
+
+2010-08-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Decrease the trace level catching the interpreter error.
+
+ * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level
+ showing the error when the interpreter returns with an error,
+ from` FT_TRACE7' to `FT_TRACE1'.
+
+2010-08-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [truetype] Prevent bytecode reuse after the interpretation error.
+
+ * src/truetype/ttinterp.c (free_buffer_in_size): New function to
+ free the buffer allocated during the interpretation of this glyph.
+ (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if
+ an error occurs in the bytecode interpretation. The interpretation
+ of invalid bytecode may break the function definitions and referring
+ them in later interpretation is danger. By unsetting these flags,
+ `fpgm' and `prep' tables are executed again in next interpretation.
+
+ This fixes Savannah bug #30798, reported by Robert Święcki.
+
+2010-08-29 Werner Lemberg <wl@gnu.org>
+
+ [ftraster] Pacify compiler.
+
+ * src/raster/ftraster.c (ft_black_new) [_STANDALONE_]: `memory' is
+ not used.
+
+2010-08-29 Werner Lemberg <wl@gnu.org>
+
+ [cff] Allow SIDs >= 65000.
+
+ * src/cff/cffload.c (cff_charset_load): Fix change from 2009-03-20:
+ The threshold for SIDs is not applicable here. I misinterpreted the
+ `SID values 65000 and above are available for implementation use'
+ sentence in the CFF specification.
+
+ Problem reported by Ivan NinÄić <inincic@pdftron.com>.
+
+2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Force hinting when the font lacks its familyname.
+
+ In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt
+ stream may lack `name' table because they are not required. Hinting
+ for nameless fonts is safer for PDFs including embedded Chinese
+ fonts. Written by David Bevan, see:
+
+ http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html
+ http://lists.freedesktop.org/archives/poppler/2010-August/006310.html
+
+ * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by
+ nameless font is given, TRUE is returned to enable hinting.
+
+2010-08-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Register yet another tricky TrueType font.
+
+ * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?',
+ a Kaishu typeface paired with `HuaTianSongTi?' by Huatian
+ Information Industry.
+
+2010-08-17 Teijo Kinnunen <Teijo.Kinnunen@nuance.com>
+
+ Fix Savannah bug #30788.
+
+ * src/cache/ftccache.c (FTC_Cache_Clear): Check `cache->buckets' for
+ NULL too.
+
+2010-08-10 Werner Lemberg <wl@gnu.org>
+
+ Try to fix Savannah bug #30717 (and probably #30719 too).
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add another
+ overflow test for `width' and `height'.
+
+2010-08-06 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.2 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-2'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.2
+
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/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.4.1/2.4.2/, s/241/242/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
+
+ * builds/unix/configure.raw (version_info): Set to 12:0:6.
+
+2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #30648.
+
+ * src/base/ftobjs.c (FT_Done_Library): Specify the order of font
+ drivers during the face closing process. Type42 faces should be
+ closed before TrueType faces, because a Type42 face refers to
+ another internal TrueType face which is created from sfnt[] array on
+ the memory.
+
+2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
+
+ [raster] Fix valgrind warning.
+
+ * src/raster/ftraster.c (Decompose_Curve) <default>: Access point[0]
+ only if we don't hit `limit'.
+
+2010-08-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #30658.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Check that the total
+ length of collected POST segments does not overrun the allocated
+ buffer.
+
+2010-08-06 Yuriy Kaminskiy <yumkam@mail.ru>
+
+ Fix conditional usage of FT_MulFix_i386.
+ With -ansi flag, gcc does not define `i386', only `__i386__'.
+
+ * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in:
+ s/i386/__i386__/.
+
+2010-08-05 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30657.
+
+ * src/truetype/ttinterp.c (BOUNDSL): New macro.
+ Change `BOUNDS' to `BOUNDSL' where appropriate.
+
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of
+ `cvtSize'.
+
+2010-08-05 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30656.
+
+ * src/type42/t42parse.c (t42_parse_sfnts): Protect against negative
+ string_size.
+ Fix comparison.
+
+2010-08-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cff] Don't use any values in decoder after parsing error.
+
+ * src/cff/cffgload.c (cff_slot_load): Skip the evaluations
+ of the values in decoder, if `cff_decoder_parse_charstrings'
+ returns any error.
+
+2010-08-04 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30644.
+
+ * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
+
+2010-08-04 Werner Lemberg <wl@gnu.org>
+
+ `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
+
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
+2010-08-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cff] Improve stack overflow test.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Check stack
+ after execution of operations too.
+
+2010-07-18 Werner Lemberg <wl@gnu.org>
+
+ Add reference counters and to FT_Library and FT_Face objects.
+
+ * include/freetype/freetype.h (FT_Reference_Face): New function.
+ * include/freetype/ftmodapi.h (FT_Rererence_Library): New function.
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec,
+ FT_LibraryRec): New field `refcount'.
+
+ * src/base/ftobjs.c (FT_Open_Face, FT_New_Library): Handle
+ `refcount'.
+ (FT_Reference_Face, FT_Reference_Library): Implement new functions.
+ (FT_Done_Face, FT_Done_Library): Handle `refcount'.
+
+ * docs/CHANGES: Updated.
+
+2010-07-18 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.1 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-1'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.1.
+
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/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.4.0/2.4.1/, s/240/241/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
+
+ * builds/unix/configure.raw (version_info): Set to 11:1:5.
+
+2010-07-17 Werner Lemberg <wl@gnu.org>
+
+ [cff] Final try to fix `hintmask' and `cntrmask' limit check.
+
+ Problem reported by Tobias Wolf <towolf@gmail.com>.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: Sigh. I'm apparently too silly to fix this
+ correctly in less than three tries.
+
+2010-07-12 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.4.0 released.
+ =========================
+
+
+ Tag sources with `VER-2-4-0'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.4.0.
+
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/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.3.12/2.4.0/, s/2312/240/.
+
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 4.
+ (FREETYPE_PATCH): Set to 0.
+
+ * builds/unix/configure.raw (version_info): Set to 11:0:5.
+
+2010-07-12 Werner Lemberg <wl@gnu.org>
+
+ Remove C++ warnings.
+
+ */*: Initialize pointers where necessary to make g++ happy.
+
+2010-07-12 malc <av1474@comtv.ru>
+ Richard Henderson <rth@redhat.com>
+
+ Fix type-punning issues with C++.
+
+ * include/freetype/internal/ftmemory.h (FT_ASSIGNP) [__cplusplus]:
+ Emulate a `typeof' operator with an inline template which uses
+ `static_cast'.
+
+2010-07-11 Werner Lemberg <wl@gnu.org>
+
+ Fix C++ compilation issue.
+
+ * src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Fix
+ type of `dot' variable.
+
+2010-07-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix another case reported in Savannah bug #30373.
+ Permit a face for Type1, Type42 and CFF without charmap,
+ patch by Tor Andersson.
+
+ * src/type1/t1objs.c (T1_Face_Init): Reset the error if it
+ is FT_Err_No_Unicode_Glyph_Name.
+ * src/type42/t42objs.c (T42_Face_Init): Ditto.
+ * src/cff/cffobjs.c (cff_face_init): Ditto.
+
+2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Use defined macros to set {platform,encoding}_id.
+
+ * src/bdf/bdfdrivr.c: Include ttnameid.h and use macros to
+ set charmap.{platfom,encoding}_id.
+ * src/pcf/pcfdrivr.c: Ditto.
+ * src/winfonts/winfnt.c: Ditto.
+ * src/type1/t1objs.c: Ditto.
+ * src/type42/t42objs.c: Ditto.
+ * src/cff/cffobjs.c: Ditto.
+ * src/pfr/pfrobjs.c: Ditto.
+
+2010-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #30373.
+ Too serious check of errors by `FT_CMap_New' since 2010-07-04
+ is fixed. Reported by Tor Andersson.
+
+ * include/freetype/fterrdef.h
+ (PSnames_Err_No_Unicode_Glyph_Name): New error code to
+ indicate the Unicode charmap synthesis failed because
+ no Unicode glyph name is found.
+
+ * src/psnames/psmodule.c (ps_unicodes_init): Return
+ PSnames_Err_No_Unicode_Glyph_Name when no Unicode glyph name
+ is found in the font.
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Return
+ CFF_Err_No_Unicode_Glyph_Name when no SID is available.
+
+ * src/type1/t1objs.c (T1_Face_Init): Proceed if `FT_CMap_New'
+ is failed by the lack of Unicode glyph name.
+ * src/type42/t42objs.c (T42_Face_Init): Ditto.
+ * src/cff/cffobjs.c (cff_face_init): Ditto.
+
+2010-07-09 Ken Sharp <ken.sharp@artifex.com>
+
+ Make ftraster.c compile in stand-alone mode with MSVC compiler.
+
+ * src/raster/ftmisc.h (FT_Int64) [_WIN32, _WIN64]: Fix typedef
+ since there is no `inttypes.h' for MSVC.
+
+2010-07-08 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30361.
+
+ * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
+
+2010-07-06 Werner Lemberg <wl@gnu.org>
+
+ Pacify compiler.
+
+ * src/cff/cffload.c (cff_index_get_pointers): Initialize
+ `new_bytes'.
+
+2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
+
+ Fix Savannah bug #27648.
+
+ * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
+ `raster_done' only if we have an outline glyph format.
+
+2010-07-05 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30030.
+
+ * builds/win32/*/freetype.vcproj: Add ftxf86.c.
+
+2010-07-05 Werner Lemberg <wl@gnu.org>
+
+ [cff] Next try to fix `hintmask' and `cntrmask' limit check.
+
+ Problem reported by malc <av1474@comtv.ru>.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: It is possible that there is just a single byte
+ after the `hintmask' or `cntrmask', e.g., a `return' instruction.
+
+2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Restrict the number of the charmaps in a rogue-compatible mode.
+ Fix for Savannah bug #30059.
+
+ * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Replace `16' the
+ minimum character code passed by a legacy rogue client by...
+ * include/freetype/config/ftoption.h (FT_MAX_CHARMAP_CACHEABLE):
+ This. It is undefined when FT_CONFIG_OPTION_OLD_INTERNALS is
+ undefined (thus the rogue client compatibility is not required).
+
+ * src/cff/cffobjs.c (cff_face_init): Abort the automatic
+ selection or synthesis of Unicode cmap subtable when the charmap
+ index exceeds FT_MAX_CHARMAP_CACHEABLE.
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Issue error message
+ when the charmap index exceeds FT_MAX_CHARMAP_CACHEABLE.
+
+ * src/base/ftobjs.c (find_unicode_charmap): When Unicode charmap
+ is found after FT_MAX_CHARMAP_CACHEABLE, ignore it and search
+ earlier one.
+ (find_variant_selector_charmap): When UVS charmap is found after
+ FT_MAX_CHARMAP_CACHEABLE, ignore it and search earlier one.
+ (FT_Select_Charmap): When a charmap matching with requested
+ encoding but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
+ earlier one.
+ (FT_Set_Charmap): When a charmap matching with requested
+ charmap but after FT_MAX_CHARMAP_CACHEABLE, ignore and search
+ earlier one.
+ (FT_Get_Charmap_Index): When a requested charmap is found
+ after FT_MAX_CHARMAP_CACHEABLE, return the inverted charmap
+ index.
+
+2010-07-04 Werner Lemberg <wl@gnu.org>
+
+ TrueType hinting is no longer patented.
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Define.
+ (TT_CONFIG_OPTION_UNPATENTED_HINTING): Undefine.
+
+ * docs/CHANGES, docs/INSTALL, include/freetype/freetype.h: Updated.
+ * docs/TRUETYPE, docs/PATENTS: Removed.
+
+2010-07-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Check error value by `FT_CMap_New'.
+
+ * 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.
+
+2010-07-03 Werner Lemberg <wl@gnu.org>
+
+ Make ftgrays.c compile stand-alone again.
+
+ * src/smooth/ftgrays.c [_STANDALONE_]: Include `stddef.h'.
+ (FT_INT_MAX, FT_PtrDist)[_STANDALONE_]: Define.
+
+2010-07-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Additional fix for Savannah bug #30306.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): If the type of the
+ POST fragment is 0, the segment is completely ignored. The declared
+ length of the segment is not cared at all. According to Adobe
+ Technical Note 5040, type 0 segment is a comment only and should not
+ be loaded for the interpreter. Reported by Robert Święcki.
+
+2010-07-01 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Protect against code range underflow.
+
+ * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow
+ negative IP values.
+
+2010-07-01 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Add rudimentary tracing for bytecode instructions.
+
+ * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New
+ array.
+ (TT_RunIns): Trace opcodes.
+
+2010-06-30 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30263.
+
+ * src/smooth/ftgrays.c (gray_render_span): Use cast to `unsigned
+ int' to avoid integer overflow.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use smaller
+ threshold values for `width' and `height'. This is not directly
+ related to the bug fix but makes sense anyway.
+
+2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Initial fix for Savannah bug #30306.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Check `rlen', the
+ length of fragment declared in the POST fragment header, and prevent
+ an underflow in length calculation. Some fonts set the length to
+ zero in spite of the existence of a following 16bit `type'.
+ Reported by Robert Święcki.
+
+2010-07-01 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Additional fix for Savannah bug #30248 and #30249.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the buffer size
+ during gathering PFB fragments embedded in LaserWriter PS font for
+ Macintosh. Reported by Robert Święcki.
+
+2010-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Minor optimizations by avoiding divisions.
+
+ * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning):
+ Replace divisions with multiplication in comparisons.
+
+2010-06-29 Werner Lemberg <wl@gnu.org>
+
+ Fix minor tracing issues.
+
+ * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
+
+2010-06-27 Werner Lemberg <wl@gnu.org>
+
+ [cff] Really fix `hintmask' and `cntrmask' limit check.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: Fix thinko and handle tracing also.
+
+2010-06-27 Werner Lemberg <wl@gnu.org>
+
+ Fix valgrind warning.
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Initialize
+ `result' array.
+
+2010-06-27 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix memory leak.
+
+ * src/cff/cffgload.c (cff_operator_seac): Free charstrings even in
+ case of errors.
+
+2010-06-27 Werner Lemberg <wl@gnu.org>
+
+ [cff] Protect against invalid `hintmask' and `cntrmask' operators.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: Ensure that we don't exceed `limit' while parsing
+ the bit masks of the `hintmask' and `cntrmask' operators.
+
+2010-06-26 Werner Lemberg <wl@gnu.org>
+
+ Fix PFR change 2010-06-24.
+
+ * src/pfr/pfrgload.c (pfr_glyph_load_simple): Really protect against
+ invalid indices.
+
+2010-06-26 Werner Lemberg <wl@gnu.org>
+
+ Improve PFR tracing messages.
+
+ * src/pfr/pfrgload.c (pfr_glyph_load_rec): Emit tracing messages for
+ simple and compound glyph offsets.
+
+2010-06-26 Werner Lemberg <wl@gnu.org>
+
+ Fix last PFR change.
+
+ * src/pfr/pfrobjs.c (pfr_face_init): Fix rejection logic.
+
+2010-06-26 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30262.
+
+ * src/sfnt/ttload.c (tt_face_load_maxp): Limit `maxComponentDepth'
+ arbitrarily to 100 to avoid stack exhaustion.
+
+2010-06-26 Werner Lemberg <wl@gnu.org>
+
+ Add some memory checks (mainly for debugging).
+
+ * src/base/ftstream.c (FT_Stream_EnterFrame): Exit with error
+ if the frame size is larger than the stream size.
+
+ * src/base/ftsystem.c (ft_ansi_stream_io): Exit with error if
+ seeking a position larger than the stream size.
+
+2010-06-25 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30261.
+
+ * src/pfr/pfrobjs.c (pfr_face_init): Reject fonts which contain
+ neither outline nor bitmap glyphs.
+
+2010-06-25 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30254.
+
+ * src/cff/cffload.c (cff_index_get_pointers): Do sanity check for
+ first offset also.
+
+2010-06-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Initial fix for Savannah bug #30248 and #30249.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Check the error during
+ reading a PFB fragment embedded in LaserWriter PS font for Macintosh.
+ Reported by Robert Święcki.
+
+2010-06-24 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30247.
+
+ * src/pcf/pcfread.c (pcf_get_metrics): Disallow (invalid) fonts with
+ zero metrics.
+
+2010-06-24 Graham Asher <graham.asher@btinternet.com>
+
+ * src/smooth/ftgrays.c (gray_render_cubic): Fix algorithm.
+ The previous version was too aggressive, as demonstrated in
+ http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00020.html.
+
+2010-06-24 Werner Lemberg <wl@gnu.org>
+
+ */*: Use module specific error names where appropriate.
+
+2010-06-24 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30236.
+
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Improve check for pointer
+ to `cmap_table'.
+
+2010-06-24 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30235.
+
+ * src/pfr/pfrgload.c (pfr_glyph_load_simple): Protect against
+ invalid indices if there aren't any coordinates for indexing.
+
+2010-06-24 Werner Lemberg <wl@gnu.org>
+
+ [bdf]: Font properties are optional.
+
+ * src/bdf/bdflib.c (_bdf_readstream): Use special error code to
+ indicate a redo operation.
+ (_bdf_parse_start): Handle `CHARS' keyword here too and pass current
+ input line to `_bdf_parse_glyph'.
+
+2010-06-23 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30220.
+
+ * include/freetype/fterrdef.h
+ (BDF_Err_Missing_Fontboundingbox_Field): New error code.
+
+ * src/bdf/bdflib.c (_bdf_parse_start): Check for missing
+ `FONTBOUNDINGBOX' field.
+ Avoid memory leak if there are multiple `FONT' lines (which is
+ invalid but doesn't hurt).
+
+2010-06-21 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30168.
+
+ * src/pfr/pfrgload.c (pfr_glyph_load_compound): Limit the number of
+ subglyphs to avoid endless recursion.
+
+2010-06-20 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30145.
+
+ * src/psaux/psobjs.c (t1_builder_add_contour): Protect against
+ `outline == NULL' which might happen in invalid fonts.
+
+2010-06-19 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30135.
+
+ * src/bdf/bdflib.c (_bdf_list_join): Don't modify value in static
+ string `empty'.
+ (_bdf_parse_glyph): Avoid memory leak in case of error.
+
+2010-06-15 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30108.
+
+ * src/autofit/afglobal.c (af_face_globals_compute_script_coverage):
+ Properly mask AF_DIGIT bit in comparison.
+
+2010-06-11 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30106.
+
+ Point numbers for FreeType's implementation of hinting masks are
+ collected before the final number of points of a glyph has been
+ determined; in particular, the code for handling the `endchar'
+ opcode can reduce the number of points.
+
+ * src/pshinter/pshalgo.c (psh_glyph_find_strong_points): Assure that
+ `end_point' is not larger than `glyph->num_points'.
+
+2010-06-11 Werner Lemberg <wl@gnu.org>
+
+ [cff]: Improve debugging output.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask>: Implement it.
+
+2010-06-10 Graham Asher <graham.asher@btinternet.com>
+
+ ftgrays: Speed up rendering of small cubic splines.
+
+ * src/smooth/ftgrays.c (gray_render_cubic): Implement new,
+ simplified algorithm to find out whether the spline can be replaced
+ with two straight lines. See this thread for more:
+
+ http://lists.gnu.org/archive/html/freetype-devel/2010-06/msg00000.html
+
+2010-06-09 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30082.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_callothersubr>: Protect against stack underflow.
+
+2010-06-08 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30053.
+
+ * src/cff/cffparse.c (cff_parse_real): Handle border case where
+ `fraction_length' has value 10.
+
+2010-06-07 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #30052.
+ This bug has been introduced with commit 2415cbf3.
+
+ * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Protect
+ against endless loop in case of corrupted font header data.
+
+2010-05-26 Werner Lemberg <wl@gnu.org>
+
+ Remove unused variable.
+ Found by Graham.
+
+ * src/autofit/afhints.c (af_glyph_hints_reload): Remove unused
+ variable `first' in first block.
+
+2010-05-22 Werner Lemberg <wl@gnu.org>
+
+ Fix various memory problems found by linuxtesting.org.
+
+ * src/base/ftgxval.c (FT_TrueTypeGX_Free, FT_ClassicKern_Free),
+ src/base/ftotval.c (FT_OpenType_Free), src/base/ftpfr.c
+ (ft_pfr_check): Check `face'.
+
+ * src/base/ftobjs.c (FT_Get_Charmap_Index): Check `charmap' and
+ `charmap->face'.
+ (FT_Render_Glyph): Check `slot->face'.
+ (FT_Get_SubGlyph_Info): Check `glyph->subglyphs'.
+
+2010-05-22 Werner Lemberg <wl@gnu.org>
+
+ autofit: Remove dead code.
+ Suggested by Graham.
+
+ * src/autofit/afhints.c (af_glyph_hints_compute_inflections):
+ Removed.
+ (af_glyph_hints_reload): Remove third argument.
+ Update all callers.
+
+2010-05-21 Bram Tassyns <bramt@enfocus.be>
+
+ Fix Savannah bug #27987.
+
+ * src/cff/cffobjs.c (remove_subset_prefix): New function.
+ (cff_face_init): Use it to adjust `cffface->family_name'.
+
+2010-05-20 Werner Lemberg <wl@gnu.org>
+
+ TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'.
+
+ Acroread does the same.
+
+ * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call
+ `Update_Max' to adjust size of instructions array if necessary and
+ add a rough safety check.
+
+ (load_truetype_glyph): Save `loader->byte_len' before recursive
+ call.
+
+ * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max):
+ Declare it as FT_LOCAL.
+
+2010-05-18 Hongbo Ni <hongbo@njstar.com>
+
+ Apply Savannah patch #7196.
+
+ * src/cff/cffgload.c (cff_slot_load): Prevent crash if CFF subfont
+ index is out of range.
+
+2010-05-11 Werner Lemberg <wl@gnu.org>
+
+ * docs/formats.txt: Give pointer to PCF documentation.
+ Information provided by Alan Coopersmith
+ <alan.coopersmith@oracle.com>.
+
+2010-05-10 Ken Sharp <ken.sharp@artifex.com>
+
+ Fix Savannah bug #29846.
+
+ Previously we discovered fonts which used `setcurrentpoint' to set
+ the initial point of a contour to 0,0. This caused FreeType to
+ raise an error, because the `setcurrentpoint' operator is only
+ supposed to be used with the results from an OtherSubr subroutine.
+
+ This was fixed by simply ignoring the error and carrying on.
+
+ Now we have found a font which uses setcurrentpoint to actually
+ establish a non-zero point for a contour during the course of a
+ glyph program. FWIW, these files may be produced by an application
+ called `Intaglio' on the Mac, when converting TrueType fonts to
+ Type 1.
+
+ The fix allows the new invalid behaviour, the old invalid behaviour
+ and real proper usage of the operator to work the same way as Adobe
+ interpreters apparently do.
+
+ (t1_decoder_parse_charstrings): Make `setcurrentpoint' use the top
+ two elements of the stack to establish unconditionally the current x
+ and y coordinates.
+
+ Make the `flex' subroutine handling (OtherSubr 0) put the current
+ x,y coordinates onto the stack, instead of two dummy uninitialised
+ values.
+
+2010-04-14 Ken Sharp <ken.sharp@artifex.com>
+
+ Fix Savannah bug #29444.
+
+ * src/psaux/psobjs.c (t1_builder_start_point): Accept (invalid)
+ `lineto' immediately after `hsbw', in accordance with Acrobat, GS,
+ and others.
+
+2010-04-14 Michał Cichoń <thedmd@artifexmundi.com>
+
+ Fix Savannah bug #27999.
+
+ * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID): Only remove
+ selected entry, not all.
+
+2010-04-06 Jonathan Kew <jfkthame@gmail.com>
+
+ Add overflow check to `fvar' table.
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance
+ count.
+
+2010-04-05 Ken Sharp <ken.sharp@artifex.com>
+
+ Fix Savannah bug #29335.
+
+ * src/raster/ftraster.c (Line_Up): Use slow multiplication to
+ prevent overflow. This shouldn't have any serious impact on speed,
+ however.
+
+2010-04-05 Werner Lemberg <wl@gnu.org>
+
+ Add new function `FT_Library_SetLcdFilterWeights'.
+
+ This is based on code written by Lifter
+ <http://unixforum.org/index.php?showuser=11691>. It fixes
+ FreeDesktop bug #27386.
+
+ * src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): New
+ function.
+
+ * include/freetype/ftlcdfil.h: Updated.
+
+ * docs/CHANGES: Updated.
+
+2010-04-01 John Tytgat <John.Tytgat@esko.com>
+
+ Fix Savannah bug #29404.
+
+ * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1
+ of `head' table of TrueType fonts).
+
+2010-03-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix `multi build' for Tytgat's CFF driver improvement.
+
+ * src/base/cffload.h (cff_index_get_name): Added.
+
+2010-03-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Remove duplicated inclusion of `FT_OUTLINE_H' in ftobjs.c.
+
+ * src/base/ftobjs.c: Remove 2nd inclusion of `FT_OUTLINE_H'.
+
+2010-03-11 Chris Liddell <chris.liddell@artifex.com>
+
+ Fix Savannah bug #27442.
+
+ * src/raster/ftraster.c (ft_black_reset): Fix `buffer_size'.
+
+2010-03-09 Werner Lemberg <wl@gnu.org>
+
+ Remove unused variable.
+ Reported by Graham.
+
+ * src/cff/cffparse.c (cff_parse_real): Remove `rest'.
+
+2010-03-02 John Tytgat <John.Tytgat@esko.com>
+
+ Improve CFF string (especially glyphname) lookup performance.
+
+ We do this by avoiding memory allocation and file I/O. This is
+ Savannah patch #7104.
+
+ * src/cff/cfftypes.h: Include PS cmaps service and
+ FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (CFF_SubFontRec): Remove `num_local_subrs'.
+ (CFF_FontRec): Add `num_strings', `strings', and `string_pool'
+ fields.
+ Remove `string_index' and `num_global_subrs' fields.
+ Use real types instead of `void' for `pshinter' and `psnames' fields.
+
+ * src/cff/cffload.c: Don't include PS cmaps service.
+ (cff_index_get_pointers): Add `pool' parameter which allows to
+ insert an extra NUL character for each String INDEX entry.
+ (cff_index_get_name): Make it a local function.
+ (cff_index_get_string): New function.
+ (cff_subfont_load): Updated.
+ (cff_font_load): Initialize `num_strings', `strings', and
+ `string_pool' fields in the `CFF_FontRec' structure.
+ (cff_index_get_sid_string): Use `cff_index_get_string' instead of
+ `cff_index_get_name'.
+ (cff_font_done): Updated.
+
+ * src/cff/cffload.h: Don't include PS cmaps service.
+ (cff_index_get_string): Added.
+ (cff_index_get_sid_string): Updated.
+
+ * src/cff/cffobjs.c: Don't include PS cmaps service and
+ FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (cff_size_get_globals_funcs, cff_slot_init): Updated.
+ (cff_face_init): Follow `cff_index_get_name',
+ `cff_index_get_string', and `cff_index_get_sid_string' changes.
+
+ * src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
+ (cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
+ (cff_cmap_unicode_init): Updated.
+
+ * src/cff/cffdrivr.c: Don't include PS cmap service.
+ (cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
+ service.
+ (cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
+ `cff_index_get_sid_string' change.
+ (cff_get_name_index): Use `cff_index_get_string' instead of
+ `cff_index_get_name'.
+
+ * src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (cff_decoder_init, cff_decoder_prepare): Updated.
+
+2010-02-27 Werner Lemberg <wl@gnu.org>
+
+ Simplify code.
+ Suggested by Behdad.
+
+ * src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
+ call FT_Get_Next_Char anyway if necessary.
+
+2010-02-26 Behdad Esfahbod <behdad@behdad.org>
+
+ Improve handling of invalid glyph indices in char->index functions.
+
+ * src/base/ftobjs.c (FT_Get_First_Char, FT_Get_Next_Char): Use a
+ loop.
+
+2010-02-18 Chris Liddell <chris.liddell@artifex.com>
+
+ Fix Savannah bug #28905.
+
+ Initialize phantom points before calling the incremental interface
+ to update glyph metrics.
+
+ * src/truetype/ttgload.c (tt_get_metrics_incr_overrides)
+ [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from...
+ (tt_get_metrics): This.
+ Updated.
+ (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
+
+----------------------------------------------------------------------------
+
+Copyright 2010-2011 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/3party/freetype/ChangeLog.20 b/3party/freetype/ChangeLog.20
new file mode 100644
index 0000000000..8fcc5e70ab
--- /dev/null
+++ b/3party/freetype/ChangeLog.20
@@ -0,0 +1,2613 @@
+2002-02-09 Werner Lemberg <wl@gnu.org>
+
+ * README: Fix typo.
+ * docs/CHANGES: Minor fixes.
+
+
+ * Version 2.0.8 released.
+ =========================
+
+
+2002-02-08 David Turner <david@freetype.org>
+
+ * docs/CHANGES: Updating for 2.0.8.
+
+ * include/freetype/freetype.h: Setting `PATCH_LEVEL' to 8 and
+ removing `FT_Get_Next_Char' from the API (temporarily).
+
+ * include/freetype/freetype.h: Adding comments to FT_Get_Next_Char;
+ note that this function might temporarily be removed for the 2.0.8
+ release.
+
+2002-02-07 David Turner <david@freetype.org>
+
+ * src/pcf/pcfread.c (pcf_load_font): Removed immature support of
+ the AVERAGE_WIDTH property.
+
+2002-02-06 David Turner <david@freetype.org>
+
+ * src/sfnt/sfobjs.c (SFNT_Load_Face): Since many fonts embedded in
+ PDF documents do not include 'cmap', 'post' and 'name' tables, the
+ SFNT face loader has been changed to not immediately report an
+ error if these are not present.
+
+ Note that the specification _requires_ these tables, but Adobe
+ seems to ignore it completely.
+
+ * src/sfnt/ttcmap.c: Removing compiler warnings.
+
+ * src/pcf/pcfread.c (pcf_read_TOC): Use FT_UInt.
+ (pcf_parse_metric, pcf_parse_compressed_metric): Removed. Code
+ is now in ...
+ (pcf_get_metric): Here.
+ (pcfSeekToType): Renamed to ...
+ (pcf_seek_to_table_type): This.
+ Use FT_Int.
+ (pcfHasType): Renamed to ...
+ (pcf_has_table_type): This.
+ Use FT_Int.
+ (find_property): Renamed to ...
+ (pcf_find_property): This.
+ Use FT_Int.
+ (pcf_get_bitmaps, pcf_get_encodings): Handle invalid PCF fonts
+ better (delaying format checks out of FT_Access_Frame ..
+ FT_Forget_Frame blocks to avoid leaving the stream in an incorrect
+ state when encountering an invalid PCF font).
+
+ * src/pcf/pcfdriver.c (PCF_Done_Face): Renamed to ...
+ (PCF_Face_Done): This.
+ (PCF_Init_Face): Renamed to ...
+ (PCF_Face_Init): This.
+ (PCF_Get_Char_Index): Renamed to ...
+ (PCF_Char_Get_Index): This.
+ (PCF_Get_Next_Char): Renamed to ...
+ (PCF_Char_Get_Next): This.
+ (pcf_driver_class): Updated.
+
+ * src/pcf/pcf.h (PCF_Done_Face): Removed.
+
+2002-02-06 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/pcf/pcfdriver.c (FT_Done_Face): Fixed small memory leak.
+
+ * src/pcf/pcfread.c (pcf_load_font): Now handles the `AVERAGE_WIDTH'
+ property to return correct character pixel (width/height) pairs for
+ embedded bitmaps.
+
+2002-02-04 Keith Packard <keithp@keithp.com>
+
+ Adding the function `FT_Get_Next_Char', doing the obvious thing
+ w.r.t. the selected charmap.
+
+ * include/freetype/freetype.h: Add prototype.
+ * include/freetype/internal/ftdriver.h: Add `FTDriver_getNextChar'
+ typedef.
+ (FT_Driver_Class): Use it.
+ * include/freetype/internal/psnames.h: Add `PS_Next_Unicode_Func'
+ typedef.
+ (PSNames_Interface): Use it.
+ * include/freetype/internal/tttypes.h: Add `TT_CharNext_Func'
+ typedef.
+ (TT_CMapTable): Use it.
+
+ * src/base/ftobjs.c (FT_Get_Next_Char): New function, implementing
+ high-level API.
+ * src/cff/cffdrivr.c (cff_get_next_char): New function.
+ (cff_driver_class): Add it.
+ * src/cid/cidriver.c (Cid_Get_Next_Char): New function.
+ (t1cid_driver_class): Add it.
+ * src/pcf/pcfdriver.c (PCF_Get_Next_Char): New function.
+ (pcf_driver_class): Add it.
+ * src/psnames/psmodule.c (PS_Next_Unicode): New function.
+ (psnames_interface): Add it.
+ * src/sfnt/ttcmap.c (code_to_next0, code_to_next2, code_to_next4,
+ code_to_next6, code_to_next_8_12, code_to_next_10): New auxiliary
+ functions.
+ (TT_CharMap_Load): Use them.
+ * src/truetype/ttdriver.c (Get_Next_Char): New function.
+ (tt_driver_class): Add it.
+ * src/type1/t1driver.c (Get_Next_Char): New function.
+ (t1_driver_class): Add it.
+ * src/winfonts/winfnt.c (FNT_Get_Next_Char): New function.
+ (winfnt_driver_class): Add it.
+
+ * src/pcf/pcfread.c (pcf_load_font): For now, report Unicode for
+ Unicode and Latin 1 encodings.
+
+2002-02-02 Keith Packard <keithp@keithp.com>
+
+ * builds/unix/freetype-config.in: Add missing `fi'.
+
+
+ * Version 2.0.7 released.
+ =========================
+
+
+2002-02-01 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h: Increasing FREETYPE_PATCH to 7
+ for the new release.
+
+2002-01-31 David Turner <david@freetype.org>
+
+ * README, README.UNX, docs/CHANGES: Updating documentation for the
+ 2.0.7 release.
+
+2002-01-30 David Turner <david@freetype.org>
+
+ * INSTALL: Moved to ...
+ * docs/INSTALL: Here to avoid conflicts with the `install' script on
+ Windows, where the filesystem doesn't preserve case.
+
+2002-01-29 David Turner <david@freetype.org>
+
+ * configure: Fixed the script. It previously didn't accept more
+ than one argument correctly. For example, when typing:
+
+ ./configure --disable-shared --disable-nls
+
+ the `--disable-nls' was incorrectly sent to the `make' program.
+
+2002-01-29 Werner Lemberg <wl@gnu.org>
+
+ * README.UNX: Fix typo.
+ * builds/unix/install.mk (uninstall): Fix library name for libtool.
+
+2002-01-28 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
+
+ * src/pcf/pcfdriver.c (PCF_Done_Face): Fix incorrect destruction of
+ the face object (face->toc.tables, face->root.family_name,
+ face->root.available_size, face->charset_encoding,
+ face->charset_registry are now freed). Thanks to Niels Moseley.
+
+2002-01-28 Roberto Alameda <ojancano@geekmail.de>
+
+ * src/type1/t1load.c (parse_encoding): Set `loader->num_chars'.
+
+2002-01-28 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs, parse_charstrings): Use copy
+ of `base' string for decrypting to not modify the original data.
+ Based on a patch by Jakub Bogusz <qboosh@pld.org.pl>.
+
+2002-01-27 Giuliano Pochini <pochini@shiny.it>
+
+ * src/smooth/ftgrays.c (gray_render_scanline): Fix bug which caused
+ bad rendering of thin lines (less than one pixel thick).
+
+2002-01-25 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffdrivr.c (cff_get_name_index): Make last patch work
+ actually.
+
+2002-01-25 Martin Zinser <zinser@decus.de>
+
+ * src/cache/ftccache.c (ftc_node_done, ftc_node_destroy): Fix
+ compilation warnings.
+ * src/base/descrip.mms (OBJS): Add `ftmm.obj'.
+ * src/cache/descrip.mms (ftcache.obj): Dependencies added.
+
+2002-01-25 WANG Yi <wangyi@founder.com.cn>
+
+ * src/cff/cffdrivr.c (cff_get_name_index): Fix deallocation bug.
+
+2002-01-21 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * docs/PATENTS: Typo fixed (thanks to Detlef `Hawkeye' Würkner) in
+ the URL for the online resource.
+
+2002-01-18 Ian Brown <ian.brown@printsoft.de>
+
+ * builds/win32/ftdebug.c: New file.
+ * builds/win32/visualc/freetype.dsp: Updated.
+
+2002-01-18 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/src/base/ftsystem.c: Updated for AmigaOS 3.9.
+ * builds/amiga/README: Updated.
+
+2002-01-18 Ian Brown <ian.brown@printsoft.de>
+
+ * builds/win32/visualc/freetype.dsp: Updated.
+
+2002-01-13 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype2.a4: The script was still buggy.
+ * builds/unix/freetype-config.in: Make it really work for any install
+ prefix.
+
+2002-01-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype2.a4: Fix some serious bugs.
+
+2002-01-09 David Turner <david@freetype.org>
+
+ * builds/unix/configure.ac: Build top-level Jamfile.
+
+2002-01-09 Maxim Shemanarev <mcseemagg@yahoo.com>
+
+ * src/smooth/ftgrays.c (gray_render_line): Small optimization to
+ the smooth anti-aliased renderer that deals with vertical segments.
+ This results in a 5-7% speedup in rendering speed.
+
+2002-01-08 David Turner <david@freetype.org>
+
+ Added some wrapper scripts to make the installation more
+ Unix-friendly.
+
+ * configure, install: New files.
+
+ * INSTALL, README.UNX: Updated installation documentation to use the
+ new 'configure' and 'install' scripts.
+
+2002-01-07 David Turner <david@freetype.org>
+
+
+ * Version 2.0.6 released.
+ =========================
+
+
+ * docs/BUGS, docs/CHANGES: Updating documentation for 2.0.6 release.
+
+ * src/tools/docmaker.py: Fixed HTML quoting in sources.
+ (html_format): Replaced with ...
+ (html_quote): New function.
+ (html_quote0): New function.
+ (DocCode::dump_html): Small improvement.
+ (DocParagraph::dump, DocBlock::html): Use html_quote0 and html_quote.
+
+ * include/freetype/config/ftoption.h: Setting default options for
+ a release build (debugging off, bytecode interpreter off).
+
+ * src/base/ftobjs.c, src/base/ftoutln.c, src/cache/ftccmap.c,
+ src/cff/cffload.c, src/cff/cffobjs.c, src/pshinter/pshalgo2.c,
+ src/sfnt/ttload.c, src/sfnt/ttsbit.c: Removing small compiler
+ warnings (in pedantic compilation modes).
+
+2002-01-05 David Turner <david@freetype.org>
+
+ * src/autohint/ahhint.c (ah_align_linked_edge): Modified computation
+ of auto-hinted stem widths; this avoids color fringes in
+ `ClearType-like' rendering.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph_Header,
+ TT_Load_Simple_Glyph, TT_Load_Composite_Glyph, load_truetype_glyph):
+ Modified the TrueType loader to make it more paranoid; this avoids
+ nasty buffer overflows in the case of invalid glyph data (as
+ encountered in the output of some buggy font converters).
+
+2002-01-04 David Turner <david@freetype.org>
+
+ * README.UNX: Added special README file for Unix users.
+
+ * builds/unix/ftsystem.c (FT_New_Stream): Fixed typo.
+
+ * src/base/ftobjs.c: Added #include FT_OUTLINE_H to get rid
+ of compiler warnings.
+
+ * src/base/ftoutln.c (FT_Outline_Check): Remove compiler warning.
+
+2002-01-03 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1objs.c (T1_Face_Init): Add cast to avoid compiler
+ warning.
+
+2002-01-03 Keith Packard <keithp@keithp.com>
+
+ * builds/unix/ftsystem.c (FT_New_Stream): Added a fix to ensure that
+ all FreeType input streams are closed in child processes of a `fork'
+ on Unix systems. This is important to avoid (potential) access
+ control issues.
+
+2002-01-03 David Turner <david@freetype.org>
+
+ * src/type1/t1objs.c (T1_Face_Init): Fixed a bug that crashed the
+ library when dealing with certain weird fonts like `Stalingrad', in
+ `sadn.pfb' (this font has no full font name entry).
+
+ * src/base/ftoutln.c, include/freetype/ftoutln.h (FT_Outline_Check):
+ New function to check the consistency of outline data.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Use `FT_Outline_Check' to
+ ensure that loaded glyphs are valid. This allows certain fonts like
+ `tt1095m_.ttf' to be loaded even though it appears they contain
+ really funky glyphs.
+
+ There still is a bug there, though.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix error condition.
+
+2001-12-30 David Turner <david@freetype.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load): Fix advance width
+ computation of auto-hinted glyphs. This noticeably improves the
+ spacing of letters in KDE and Gnome.
+
+2001-12-25 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * builds/dos/detect.mk: Correcting the order for Borland compilers:
+ 16-bit bcc was never selected, always overridden by 32-bit bcc32.
+
+2001-12-22 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
+
+ * src/pfc/pcfread.c (pcf_load_font): Handle property `POINT_SIZE'
+ and fix incorrect computation of `available_sizes'.
+
+2001-12-22 David Turner <david@freetype.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load): Auto-hinted glyphs had an
+ incorrect glyph advance in the case of mono-width fonts (like
+ Courier, Andale Mono, and others).
+
+2001-12-22 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/*: Adaptations to latest changes.
+ Support added for MorphOS.
+
+2001-12-22 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshrec.c (FT_COMPONENT): Redefine to `trace_pshrec'.
+ (ps_mask_table_merge, ps_hints_open, ps_hints_stem,
+ ps_hints_t1stem3, ps_hints_t2mask, ps_hints_t2counter): Fix
+ FT_ERROR messages.
+ * src/pshinter/pshalgo1.c (FT_COMPONENT): Define as
+ `trace_pshalgo1'.
+ * src/pshinter/pshalgo2.c (FT_COMPONENT): Define as
+ `trace_pshalgo2'.
+ * include/freetype/internal/ftdebug.h (FT_Trace): Updated.
+
+ * docs/modules.txt: New file.
+
+2001-12-21 David Turner <david@freetype.org>
+
+ * src/pshinter/pshrec.c (ps_hints_t2mask, ps_hints_t2counter):
+ Ignore invalid `hintmask' and `cntrmask' operators (instead of
+ returning an error). Glyph 2028 of the CFF font `MSung-Light-Acro'
+ couldn't be rendered otherwise (it seems its charstring is buggy,
+ though this requires more analysis).
+ (FT_COMPONENT): Define.
+
+ * src/cff/cffgload.c (CFF_Parse_CharStrings), src/psaux/t1decode.c
+ (T1_Decoder_Parse_Charstrings), src/pshinter/pshalgo2.c (*), Fixed a
+ bug where the X and Y axis where inverted in the postscript hinter.
+ This caused problem when displaying on non-square surfaces.
+
+ * src/pshinter/pshalgo2.c: s/vertical/dimension/.
+
+ * src/pshinter/pshglob.c (psh_globals_new): Replaced a floating
+ point constant with a fixed-float equivalent. For some reasons not
+ all compilers are capable of directly computing a floating pointer
+ constant casted to FT_Fixed, and will link a math library instead.
+
+2001-12-20 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c (ftc_node_destroy, ftc_cache_lookup): Fix
+ tracing strings.
+ * src/cache/ftccmap.c (ftc_cmap_family_init): Ditto.
+ * src/cache/ftcmanag.c (ftc_family_table_alloc,
+ ftc_family_table_free, FTC_Manager_Check): Ditto.
+ * src/cache/ftcsbits.c (ftc_sbit_node_load): Ditto.
+
+ * src/base/ftobjs.c (FT_Done_Library): Remove compiler warning.
+
+2001-12-20 David Turner <david@freetype.org>
+
+ Added PostScript hinter support to the CFF and CID drivers.
+
+ * include/freetype/internal/cfftypes.h (CFF_Font): New member
+ `pshinter'.
+ * src/cff/cffload.c (CFF_Get_Standard_Encoding): New function.
+ * src/cff/cffload.h: Updated.
+ * src/cff/cffgload.c (CFF_Init_Builder): Renamed to ...
+ (CFF_Builder_Init): This.
+ Added new argument `hinting'.
+ (CFF_Done_Builder): Renamed to ...
+ (CFF_Builder_Done): This.
+ (CFF_Init_Decoder): Added new argument `hinting'.
+ (CFF_Parse_CharStrings): Implement vstem support.
+ (CFF_Load_Glyph): Updated.
+ Add hinting support.
+ (cff_lookup_glyph_by_stdcharcode): Use CFF_Get_Standard_Encoding().
+ (cff_argument_counts): Updated.
+ * src/cff/cffgload.h: Updated.
+ * src/cff/cffobjs.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (CFF_Size_Get_Globals_Funcs, CFF_Size_Done, CFF_Size_Init,
+ CFF_Size_Reset, CFF_GlyphSlot_Done, CFF_GLyphSlot_Init): New
+ functions.
+ (CFF_Init_Face): Renamed to ...
+ (CFF_Face_Init): This.
+ Add hinter support.
+ (CFF_Done_Face): Renamed to ...
+ (CFF_Face_Done): This.
+ (CFF_Init_Driver): Renamed to ...
+ (CFF_Driver_Init): This.
+ (CFF_Done_Driver): Renamed to ...
+ (CFF_Driver_Done): This.
+ * src/cff/cffobjs.h: Updated.
+ * src/cff/cffdrivr.c (cff_driver_class): Updated.
+
+ * include/freetype/internal/t1types.h (CID_FaceRec): New member
+ `pshinter'.
+ * src/cid/cidgload.c (CID_Load_Glyph): Add hinter support.
+ * src/cid/cidobjs.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (CID_GlyphSlot_Done, CID_GlyphSlot_Init, CID_Size_Get_Globals_Funcs,
+ CID_Size_Done, CID_Size_Init, CID_Size_Reset): New functions.
+ (CID_Done_Face): Renamed to ...
+ (CID_Face_Done): This.
+ (CID_Init_Face): Renamed to ...
+ (CID_Face_Init): This.
+ Add hinting support.
+ (CID_Init_Driver): Renamed to ...
+ (CID_Driver_Init): This.
+ (CID_Done_Driver): Renamed to ...
+ (CID_Driver_Done): This.
+ * src/cid/cidobjs.h: Updated.
+ * src/cidriver.c: Updated.
+
+ * src/pshinter/pshrec.c (t2_hint_stems): Fixed.
+
+ * src/base/ftobjs.c (FT_Done_Library): Fixed a stupid bug that
+ crashed the library on exit.
+
+ * src/type1/t1gload.c (T1_Load_Glyph): Enable font matrix
+ transformation of hinted glyphs.
+
+ * src/cid/cidload.c (cid_read_subrs): Fix error condition.
+
+ * src/cid/cidobjs.c (CID_Face_Done): Fixed a memory leak; the subrs
+ routines were never released when CID faces were destroyed.
+
+ * src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: Updated
+ to move the definition of encoding tables back within `cffload.c'
+ instead of making them part of a shared header (causing problems in
+ `multi' builds). This reverts change 2001-08-08.
+
+ * docs/CHANGES: Updated for 2.0.6 release.
+ * docs/TODO: Added `stem3 and counter hints support' to the TODO
+ list for the Postscript hinter.
+ * docs/BUGS: Closed the AUTOHINT-NO-SBITS bug.
+
+2001-12-19 David Turner <david@freetype.org>
+
+ * include/freetype/cache/ftcache.h: Added comments to indicate that
+ some of the exported functions should only be used by applications
+ that need to implement custom cache types.
+
+ * src/truetype/ttgload.c (cur_to_org, org_to_cur): Fixed a nasty bug
+ that prevented composites from loading correctly, due to missing
+ parentheses around macro parameters.
+
+ * src/sfnt/sfobjs.c (SFNT_Load_Face): Make the `post' and `name'
+ tables optional to load PCL fonts properly.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph), src/base/ftobjs.c
+ (FT_Load_Glyph), include/freetype/freetype.h (FT_LOAD_SBITS_ONLY):
+ `Fixed' the bug that prevented embedded bitmaps to be loaded when
+ the auto-hinter is used. This actually is a hack but will be enough
+ until the internal re-design scheduled for FreeType 2.1.
+
+ * src/raster/ftrend1.c (ft_raster1_render): Fixed a nasty outline
+ shifting bug in the monochrome renderer.
+
+ * README: Updated version numbers to 2.0.6.
+
+2001-12-17 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix test for invalid
+ glyph header.
+
+2001-12-15 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Remove compiler warning.
+ * include/freetype/ftcache.h (FTC_Node_Unref): Removed. It is
+ already in ftcmanag.h.
+ * src/cache/ftcsbits.c (ftc_sbit_node_load): Remove unused variable
+ `gfam'.
+ * src/cache/ftcmanag.c (ftc_family_table_alloc,
+ * ftc_family_table_free): Use FT_EXPORT_DEF.
+ * include/freetype/cache/ftcmanag.h: Updated.
+ * src/cache/ftccache.c (ftc_node_destroy): Use FT_EXPORT_DEF.
+ * src/cache/ftccmap.c (ftc_cmap_node_init): Remove unused variable
+ `cfam'.
+ Remove compiler warning.
+ (FTC_CMapCache_Lookup): Remove compiler warnings.
+ (ftc_cmap_family_init): Ditto.
+ (FTC_CMapCache_Lookup): Ditto.
+
+ * builds/unix/configure.ac: Increase `version_info' to 8:0:2.
+ * builds/unix/configure: Regenerated.
+
+2001-12-14 Werner Lemberg <wl@gnu.org>
+
+ * builds/mac/README: Updated.
+
+2001-12-14 Scott Long <scott@swiftview.com>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fixing crash when
+ dealing with invalid fonts (i.e. glyph size < 10 bytes).
+
+2001-12-14 Sam Latinga <slouken@devolution.com>
+
+ * builds/mac/freetype.make: A new Makefile to build with MPW on
+ MacOS classic.
+
+2001-12-14 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c (TT_Load_Glyph), src/type1/t1gload.c
+ (T1_Load_Glyph), src/cid/cidgload.c (CID_Load_Glyph),
+ src/cff/cffgload.c (CFF_Load_Glyph): Fixed a serious bug common to
+ all font drivers (the advance width was never hinted when it
+ should).
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): New macro.
+ * src/base/ftdbgmem.c (debug_mem_dummy) [!FT_DEBUG_MEMORY]: Don't
+ use `extern' keyword.
+
+2001-12-12 David Turner <david@freetype.org>
+
+ * src/pshinter/pshglob.c (psh_blues_scale_zones, psh_blues_snap_stem
+ psh_globals_new): Adding correct BlueScale/BlueShift support, plus
+ family blues processing.
+ * src/pshinter/pshglob.h (PSH_BluesRec): Updated.
+
+ Started adding support for the Postscript hinter in the CFF module.
+
+ * src/cff/cffgload.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
+ (CFF_Parse_CharStrings): Implement it.
+ * src/cff/cffgload.h: Updated.
+
+2001-12-12 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype2.m4: Some portability fixes.
+
+2001-12-11 Jouk Jansen <joukj@hrem.stm.tudelft.nl>
+
+ * src/base/descrip.mms (OBJS): Add ftdebug.obj.
+
+2001-12-11 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (TT_Load_Generic_Header): Typos.
+
+2001-12-11 David Turner <david@freetype.org>
+
+ * builds/unix/freetype-config.in: Modified the script to prevent
+ passing `-L/usr/lib' to gcc.
+
+ * docs/FTL.TXT: Simple fix (change `LICENSE.TXT' to `FTL.TXT').
+
+ * builds/unix/freetype2.m4: New file for checking configure paths.
+ We need to install it in $(prefix)/share/aclocal/freetype2.m4 but I
+ didn't modify builds/unix/install.mk yet.
+
+ * INSTALL: Updated the instructions to build shared libraries with
+ Jam. They were simply wrong.
+
+ * src/base/fttrigon.c (FT_Cos): Fixed a small bug that caused
+ slightly improper results for `FT_Cos' and `FT_Sin' (example:
+ FT_Sin(0) == -1!).
+
+2001-12-11 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * include/freetype/internal/ftstream.h (GET_LongLE, GET_ULongLE):
+ Fixed incorrect argument types.
+
+2001-12-10 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
+
+ * src/pcf/pcfdriver.c (PCF_Init_Face): Allow Xft to use PCF fonts
+ by setting the `face->metrics.max_advance' correctly.
+
+2001-12-07 David Turner <david@freetype.org>
+
+ * include/freetype/cache/ftccmap.h, src/cache/ftccmap.c: Added new
+ charmap cache.
+ * src/cache/ftcache.c: Updated.
+
+ * src/autohint/ahhint.c (ah_hinter_hint_edges): s/UNUSED/FT_UNUSED/.
+
+2001-12-06 Leonard Rosenthol <leonardr@lazerware.com>
+
+ Added support for reading .dfont files on Mac OS X. Also added a
+ new routine which looks up a given font by name in the Mac OS and
+ returns the disk file where it resides.
+
+ * src/base/ftmac.c: Include <Files.h> and <TextUtils.h>.
+ (is_dfont): New auxiliary function.
+ (FT_New_Face_From_dfont): New function.
+ (FT_GetFile_From_Mac_Name): New exported function.
+ (FT_New_Face): Updated.
+ * include/freetype/ftmac.h: Updated.
+
+2001-12-06 David Turner <david@freetype.org>
+
+ * src/cache/Jamfile, src/cache/rules.mk: Updated.
+
+2001-12-06 Werner Lemberg <wl@gnu.org>
+
+ * INSTALL: Small update.
+
+2001-12-05 David Turner <david@freetype.org>
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Re-ordered code for
+ debugging purposes.
+ Comment out use of `origin'.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render): Fixed a nasty hidden bug
+ where outline shifting wasn't correctly undone after bitmap
+ rasterization. This created problems with certain glyphs (like '"'
+ of certain fonts) and the cache system.
+
+ * src/pshinter/pshalgo1.c (psh1_hint_table_init): Fix typo.
+ * src/pshinter/pshalgo2.c (psh2_hint_table_init): Fix typo.
+ (ps2_hints_apply): Small fix.
+
+2001-12-05 David Turner <david@freetype.org>
+
+ * src/pshinter/pshalgo2.c (psh2_hint_table_init),
+ src/pshinter/pshalgo1.c (psh1_hint_table_init): Removed compiler
+ warnings.
+
+ * include/freetype/ftcache.h, include/freetype/cache/*, src/cache/*:
+ Yet another massive rewrite of the caching sub-system in order to
+ both increase performance and allow simpler cache sub-classing. As
+ an example, the code for the image and sbit caches is now much
+ simpler.
+
+ I still need to update the documentation in
+ www/freetype2/docs/cache.html to reflect the new design though.
+
+ * include/freetype/config/ftheader.h (FT_CACHE_CHARMAP_H): New
+ macro.
+ (FT_CACHE_INTERNAL_CACHE_H): Updated.
+
+2001-12-05 David Krause <freetype@davidkrause.com>
+
+ * docs/license.txt: s/X Windows/X Window System/.
+
+2001-12-04 Werner Lemberg <wl@gnu.org>
+
+ * src/raster/ftraster.c: Fix definition condition of MEM_Set().
+ * src/smooth/ftgrays.c (M_Y): Change value to 192.
+ * src/base/ftdbgmem.c (ft_mem_table_destroy): Fix printf() parameter.
+ Remove unused variable.
+ * src/cache/ftcimage.c (ftc_image_node_init,
+ ftc_image_node_compare): Remove unused variables.
+ * src/cache/ftcsbits.c (ftc_sbit_node_weight): Remove unused
+ variable.
+ * src/raster/ftraster.c (MEM_Set): Move definition down to avoid
+ compiler warning.
+ * src/autohint/ahhint.c (ah_hinter_hint_edges): Use UNUSED() to
+ avoid compiler warnings.
+ * src/pcf/pcfread.c (tableNames): Use `const'.
+ (pcf_read_TOC): Change counter name to avoid compiler warning.
+ Use `const'.
+ * src/pshinter/pshrec.c (ps_hints_close): Remove redundant
+ declaration.
+ * src/pshinter/pshalgo1.c (psh1_hint_table_init): Rename variables
+ to avoid shadowing.
+ * src/pshinter/pshalgo2.c (psh2_hint_table_activate_mask): Ditto.
+ * src/type1/t1objs.h: Remove double declarations of `T1_Size_Init()'
+ and `T1_Size_Done()'.
+
+2001-11-20 Antoine Leca <antoineleca@multimania.com>
+
+ * include/freetype/ttnameid.h: Added some new Microsoft language
+ codes and LCIDs as found in MSDN (Passport SDK). Also added
+ comments about the meaning of bit 57 of the `OS/2' table
+ (TT_UCR_SURROGATES) which (with OpenType v.1.3) now means `there is
+ a character beyond 0xFFFF in this font'. Thanks to Detlef Würkner
+ <TetiSoft@apg.lahn.de> for noticing this.
+
+2001-11-20 David Turner <david@freetype.org>
+
+ * src/pshinter/{pshalgo2.c, pshalgo1.c}: Fixed stupid bug in sorting
+ routine that created nasty alignment artefacts.
+
+ * src/pshinter/pshrec.c, tests/gview.c: Debugging updates.
+
+ * src/smooth/ftgrays.c: De-activated experimental gamma support.
+ Apparently, `optimal' gamma tables depend on the monitor type,
+ resolution and general karma, so it's better to compute them outside
+ of the rasterizer itself.
+ (gray_convert_glyph): Use `volatile' keyword.
+
+2001-10-29 David Turner <david@freetype.org>
+
+ Adding experimental `gamma' support. This produces smoother glyphs
+ at small sizes for very little cost.
+
+ * src/smooth/ftgrays.c (grays_init_gamma): New function.
+ (gray_raster_new): Use it.
+
+ Various fixes to the auto-hinter. They merely improve the output of
+ sans-serif fonts. Note that there are still problems with serifed
+ fonts and composites (accented characters).
+
+ * src/autohint/ahglyph.c (ah_outline_load,
+ ah_outline_link_segments): Implement it.
+ Fix typos.
+ (ah_outline_save, ah_outline_compute_segments): Fix typos.
+ * src/autohint/ahhint.c (ah_align_serif_edge): New argument
+ `vertical'. Implement improvement.
+ (ah_hint_edges_3, ah_hinter_hint_edges): Implement it.
+ Fix typos.
+ (ah_hinter_align_strong_points, ah_hinter_align_weak_points): Fix
+ typos.
+ (ah_hinter_load): Set `ah_debug_hinter' if DEBUG_HINTER is defined.
+ * src/autohint/ahmodule.c: Implement support for DEBUG_HINTER macro.
+ * src/autohint/ahtypes.h: Ditto.
+ (AH_Hinter): Remove `disable_horz_edges' and `disable_vert_edges'
+ (making them global as `ah_debug_disable_horz' and
+ `ah_debug_disable_vert').
+ Fix typos.
+
+ * tests/gview.c: Updated the debugging glyph viewer to show the
+ hints generated by the `autohint' module.
+
+2001-10-27 David Turner <david@freetype.org>
+
+ * src/cache/ftcchunk.c (ftc_chunk_cache_lookup): Fixed a bug that
+ considerably lowered the performance of the abstract chunk cache.
+
+2001-10-26 David Turner <david@freetype.org>
+
+ * include/freetype/ftcache.h, include/freetype/cache/*.h,
+ src/cache/*.c: Major re-design of the cache sub-system to provide
+ better performance as well as an `Acquire'/`Release' API. Seems to
+ work well here, but probably needs a bit more testing.
+
+2001-10-26 Leonard Rosenthol <leonardr@lazerware.com>
+
+ * builds/mac/README: Updated to reflect my taking over the project
+ and that is now being actively maintained.
+
+ * src/base/ftmac.c (parse_fond): Applied patches from Paul Miller
+ <paulm@profoundeffects.com> to support loading a face other than the
+ first from a FOND resource.
+ (FT_New_Face_From_FOND): Updated.
+
+2001-10-25 Leonard Rosenthol <leonardr@lazerware.com>
+
+ * builds/mac/ftlib.prj: Update of CodeWarrior project file for Mac
+ OS for latest version (7) of CWPro and for recent changes to the FT
+ source tree.
+
+2001-10-25 David Turner <david@freetype.org>
+
+ * include/freetype/config/ftoption.h: Updated comments to explain
+ precisely how to use project-specific macro definitions without
+ modifying this file manually.
+
+ (FT_CONFIG_FORCE_INT64): Define.
+
+ (FT_DEBUG_MEMORY): New macro.
+
+2001-10-24 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * builds/unix/ftsystem.c (FT_New_Memory): Added a missing `{'.
+
+2001-10-23 David Turner <david@freetype.org>
+
+ * include/freetype/internal/ftmemory.h, src/base/ftdbgmem.c:
+ Improvements to the memory debugger to report more information in
+ case of errors. Also, some allocations that occurred through REALLOC
+ couldn't be previously caught correctly.
+
+ * src/autohint/ahglyph.c (ah_outline_compute_segments,
+ ah_outline_compute_edges), src/raster/ftraster.c (ft_black_new),
+ src/smooth/ftgrays.c (gray_render_span, gray_raster_new): Replaced
+ liberal uses of memset() by the MEM_Set() macro.
+
+2001-10-23 David Turner <david@freetype.org>
+
+ * src/raster/ftraster.c (Update): Removed to be inlined in ...
+ (Sort): Updated.
+
+2001-10-22 David Turner <david@freetype.org>
+
+ * builds/unix/ftsystem.c (FT_New_Memory, FT_Done_Memory),
+ builds/vms/ftsystem.c (FT_New_Memory, FT_Done_Memory),
+ builds/amiga/ftsystem.c (FT_New_Memory, FT_Done_Memory),
+ src/base/ftdbgmem.c: Updated the memory debugger and
+ platform-specific implementations of `ftsystem' in order to be able
+ to debug memory allocations on Unix, VMS and Amiga too!
+
+ * src/pshinter/pshalgo2.c (psh2_hint_table_record_mask): Removed
+ some bogus warnings.
+
+ * include/freetype/internal/ftmemory.h, src/base/ftdbgmem.c:
+ Modified the debugging memory manager to report the location (source
+ file name + line number) where leaked memory blocks are allocated in
+ the source file.
+
+ * src/base/ftdbgmem.c: New debugging memory manager. You must
+ define the FT_DEBUG_MEMORY macro in `ftoption.h' to enable it. It
+ will record every memory block allocated and report simple errors
+ like memory leaks and double deletes.
+
+ * src/base/Jamfile: Include ftdbgmem.
+ * src/base/rules.mk: Ditto.
+ * src/base/ftbase.c: Include ftdbgmem.c.
+
+ * include/freetype/config/ftoption.h: Added the FT_DEBUG_MEMORY
+ macro definition.
+
+ * src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory): Modified the
+ base component to use the debugging memory manager when the macro
+ FT_DEBUG_MEMORY is defined.
+
+2001-10-21 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/cffload.c (CFF_Done_Font): Free subfonts array only if
+ we are working with a CID keyed CFF font. Otherwise, a variable
+ that was never allocated memory might freed. This is a correction
+ to the previous patch for freeing subfonts.
+
+2001-10-21 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/cffload.c (CFF_Done_Font): Free the subfonts array to
+ avoid a memory leak.
+
+2001-10-21 David Turner <david@freetype.org>
+
+ * src/pshinter/pshalgo2.c, src/pshinter/pshalgo1.c,
+ src/pshinter/pshglob.c: Removing compiler warnings in pedantic modes
+ (in multi-object compilation mode, mainly).
+
+2001-10-20 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/type1/t1load.c (parse_encoding): Add a test to make sure
+ that custom encodings (i.e., neither StandardEncoding nor
+ ExpertEncoding) are not loaded twice when the Type 1 font is
+ synthetic.
+
+ * src/type1/t1load.c (parse_font_name, parse_subrs): Added a test
+ for when loading synthetic fonts to make sure that the font name
+ and subroutines are not loaded twice. This is to remove a memory
+ leak that occurred because the original memory blocks for these
+ objects were not deallocated when the objects were parsed the
+ second time.
+
+2001-10-19 David Turner <david@freetype.org>
+
+ * src/smooth/ftgrays.c, src/pshinter/pshglob.h,
+ src/pshinter/pshrec.c, src/pshinter/pshalgo2.c: Getting rid of
+ compiler warnings.
+
+ * src/pshinter/module.mk, src/pshinter/rules.mk: Adding control
+ files to build the PostScript hinter with the `old' build system.
+
+2001-10-19 Jacob Jansen <joukj@hrem.stm.tudelft.nl>
+
+ * descrip.mms, src/pshinter/descrip.mms: Updates to the VMS build
+ files.
+
+2001-10-18 David Turner <david@freetype.org>
+
+ * src/psnames/pstables.h, src/tools/glnames.py: Rewrote the
+ `glnames.py' script used to generate the `pstables.h' header file.
+ The old one contained a serious bug that made FreeType return
+ incorrect glyph names for certain glyphs.
+
+ * src/truetype/ttdriver.c (Set_Char_Sizes): Changing computation of
+ pixel size from character size to use rounding. This is an
+ experiment to see whether this gives values similar to Windows for
+ scaled ascent/descent/etc.
+
+ * src/base/ftcalc.c (FT_Div64by32): Changed the implementation
+ slightly since the original code was mis-compiled on Mac machines
+ using the MPW C compiler.
+
+ * src/base/ftobjs.c (FT_Realloc): When a memory block was grown
+ through FT_Realloc(), the new bytes were not set to 0, which created
+ some strange bugs in the PostScript hinter.
+ (destroy_face): Don't deallocate unconditionally.
+
+ * src/cid/cidgload.c (CID_Compute_Max_Advance, CID_Load_Glyph):
+ Adding support to new PostScript hinter.
+
+ * include/freetype/internal/psglobal.h,
+ include/freetype/internal/pshints.h,
+ include/freetype/config/ftmodule.h, src/pshinter/Jamfile,
+ src/pshinter/pshalgo.h, src/pshinter/pshalgo1.h,
+ src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.h,
+ src/pshinter/pshalgo2.c, src/pshinter/pshglob.h,
+ src/pshinter/pshglob.c, src/pshinter/pshinter.c,
+ src/pshinter/pshmod.c, src/pshinter/pshmod.h, src/pshinter/pshrec.c,
+ src/pshinter/pshrec.h: Adding new PostScript hinter module.
+
+ * include/freetype/internal/ftobjs.h,
+ include/freetype/internal/internal.h,
+ include/freetype/internal/psaux.h,
+ include/freetype/internal/t1types.h, src/psaux/psobjs.c,
+ src/psaux/psobjs.h, src/psaux/t1decode.h, src/psaux/t1decode.c,
+ src/type1/t1driver.c, src/type1/t1gload.c, src/type1/t1objs.c,
+ src/type1/t1objs.h: Updates to use the new PostScript hinter.
+
+ * tests/Jamfile, tests/gview.c: Adding a new glyph hinting
+ viewer/debugger to the source tree. Note that you will _not_ be
+ able to compile it since it depends on an unavailable graphics
+ library named `Nirvana' to render vector images.
+
+2001-10-17 David Turner <david@freetype.org>
+
+
+ * Version 2.0.5 released.
+ =========================
+
+
+ * include/freetype/freetype.h, include/internal/ftobjs.h,
+ src/base/ftobjs.c, src/type1/t1driver.c: Adding a new function named
+ 'FT_Get_Postscript_Name' to retrieve the PostScript name of a given
+ font. Should work with all formats except pure CFF/CEF fonts (this
+ will be added soon).
+
+ * src/cid/cidriver (cid_get_postscript_name): New function.
+ (CID_Get_Interface): Handle `postscript_name' interface.
+
+ * src/sfnt/sfdriver.c (get_sfnt_postscript_name): New function.
+ (SFNT_Get_Interface): Handle `postscript_name' interface.
+
+ * src/type1/t1driver.c (t1_get_ps_name): New function.
+ (Get_Interface): Handle `postscript_name' interface.
+
+ * README, docs/CHANGES: Updated for 2.0.5 release.
+
+2001-10-08 David Turner <david@freetype.org>
+
+ Fixed a bug in `glnames.py' that prevented it from generating
+ correct glyph names tables. This resulted in the unavailability of
+ certain glyphs like `Cacute', `cacute' and `lslash' in Unicode
+ charmaps, even if these were present in the font (causing problems
+ for Polish users).
+
+ * src/tools/glnames.py (mac_standard_names): Fixed.
+ (t1_standard_strings): Some fixes and renamed to ...
+ (sid_standard_names): This.
+ (t1_expert_encoding): Fixed.
+ (the_adobe_glyph_list): Renamed to ...
+ (adobe_glyph_names): This.
+ (the_adobe_glyphs): Renamed to ...
+ (adobe_glyph_values): This.
+ (dump_mac_indices, dump_glyph_list, dump_unicode_values, main):
+ Updated.
+ * src/psnames/pstables.h: Regenerated.
+ * src/psnames/psmodule.c (PS_Unicode_Value): Fix offset.
+ Fix return value.
+ Use `sid_standard_table' and `ps_names_to_unicode' instead of
+ `t1_standard_glyphs' and `names_to_unicode'.
+ (PS_Macintosh_Name): Use `ps_glyph_names' instead of
+ `standard_glyph_names'.
+ (PS_Standard_Strings): Use `sid_standard_names' instead of
+ `t1_standard_glyphs'.
+
+ * doc/BUGS, doc/TODO: New documents.
+
+2001-10-07 Richard Barber <rich@solutionuk.com>
+
+ * src/cache/ftlru.c (FT_Lru_Lookup_Node): Fixed a bug that prevented
+ correct LRU behaviour.
+
+2001-10-07 David Turner <david@freetype.org>
+
+ setjmp() and longjmp() are now used for rollback (i.e. when memory
+ pool overflow occurs).
+
+ Function names are now all uniformly prefixed with `gray_'.
+
+ * src/smooth/ftgrays.c: Include <setjmp.h>.
+ (ErrRaster_MemoryOverflow): New macro.
+ (TArea): New type to store area values in each cell (using `int' was
+ too small on 16-bit systems). <limits.h> is included to properly
+ get the needed data type.
+ (TCell, TRaster): Use it.
+ (TRaster): New element `jump_buffer'.
+ (gray_compute_cbox): Use `RAS_ARG' as the only parameter and get
+ `outline' from it.
+ (gray_record_cell): Use longjmp().
+ (gray_set_cell): Use gray_record_cell() for error handling.
+ (gray_render_line, gray_render_conic, gray_render_cubic): Simplify.
+ (gray_convert_glyph_inner): New function, using setjmp().
+ (gray_convert_glyph): Use it.
+
+2001-10-07 David Turner <david@freetype.org>
+
+ Provide a public API to manage multiple size objects for a given
+ FT_Face in the new header file `ftsizes.h'.
+
+ * include/freetype/ftsizes.h: New header file,
+ * include/freetype/internal/ftobjs.h: Use it.
+ Remove declarations of FT_New_Size and FT_Done_Size (moved to
+ ftsizes.h).
+ * include/freetype/config/ftheader.h (FT_SIZES_H): New macro.
+ * src/base/ftobjs.c (FT_Activate_Size): New function.
+ * src/cache/ftcmanag.c: Include ftsizes.h.
+ (ftc_manager_init_size, ftc_manager_flush_size): Use
+ FT_Activate_Size.
+
+2001-09-20 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/*: Added port to Amiga with the SAS/C compiler.
+
+2001-09-15 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/type1/t1afm.c (T1_Done_AFM): Free `afm'.
+
+2001-09-10 Yao Zhang <yzhang@sharemedia.com>
+
+ * src/sfnt/ttcmap.c (code_to_index2): Handle code values with
+ hi-byte == 0 correctly.
+
+2001-09-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/link-std.mk ($(PROJECT_LIBRARY)): Fix typo.
+
+2001-08-30 Martin Muskens <mmuskens@aurelon.com>
+
+ * src/type1/t1load.c (parse_font_matrix): A new way to compute the
+ units per EM with greater accuracy (important for embedded T1 fonts
+ in PDF documents that were automatically generated from TrueType
+ ones).
+
+ * src/type1/t1load.c (is_alpha): Now supports `+' in font names;
+ this is used in embedded fonts.
+
+ * src/psaux/psobjs.c (PS_Table_Add): Fixed a reallocation bug that
+ generated a dangling pointer reference.
+
+2001-08-30 Anthony Feik <afeick@hotmail.com>
+
+ * src/type1/t1afm.c (T1_Read_Afm): Now correctly sets the flag
+ FT_FACE_FLAG_KERNING when appropriate for Type1 + AFM files.
+
+2001-08-25 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (TT_Load_CMap): Fix frame length of
+ `cmap_rec_fields'.
+
+ * include/freetype/fterrors.h [!FT_CONFIG_OPTION_USE_MODULE_ERRORS]:
+ Undefine FT_ERR_BASE before defining again.
+
+2001-08-22 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.h: Fix prototype of TT_Move_Func.
+
+2001-08-21 Werner Lemberg <wl@gnu.org>
+
+ * builds/dos/dos-def.mk (NO_OUTPUT): Don't use `&>' but `>'.
+
+2001-08-21 David Turner <david@freetype.org>
+
+ * include/freetype/config/ftoption.h: Changed the default setting
+ for FT_CONFIG_OPTION_USE_MODULE_ERRORS to undefined, since it breaks
+ source compatibility in a few cases. Updated the comment to explain
+ that too.
+
+2001-08-17 Martin Muskens <mmuskens@aurelon.com>
+
+ * src/base/ftcalc.c (FT_MulDiv): Fixed serious typo.
+
+2001-08-12 Werner Lemberg <wl@gnu.org>
+
+ Updating to OpenType 1.3.
+
+ * include/freetype/internal/tttypes.h (TT_CMap0, TT_CMap2, TT_CMap4,
+ TT_CMap6): Adding field `language'.
+ (TT_CMapTable): Removing field `language'.
+ Type of `length' field changed to FT_ULong.
+ Adding fields for cmaps format 8, 10, and 12.
+ (TT_CMapGroup): New auxiliary structure.
+ (TT_CMap8_12, TT_CMap10): New structures.
+ * include/freetype/tttables.h (TT_HoriHeader, TT_VertHeader):
+ Removed last element of `Reserved' array.
+ * include/freetype/ttnameid.h (TT_PLATFORM_CUSTOM, TT_MS_ID_UCS_4,
+ TT_NAME_ID_CID_FINDFONT_NAME): New macros.
+
+ * src/sfnt/ttcmap.c (TT_CharMap_Load): Updated loading of `language'
+ field to the new structures.
+ Fixed freeing of arrays in case of unsuccessful loads.
+ Added support for loading format 8, 10, and 12 cmaps.
+ (TT_CharMap_Free): Added support for freeing format 8, 10, and 12
+ cmaps.
+ (code_to_index4): Small improvement.
+ (code_to_index6): Ditto.
+ (code_to_index8_12, code_to_index10): New functions.
+ * src/sfnt/ttload.c (TT_Load_Metrics_Header): Updated to new
+ structure.
+ (TT_Load_CMap): Ditto.
+
+ * src/sfnt/sfobjs.c (tt_encodings): Add MS UCS4 table (before MS
+ Unicode).
+
+2001-08-11 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1driver.c (t1_get_name_index): Fix compiler warning.
+
+2001-08-09 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/cffdrivr.c (get_cff_glyph_name): Renamed to
+ cff_get_glyph_name for consistency.
+
+ (cff_get_glyph_index): Minor documentation change.
+
+ * src/type1/t1driver.c (t1_get_name_index): New function used in
+ Get_Interface as the function returned when the `name_index'
+ function is requested.
+
+ (get_t1_glyph_name): Renamed to t1_get_glyph_name for consistency.
+
+2001-08-08 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/cffload.c: Removed definitions of cff_isoadobe_charset,
+ cff_expert_charset, cff_expertsubset_charset, cff_standard_encoding,
+ and cff_expert_encoding arrays to cffload.h.
+
+ * src/cff/cffload.h: Added definitions of cff_isoadobe_charset,
+ cff_expert_charset, cff_expertsubset_charset, cff_standard_encoding,
+ and cff_expert_encoding arrays.
+
+ * src/cff/cffdrivr.c (cff_get_name_index): New function, returned
+ when `cff_get_interface' is called with a request for the
+ `name_index' function.
+
+ (cff_get_interface): Modified so that it returns the function
+ `cff_get_name_index' when the `name_index' function is requested.
+
+ * src/base/ftobjs.c (FT_Get_Name_Index): New function, used to
+ return a glyph index for a given glyph name only if the driver
+ supports glyph names.
+
+ * include/freetype/internal/ftobjs.h (FT_Name_Index_Requester):
+ New function pointer type definition used in the function
+ FT_Get_Name_Index.
+
+ * include/freetype/freetype.h (FT_Get_Name_Index): Added
+ documentation and prototype.
+
+2001-07-26 Werner Lemberg <wl@gnu.org>
+
+ * builds/cygwin/*: Removed. Use the unix stuff instead.
+
+2001-07-26 Jouk Jansen <joukj@hrem.stm.tudelft.nl>
+
+ * builds/vms/ftconfig.h (FT_CALLBACK_DEF): Updated to change dated
+ 2001-06-27.
+
+2001-07-17 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (PS_Table): Use FT_Offset for
+ `cursor' and `capacity'.
+ * src/psaux/psobjc.c (reallocate_t1_table): Use FT_Long for second
+ parameter.
+ (PS_Table_Add): Use FT_Offset for `new_size'.
+
+ Add support for version 0.5 maxp tables.
+
+ * src/sfnt/ttload.c (TT_Load_MaxProfile): Implement it.
+ (TT_Load_OS2): Initialize some values.
+
+2001-07-13 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftsynth.c: Include ftcalc.h unconditionally.
+
+2001-07-07 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c, src/truetype/ttinterp.c, src/pcf/pcfread:
+ Removed pedantic compiler warnings when the bytecode interpreter is
+ compiled in.
+
+2001-07-03 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahhint.c (ah_hinter_align_weak_points): Remove
+ unused variable `edges'.
+ (ah_hinter_load): Remove unused variables `old_width' and
+ `new_width'.
+ * src/cid/cidload.c (cid_decrypt): Use `U' for constant (again).
+ * src/psaux/psobjs.c (T1_Decrypt): Ditto.
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Ditto.
+
+2001-06-28 David Turner <david@freetype.org>
+
+ * include/internal/ftstream.h: Modified the definitions
+ of the FT_GET_XXXX and NEXT_XXXX macros for 16-bit correctness.
+
+2001-06-26 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c, src/cid/cidload.h (cid_decrypt): Use FT_Offset
+ instead of FT_Int as type for `length' parameter.
+ * include/freetype/internal/psaux.h (PSAux_Interface): Updated.
+
+2001-06-27 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * src/psaux/psobjs.c, src/psaux/psobjs.h (T1_Decrypt): Use FT_Offset
+ instead of FT_Int as type for `length' parameter.
+
+
+ * Version 2.0.4 released.
+ =========================
+
+
+2001-06-27 David Turner <david@freetype.org>
+
+ * builds/unix/ftconfig.in: Changed the definition of the
+ FT_CALLBACK_DEF macro.
+
+ * include/freetype/ftconfig.h, src/*/*.c: Changed the definition and
+ use of the FT_CALLBACK_DEF macro in order to support 16-bit
+ compilers.
+
+ * builds/unix/ftconfig.in: Changed the definition of the
+ FT_CALLBACK_DEF macro.
+
+ * src/sfnt/ttload.c (TT_Load_Kern): The kern table loader now ensures
+ that the kerning table is correctly sorted (some problem fonts don't
+ have a correct kern table).
+
+2001-06-26 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * include/freetype/internal/ftstream.h (FT_GET_OFF3_LE): Fix typo.
+
+2001-06-24 David Turner <david@freetype.org>
+
+ * src/base/ftcalc.c (ft_div64by32): Fixed the source to work
+ correctly on 16-bit systems.
+
+2001-06-23 Anthony Fok <fok@debian.org>
+
+ * debian/*: Added Debian package build directory for 2.0.4.
+
+2001-06-22 David Turner <david@freetype.org>
+
+ * docs/PATENTS: Added patents disclaimer. This one was missing!
+
+ * docs/CHANGES, docs/todo: Updated for the upcoming 2.0.4 release.
+
+2001-06-20 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftconfig.h: Add two more `L's to
+ constants.
+ Add missing semicolons.
+
+ * builds/toplevel.mk: Do similar change as for
+ builds/unix/detect.mk.
+
+ * include/freetype/freetype.h (FT_ENC_TAG): New version to make it
+ easier to redefine.
+ * include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
+
+ * src/pcf/pcfread.c (pcf_get_encodings): Add cast.
+
+2001-06-19 David Turner <david@freetype.org>
+
+ * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
+ Updated the Visual C++ project (for the 2.0.4 release).
+
+ * builds/unix/detect.mk: Added rule for AIX detection (which uses
+ /usr/sbin/init instead of /sbin/init).
+
+ * include/freetype/fterrors.h, src/*/*err*.h: Updated some of the
+ error macros to simplify handling of new error scheme.
+
+2001-06-19 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/fttypes.h (FT_ERROR_MODULE): New macro.
+
+2001-06-19 David Turner <david@freetype.org>
+
+ Removing _lots_ of compiler warnings when the most pedantic warning
+ levels of Visual C++ and Borland C++ are used. Too many files to be
+ listed here, but FT2 now compiles without warnings with VC++ and the
+ `/W4' warning level (lint-style).
+
+ * include/freetype/freetype.h (FT_New_Memory_Face): Updated
+ documentation.
+ * include/freetype/fttypes.h (FT_BOOL): New macro.
+ * include/freetype/internal/ftdebug.h: Add #pragma for Visual C++
+ to suppress warning.
+ * include/freetype/internal/ftstream.h (FT_GET_SHORT_{BE,LE},
+ FT_GET_OFF3_{BE,LE}, FT_GET_LONG_{BE,LE}): New macros.
+ (NEXT_*): Use them.
+ * src/autohint/ahglobal.c: Include FT_INTERNAL_DEBUG_H.
+ (FT_New_Memory_Face): Add `const' to function declaration.
+
+2001-06-18 Werner Lemberg <wl@gnu.org>
+
+ Minor cleanups to remove compiler warnings.
+
+ * include/freetype/cache/ftcmanag.h (FTC_MAX_BYTES_DEFAULT): Use
+ `L' for constant.
+ * include/freetype/config/ftoption.h (FT_RENDER_POOL_SIZE): Ditto.
+ * src/base/ftcalc.c (FT_MulDiv): Use `L' for constant.
+ * src/base/ftglyph.c (FT_Glyph_Get_CBox): Remove `error' variable.
+ * src/base/fttrigon.c (ft_trig_arctan_table): Use `L' for constants.
+ * src/base/ftobjs.c (FT_Done_Size): Fix return value.
+ (FT_Set_Char_Size, FT_Set_Pixel_Sizes, FT_Get_Kerning): Remove
+ unused `memory' variable.
+ * src/autohint/ahglyph.c (ah_get_orientation): Use `L' for constant.
+ * src/autohint/ahhint.c (ah_hint_edges_3,
+ ah_hinter_align_edge_points): Remove unused `before' and `after'
+ variables.
+ (ah_hinter_align_weak_points): Remove unused `edge_limit' variable.
+ (ah_hinter_load): Remove unused `new_advance', `start_contour',
+ and `metrics' variables.
+ * src/cff/cffload.c (CFF_Load_Encoding): Remove dead code to avoid
+ compiler warning.
+ * src/cff/cffobjs.c (CFF_Init_Face): Remove unused `base_offset'
+ variable.
+ * src/cff/cffgload.c (CFF_Parse_CharStrings): Remove unused
+ `outline' variable.
+ (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/sfnt/ttload.c (TT_Load_Kern): Remove unused `version'
+ variable.
+ * src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top'
+ variable.
+ * src/truetype/ttgload.c (load_truetype_glyph): Remove unused
+ `num_contours' and `ins_offset' variables.
+ (compute_glyph_metrics): Remove unused `Top' and `x_scale'
+ variables.
+ (TT_Load_Glyph): Remove unused `memory' variable.
+ * src/smooth/ftgrays.c (grays_raster_render): Use `L' for constants.
+
+2001-06-18 Werner Lemberg <wl@gnu.org>
+
+ Make the new error scheme source compatible with older FT versions
+ by introducing another layer.
+
+ * include/freetype/fterrors.h (FT_ERRORDEF_, FT_NOERRORDEF_): New
+ macros.
+ (FT_NOERRORDEF): Removed.
+ * include/*/*err*.h: Use FT_ERRORDEF_ and FT_NOERRORDEF_.
+
+2001-06-16 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_ENC_TAG): New macro.
+ (FT_Encoding_): Use it.
+ * include/freetype/ftimage.h (FT_IMAGE_TAG): Define it
+ conditionally.
+
+2001-06-14 David Turner <david@freetype.org>
+
+ Modified the TrueType interpreter to let it use the new
+ trigonometric functions provided in `fttrigon.h'. This gets rid of
+ some old 64-bit computation routines, as well as many warnings when
+ compiling the library with the `long long' 64-bit integer type.
+
+ * include/freetype/config/ftoption.h: Undefine
+ FT_CONFIG_OPTION_OLD_CALCS.
+ * include/freetype/internal/ftcalc.h: Rearrange use of
+ FT_CONFIG_OPTION_OLD_CALCS.
+ * src/base/ftcalc.c: Add declaration of FT_Int64 if
+ FT_CONFIG_OPTION_OLD_CALCS isn't defined.
+ * src/truetype/ttinterp.c: Use FT_TRIGONOMETRY_H.
+ (Norm): Add a special version if FT_CONFIG_OPTION_OLD_CALCS isn't
+ defined.
+ (Current_Ratio, Normalize): Simplify code.
+
+2001-06-11 Mike Owens <MOwens@amtdatasouth.com>
+
+ * src/base/ftcalc.c (FT_MulDiv, FT_DivFix, FT_Sqrt64): Remove
+ compiler warnings.
+
+2001-06-08 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.in: Renamed to ...
+ * builds/unix/configure.ac: This to make sure that autoconf 2.50 is
+ needed.
+ Run `autoupdate' on it.
+ Increase `version_info' to 7:0:1.
+ * builds/unix/configure: Regenerated.
+
+2001-06-08 David Turner <david@freetype.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Fixed a bug that
+ corrupted transformed glyphs that were auto-hinted (the transform
+ was applied twice).
+
+ Fixed a bug that returned an invalid linear width for composite
+ TrueType glyphs.
+
+ * include/internal/tttypes.h (TT_Loader_): Two new elements `linear'
+ and `linear_def'.
+ * src/truetype/ttgload.c (load_truetype_glyph,
+ compute_glyph_metrics): Use it.
+
+ * include/fttypes.h (FT_ERROR_BASE): New macro.
+ * src/base/ftobjs.c (FT_Open_Face, FT_Render_Glyph_Internal): Use it
+ to make source code work with the new error scheme implemented by
+ Werner.
+ * src/base/ftoutln.c (FT_Outline_Render): Ditto.
+
+2001-06-07 Werner Lemberg <wl@gnu.org>
+
+ Updating to libtool 1.4.0 and autoconf 2.50.
+
+ * builds/unix/ltconfig: Removed.
+ * builds/unix/ltmain.sh, builds/unix/configure.in,
+ builds/unix/aclocal.m4: Updated.
+ * builds/unix/configure: Regenerated.
+
+2001-06-06 Werner Lemberg <wl@gnu.org>
+
+ Complete redesign of error codes. Please check ftmoderr.h for more
+ details.
+
+ * include/freetype/internal/cfferrs.h,
+ include/freetype/internal/tterrors.h,
+ include/freetype/internal/t1errors.h: Removed. Replaced with files
+ local to the module. All extra error codes have been moved to
+ `fterrors.h'.
+
+ * src/sfnt/ttpost.h: Move error codes to `fterrors.h'.
+
+ * src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h,
+ src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h,
+ src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h,
+ src/smooth/ftsmerrs.h, src/truetype/tterrors.h,
+ src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the
+ error names for the module it belongs to.
+
+ * include/freetype/ftmoderr.h: New file, defining the module error
+ offsets. Its structure is similar to `fterrors.h'.
+
+ * include/freetype/fterrors.h (FT_NOERRORDEF): New macro.
+ (FT_ERRORDEF): Redefined to use module error offsets.
+ All internal error codes are now public; unused error codes have
+ been removed, some are new.
+
+ * include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New
+ macro.
+ * include/freetype/config/ftoption.h
+ (FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro.
+
+ All other source files have been updated to use the new error codes;
+ some already existing (internal) error codes local to a module have
+ been renamed to give them the same name as in the base module.
+
+ All make files have been updated to include the local error files.
+
+2001-06-06 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidtokens.h: Replaced with...
+ * src/cid/cidtoken.h: This file for 8+3 consistency.
+
+ * src/raster/ftraster.c: Use macros for header file names.
+
+ * src/include/freetype/tttables.h (TT_HoriHeader_, TT_VertHeader_):
+ Fix length of `Reserved' array. Note that this isn't the real fix
+ since recent OpenType specs have introduced a `CaretOffset' field
+ instead of the first reserved byte.
+
+2001-05-29 Werner Lemberg <wl@gnu.org>
+
+ * INSTALL: Minor fixes.
+
+
+ * Version 2.0.3 released.
+ =========================
+
+
+2001-05-29 David Turner <david@freetype.org>
+
+ * INSTALL, docs/CHANGES: Updated.
+
+2001-05-25 David Turner <david@freetype.org>
+
+ Moved several documents from the top-level to the `docs' directory.
+
+ * src/base/ftcalc.c (FT_DivFix): Small fix to return value.
+
+2001-05-16 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fixed a bug in the
+ composite loader. Spotted by Keith Packard.
+ * src/base/ftobjs.c (FT_GlyphLoader_Check_Points,
+ FT_GlyphLoader_Check_Subglyphs): Ditto.
+
+2001-05-14 David Turner <david@freetype.org>
+
+ Fixed the incorrect blue zone computations, and improved the
+ composite support. Note that these changes result in improved
+ rendering, while sometimes introducing their own artefacts. This is
+ probably the last big change to the autohinter before the
+ introduction of a complete replacement.
+
+ * src/autohint/ahglobal.c (sort_values): Fix loop.
+ * src/autohint/ahglyph.c: Removed some obsolete code.
+ (ah_outline_compute_edges): Modify code to set the ah_edge_round
+ flag.
+ (ah_outline_compute_blue_edges): Add code to compute active blue
+ zones.
+ * src/autohint/ahhint.c (ah_hinter_glyph_load): Change load_flags
+ value.
+
+ * 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.
+
+2001-05-12 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftbbox.h: FTBBOX_H -> __FTBBOX_H__.
+ * include/freetype/fttrigon.h: __FT_TRIGONOMETRY_H__ ->
+ __FTTRIGON_H__.
+ Include FT_FREETYPE_H.
+ Beautified; added copyright.
+ * src/base/fttrigon.c: Beautified; added copyright.
+
+2001-05-11 David Turner <david@freetype.org>
+
+ * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c
+ (parse_font_matrix), src/type1/t1load.c (parse_font_matrix): Fixed
+ the incorrect EM size computation.
+
+ * include/freetype/fttrigon.h, src/base/fttrigon.c: New files,
+ adding trigonometric functions to the core API (using Cordic
+ algorithms).
+ * src/base/ftbase.c, src/base/Jamfile, src/base/rules.mk: Use them.
+
+ * builds/newline: New file.
+ * builds/top_level.mk, builds/detect.mk: Use it. This fixes
+ problems with Make on Windows 2000, as well as problems when `make
+ distclean' is invoked on a non-Unix platform when there is no
+ `config.mk' in the current directory.
+
+ * builds/freetype.mk: Fixed a problem with object deletions under
+ Dos/Windows/OS/2 systems.
+
+ Added new directory to hold tools and test programs.
+
+ * docs/docmaker.py, docs/glnames.py: Moved to...
+ * src/tools/docmaker.py, src/tools/glnames.py: This place.
+ * src/tools/cordic.py: New file used to compute arctangent table
+ needed by fttrigon.c.
+ * src/tools/test_bbox.c, src/tools/test_trig.c: New test files.
+
+ * src/tools/docmaker.py: Improved the script to add the current date
+ at the footer of each web page (useful to distinguish between
+ versions).
+
+ * Jamfile: Fixed incorrect HDRMACRO argument.
+
+ * TODO: Removed the cubic arc bbox computation note, since it has been
+ fixed recently.
+ * src/base/ftbbox.c (test_cubic_zero): Renamed to...
+ (test_cubic_extrema): This function. Use `UL' for unsigned long
+ constants.
+
+ * include/freetype/t1tables.h, include/freetype/config/ftoption.h:
+ Formatting.
+
+2001-05-10 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (FT_Open_Face): Fixed a small memory leak
+ which happened when trying to open 0-size font files!
+
+2001-05-09 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftcalc.h: Move declaration of
+ FT_SqrtFixed() out of `#ifdef FT_LONG64'.
+
+2001-05-08 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
+
+ * src/pcfdriver.c (PCF_Load_Glyph): Fixed incorrect bitmap width
+ computation.
+
+2001-05-08 David Turner <david@freetype.org>
+
+ * docs/docmaker.py: Updated the DocMaker script in order to add
+ command line options (--output,--prefix,--title), fix the erroneous
+ line numbers reported during errors and warnings, and other
+ formatting issues.
+
+ * src/base/ftcalc.c (FT_MulDiv, FT_MulFix, FT_DivFix): Various tiny
+ fixes related to rounding in 64-bits routines and
+ pseudo-`optimizations'.
+
+2001-04-27 David Turner <david@freetype.org>
+
+ * src/base/ftbbox.c (BBox_Cubic_Check): Fixed the coefficient
+ normalization algorithm (invalid final bit position, and invalid
+ shift computation).
+
+2001-04-26 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/config.guess, builds/unix/config.sub: Updated to
+ latest versions from gnu.org.
+
+ * builds/compiler/gcc-dev.mk: Add `-Wno-long-long' flag.
+
+ * include/freetype/internal/ftcalc.h: Define FT_SqrtFixed()
+ unconditionally.
+ * src/base/ftbbox.c: Include FT_INTERNAL_CALC_H.
+ Fix compiler warnings.
+ * src/base/ftcalc.c: Fix (potential) compiler warnings.
+
+2001-04-26 David Turner <david@freetype.org>
+
+ * src/base/ftcalc.c (FT_SqrtFixed): Corrected/optimized the 32-bit
+ fixed-point square root computation. It is now used even with
+ 64-bits integers, as it is _much_ faster than calling FT_Sqrt64 :-)
+
+ * src/base/ftbbox.c: Removed invalid `#include FT_BEZIER_H' line.
+
+2001-04-25 David Turner <david@freetype.org>
+
+ * src/base/ftbbox.c (BBox_Cubic_Check): Rewrote function to use
+ direct computations with 16.16 values instead of sub-divisions. It
+ is now slower, but proves a point :-)
+
+ * src/raster/ftraster.c, src/smooth/ftgrays.c, src/base/ftbbox.c:
+ Fixed the Bézier stack depths.
+
+ * src/base/ftcalc.c (FT_MulFix): Minor rounding fix.
+
+ * builds/beos: Added BeOS-specific files to the old build system
+ (no changes were necessary to support BeOS in the Jamfile though).
+
+2001-04-20 David Turner <david@freetype.org>
+
+ * ftconfig.h, ftoption.h: Updated `ftconfig.h' to detect 64-bit int
+ types on platforms where Autoconf is not available). Also removed
+ FTCALC_USE_LONG_LONG and replaced it with
+ FT_CONFIG_OPTION_FORCE_INT64.
+
+ * builds/win32/freetype.dsp: Updated the Visual C++ project file.
+ Doesn't create a DLL yet.
+
+ * cffgload.c: Removed a compilation warning.
+
+2001-04-10 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * t1load.c (parse_charstrings): Changed code for placing .notdef
+ glyph into slot 0 so that we no longer have a memory access
+ violation.
+
+ * t1load.h: In structure T1_Loader, added swap_table (of type
+ PS_Table) to facilitate placing the .notdef glyph into slot 0.
+
+2001-04-10 Francesco Zappa Nardelli <francesco.zappa.nardelli@ens.fr>
+
+ * src/pcf/pcfdriver.c (PCF_Get_Char_Index): Fix return value.
+
+2001-04-09 Laurence Withers <lwithers@lwithers.demon.co.uk>
+
+ * builds/dos/detect.mk: Add support for bash.
+
+2001-04-05 Werner Lemberg <wl@gnu.org>
+
+ * builds/os2/*.mk: These files have been forgotten to update to
+ the structure of similar makefiles.
+ * builds/dos/*.mk: Ditto.
+ * builds/ansi/*.mk: Ditto.
+
+ * builds/win32/win32-def.mk (BUILD): Fix typo.
+
+ * builds/compiler/*.mk (CLEAN_LIBRARY): Don't use NO_OUTPUT.
+ This is already used in the link_*.mk files.
+
+2001-04-03 Werner Lemberg <wl@gnu.org>
+
+ * src/*/Jamfile: Slight changes to make files more cryptic.
+
+2001-04-03 Werner Lemberg <wl@gnu.org>
+
+ * Jamfile, src/Jamfile, src/*/Jamfile: Formatted. Slight changes
+ to give files identical structure.
+
+2001-04-02 Werner Lemberg <wl@gnu.org>
+
+ * CHANGES: Reformatted, minor fixes.
+ * TODO: Updated.
+ * README: Formatting.
+ * include/freetype/freetype.h: Formatting.
+
+ * Jamfile: Fix typo.
+
+ * src/cff/cffparse.c: Move error code #defines to...
+ * include/freetype/internal/cfferrs.h: This file.
+ * src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffload.c: Replaced
+ `FT_Err_*' with `CFF_Err_*'.
+ * src/cid/cidparse.c: Replaced `FT_Err_*' with `T1_Err_*'.
+ * src/psaux/psobjs.c, src/psaux/t1decode.c: Ditto.
+ * src/sfnt/sfobcs.c, src/sfnt/ttload.c: Replaced `FT_Err_*' with
+ `TT_Err_*'.
+ * src/truetype/ttgload.c, src/truetype/ttobjs.c: Ditto.
+ * src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1objs.c,
+ src/type1/t1parse.c: Replaced `FT_Err_*' with `T1_Err_*'.
+
+ * include/freetype/internal/cfferrs.h: Add
+ `CFF_Err_Unknown_File_Format'.
+ * include/freetype/internal/t1errors.h: Add
+ `T1_Err_Unknown_File_Format'.
+ * include/freetype/internal/tterrors.h: Add
+ `TT_Err_Unknown_File_Format'.
+
+ * src/cff/cffload.h: Add `cff_*_encoding' and `cff_*_charset'
+ references.
+ * src/psaux/psobjs.c: Include `FT_INTERNAL_TYPE1_ERRORS_H'.
+
+ * src/cff/cffobjs.c (CFF_Init_Face, CFF_Done_Face): Use
+ FT_LOCAL_DEF.
+ * src/cid/cidobjs.c (CID_Done_Driver): Ditto.
+ * src/trutype/ttobjs.c (TT_Init_Face, TT_Done_Face, TT_Init_Size):
+ Ditto.
+ * src/type1/t1objs.c (T1_Done_Driver): Ditto.
+ * src/pcf/pcfdriver.c (PCF_Done_Face): Ditto.
+ * src/pcf/pcf.h: Use FT_LOCAL for `PCF_Done_Face'.
+
+2001-04-02 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/sfnt/ttload.c (TT_Load_Metrics): Fix an improper pointer
+ dereference. Submitted by Herbert Duerr <duerr@sun.com>.
+
+2001-03-26 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * include/freetype/config/ftconfig.h: Changed hexadecimal
+ constants to use suffix U to avoid problems with HP-UX's c89
+ compiler. Submitted by G.W. Lucas <glucas@sonalysts.com>.
+
+2001-03-24 David Turner <david.turner@freetype.org>
+
+ * Jamrules, Jamfile, src/Jamfile, src/*/Jamfile: Adding jamfiles to
+ the source tree. See www.freetype.org/jam/index.html for details.
+
+
+ * Version 2.0.2 released.
+ =========================
+
+
+2001-03-20 Werner Lemberg <wl@gnu.org>
+
+ * builds/win32/detekt.mk: Fix .PHONY target for Intel compiler.
+
+2001-03-20 David Turner <david.turner@freetype.org>
+
+ * include/freetype/config/ftheader.h, include/freetype/ftsnames.h:
+ Renamed `ftnames.h' to `ftsnames.h', and FT_NAMES_H to
+ FT_SFNT_NAMES_H.
+
+ * docs/docmaker.py: Added generation of INDEX link in table of
+ contents.
+
+ * INSTALL, docs/BUILD: Updated documentation to indicate that the
+ compilation process has changed slightly (no more `src' required in
+ the include path).
+
+ * builds/*/*-def.mk: Changed the objects directory from `obj' to
+ `objs'.
+
+ * include/freetype/config/ftheader.h: Removed obsolete macros like
+ FT_SOURCE_FILE, etc. and added cache-specific macro definitions that
+ were previously defined in <freetype/ftcache.h>. Added comments to
+ be included in a new API Reference section.
+
+ * src/*/*: Removed the use of FT_SOURCE_FILE, etc. Now, each
+ component needs to add its own directory to the include path at
+ compile time. Modified all `rules.mk' and `descrip.mms'
+ accordingly.
+
+2001-03-20 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.in: Add $ft_version.
+ * builds/unix/freetype-config.in: Use it.
+ * builds/unix/configure: Updated.
+
+2001-03-19 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/type1/t1load.c (parse_font_matrix): Assign the units per em
+ value an unsigned short value, first by shifting right 16 bits,
+ then by casting the results to FT_UShort.
+
+ * src/cff/cffparse.c (cff_parse_font_bbox): Assign the units per em
+ value an unsigned short value, first by shifting right 16 bits,
+ then by casting the results to FT_UShort.
+
+2001-03-17 David Turner <david.turner@freetype.org>
+
+ * src/cid/cidobjs.c, src/cid/cidload.c, src/pcf/pcfread.c,
+ src/type1/t1load.c, src/type1/t1objs.c: Added a few casts to remove
+ compiler warnings in pedantic modes.
+
+ * include/config/ft2build.h, include/config/ftheader.h: The file
+ `ft2build.h' was renamed to `ftheader.h' to avoid conflicts with the
+ top-level <ft2build.h>.
+
+ * include/config/ftheader.h: Added new section describing the #include
+ macros.
+
+2001-03-17 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/cffparse.c (cff_parse_font_bbox): Obtain rounded FT_Fixed
+ values for the bounding box numbers.
+
+ * src/cff/cffobjs.c (CFF_Init_Face): When processing a CFF/CEF font,
+ set `root->ascender' (`root->descender') to the integer part of
+ `root->bbox.yMax' (`root->bbox.yMin', respectively).
+
+2001-03-16 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/cffdrivr.c (get_cff_glyph_name): New function. Used in
+ cff_get_interface to facilitate getting a glyph name for glyph index
+ via FT_Get_Glyph_Name().
+
+ (cff_get_interface): Added support for getting a glyph name via the
+ `glyph_name' module interface. Uses the new function
+ get_cff_glyph_name().
+ Submitted by Sander van der Wal <svdwal@xs4all.nl>.
+
+ * src/cff/cffobjs.c (CFF_Init_Face): Logical or the face flags with
+ FT_FACE_FLAG_GLYPH_NAMES only if FT_CONFIG_OPTION_NO_GLYPH_NAMES is
+ not defined. This is to add support for getting a glyph name from a
+ glyph index via FT_Get_Glyph_Name().
+ Submitted by Sander van der Wal <svdwal@xs4all.nl>.
+
+ * src/cff/cffgload.c (CFF_Parse_CharStrings): Added support for
+ deprecated operator `dotsection'.
+ Submitted by Sander van der Wal <svdwal@xs4all.nl>.
+
+2001-03-12 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Fix error
+ messages.
+
+ * INSTALL, docs/BUILD: We need GNU make 3.78.1 or newer.
+
+2001-03-12 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * include/freetype/internal/psaux.h: Changed the lenIV member of
+ the T1_Decoder_ struct to be an FT_Int instead of an FT_UInt.
+
+ * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Adjust
+ for lenIV seed bytes at the start of a decrypted subroutine.
+
+ * src/cid/cidload.c (cid_read_subrs): Decrypt subroutines only
+ if lenIV >= 0.
+
+ * src/cid/cidgload.c (cid_load_glyph): Decrypt charstrings only
+ if lenIV >= 0.
+
+2001-03-11 Werner Lemberg <wl@gnu.org>
+
+ * TODO: Updated.
+
+ * src/pcf/pcfread.c: Put READ_Fields() always in a conditional to
+ avoid compiler warnings.
+
+2001-03-10 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * TODO: New file.
+
+ * include/freetype/freetype.h: Added prototypes and notes for
+ three new functions: FT_RoundFix, FT_CeilFix, and FT_FloorFix.
+ * src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_FloorFix): Added
+ implementation code.
+
+ * src/cid/cidobjs.c (CID_Init_Face): Use calculated units_per_EM,
+ and if that is not available, default to 1000 units per EM. Changed
+ assignment code for ascender and descender values.
+ * src/cid/cidload.c (parse_font_matrix): Added units_per_EM
+ processing.
+ (parse_font_bbox): Changed to use FT_Fixed number handling.
+
+ * src/type1/t1objs.c (T1_Init_Face): Changed the assignment code
+ for ascender, descender, and max_advance_width.
+ * src/type1/t1load.c (parse_font_bbox): Changed to use FT_Fixed
+ number handling.
+
+2001-03-10 Henrik Grubbström <grubba@roxen.com>
+
+ * src/*/*.c: Added many casts to make code more 64bit-safe.
+
+2001-03-07 Werner Lemberg <wl@gnu.org>
+
+ * INSTALL, docs/BUILD: We need GNU make 3.78 or newer.
+
+2001-03-07 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/type1/t1objs.c (T1_Init_Face): Minor correction: We must wait
+ until parse_font_bbox is changed before we use logical shift rights
+ in the assignments of `root->ascender', `root->descender', and
+ `root->max_advance_width'.
+
+ (T1_Done_Face): Free `char_name' table to avoid a memory leak.
+ Submitted by Sander van der Wal <svdwal@xs4all.nl>.
+
+2001-03-05 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/cffgload.c (CFF_Load_Glyph): Set glyph control data to the
+ the Type 2 glyph charstring (used by conversion programs).
+ Submitted by Ha Shao <hashao@chinese.com>.
+
+2001-03-04 Antoine Leca <Antoine.Leca@renault.fr>
+
+ * include/freetype/ttnameid.h: Correct a stupid typo which prevented
+ correct compilation (TT_MS_LANGID_TIGRIGNA_ETHIOPIA appeared twice).
+
+2001-03-04 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahtypes.h (AH_Hinter): Add elements
+ `disable_horz_edges', `disable_vert_edges'.
+ * src/autohint/ahhint.c (ah_hint_edges_3, ah_hinter_hint_edges): Use
+ them (and remove static variables with the same names).
+ * src/pcf/pcfutil.c (BitOrderInvert): Add `const'.
+ * docs/glnames.py: Updated to latest pstables.h changes.
+
+ * builds/unix/detect.mk: Add test for Hurd.
+ * builds/hurd/detect.mk: Removed.
+
+2001-03-04 Sander van der Wal <svdwal@xs4all.nl>
+
+ * src/psnames/pstables.h: Add more `const'.
+ * src/pcf/pcfutil.c: Ditto.
+
+2001-03-04 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixing typo
+ (FT_Glyph_Done -> FT_Done_Glyph).
+
+2001-03-01 Antoine Leca <Antoine.Leca@renault.fr>
+
+ * include/freetype/ttnameid.h: Added some new Microsoft language
+ codes and LCIDs as found in Office Xp.
+
+2001-02-28 David Turner <david.turner@freetype.org>
+
+ * builds/hurd/detect.mk: New file. Added support to detect the GNU
+ Hurd operating system as Unix-like. Fix submitted by Anthony Fok
+ <foka@debian.org>.
+
+ * src/type1/t1gload.c (T1_Load_Glyph): Set glyph control data to the
+ the Type 1 glyph charstring (used by conversion programs).
+ Submitted by Ha Shao <hashao@chinese.com>.
+
+2001-02-22 David Turner <david.turner@freetype.org>
+
+ * src/base/ftgrays.c (grays_sweep): The function didn't exit
+ immediately if `num_cells' was 0 as it should. Thanks to Boris for
+ finding this out.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Fixed memory leak when
+ bitmap rendering fails (thanks to Graham Asher).
+
+2001-02-13 Werner Lemberg <wl@gnu.org>
+
+ * docs/docmaker.py (DocSection::add_element): Use
+ `self.print_error()'.
+
+ * builds/unix/config.{guess,sub}: Updated (from ftp.gnu.org).
+
+2001-02-13 David Turner <david.turner@freetype.org>
+
+ * docs/docmaker.py, include/freetype/*.h: Updated the DocMaker
+ script to support chapters and section block ordering. Updated the
+ public header files accordingly.
+
+ * src/base/ftglyph.c (FT_Glyph_Copy): Advance width and glyph format
+ were not correctly copied.
+
+2001-02-08 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/cffparse.c (cff_parse_font_matrix): Removed an
+ unnecessary fprintf( stderr, ... ).
+
+2001-02-07 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/type1/t1objs.c (T1_Init_Face): Added code to get the
+ units_per_EM from the value assigned in parse_font_matrix, if
+ available. Default to 1000 if not available.
+
+ * src/cff/cffparse.c (cff_parse_font_matrix): Added logic to get
+ the units_per_EM from the FontMatrix.
+
+ (cff_parse_fixed_thousand): New function. Gets a real number from
+ the CFF font, but multiplies by 1000 (this is to avoid rounding
+ errors when placing this real number into a 16.16 fixed number).
+
+ (cff_parse_real): Added code so that the integer part is moved
+ into the high sixteen bits of the 16.16 fixed number.
+
+ * src/cff/cffobjs.c (CFF_Init_Face): Added logic to get the units
+ per EM from the CFF dictionary, if available.
+
+ * include/freetype/internal/cfftypes.h: In struct CFF_Font_Dict_,
+ added a units_per_em member to facilitate passing of units_per_em
+ from function cff_parse_font_matrix.
+
+ * src/type1/t1load.c (is_alpha): Make `-' a legal alphanumeric
+ character. This is so that font names with `-' are fully parsed,
+ etc...
+
+2001-02-02 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psobjs.c (shift_elements): Remove if clause (which is
+ obsolete now).
+
+ (reallocate_t1_table, PS_Table_Done): Replace REALLOC() with ALLOC()
+ + MEM_Copy() to avoid a memory bug.
+
+2001-02-01 David Turner <david.turner@freetype.org>
+
+ * docs/docmaker.py: Improved the index sorting routine to place
+ capital letters before small ones. Added the `<order>' marker to
+ section blocks in order to give the order of blocks.
+
+2001-01-30 Antoine Leca <Antoine.Leca@renault.fr>
+
+ * include/freetype/ttnameid.h: Latest updates to Microsoft language
+ ID codes.
+
+2001-01-24 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/t1load.c (parse_font_matrix): Added heuristic to get
+ units_per_EM from the font matrix.
+
+ (parse_dict): Deleted test to see whether the FontInfo keyword has
+ been seen. Deletion of this test allows fonts without FontInfo
+ dictionaries to be parsed by the Type 1 driver.
+
+ (T1_Open_Face): Deleted empty subroutines array test to make sure
+ fonts with no subroutines still are parsed.
+
+2001-01-17 Francesco Zappa Nardelli <francesco.zappa.nardelli@ens.fr>
+
+ * src/pcfread.c (pcf_get_properties, pcf_get_metrics,
+ pcf_get_bitmaps): Fix compiler errors.
+
+2001-01-11 David Turner <david.turner@freetype.org>
+
+ * src/pcf/pcfread.c: Removed some compilation warnings related
+ to comparison of signed vs. unsigned integers.
+
+ * include/freetype/internal/ftdebug.h: Changed the debug trace
+ constants from trace_t2xxxx to trace_cffxxxx to be able to compile
+ the CFF driver in debug mode.
+
+2001-01-11 Matthew Crosby <mcrosby@marthon.org>
+
+ * builds/unix/freetype-config.in: Fix problems with separate
+ --prefix and --exec-prefix.
+
+2001-01-11 David Turner <david.turner@freetype.org>
+
+ * docs/docmaker.py: Added cross-references generation as well as
+ more robust handling of pathname wildcard matching.
+
+2001-01-10 Werner Lemberg <wl@gnu.org>
+
+ * docs/docmaker.py: Minor improvements to reduce unwanted spaces
+ and empty lines in output.
+
+2001-01-09 David Turner <david.turner@freetype.org>
+
+ * docs/docmaker.py: Improved script to generate table of contents
+ and index pages. It also supports wildcards on non Unix systems.
+
+ * include/freetype/*.h, include/freetype/cache/*.h: Updated comments
+ to include section definitions/delimitations for the API Reference
+ generator.
+
+ * include/freetype/freetype.h: Moved declaration of
+ `FT_Generic_Finalizer' and the `FT_Generic' structure to...
+ * include/freetype/fttypes.h: here.
+
+2001-01-04 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ttnameid.h: Updated Unicode code range comments.
+
+2001-01-03 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/rules.mk: Use cffgload.{c,h} instead of t2gload.{c,h}.
+
+ * include/freetype/internal/internal.h: Changed to use cfftypes.h
+ (cfferrs.h) instead of t2types.h (t2errors.h, respectively).
+
+ * include/freetype/internal/cfftypes.h: Merged in changes from
+ t2types.h and made this the canonical `types' header for the CFF
+ driver.
+
+ * include/freetype/internal/t2types.h: This file was merged with
+ cfftypes.h and is no longer necessary.
+
+ * include/freetype/internal/t2errors.h: Renamed to cfferrs.h.
+
+ * src/cff/cffobjs.c, src/cff/cffobjs.h, src/cff/cffparse.c,
+ src/cff/cffdrivr.c, src/cff/cff.c, src/cff/cffload.c,
+ src/cff/cffgload.c, src/cff/cffgload.h: Changed to use
+ cffgload.{c,h} instead of t2gload.{c,h}. All occurrences of t2_
+ (T2_) were replaced with cff_ (CFF_, respectively).
+
+ * src/cff/t2gload.h: Renamed cffgload.h.
+
+ * src/cff/t2gload.c: Renamed cffgload.c
+
+2000-01-02 Jouk Jansen <joukj@hrem.stm.tudelft.nl>
+
+ * builds/vms: Support files for VMS architecture added.
+ * descrip.mms, src/*/descrip.mms: VMS makefiles added.
+ * README.VMS: New file.
+
+2000-01-01 Werner Lemberg <wl@gnu.org>
+
+ * LICENSE.TXT: Added info about PCF driver license.
+
+2001-01-01 Francesco Zappa Nardelli <francesco.zappa.nardelli@ens.fr>
+
+ * src/pcf/*: New driver module for PCF font format (used in
+ X Window System).
+ * include/freetype/internal/ftdebug.h (FT_Trace): Added values for
+ PCF driver.
+ * include/freetype/internal/pcftypes.h: New file.
+ * include/freetype/config/ftmodule.h: Added PCF driver module.
+
+2001-01-01 Werner Lemberg <wl@gnu.org>
+
+ * src/winfonts/winfnt.c (FNT_Get_Char_Index): Fix parameter type.
+
+2000-12-31 Werner Lemberg <wl@gnu.org>
+
+ * builds/modules.mk (clean_module_list): Fixed deletion of module
+ file in case `make make_module_list' is called before `make setup'.
+
+2000-12-30 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (CFF_Load_Charset): Improved error messages.
+ (CFF_Load_Charset, CFF_Load_Encoding): Remove unnecessary variable
+ definition.
+
+2000-12-30 Tom Kacvinsky <tkacvins@freetype.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
+ charset and encoding parsers in the CFF driver.
+
+ * src/cff/t2gload.c (t2_lookup_glyph_by_stdcharcode,
+ t2_operator_seac): Added these functions for use in implementing the
+ seac emulation provided by the Type 2 endchar operator.
+ (T2_Parse_CharStrings): Added seac emulation for the endchar
+ operator.
+
+ * src/cff/cffload.c (CFF_Load_Encoding, CFF_Load_Charset,
+ CFF_Done_Encoding, CFF_Done_Charset): Extended to load and parse the
+ charset/encoding tables, and free the memory used by them when the
+ CFF driver is finished with them. Added tables
+
+ cff_isoadobe_charset
+ cff_expert_charset
+ cff_expertsubset_charset
+ cff_standard_encoding
+ cff_expert_encoding
+
+ so that the encoding/charset parser can handle predefined encodings and
+ charsets.
+
+2000-12-24 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/t2gload.c (T2_Load_Glyph): Added code so that the font
+ transform is applied.
+
+ * src/cff/cffparse.c (cff_parse_font_matrix): Added code so that
+ the font matrix numbers are scaled by 1/(matrix->yy). Also, the
+ offset vector now contains integer values instead of 16.16 fixed
+ numbers.
+
+2000-12-22 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph):
+ Removed unnecessary comments and commented-out code.
+
+2000-12-21 David Turner <david.turner@freetype.org>
+
+ * src/cid/cidafm.c, src/cid/cidafm.h: removed un-needed files,
+ we'll work on supporting CID AFM files later I guess :-)
+
+2000-12-21 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load, ah_hinter_load_glyph):
+ Changed so that fonts with a non-standard FontMatrix render
+ correctly. Previously, the first glyph rendered from such a
+ font did not have the transformation matrix applied.
+
+2000-12-17 Werner Lemberg <wl@gnu.org>
+
+ * *.mk: Added lots of `.PHONY' targets.
+
+2000-12-17 Karsten Fleischer <kfleisc1@ford.com>
+
+ * *.mk: Implemented `platform' target to disable auto-detection.
+
+2000-12-14 Werner Lemberg <wl@gnu.org>
+
+ * docs/design/modules.html: Removed. Covered by design-*.html.
+
+ * INSTALL: Added info about makepp.
+
+2000-12-14 David Turner <david.turner@freetype.org>
+
+ Added support for clipped direct rendering in the smooth renderer.
+ This should not break binary compatibility of existing applications.
+
+ * include/freetype/fttypes.h, include/freetype/ftimage.h: Move
+ definition of the FT_BBox structure from the former to the latter.
+ * include/freetype/ftimage.h: Add `ft_raster_flag_clip' value to
+ FT_Raster_Flag enumeration.
+ Add `clip_box' element to FT_Raster_Params structure.
+ * src/smooth/ftgrays.c (grays_convert_glyph): Implement it.
+
+ * INSTALL: Updated installation instructions on Win32, listing the
+ new `make setup list' target used to list supported
+ compilers/targets.
+
+ * src/raster/ftraster.c (ft_black_render): Test for unsupported
+ direct rendering before testing arguments.
+
+2000-12-13 David Turner <david.turner@freetype.org>
+
+ * include/freetype/config/ft2build.h,
+ include/freetype/internal/internal.h: Fixed header inclusion macros
+ to use direct definitions. This is the only way to do these things
+ in a portable way :-( The rest of the code should follow shortly
+ though everything compiles now.
+
+ * builds/compiler/intelc.mk, builds/compiler/watcom.mk: New files.
+
+ * builds/win32/detect.mk: Added support for the Intel C/C++
+ compiler, as well as _preliminary_ (read: doesn't work!) support for
+ Watcom. Also added a new setup target. Type `make setup list' for
+ a list of supported command-line compilers on Win32.
+
+ * src/base/ftdebug.c: Added dummy symbol to avoid empty file if
+ conditionals are off.
+
+2000-12-13 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ftsystem.c: Fixed typos. Fixed inclusion of wrong
+ ftconfig.h file.
+
+2000-12-12 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ft2build.h (FT2_ROOT, FT2_CONFIG_ROOT):
+ Removed. ANSI C doesn't (explicitly) allow macro expansion in
+ arguments using `##'.
+ (FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE): Use directory
+ names directly. Make them configurable. Use `##' to strip leading
+ and trailing spaces from arguments.
+
+ * builds/unix/ft2unix.h: Adapted.
+
+ * src/base/ftsystem.c (ft_alloc, ft_realloc, ft_free, ft_io_stream,
+ ft_close_stream): Use FT_CALLBACK_DEF.
+
+ * builds/unix/ftsystem.c: Use new header scheme.
+ (FT_Done_Memory): Use free() from FT_Memory structure.
+
+ * src/base/ftinit.c, src/base/ftmac.c: Header scheme fixes.
+
+2000-12-11 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ft2build.h (FT2_CONFIG_ROOT,
+ FT2_PUBLIC_FILE, FT2_CONFIG_FILE, FT2_INTERNAL_FILE,
+ FT_SOURCE_FILE): Use `##' operator to be really ANSI C compliant.
+
+2000-12-09 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/detect.mk: Remove unused USE_CFLAGS variable.
+
+2000-12-08 Werner Lemberg <wl@gnu.org>
+
+ * */*.h: Changed body inclusion macro names to start and end with
+ `__' (those which haven't converted yet). Fixed minor conversion
+ issues.
+
+ * src/winfonts/winfnt.c: Updated to new header inclusion scheme.
+
+ * src/truetype/ttinterp.c: Remove unused CALC_Length() macro.
+
+2000-12-07 David Turner <david.turner@freetype.org>
+
+ * */*.[ch]: Changed source files to adhere to the new
+ header inclusion scheme. Not completely tested but works for now
+ here.
+
+ * src/cff/t2driver.c: Renamed and updated to...
+ * src/cff/cffdrivr.c: New file.
+ * src/cff/t2driver.h: Renamed and updated to...
+ * src/cff/cffdrivr.h: New file.
+ * src/cff/t2load.c: Renamed and updated to...
+ * src/cff/cffload.c: New file.
+ * src/cff/t2load.h: Renamed and updated to...
+ * src/cff/cffload.h: New file.
+ * src/cff/t2objs.c: Renamed and updated to...
+ * src/cff/cffobjs.c: New file.
+ * src/cff/t2objs.h: Renamed and updated to...
+ * src/cff/cffobjs.h: New file.
+ * src/cff/t2parse.c: Renamed and updated to...
+ * src/cff/cffparse.c: New file.
+ * src/cff/t2parse.h: Renamed and updated to...
+ * src/cff/cffparse.h: New file.
+ * src/cff/t2tokens.h: Renamed and updated to...
+ * src/cff/cfftoken.h: New file.
+
+ * src/cff/cff.c, src/cff/rules.mk: Updated.
+
+2000-12-06 David Turner <david.turner@freetype.org>
+
+ * src/cache/ftlru.c (FT_Lru_Done): Fixed memory leak.
+
+2000-12-06 Werner Lemberg <wl@gnu.org>
+
+ * builds/module.mk: Replaced `xxx #' with `xxx$(space).
+ * builds/os2/detekt.mk, builds/win32/detekt.mk: Moved comment to
+ avoid trailing spaces in variable.
+ * builds/freetype.mk: Use $(D) instead of $D to make statement more
+ readable.
+
+ * docs/docmaker.py: Formatting.
+
+2000-12-05 David Turner <david.turner@freetype.org>
+
+ * src/psaux/psauxmod.c: Fixed a broken inclusion of component
+ header files (an FT_FLAT_COMPILE test was missing).
+
+ * src/cache/ftcmanag.c (FTC_Manager_Done): Fixed a bug that caused
+ an occasional crash when the function was called (due to a dangling
+ pointer).
+
+ * src/base/ftsystem.c (FT_Done_Memory): Fixed an obvious bug:
+ The ANSI `free()' function was called instead of `memory->free()'.
+
+ * docs/docmaker.py: Added section filtering, multi-page generation
+ (index page generation is still missing though).
+
+2000-12-04 David Turner <david.turner@freetype.org>
+
+ * builds/unix/install.mk, builds/unix/ft2unix.h: The file `ft2unix.h'
+ is now installed as <ft2build.h> for Unix systems. Note that we
+ still use the `freetype2/freetype' installation path for now.
+
+ * */*.[ch]: Now using <ft2build.h> as the default build and setup
+ configuration file in all public headers. Internal source files
+ still need some changes though.
+
+ * builds/devel/ft2build.h, builds/devel/ftoption.h: Created a new
+ directory to hold all development options for both the Unix and
+ Win32 developer builds.
+
+ * builds/win32/detect.mk, builds/win32/w32-bccd.mk,
+ builds/win32/w32-dev.mk: Changed the developer build targets to
+ `devel-gcc' and `devel-bcc' in order to be able to develop with the
+ Borland C++ compiler.
+
+2000-12-01 David Turner <david.turner@freetype.org>
+
+
+ * Version 2.0.1 released.
+ =========================
+
+
+ * builds/unix/configure.in, builds/unix/configure,
+ builds/cygwin/configure.in, builds/cygwin/configure: Setting
+ `version_info' to 6:1:0 for the 2.0.1 release.
+
+ * CHANGES: Added a summary of changes between 2.0.1 and 2.0.
+
+ * builds/unix/ftconfig.in, builds/cygwin/ftconfig.in: Changes
+ to allow compilation under Unix with the Unix-specific config
+ files.
+
+2000-12-01 Werner Lemberg <wl@gnu.org>
+
+ * INSTALL: Revised.
+ * builds/compiler/bcc-dev.mk, builds/compiler/visualage.mk,
+ builds/compiler/bcc.mk, builds/win32/w32-bcc.mk,
+ builds/win32/w32-bccd.mk: Revised.
+ * include/freetype/config/ftbuild.h,
+ include/freetype/internal/internal.h: Revised.
+ * include/freetype/ftimage.h: Updated to new header inclusion scheme.
+
+2000-11-30 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (.PHONY): Adding `distclean'.
+ * builds/unix/detect.mk (.PHONY): Adding `devel', `unix', `lcc',
+ `setup'.
+
+2000-11-30 David Turner <david.turner@freetype.ogr>
+
+ * INSTALL: Slightly updated the quick starter documentation to
+ include IDE compilation, prevent against BSD Make, and specify `make
+ setup' instead of a single `make' for build configuration.
+
+ * include/config/ftbuild.h, include/internal/internal.h: Added new
+ configuration files used to determine the location of all public,
+ configuration, and internal header files for FreeType 2. Modified
+ all headers under `include/freetype' to reflect this change. Note
+ that we still need to change the library source files themselves
+ though.
+
+ * builds/compiler/bcc.mk, builds/compiler/bcc-dev.mk,
+ builds/win32/w32-bcc.mk, builds/win32/w32-bccd.mk,
+ builds/win32/detect.mk: Added new files to support compilation with
+ the free Borland C++ command-line compiler. Modified the detection
+ rules to recognize the new `bcc32' target in `make setup bcc32'.
+
+ * src/sfnt/ttcmap.c, src/sfnt/ttpost.c, src/sfnt/ttsbit.c,
+ src/truetype/ttobjs.c, src/truetype/ttgload.c,
+ src/truetype/ttinterp.c: Fixed a few comparisons that Borland C++
+ didn't really like. Basically, this compiler complains when FT_UInt
+ is compared to FT_UShort (apparently, it promotes `UShort' to `Int'
+ in these cases).
+
+2000-11-30 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * t2objs.c (T2_Init_Face): Added calculation of `face->height' for
+ pure CFF fonts.
+
+ * t1objs.c (T1_Init_Face): Fixed computation of `face->height'.
+
+2000-11-29 David Turner <david.turner@freetype.org>
+
+ * src/base/ftbbox.c (BBox_Conic_Check): Fixed a really stupid
+ bug in the formula used to compute the conic Bézier extrema
+ of non-monotonous arcs.
+
+2000-11-29 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c (FT_SqrtFixed), src/base/ftobjs.c
+ (FT_Set_Renderer): Use FT_EXPORT_DEF.
+ * src/cache/ftcimage.c (FTC_Image_Cache_Lookup),
+ src/cache/ftcmanag.c (FTC_Manager_Done, FTC_Manager_Reset,
+ FTC_Manager_Lookup_Face, FTC_Manager_Lookup_Size,
+ FTC_Manager_Register_Cache), src/cache/ftcsbits.c
+ (FTC_SBit_Cache_Lookup): Ditto.
+
+ * src/include/freetype/cache/ftcglyph.h (FTC_GlyphNode_Init),
+ src/include/freetype/ftmac.h (FT_New_Face_From_FOND): Use FT_EXPORT.
+
+2000-11-29 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfdriver.c: Include ttsbit.h and ttpost.h only
+ conditionally.
+
+ * src/truetype/ttdriver.c (Set_Char_Sizes, Set_Pixel_Sizes): Set
+ `size->strike_index' only conditionally.
+
+ * src/type1/t1driver.c, src/type1/t1objs.c: Include t1afm.h only
+ conditionally.
+
+ * src/winfonts/winfnt.h: Move all type definitions to...
+ * src/include/freetype/internal/fnttypes.h: New file.
+ * src/winfonts/winfnt.c: Use it.
+
+2000-11-29 ??? ??? <darin@eazel.com>
+
+ * include/freetype/internal/ftdebug.h: Replaced FT_CAT and FT_XCAT
+ with a direct solution (which also satisfies picky compilers).
+
+2000-11-28 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
+
+ * src/truetype/ttobjs.c (TT_Init_Size): Fix #ifdef's to work with
+ disabled interpreter also.
+
+ * src/base/ftnames.c (FT_Get_Sfnt_Name_Count): Fix incorrect
+ parentheses.
+
+2000-11-26 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/t2gload.c (T2_Parse_CharStrings): Added logic to glyph
+ width setting code to take into account even/odd argument counts
+ and glyph width operand before endchar/hmoveto/vmoveto.
+
+2000-11-26 Werner Lemberg <wl@gnu.org>
+
+ * builds/ansi/ansi.mk: Fix inclusion order of files.
+
+2000-11-26 Keith Packard <keithp@keithp.com>
+
+ * src/type1/t1objs.c (T1_Init_Face): Compute style flags.
+
+2000-11-26 Werner Lemberg <wl@gnu.org>
+
+ * builds/compiler/ansi-cc.mk (CLEAN_LIBRARY): Fix rule and
+ conditional.
+
+2000-11-23 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs, parse_charstrings): Use decrypt
+ function from PSAux module.
+
+ * src/type1/t1parse.c (T1_Done_Parse): Renamed to...
+ (T1_Finalize_Parser): New function (to avoid name clash with a
+ function in the PSAux module).
+ (T1_Decrypt): Removed since it is duplicated in the PSAux module.
+ (T1_Get_Private_Dict): Added `psaux' as new parameter; use decrypt
+ function from PSAux module.
+
+ * src/type1/t1parse.h: Adapted.
+
+2000-11-22 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/cff/t2objs.c (T2_Init_Face): For pure CFF fonts, set
+ `root->num_faces' to `cff->num_faces' and set `units_per_EM'
+ to 1000.
+
+ * src/cff/t2parse.c (parse_t2_real): Fixed real number parsing
+ loop.
+
+ * src/cff/t2load.c (T2_Get_String): Called T2_Get_Name with a
+ sid that was off by one.
+
+2000-11-16 David Turner <david@freetype.org>
+
+ * src/autohint/ahtypes.h (AH_Hinter): Added new fields to control
+ auto-hinting of synthetic Type 1 fonts.
+
+ * src/autohint/ahhint.c (ah_hinter_load, ah_hinter_load_glyph):
+ Added auto-hinting support of synthetic Type 1 fonts.
+
+2000-11-12 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * src/sfnt/ttload.c (TT_LookUp_Table, TT_Load_Generic_Table): Change
+ tracing output.
+
+ * src/sfnt/sfobjs.c (SFNT_Load_Face): Set boolean variable
+ `has-outline' to true only if the font has a `glyf' or `CFF ' table.
+
+2000-11-11 Werner Lemberg <wl@gnu.org>
+
+ * builds/win32/visualc/freetype.dsp: Fix raster1->raster and
+ type1z->type1.
+
+2000-11-11 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * builds/unix/freetype-config.in, builds/cygwin/freetype-config.in:
+ Added a --libtool option. When freetype-config --libtool is
+ invoked, the absolute path to the libtool convenience library
+ is returned.
+
+2000-11-11 Werner Lemberg <wl@gnu.org>
+
+ * builds/cygwin/cygwin-def.in: Same fix as previous.
+
+2000-11-10 Tom Kacvinsky <tkacvins@freetype.org>
+
+ * builds/unix/unix-def.in: Add
+
+ INSTALL_PROGRAM := @INSTALL_PROGRAM@
+ INSTALL_SCRIPT := @INSTALL_SCRIPT@
+
+ so that installation of freetype-config does not fail.
+
+2000-11-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/cygwin/freetype-config.in, builds/unix/freetype-config.in:
+ Move test down for empty --exec-prefix.
+ Fix --version.
+
+ * builds/cygwin/install.mk, builds/unix/install.mk: Use
+ $(INSTALL_SCRIPT) for installation of freetype-config.
+
+ * builds/cygwin/install.mk: Fix clean target names.
+
+2000-11-09 David Turner <david@freetype.org>
+
+
+ * Version 2.0 released.
+ =======================
+
+----------------------------------------------------------------------------
+
+Copyright 2000, 2001, 2002, 2007 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/3party/freetype/ChangeLog.21 b/3party/freetype/ChangeLog.21
new file mode 100644
index 0000000000..d6371d1758
--- /dev/null
+++ b/3party/freetype/ChangeLog.21
@@ -0,0 +1,9439 @@
+2005-06-08 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.1.10 released.
+ ==========================
+
+
+ * src/pcf/readme: Renamed to...
+ * src/pcf/README: This.
+
+2005-06-07 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/*: Added copyright notes, reworked some comments.
+
+2005-06-05 Werner Lemberg <wl@gnu.org>
+
+ * Add copyright notices to all files which don't have one.
+
+ * docs/license.txt: Renamed to...
+ * docs/LICENSE.TXT: This.
+ * docs/FTL.txt: Renamed to...
+ * docs/FTL.TXT: This.
+ * docs/GPL.txt: Renamed to...
+ * docs/GPL.TXT: This.
+
+ * docs/PATENTS: Slightly reworded. Suggested by Sylvain Beucler
+ <beuc@gnu.org>.
+
+2005-06-04 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftimage.h (FT_Outline_MoveToFunc,
+ FT_Outline_LineToFunc, FT_Outline_ConicToFunc,
+ FT_Outline_CubicToFunc, FT_Raster_RenderFunc),
+ include/freetype/ftrender.h (FT_Glyph_TransformFunc,
+ FT_Renderer_RenderFunc, FT_Renderer_TransformFunc): Don't use
+ `const' to stay compatible with FreeType 2.1.9.
+
+2005-06-01 Adam D. Moss <adam@gimp.org>
+
+ * src/base/ftstroke.c (ft_stroker_inside): Revert `sigma' patch from
+ 2004-07-11; this gives much better results under normal
+ circumstances.
+
+2005-05-30 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Minor
+ documentation improvements.
+
+ * include/freetype/ftoutln.h (FT_Outline_Embolden): Fix typos.
+
+ * src/base/ftbitmap.c (FT_Bitmap_Embolden): Add support for bitmap
+ of pixel_mode FT_PIXEL_MODE_GRAY2 or FT_PIXEL_MODE_GRAY4.
+ If xstr is larger than 8 and bitmap is of pixel_mode
+ FT_PIXEL_MODE_MONO, set xstr to 8 instead of returning error.
+
+2005-05-29 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftbitmap.c (FT_Bitmap_Embolden): Fix emboldening bitmap
+ of mode FT_PIXEL_MODE_GRAY. Also add support for mode
+ FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V.
+ (ft_bitmap_assure_buffer): FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V
+ should have ppb (pixel per byte) 1.
+ Zero the padding when there's no need to allocate memory.
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle slot->advance
+ too.
+ More suited emboldening strength.
+
+2005-05-28 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftbitmap.c (FT_Bitmap_Embolden): Handle negative pitch.
+ Handle FT_PIXEL_MODE_GRAY with num_gray != 256.
+ Improve speed for FT_PIXEL_MODE_GRAY.
+ (ft_bitmap_assure_buffer): Accept FT_PIXEL_MODE_LCD and
+ FT_PIXEL_MODE_LCD_V.
+
+2005-05-27 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Initialize `error'.
+
+ * src/base/ftobjs.c (ft_cmap_done_internal): New function.
+ (FT_CMap_Done): Remove cmap from cmap list.
+ (destroy_charmaps, FT_CMap_New): Don't call FT_CMap_Done but
+ ft_cmap_done_internal.
+
+2005-05-26 Werner Lemberg <wl@gnu.org>
+
+ * docs/GPL.txt: Update postal address of FSF.
+
+2005-05-26 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Improve
+ documentation.
+
+ * src/base/ftsynth.c (FT_BOLD_THRESHOLD): Removed.
+ (FT_GlyphSlot_Embolden): Check whether slot is bitmap owner.
+ Always modify the metrics.
+
+2005-05-24 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2005-05-24 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): New declaration.
+
+ * include/freetype/ftoutln.h (FT_Outline_Embolden): New declaration.
+
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): New auxiliary
+ function.
+ (FT_Bitmap_Embolden): New function.
+
+ * src/base/ftoutln.c (FT_Outline_Embolden): New function.
+
+ * src/base/ftsynth.c: Don't include FT_INTERNAL_CALC_H and
+ FT_TRIGONOMETRY_H but FT_BITMAP_H.
+ (FT_GlyphSlot_Embolden): Use FT_Outline_Embolden or
+ FT_Bitmap_Embolden.
+
+2005-05-24 Werner Lemberg <wl@gnu.org>
+
+ * configure: Always remove config.mk, builds/unix/unix-def.mk, and
+ builds/unix/unix-cc.mk. This fixes repeated calls of the script.
+ Reported by Nelson Beebe and Behdad Esfahbod.
+
+ * README.CVS: Mention file permissions.
+
+2005-05-23 Werner Lemberg <wl@gnu.org>
+
+ * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk
+ (CFLAGS), builds/compiler/gcc.mk (CFLAGS): Remove
+ -fno-strict-aliasing.
+
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c --
+ it is currently loaded from ttsbit.c.
+
+2005-05-23 Behdad Esfahbod <behdad@cs.toronto.edu>
+
+ Say you have `(Foo*)x' and want to assign, pass, or return it as
+ `(Bar*)'. If you simply say `x' or `(Bar*)x', then the C compiler
+ would warn you that type casting incompatible pointer types breaks
+ strict-aliasing. The solution is to cast to `(void*)' instead which
+ is the generic pointer type, so the compiler knows that it should
+ make no strict-aliasing assumption on `x'. But the problem with
+ `(void*)x' is that seems like in C++, unlike C, `void*' is not a
+ generic pointer type and assigning `void*' to `Bar*' without a cast
+ causes an error. The solution is to cast to `Bar*' too, with
+ `(Bar*)(void*)x' as the result -- this is what the patch does.
+
+ * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP),
+ include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Remove
+ cast on lvalue, use a temporary pointer instead.
+ Cast temporarily to (void*) to not break strict aliasing.
+
+ * include/freetype/internal/ftmemory.h (FT_MEM_ALLOC,
+ FT_MEM_REALLOC, FT_MEM_QALLOC, FT_MEM_QREALLOC, FT_MEM_FREE),
+ src/base/ftglyph.c (FT_Glyph_To_Bitmap): Cast temporarily to (void*)
+ to not break strict aliasing.
+
+ * src/base/ftinit.c (FT_USE_MODULE): Fix wrong type information.
+
+ * builds/unix/configure.ac (XX_CFLAGS): Remove -fno-strict-aliasing.
+
+2005-05-23 David Turner <dturner@freetype.org>
+
+ Fix Savannah bug #12213 (incorrect behaviour of the cache sub-system
+ in low-memory conditions).
+
+ * include/freetype/cache/ftccache.h (FTC_CACHE_TRYLOOP,
+ 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.
+
+2005-05-23 Werner Lemberg <wl@gnu.org>
+
+ * src/base/rules.mk (BASE_SRC): Don't add ftsynth.c here but...
+ (BASE_EXT_SRC): Here.
+
+2005-05-22 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftrfork.c (raccess_guess_apple_generic): Mark
+ `version_number' and `entry_length' as unused.
+ (raccess_guess_linux_double_from_file_name): Remove `memory'.
+ (raccess_make_file_name): Mark `error' as unused.
+
+ * src/bdf/bdflib.c (_bdf_parse_properties): Remove `memory'.
+
+ * src/cid/cidobjs.c (cid_face_init): Remove `psnames'.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Remove `memory'.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints,
+ ft_var_readpackeddeltas, ft_var_load_avar): Mark `error' as unused.
+
+ * src/base/rules.mk (BASE_SRC): Add ftsynth.c.
+
+2005-05-21 David Turner <david@freetype.org>
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Fix a bug that
+ produced unpleasant artefacts when trying to embolden very sharp
+ corners.
+
+2005-05-20 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2005-05-20 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftbitmap.c: Don't include FT_FREETYPE_H and FT_IMAGE_H
+ but FT_BITMAP_H.
+ (FT_Bitmap_Copy): New function (from ftglyph.c).
+
+ * include/freetype/ftbitmap.h (FT_Bitmap_Copy): New public
+ definition.
+
+ * src/base/ftglyph.c: Include FT_BITMAP_H.
+ (ft_bitmap_copy): Move to ftbitmap.c.
+ (ft_bitmap_glyph_init): Remove `memory' variable.
+ Create new bitmap object if FT_GLYPH_OWN_BITMAP isn't set.
+ (ft_bitmap_glyph_copy): Use FT_Bitmap_Copy.
+ (ft_bitmap_glyph_done): Use FT_Bitmap_Done.
+ (ft_outline_glyph_init): Use FT_Outline_Copy.
+
+ * src/base/ftoutln.c (FT_Outline_Copy): Handle source == target.
+ (FT_Outline_Done_Internal): Check for valid `memory' pointer.
+ (FT_Outline_Translate, FT_Outline_Reverse, FT_Outline_Render,
+ FT_Outline_Transform): Check for valid `outline' pointer.
+
+ * src/base/ftobjs.c (FT_New_GlyphSlot): Prepend glyph slot to
+ face->glyph, otherwise a new second glyph slot cannot be created.
+ (FT_Done_GlyphSlot): Fix memory leak.
+ (FT_Open_Face): Updated -- face->glyph is already managed by
+ FT_New_GlyphSlot.
+
+ * src/type42/t42objs.c (T42_GlyphSlot_Done): Updated.
+
+2005-05-20 Kirill Smelkov <kirr@mns.spb.ru>
+
+ * include/freetype/ftimage.h (FT_Raster_Params),
+ include/freetype/ftoutln.h (FT_Outline_Translate,
+ FT_Outline_Transform), src/base/ftoutln.c (FT_Outline_Translate,
+ FT_Outline_Transform): Decorate parameters with `const' where
+ appropriate.
+ Update all callers.
+
+ * src/raster/ftraster.c (ft_black_reset), src/smooth/ftgrays.c
+ (gray_raster_reset): Remove `const' from `pool_base' argument.
+
+2005-05-18 Kirill Smelkov <kirr@mns.spb.ru>
+
+ * src/raster/ftmisc.h: New file. Only needed if ftraster.c is
+ compiled as stand-alone.
+
+ * src/raster/ftraster.c: Add comment how to compile as stand-alone.
+ s/FT_CONFIG_OPTION_STATIC_RASTER/FT_STATIC_RASTER/.
+ s/TT_STATIC_RASTER/FT_STATIC_RASTER/.
+ [_STANDALONE_]: Include ftimage.h and ftmisc.h.
+ (FT_TRACE1, FT_TRACE6, ft_memset, FT_MEM_ZERO): Define
+ conditionally.
+ (Render_Glyph, Render_Gray_Glyph): Return Raster_Err_None (or
+ Raster_Err_Unsupported).
+ (ft_black_new) [_STANDALONE_]: Fix type of `the_raster'.
+ (ft_black_init, ft_black_reset, ft_black_set_mode, ft_black_render):
+ Use `ras', not `raster'.
+ (ft_black_done): Use FT_UNUSED_RASTER.
+ (Horizontal_Sweep_Init, Horizontal_Sweep_Step,
+ Horizontal_Gray_Sweep_Span): Use FT_UNUSED_RASTER.
+
+2005-05-18 Werner Lemberg <wl@gnu.org>
+
+ * docs/announce: Start updating.
+
+ * docs/CHANGES: Updated.
+
+2005-05-16 Vitaliy Pasternak <v_a_pasternak@mail.ru>
+
+ * builds/win32/visualc/freetype.vcproj: Updated.
+ Exclude debug info for `Release' versions to reduce library size.
+
+2005-05-16 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Open_Face): Make it work as documented, this
+ is, ignore `aface' completely if face_index < 0. Reported by David
+ Osborn <spam@habitualhiatus.com>.
+
+2005-05-16 Kirill Smelkov <kirr@mns.spb.ru>
+
+ * include/freetype/ftimage.h (FT_Outline_MoveToFunc,
+ FT_Outline_LineTo_Func, FT_Outline_ConicToFunc,
+ FT_Outline_CubicToFunc), src/smooth/ftgrays.c (gray_render_conic,
+ gray_render_cubic, gray_move_to, gray_line_to, gray_conic_to,
+ gray_cubic_to, gray_render_span, gray_sweep): Decorate parameters
+ with `const' where appropriate.
+
+2005-05-11 Kirill Smelkov <kirr@mns.spb.ru>
+
+ * include/freetype/ftimage.h (FT_Raster_RenderFunc),
+ include/freetype/ftrender.h (FT_Glyph_TransformFunc,
+ FT_Renderer_Render_Func, FT_Renderer_TransformFunc),
+ src/base/ftglyph.c (ft_outline_glyph_transform),
+ src/raster/ftrend1.c (ft_raster1_transform, ft_raster1_render),
+ src/smooth/ftgrays.c (FT_Outline_Decompose, gray_raster_render),
+ src/smooth/ftsmooth.c (ft_smooth_transform,
+ ft_smooth_render_generic, ft_smooth_render, ft_smooth_render_lcd,
+ ft_smooth_render_lcd_v): Decorate parameters with `const' where
+ appropriate.
+
+ * src/raster/ftraster.c (RASTER_RENDER_POOL): Removed. Obsolete.
+ (ft_black_render): Decorate parameters with `const' where
+ appropriate.
+
+2005-05-11 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttcmap.c (tt_cmap4_set_range): Fix typo (FT_PEEK_SHORT ->
+ FT_PEEK_USHORT) which caused crashes. Reported by Ismail Donmez
+ <ismail@kde.org.tr>.
+
+2005-05-08 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE)
+ [__cplusplus]: Fix typo.
+
+2005-05-07 Werner Lemberg <wl@gnu.org>
+
+ Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck
+ Blaskey <listtarget@danbala.com>).
+
+ * src/sfnt/ttcmap.h (TT_CMap): Add member `unsorted'.
+ * src/sfnt/ttcmac.c: Use SFNT_Err_Ok where appropriate.
+
+ (tt_cmap0_validate, tt_cmap2_validate, tt_cmap6_validate,
+ tt_cmap8_validate, tt_cmap10_validate, tt_cmap12_validate): Use
+ `FT_Error' as return type.
+ (tt_cmap4_validate): Use `FT_Error' as return type.
+ Return error code for unsorted cmap.
+ (tt_cmap4_char_index, tt_cmap4_char_next): Use old code for unsorted
+ cmaps.
+ (tt_face_build_cmaps): Set `unsorted' variable in cmap.
+
+2005-05-07 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_get_location): Fix typo.
+
+2005-05-06 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Set ppem value in top
+ dictionary for SFNT-based CFF.
+
+2005-05-05 Werner Lemberg <wl@gnu.org>
+
+ Handle malformed `loca' table entries.
+
+ * docs/TODO: Add some bugs which should be fixed.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add `glyf_len'
+ element.
+
+ * src/truetype/ttpload.c (tt_face_load_loca): Get length of `glyf'
+ table.
+ (tt_face_get_location): Fix computation of `asize' for malformed
+ `loca' entries.
+
+2005-05-01 David Turner <david@freetype.org>
+
+ * Jamfile: Remove `otvalid' from the list of compiled modules.
+
+ * include/freetype/internal/ftserv.h: Add compiler pragmas to get
+ rid of annoying warnings with Visual C++ compiler in maximum warning
+ mode.
+
+ * src/autofit/afhints.c, src/autofit/aflatin.c, src/base/ftstroke.c,
+ src/bdf/bdfdrivr.c, src/cache/ftcbasic.c, src/cache/ftccmap.c,
+ src/cache/ftcmanag.c, src/cff/cffload.c, src/cid/cidload.c,
+ src/lzw/zopen.c, src/otvalid/otvgdef.c, src/pcf/pcfread.c,
+ src/sfnt/sfobjs.c, src/truetype/ttgxvar.c: Remove compiler warnings.
+
+2005-04-28 Werner Lemberg <wl@gnu.org>
+
+ * docs/TODO: Updated.
+
+2005-04-24 Werner Lemberg <wl@gnu.org>
+
+ * src/otvalid/otvcommn.c
+ (otv_GSUBGPOS_have_MarkAttachmentType_flag): Handle table == 0.
+
+2005-04-16 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Set default upem value in top
+ font dict also.
+ Handle font matrix settings in subfonts.
+
+ * src/cff/cffgload.c (cff_slot_load): Use the correct font matrix
+ for CID-keyed fonts with subfonts.
+
+ * docs/formats.txt: Updated.
+
+2005-04-14 Kirill Smelkov <kirr@mns.spb.ru>
+
+ * include/freetype/freetype.h (FT_Vector_Transform),
+ include/freetype/ftimage.h (FT_Raster_Params),
+ include/freetype/ftoutln.h, src/base/ftoutln.c (FT_Outline_Get_CBox,
+ FT_Outline_Copy, FT_Outline_Transform, FT_Vector_Transform,
+ FT_Outline_Get_Bitmap), src/raster/ftraster.c (ft_black_render),
+ src/smooth/ftgrays.c (gray_raster_render): Decorate parameters with
+ `const' where appropriate.
+
+2005-04-14 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_charstrings): Catch this non-standard
+ beginning of the /CharStrings dictionary:
+
+ /CharStrings 118 dict def
+ Private begin
+ CharStrings begin
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Fix arguments
+ to call of tt_sbit_decoder_load_bitmap.
+
+2005-04-13 Werner Lemberg <wl@gnu.org>
+
+ * docs/TODO: Updated.
+
+ * autogen.sh: Use `--force' for all commands.
+
+2005-04-09 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values
+ only if `fitted' is not zero.
+
+2005-04-06 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]:
+ Fix typo which sometimes causes wrong metrics for the last glyph.
+
+2005-04-04 David Turner <david@freetype.org>
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (FT_OPTIMIZE_MEMORY): Comment out this macro for the upcoming 2.1.10
+ release.
+ (*_CHESTER_*): Removed. No longer used.
+
+ * src/autofit/afhints.c (af_axis_hints_new_segment,
+ af_axis_hints_new_edge): Small tweak to use less heap memory.
+
+2005-04-03 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1parse.c (T1_New_Parser): Relax the check for a valid
+ first line in the font.
+
+2005-04-03 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES, include/freetype/freetype.h: Improve documentation
+ of FT_Set_Pixel_Sizes and FT_Set_Char_Size.
+
+2005-03-26 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/src/base/ftsystem.c (ft_amiga_stream_io): Fix buffer
+ offsets after a large read.
+
+2005-03-26 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afglobal.c (af_face_globals_get_metrics):
+ s/index/gidx/.
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Fix compiler
+ warnings.
+
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Add ttsbit0.c.
+
+ * src/sfnt/ttsbit0.h: Dummy file for build with `make'.
+
+2005-03-26 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ Update of the Amiga port.
+
+ * builds/amiga/makefile, builds/amiga/makefile.os4,
+ builds/amiga/smakefile: Included the base extension files
+ (ftbitmap.c, ftotval.c, ftpfr.c, ftstroke.c, ftxf86.c).
+
+2005-03-25 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ Update of the Amiga port.
+
+ * builds/amiga/makefile, builds/amiga/smakefile: Handle new modules.
+
+ * builds/amiga/makefile.os4: Makefile for AmigaOS4 SDK.
+
+ * builds/amiga/README: Updated.
+
+ * builds/amiga/include/freetype/config/ftconfig.h: Handle gcc for
+ AmigaOS4.
+
+ * builds/amiga/include/freetype/config/ftmodule.h: Handle new
+ modules.
+
+ * builds/amiga/src/base/ftdebug.c: Updated to current version of
+ default ftdebug.c.
+ Add various include files and macros to have proper support for
+ both AmigaOS4 and older AmigaOS versions.
+ Don't declare KVPrintF explicitly.
+ Replace getenv with GetVar.
+ Actually enable debugging code.
+
+ * builds/amiga/src/base/ftsystem.c: Major rewrite.
+
+2005-03-23 Werner Lemberg <wl@gnu.org>
+
+ * tests/*: Removed.
+
+2005-03-23 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES, docs/INSTALL.ANY: Updated.
+
+ * include/freetype/ftmoderr.h: Replace `Autohint' with `Autofit'.
+ Add `OTvalid'.
+
+ * src/autofit/aferrors.h: New file.
+
+ * src/autofit/afglobal.c, src/autofit/afhints.c,
+ src/autofit/aflatin.c, src/autofit/afloader.c: s/FT_Err_/AF_Err_/.
+ Include aferrors.h.
+
+ * src/autofit/rules.mk (AUTOF_DRV_H): Include aferrors.h.
+
+ * src/otvalid/otverror.h: s/FT_Mod_Err_OTV/FT_Mod_Err_OTvalid/.
+
+2005-03-22 David Turner <david@freetype.org>
+
+ * src/autohint/*: Removed.
+ * Jamfile: Updated.
+
+2005-03-15 David Turner <david@freetype.org>
+
+ * src/bdf/bdflib.c: Remove compiler warnings.
+ (hash_rehash, hash_init): Don't call FT_MEM_ZERO.
+ (_bdf_list_t): Add `memory' field.
+ (_bdf_list_init, _bdf_list_done, _bdf_list_ensure): New functions.
+ (_bdf_shift, _bdf_join): Rename to...
+ (_bdf_list_shift, _bdf_list_join): This.
+ (_bdf_split): Renamed to...
+ (_bdf_list_split): This. Use new functions.
+ (bdf_internal_readstream): Removed.
+ (NO_SKIP): New macro.
+ (_bdf_readstream): Rewritten.
+ (bdf_create_property, _bdf_add_comment): Improve allocation.
+ (_bdf_set_default_spacing, _bdf_parse_glyphs): Updated. Improve
+ allocation.
+ (_bdf_parse_properties, _bdf_parse_start): Updated.
+ (bdf_load_font): Updated to use new functions.
+
+ * src/type1/t1parse.c (check_type1_format): New function.
+ (T1_New_Parser): Use it to check font header before allocating
+ anything on the heap.
+
+ * src/type42/t42parse.c (t42_parser_init): Modify functions to check
+ the font header before allocating anything on the heap.
+
+ * include/freetype/internal/ftmemory.h (FT_ARRAY_MAX,
+ FT_ARRAY_CHECK): New macros.
+
+ * src/base/ftstream.c (FT_Stream_TryRead): New function.
+ * include/freetype/internal/ftstream.h: Updated.
+
+ * src/pcf/pcfread.c (pcf_read_TOC), src/pcf/pcfutil.c
+ (BitOrderInvert, TwoByteSwap, FourByteSwap): Minor fixes and
+ simplifications. Try to protect the PCF driver from doing stupid
+ things with broken fonts.
+
+ * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Check the LZW header before
+ doing anything else. This avoids unnecessary heap allocations
+ (400KByte of heap memory for the LZW decoder).
+
+ * src/gzip/ftgzip.c (FT_Stream_OpenGZip): Ditto for the gzip
+ decoder, although the code savings are smaller.
+
+ * docs/CHANGES: Updated.
+
+2005-03-10 David Turner <david@freetype.org>
+
+ * src/tools/glnames.py: Add comment to explain the compression
+ being used for the Adobe Glyph List.
+
+2005-03-10 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_load_cvt, tt_face_load_fpgm):
+ Fix serious typo which prevented correct TT rendering.
+
+ * include/freetype/internal/ftmemory.h: Undo change from 2005-03-03.
+ To suppress warnings it is sufficient to use `-fno-strict-aliasing'.
+
+2005-03-10 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/glnames.py: Formatted.
+ Format output to be in sync with other FreeType code.
+ Import `re' and `os.path'.
+ (StringTable) <__init__>: Add parameter to initialize master table
+ name.
+ (StringTable) <dump>: Don't pass master table name.
+ (StringTable) <dump_sublist>: Emit explanatory comment.
+ Simplify and make output more human readable.
+ (t1_bias, glyph_list, adobe_glyph_names): Removed. Unused.
+ (main): Use `basename' for file name in header.
+
+ * src/psnames/pstables.h: Regenerated.
+
+2005-03-09 David Turner <david@freetype.org>
+
+ * src/tools/glnames.py: Rewrite the generator for the `pstables.h'
+ header file which contains various constant tables related to glyph
+ names. It now uses a different, more compact storage scheme that
+ saves about 20KB. This also closes Savannah bug #12262.
+
+ * src/psnames/pstables.h: Regenerated.
+
+ * src/psnames/psmodule.c (ps_unicode_value): Use
+ `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
+ more carefully. This fixes Savannah bug #12263.
+
+2005-03-06 David Turner <david@freetype.org>
+
+ * src/otvalid/otvgsub.c, src/otvalid/otvgpos.c: Make static tables
+ constant.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init): Fix Savannah bug
+ #12212 (auto-hinter refuses to work if no Unicode charmap in font).
+
+2005-03-05 Werner Lemberg <wl@gnu.org>
+
+ * autogen.sh: New script for bootstrapping.
+
+ * README.CVS: New file which documents bootstrapping.
+
+ * builds/unix/aclocal.m4, builds/unix/config.guess,
+ builds/unix/config.sub, builds/unix/configure,
+ builds/unix/ltmain.sh: Removed.
+
+2005-03-04 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftutil.c: Include FT_INTERNAL_OBJECTS_H.
+
+2005-03-03 Werner Lemberg <wl@gnu.org>
+
+ Various fixes for C and C++ compiling.
+
+ * src/autofit/*: Add copyright messages.
+
+ * src/autofit/afhints.c (af_glyph_hints_done): Don't use
+ `AF_Dimension' but `int' for loop counter.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths): Don't use
+ `AF_Dimension' but `int' for loop counter.
+ Use proper enumeration value for `render_mode'.
+ (af_latin_metrics_scale_dim): Don't shadow variables.
+ (af_latin_hints_compute_segments): Use proper cast for `major_dir'
+ and `segment_dir'.
+ (af_latin_align_linked_edge, af_latin_hint_edges): Fix arguments of call to
+ `af_latin_compute_stem_width'.
+ (af_latin_hints_apply): Don't use `AF_Dimension' but `int' for loop
+ counter.
+
+ * src/base/ftdbgmem.c (ft_mem_table_get_source, FT_DumpMemory): Use
+ proper cast for memory allocation.
+
+ * src/cff/cffdrivr.c (cff_get_kerning): Use proper cast for
+ initialization of `sfnt'.
+
+ * src/sfnt/sfdriver.c: Include `ttkern.h'.
+
+ * src/sfnt/ttkern.c (tt_face_get_kerning): Don't shadow variables.
+
+ * src/truetype/ttgload.c: Include `ttpload.h'.
+
+2005-03-03 David Turner <david@freetype.org>
+
+ * include/freetype/internal/ftmemory.h (FT_ALLOC, FT_REALLOC,
+ FT_QALLOC, FT_QREALLOC) [gcc >= 3.3]: Provide macro versions which
+ avoid compiler warnings.
+ (FT_NEW, FT_NEW_ARRAY, FT_RENEW_ARRAY, FT_QNEW, FT_QNEW_ARRAY,
+ FT_QRENEW_ARRAY, FT_ALLOC_ARRAY, FT_REALLOC_ARRAY): Updated.
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE,
+ FT_FACE_FIND_GLOBAL_SERVICE, FT_FACE_LOOKUP_SERVICE) [__cplusplus]:
+ Provide macro versions which avoid compiler warnings.
+
+ * src/base/ftutil.c (ft_highpow2): New utility function.
+
+ * include/freetype/internal/ftobjs.h: Updated.
+
+ * src/pfr/pfrload.c (pfr_get_gindex, pfr_compare_kern_pairs,
+ pfr_sort_kerning_pairs): Don't define if FT_OPTIMIZE_MEMORY is set.
+ (pfr_phy_font_done): Don't handle `kern_pairs' if FT_OPTIMIZE_MEMORY
+ is set.
+ (pfr_phy_font_load): Don't call `pfr_sort_kerning_pairs' if
+ FT_OPTIMIZE_MEMORY is set.
+
+ * src/pfr/pfrobjs.c (pfr_slot_load): Comment out some code which
+ doesn't work with broken fonts.
+ (pfr_face_get_kerning) [FT_OPTIMIZE_MEMORY]: Implement.
+
+ * src/pfr/pfrtypes.h (PFR_KernItemRec): Optimize member types.
+ (PFR_NEXT_KPAIR): New macro.
+ (PFR_PhyFontRec): Don't define `kern_pairs' if FT_OPTIMIZE_MEMORY is
+ set.
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Introduce
+ temporary variable to avoid gcc warning.
+ (tt_face_load_sbit_image): Mark unused variables with FT_UNUSED.
+
+ * src/truetype/ttpload.c (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]:
+ Remove redundant variable.
+
+ * include/freetype/config/ftmodule.h: Moving the order of drivers to
+ speed up font loading. The PCF and BDF loaders are still slow and
+ consume far too much memory.
+
+2005-03-03 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h: Updated to recent changes.
+
+2005-03-02 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afdummy.c, src/autofit/afdummy.h
+ (af_dummy_script_class): Fix type.
+
+ * src/autofit/aflatin.c, src/autofit/aflatin.h
+ (af_latin_script_class): Fix type.
+
+ * src/autofit/rules.mk (AUTOF_DRV_SRC): Fix typo.
+
+2005-03-01 David Turner <david@freetype.org>
+
+ * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning),
+ src/sfnt/ttsbit0.c (tt_face_load_sbit_strikes,
+ tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_compound,
+ tt_sbit_decoder_load_image), src/sfnt/ttload.c
+ (tt_face_load_metrics): Remove compiler warnings
+ -- redundant variables, missing initializations, etc.
+
+ * src/sfnt/ttsbit.h: Handle FT_OPTIMIZE_MEMORY.
+
+ * src/autofit/rules.mk, src/autofit/module.mk,
+ src/autofit/afangles.h: New files.
+
+ * src/autofit/afhints.c (af_axis_hints_new_segment,
+ af_axis_hints_new_edge): New functions.
+ (af_glyph_hints_done): Do proper deallocation.
+ (af_glyph_hints_reload): Only reallocate points array. This
+ drastically reduces heap usage.
+
+ * src/autofit/afhints.h (AF_PointRec, AF_SegmentRec): Optimize
+ member types and positions.
+ (AF_AxisHintsRec): Add `max_segments' and `max_edges'.
+ (af_axis_hints_new_segment, af_axis_hints_new_edge): New prototypes.
+
+ * src/autofit/aflatin.c (af_latin_metricsc_scale): Don't call
+ AF_SCALER_EQUAL_SCALES.
+ (af_latin_hints_compute_segments): Change return type to FT_Error.
+ Update all callers.
+ Improve segment allocation.
+ (af_latin_hints_compute_edges): Change return type to FT_Error.
+ Update all callers.
+ Improve edge allocation and link handling.
+ (af_latin_hints_detect_features): Change return type to FT_Error.
+ Update all callers.
+
+ * src/autofit/aflatin.h: Updated.
+
+ * src/autofit/afloader.c (af_loader_load_g)
+ <FT_GLYPH_FORMAT_OUTLINE>: Assure axis->num_edges > 1. This fixes
+ a bug with certain fonts.
+
+ * include/freetype/config/ftmodule.h: The auto-fitter is now the
+ only supported auto-hinting module.
+
+ * include/freetype/config/ftstdlib.h (FT_INT_MAX): New macro.
+
+2005-02-28 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_load_loca): Fix typo.
+
+ * src/sfnt/ttkern.c: Include `ttkern.h'.
+ (FT_COMPONENT): Updated.
+
+ * include/freetype/internal/fttrace.h: Add entry for `ttkern'.
+
+ * src/sfnt/ttsbit0.c: s/FT_Err_/SFNT_Err_/.
+ Decorate constants with `U' and `L' where necessary.
+
+ * src/sfnt/ttcmap.c (tt_cmap4_next): Remove unused variable.
+
+2005-02-28 David Turner <david@freetype.org>
+
+ * src/base/ftdbgmem.c (FT_DumpMemory): Added sorting of memory
+ sources according to decreasing maximum cumulative allocations.
+ (ft_mem_source_compare): New auxiliary function.
+
+ * src/sfnt/ttsbit0.c: New file, implementing a heap-optimized
+ embedded bitmap loader.
+
+ * src/sfnt/ttsbit.c: Include `ft2build.h', FT_INTERNAL_DEBUG_H,
+ FT_INTERNAL_STREAM_H, FT_TRUETYPE_TAGS_H.
+ Load `ttsbit0.c' if FT_OPTIMIZE_MEMORY is set, otherwise use
+ file contents.
+ (tt_face_load_sbit_strikes): Set up root fields to indicate the
+ strikes. This fixes Savannah bug #12107.
+ Use `static' keyword for `sbit_line_metrics_field',
+ `strike_start_fields', `strike_end_fields'.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Define
+ `sbit_table', `sbit_table_size', `sbit_num_strikes' if
+ FT_OPTIMIZE_MEMORY is set.
+ Don't define `num_sbit_strikes' and `sbit_strikes' if
+ FT_OPTIMIZE_MEMORY is set.
+
+ * src/cff/cffobjs.c (sbit_size_reset): Handle FT_OPTIMIZE_MEMORY.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Fixed bug that prevented
+ loading SFNT fonts without a `kern' table.
+ Properly pass root->face_flags.
+ Remove code for TT_CONFIG_OPTION_EMBEDDED_BITMAPS.
+
+ * src/sfnt/sfdriver.c (sfnt_interface)
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Don't use `tt_find_sbit_image'
+ and `tt_load_sbit_metrics'.
+
+ * src/sfnt/ttcmap.c: Optimize linear charmap scanning for Format 4.
+ (OPT_CMAP4): New macro.
+ (TT_CMap4Rec) [OPT_CMAP4]: New structure.
+ (tt_cmap4_init, tt_cmap4_set_range, tt_cmap4_next, tt_cmap4_reset)
+ [OPT_CMAP4]: New functions.
+ (tt_cmap4_char_next) [OPT_CMAP4]: Use `tt_cmap4_next' and
+ `tt_cmap4_reset'.
+ (tt_cmap4_class_rec) [OPT_CMAP4]: Use `TT_CMap4Rec' and
+ `tt_cmap4_init'.
+
+ * src/truetype/ttobjs.c (Reset_SBit_Size): Handle
+ FT_OPTIMIZE_MEMORY.
+
+ * src/autofit/afhints.h (AF_PointRec, AF_SegmentRec, AF_EdgeRec):
+ Optimize member types.
+
+ * src/autofit/afloader.c (af_loader_done): Call
+ `af_glyph_hints_done'.
+
+2005-02-27 David Turner <david@freetype.org>
+
+ * src/sfnt/ttkern.c (tt_face_load_kern): Fix a small bug which
+ caused invalid (random) return values for the horizontal kerning.
+
+2005-02-25 David Turner <david@freetype.org>
+
+ Implement several memory optimizations to drastically reduce the
+ heap usage of FreeType, especially in the case of memory-mapped
+ files. The idea is to avoid loading and decoding tables in the
+ heap, and instead access the raw data whenever possible (i.e., when
+ it doesn't compromise performance).
+
+ This has several benefits: For example, opening vera.ttf now uses
+ just a small amount of memory (even when the FT_Library footprint is
+ accounted for), until you start loading glyphs. Even then, you save
+ at least 20KB compared to the non-optimized case. Performance of
+ various operations, including open and close, has also been
+ dramatically improved.
+
+ More optimizations to come, especially for the auto-hinter.
+
+ * include/freetype/internal/sfnt.h (TT_Face_GetKerningFunc): New
+ function type.
+ (SFNT_Interface): Add it.
+
+ * include/freetype/internal/tttypes.h (TT_HdmxEntryRec, TT_HdmxRec,
+ TT_Kern0_PairRec): Don't define if FT_OPTIMIZE_MEMORY is set.
+ (TT_FaceRec): Define `horz_metrics', `horz_metrics_size',
+ `vert_metrics', `vert_metrics_size', `hdmx_table',
+ `hdmx_table_size', `hdmx_record_count', `hdmx_record_size',
+ `hdmx_record_sizes', `kern_table', `kern_table_size,
+ `num_kern_tables', `kern_avail_bits', `kern_order_bits' if
+ FT_OPTIMIZE_MEMORY is set.
+ Don't define `hdmx', `num_kern_pairs', `kern_table_index',
+ `kern_pairs' if FT_OPTIMIZE_MEMORY is set.
+
+ * src/base/ftdbgmem.c (ft_mem_table_set): Don't shadow variable.
+ Fix compiler warning.
+
+ * src/cff/cffdrivr.c (Get_Kerning): Renamed to...
+ (cff_get_kerning): This. Simplify.
+ (cff_driver_class): Updated.
+
+ * src/sfnt/Jamfile (_sources): Add `ttkern'.
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `ttkern.c'.
+
+ * src/sfnt/sfdriver.c (sfnt_interface): Add `tt_face_get_kerning'.
+
+ * src/sfnt/sfnt.c: Include `ttkern.c'.
+
+ * src/sfnt/sfobjs.c: Include `ttkern.h'.
+ (sfnt_load_face): Consider the `kern' and `gasp' table as optional.
+ (sfnt_done_face): Call `tt_face_done_kern'.
+ Handle horizontal metrics for FT_OPTIMIZE_MEMORY.
+
+ * src/sfnt/ttkern.c, src/sfnt/ttkern.h: New files. Code has been
+ taken from `ttload.c' and `ttload.h'.
+ Provide special versions of `tt_face_load_kern',
+ `tt_face_get_kerning', and `tt_face_done_kern' for
+ FT_OPTIMIZE_MEMORY.
+
+ * src/sfnt/ttload.c (tt_face_load_metrics, tt_face_load_hdmx,
+ tt_face_free_hdmx): Provide version for FT_OPTIMIZE_MEMORY.
+ (tt_face_load_kern, tt_kern_pair_compare, TT_KERN_INDEX): Moved to
+ `ttkern.c'.
+
+ * src/sfnt/ttload.h: Updated.
+
+ * src/sfnt/ttsbit.c (sbit_metrics_field): Add `static' keyword.
+
+ * src/truetype/ttdriver.c (Get_Kerning): Renamed to...
+ (tt_get_kerning): This. Simplify.
+ (tt_driver_class): Updated.
+
+ * src/truetype/ttgload.c (TT_Get_Metrics): Renamed to...
+ (tt_face_get_metrics): This. Provide version for FT_OPTIMIZE_MEMORY.
+ Update all callers.
+ (Get_Advance_Widths): Replaced with...
+ (Get_Advance_WidthPtr): This. Provide version for
+ FT_OPTIMIZE_MEMORY.
+ Update all callers.
+
+ * src/truetype/ttgload.h: Updated.
+
+2005-02-22 David Turner <david@freetype.org>
+
+ * src/base/ftdbgmem.c: Partly rewritten. Added the ability to list
+ all allocation sites in the memory debugger. Also a new function
+ FT_DumpMemory() was added. It is only available in builds with
+ FT_DEBUG_MEMORY defined, and you must declare it in your own code to
+ use it, i.e., with something like:
+
+ extern void FT_DumpMemory( FT_Memory );
+
+ ...
+
+ FT_DumpMemory( memory );
+
+ * include/freetype/config/ftoption.h
+ (TT_CONFIG_OPTION_BYTECODE_INTERPRETER): Comment out definition --
+ again.
+ (FT_OPTIMIZE_MEMORY): New configuration macro to control various
+ optimizations for reducing the heap footprint of memory-mapped
+ TrueType files.
+
+ * include/freetype/internal/ftmemory.h (FT_ARRAY_ZERO): New
+ convenience macro.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec)
+ [FT_OPTIMIZE_MEMORY]: Use optimized types for `num_locations' and
+ `glyph_locations'.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Call
+ `tt_face_get_location'.
+
+ * src/truetype/ttobjs.c (tt_face_init)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Improve error handling.
+ (tt_face_done): Call `tt_face_done_loca'.
+
+ * src/truetype/ttpload.c (tt_face_get_location, tt_face_done_loca):
+ New functions. If FT_OPTIMIZE_MEMORY is set, the locations table is
+ read directly from memory-mapped streams, instead of being decoded
+ into the heap.
+ (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]: New implementation.
+ (tt_face_load_cvt, tt_face_load_fpgm): Only load table if the
+ bytecode interpreter is compiled in.
+
+ * src/truetype/ttpload.h: Updated.
+
+ * src/autohint/ahglyph.c (ah_outline_load): Improve allocation
+ logic.
+
+2005-02-20 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.5.14.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.9.4.
+
+ * builds/unix/config.guess, builds/unix/config.sub: Updated from
+ `config' CVS module at subversions.gnu.org.
+
+ * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
+ `texinfo' CVS module at subversions.gnu.org.
+
+2005-02-14 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Don't try to build
+ a cmap for a CID-keyed font which doesn't have SIDs.
+
+2005-02-13 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (read_binary_data): Return more meaningful
+ value.
+ (parse_encoding, parse_subrs, parse_charstrings, parse_dict): Check
+ parser error value after call to T1_Skip_PS_Token (where necessary).
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Check parser error
+ value after call to T1_Skip_PS_Token.
+
+ * src/cid/cidparse.c (cid_parser_new): Check parser error value
+ after call to cid_parser_skip_PS_token.
+
+ * src/type42/t42parse.c (t42_parse_encoding, t42_parse_sfnts,
+ t42_parse_charstrings, t42_parse_dict): Check parser error value
+ after call to T1_Skip_PS_Token (where necessary).
+
+ * src/psaux/psobjc.c (skip_string, ps_parser_skip_PS_token,
+ ps_tobytes): Add error messages.
+
+2005-02-12 Werner Lemberg <wl@gnu.org>
+
+ * configure: Output more variables to the created Makefile so that
+ it can be used for ft2demos also (if the FT2DEMOS variable is
+ defined).
+
+2005-02-10 David Turner <david@freetype.org>
+
+ * src/pfr/pfrgload.c (pfr_glyph_load): Fix an unbounded growing
+ dynamic array when loading a glyph from a PFR font (Savannah bug
+ #11921).
+
+ * src/base/ftbitmap.c (FT_Bitmap_Convert): Small improvements to the
+ conversion function (mainly stupid optimization).
+
+ * src/base/Jamfile: Adding ftbitmap.c to the list of compiled files.
+
+2005-02-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype-config.in: Add new flag `--ftversion' to
+ return the FreeType version. Suggested by George Williams
+ <gww@silcom.com>.
+
+ * docs/CHANGES: Updated.
+
+2005-02-09 Werner Lemberg <wl@gnu.org>
+
+ * src/otvalid/otvmod.c (otv_validate): Deallocate arrays in case
+ of error. Reported by YAMANO-UCHI Hidetoshi <mer@din.or.jp>.
+
+2005-02-08 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_closepath>: Accept `T1_Parse_Have_Moveto' state also which can
+ happen in empty glyphs. Reported by Ian Brown
+ <ian.brown@printsoft.de> (Savannah bug #11856).
+
+2005-02-04 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/*: Removed. Obsolete.
+
+2004-12-28 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.5.10.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.9.4.
+ * builds/unix/configure: Regenerated with autoconf 2.59b.
+
+ * builds/unix/config.guess, builds/unix/config.sub: Updated from
+ `config' CVS module at subversions.gnu.org.
+
+ * builds/unix/install-sh: Updated from
+ `texinfo' CVS module at subversions.gnu.org.
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Add proper cast for
+ ft_alloc.
+ Fix compiler warning.
+
+2004-12-27 Dirck Blaskey <listtarget@danbala.com>
+
+ * src/cff/cffobjs.c (cff_face_init): Improve computation of
+ FT_STYLE_BOLD_FLAG.
+
+2004-12-27 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): A CFF within an SFNT can have
+ only a single font. This is undocumented but has been verified on
+ the opentype list.
+
+2004-12-26 Werner Lemberg <wl@gnu.org>
+
+ * Jamfile (FT2_COMPONENTS): Add `otvalid'.
+
+2004-12-25 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbitmap.c (FT_Bitmap_Convert): Fix compiler warning.
+
+2004-12-15 Werner Lemberg <wl@gnu.org>
+
+ * vms_make.com: Add ftbitmap.obj.
+
+2004-12-14 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbitmap.c, include/freetype/ftbitmap.h: New files for
+ handling various bitmap formats.
+
+ * include/freetype/config/ftheader.h (FT_BITMAP_H): New macro.
+
+ * src/base/rules.mk (BASE_EXT_SRC): Add ftbitmap.c.
+
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Don't convert bitmaps to 8bpp
+ but return them as-is.
+
+ * docs/CHANGES: Mention new bitmap API.
+ * include/freetype/ftchapter.s: Updated.
+
+2004-12-11 Robert Clark <freetype@ratty.org.uk>
+
+ * src/base/ftobjs.c (FT_Get_Kerning): Make kerning amount
+ dependent on ppem by scaling down for ppem < 25, then do normal
+ rounding. This gives slightly better results than rounding towards
+ zero.
+
+2004-12-09 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Get_Kerning): Always round towards zero
+ for FT_KERNING_DEFAULT. This greatly enhances the kerning for
+ small ppem values.
+
+2004-12-08 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (ft_glyphslot_clear): Reset `lsb_delta' and
+ `rsb_delta'.
+
+2004-12-05 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/install.mk (install): Use $(OBJ_BUILD) for ftconfig.h.
+
+2004-12-03 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * include/freetype/ttnameid.h: Updated to latest
+ specifications from Microsoft.
+
+2004-11-26 Jouk Jansen <joukj@hrem.stm.tudelft.nl>
+
+ * vms_make.com: Include ftbbox.c.
+ Fix `ccopt'.
+ Handle `otvalid' module.
+ Update `vmslib.dat' default values.
+ Fixes to `libs.opt'.
+
+2004-11-23 Anders Kaseorg <anders@kaseorg.com>
+
+ * src/base/ftoutln.c (FT_OrientationExtremumRec,
+ ft_orientation_extremum_compute): Removed.
+ (FT_Outline_Get_Orientation): Rewritten, simplified.
+
+ * src/autohint/ahglyph.c: Include FT_OUTLINE_H.
+ (ah_test_extremum, ah_get_orientation): Removed.
+ (ah_outline_load): Use FT_Outline_Get_Orientation.
+
+ * src/base/ftsynth.c (ft_test_extrama, ft_get_orientation): Removed.
+ (FT_GlyphSlot_Embolden): Use FT_Outline_Get_Orientation.
+
+2004-11-23 Fernando Papa <fpapa@netgate.com.uy>
+
+ * src/truetype/ttinterp.h: Fix typo.
+
+2004-11-22 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * builds/win32/detect.mk: Corrected logic that detects Windows NT to
+ use the previous change even if win32 is forced. Corrected
+ detection of win32 on Win9X.
+
+ * builds/dos/detect.mk: Added same correction as for win32 about
+ COPY on Windows NT. Detection of plain DOS 7.x.
+
+2004-11-22 Werner Lemberg <wl@gnu.org>
+
+ * builds/detect.mk: Undo change from 2004-11-20.
+ * builds/win32/detect.mk: If the `OS' environment variable contains
+ `Windows_NT', use `cmd.exe /c copy' for copying files.
+
+2004-11-20 Werner Lemberg <wl@gnu.org>
+
+ * builds/detect.mk (dos_setup): Use `cmd.exe' for copying
+ $(CONFIG_MK) to force lowercase file name under Windows.
+
+2004-11-19 Werner Lemberg <wl@gnu.org>
+
+ Fix a serious bug in the TT hinter.
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Don't shift
+ points vertically before hinting.
+
+ * docs/CHANGES: Updated.
+
+ * src/cache/ftcglyph.c (FTC_GNode_UnselectFamily,
+ FTC_GCache_Lookup): A new try to fix comparison with zero.
+
+2004-11-16 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.ac: Add `-fno-strict-aliasing' if gcc is
+ used.
+ * builds/unix/configure: Regenerated.
+ * builds/unix/config.guess, builds/unix/config.sub: Updated from
+ `config' CVS module at subversions.gnu.org.
+
+2004-11-16 Dr. Martin P.J. Zinser <zinser@decus.de>
+
+ * src/cache/ftcglyph.c (FTC_GNode_UnselectFamily,
+ FTC_GCache_Lookup): Fix comparison with zero.
+
+ * docs/INSTALL.VMS: Updated.
+
+ * vms_make.com: Updated. All `descrip.mms' files are now created
+ automatically.
+
+ * src/*/descrip.mms: Removed.
+
+2004-11-16 Owen Taylor <otaylor@redhat.com>
+
+ * builds/unix/freetype-config.in: Suppress -L$libdir for
+ /usr/lib64 as well as /usr/lib. (Reported by Dan Winship -
+ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=139199)
+
+2004-11-11 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffdrivr.c (cff_service_ps_info): Updated.
+ * src/cid/cidriver.c (cid_service_ps_info): Updated.
+ * src/type42/t42drivr.c (t42_ps_get_font_private): New function.
+ (t42_service_ps_info): Updated.
+
+ * src/type42/t42parse.c (t42_parse_dict): Remove compiler warning.
+
+2004-11-11 David Bevan <dbevan@emtex.com>
+
+ Add new function FT_Get_PS_Font_Private().
+
+ * include/freetype/internal/services/svpsinfo.h
+ (PS_GetFontPrivateFunc): New service function.
+
+ * include/freetype/t1tables.h, src/base/fttype1.c
+ (FT_Get_PS_Font_Private): New function.
+
+ * src/type1/t1driver.c (t1_ps_get_font_private): New function.
+ (t1_service_ps_info): Updated.
+
+2004-10-13 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftstdlib.h: Include `stddef.h'.
+ (ft_ptrdiff_t): Define.
+
+ * include/freetype/fttypes.h (FT_PtrDist): Use `ft_ptrdiff_t'.
+
+ * src/cid/cidload.c (cid_parse_dict), src/type1/t1load.c
+ (parse_dict): Fix compiler warning.
+
+2004-10-11 Joshua Neal <jneal@csdaily.com>
+
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Check for pointer
+ overflow.
+
+ * src/sfnt/ttload.c (tt_face_load_hdmx): Protect against bad input.
+ Don't use FT_QNEW_ARRAY but FT_NEW_ARRAY to make deallocation work
+ in case of failure.
+
+ * src/sfnt/ttsbit.c (Load_SBit_Range): Check range intervals.
+ (tt_face_load_sbit_strikes): Allocate `strike_sbit_ranges' after
+ frame test.
+
+ * src/truetype/ttgload.c (TTLoad_Simple_Glyph): Add assertion for
+ `flag'.
+
+2004-10-09 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-10-09 Boris Letocha <b.letocha@cz.gmc.net>
+
+ Fix handling of NPUSHW if skipped in data stream.
+
+ * src/truetype/ttinterp.c (opcode_length): Set value for NPUSHW
+ to -2.
+ (SkipCode, TT_RunIns): Use opcode_length value for computation of
+ bytes to be skipped.
+
+2004-09-10 Jouk Jansen <joukj@hrem.stm.tudelft.nl>
+
+ * vms_make.com: Updated.
+
+2004-09-09 Werner Lemberg <wl@gnu.org>
+
+ Adding OpenType validation module. The code is based on the
+ (unfinished) `otlayout' module but has been heavily modified to make
+ it much more compact.
+
+ * src/otvalid/*: New module.
+
+ * include/freetype/ftotval.h, src/base/ftotval.c,
+ include/freetype/internal/services/svotval.h: New files.
+
+ * include/freetype/config/ftmodule.h: Add otv_module_class.
+ * include/freetype/config/ftheader.h (FT_OPENTYPE_VALIDATE_H): New
+ macro.
+ * include/freetype/internal/ftserv.h
+ (FT_SERVICE_OPENTYPE_VALIDATE_H): New macro.
+ * include/freetype/internal/fttrace.h (otvmodule, otvcommon,
+ otvbase, otvgdef, otvgpos, otvgsub, otvjstf): New trace components.
+
+ * include/freetype/ftchapters.h: Updated.
+
+ * src/base/Jamfile (Library), src/base/descrip.mms (OBJS),
+ src/base/rules.mk (BASE_EXT_SRC): Updated.
+
+ * docs/CHANGES: Updated.
+
+2004-09-08 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/docmaker/sources.py (re_source_block_format2) <column>:
+ Use lookahead assertion to not match `*/'. This removes spurious
+ insertions of `/' in the HTML output.
+
+2004-09-07 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Fix call to
+ FT_NEW_ARRAY.
+
+2004-09-04 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftobjs.h: Don't include
+ FT_CONFIG_STANDARD_LIBRARY_H.
+ (FT_Validator, FT_ValidationLevel, FT_ValidatorRec, FT_VALIDATOR,
+ ft_validator_init, ft_validator_run, ft_validator_error, FT_INVALID,
+ FT_INVALID_TOO_SHORT, FT_INVALID_OFFSET, FT_INVALID_FORMAT,
+ FT_INVALID_GLYPH_ID, FT_INVALID_DATA): Move to...
+
+ * include/freetype/internal/ftvalid.h: New file.
+ Make FT_INVALID return module-specific error codes.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_VALIDATE_H): New
+ macro.
+
+ * include/freetype/fterrors.h: Undefine FT_ERR_PREFIX only if
+ FT_KEEP_ERR_PREFIX isn't defined.
+
+ * src/base/ftobjs.c: Include FT_INTERNAL_VALIDATE_H.
+
+ * src/sfnt/ttcmap.h: Don't include FT_INTERNAL_OBJECTS_H but
+ FT_INTERNAL_VALIDATE_H.
+
+ * src/sfnt/ttcmap.c: Don't include FT_INTERNAL_OBJECTS_H but
+ FT_INTERNAL_VALIDATE_H.
+ Include sferrors.h before FT_INTERNAL_VALIDATE_H.
+ s/FT_Err_Ok/SFNT_Err_Ok/.
+
+ * src/sfnt/sferrors.h: Define FT_KEEP_ERR_PREFIX.
+
+ * src/type1/t1afm.c: Include t1errors.h.
+
+2004-09-03 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftdebug.c (ft_debug_init): Highest debug level is 7,
+ not 6.
+ * docs/DEBUG: Updated.
+
+2004-08-30 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/tttags.h (TTAG_BASE, TTAG_GDEF, TTAG_GPOS,
+ TTAG_JSTF): New tags.
+
+ * include/freetype/fttypes.h (FT_Bytes, FT_Tag): New typedefs.
+ (FT_Int): Add `signed'.
+
+2004-08-29 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otlgpos.c (otl_gpos_subtable_validate): Add argument
+ to pass number of lookups.
+ Update all callers.
+ Don't call otl_lookup_list_validate but otl_lookup_validate.
+ (otl_gpos_validate): Call otl_lookup_list_validate instead of
+ otl_gpos_subtable_validate.
+
+ * src/otlayout/otlgpos.h: Updated.
+
+ * src/otlayout/otljstf.c (otl_jstf_max_validate): Add argument to
+ pass number of lookups.
+ Update all callers.
+
+
+ * src/cff/cffparse.c (cff_parse_real): s/exp/exponent/ to avoid
+ compiler warning.
+
+
+ * src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h: Renamed to...
+ * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: This.
+ * src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
+ src/sfnt/sfnt.c, src/sfnt/sfobjs.c: Updated.
+
+
+ * builds/compiler/gcc-dev.mk (CFLAGS): Don't add `-Wnested-externs'
+ if compiler is g++ (v3.3.3 emits a warning otherwise).
+
+2004-08-28 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otlgpos.c (otl_value_length): Return number of bytes,
+ not number of 16bit entities.
+ (otl_gpos_lookup2_validate): Check class definition tables for
+ format 2.
+ Fix loop for format 2.
+ (otl_liga_mark2_validate): Fix offset for otl_anchor_validate.
+
+2004-08-27 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftmac.c: Don't include truetype/ttobjs.h.
+ Don't include type1/t1objs.h.
+ (FT_New_Face_From_FSSpec) [!__MWERKS__]: Remove compiler warnings.
+
+2004-08-27 Mathieu Malaterre <mathieu@malaterre.com>
+
+ * src/base/ftmac.c: Handle OS_INLINE for xlc compiler also.
+
+2004-08-27 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otlayout.h: Add copyright.
+ (OTL_INVALID_OFFSET): Removed.
+
+ * src/otlayout/otlgdef.h: Include otlayout.h.
+ Comment out inclusion of otltable.h.
+
+ * src/otlayout/otlgpos.c (otl_gpos_lookup4_validate): Fix call
+ to otl_base_array_validate.
+ (otl_liga_mark2_validate): Fix `for' loop.
+
+ * src/otlayout/otlgsub.c (otl_ligature_validate): Check `glyph_id',
+ not components array.
+
+ * src/otlcommn.c (otl_lookup_get_count, otl_feature_get_count):
+ Comment out.
+ (otl_lookup_list_get_count, otl_feature_list_get_count): Activate.
+ (otl_feature_list_validate, otl_gsubgpos_get_lookup_count):
+ s/otl_lookup_get_count/otl_lookup_list_get_count/.
+ (otl_script_list_validate):
+ s/otl_feature_get_count/otl_feature_list_get_count/.
+ (otl_script_validate): Call otl_lang_validate for default language.
+
+ * src/otlayout/otlcommn.h: Updated.
+
+2004-08-16 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otlgpos.c (otl_gpos_lookup1_validate,
+ otl_gpos_lookup2_validate, otl_gpos_lookup3_validate,
+ otl_gpos_lookup4_validate, otl_gpos_lookup5_validate,
+ otl_gpos_lookup6_validate, otl_gpos_lookup9_validate,
+ otl_gpos_validate): Update
+ function arguments.
+ (otl_gpos_lookup7_validate, otl_gpos_lookup8_validate): Update
+ function arguments.
+ Handle NULL offsets correctly.
+ Check sequence and lookup indices for format 3.
+ (otl_pos_rule_validate, otl_chain_pos_rule_validate): Add argument
+ to pass lookup count.
+ Check sequence and glyph indices.
+ (otl_gpos_subtable_validate): Update function arguments.
+ Update callers.
+
+ * src/otlayout/otlgpos.h: Updated.
+
+ * src/otlayout/otlgsub.c (otl_gsub_lookup1_validate,
+ otl_gsub_lookup3_validate, otl_gsub_lookup8_validate): Update
+ function arguments.
+ Add glyph index checks.
+ (otl_sequence_validate, otl_alternate_set_validate,
+ otl_ligature_validate): Add argument to pass glyph count.
+ Update callers.
+ Add glyph index check.
+ (otl_gsub_lookup2_validate, otl_gsub_lookup4_validate): Update
+ function arguments.
+ (otl_ligature_set_validate): Add argument to pass glyph count.
+ Update caller.
+ (otl_sub_class_rule_validate,
+ otl_sub_class_rule_set_validate): Removed.
+ (otl_sub_rule_validate, otl_chain_sub_rule_validate): Add argument
+ to pass lookup count.
+ Update callers.
+ Add lookup index check.
+ (otl_sub_rule_set_validate, otl_chain_sub_rule_set_validate): Add
+ argument to pass lookup count.
+ Update callers.
+ (otl_gsub_lookup5_validate): Update function arguments.
+ Handle NULL offsets correctly.
+ Don't call otl_sub_class_rule_set_validate but
+ otl_sub_rule_set_validate.
+ Check sequence and lookup indices for format 3.
+ (otl_gsub_lookup6_validate): Update function arguments.
+ Handle NULL offsets correctly.
+ Check sequence and lookup indices for format 3.
+ (otl_gsub_lookup7_validate, otl_gsub_validate): Update function
+ arguments.
+
+ * src/otlayout/otlgsub.h: Updated.
+
+ * src/otlayout/otlbase.c (otl_base_validate): Handle NULL offsets
+ correctly.
+
+ * src/otlayout/otlcommn.c (otl_class_definition_validate): Fix
+ compiler warning.
+ (otl_coverage_get_first, otl_coverage_get_last): New functions.
+ (otl_lookup_validate): Add arguments to pass lookup and glyph
+ counts.
+ Update callers.
+ (otl_lookup_list_validate): Add argument to pass glyph count.
+ Update callers.
+
+ * src/otlayout/otlcommn.h: Updated.
+
+ * src/otlayout/otljstf.c (otl_jstf_extender_validate,
+ otl_jstf_max_validate, otl_jstf_script_validate,
+ otl_jstf_priority_validate, otl_jstf_lang_validate): Add parameter
+ to validate glyph indices.
+ Update callers.
+ (otl_jstf_validate): Add parameter which specifies number of glyphs
+ in font.
+
+ * src/otlayout/otljstf.h: Updated.
+
+2004-08-15 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otlgpos.c (otl_liga_mark2_validate): Add parameter
+ to handle possible NULL values properly.
+ Update all callers.
+
+2004-08-15 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/gpos.c: Rename counting variables to be more
+ meaningful.
+ Add copyright.
+ (otl_liga_attach_validate): Renamed to...
+ (otl_liga_mark2_validate): This.
+ Update all callers.
+ (otl_mark2_array_validate): Removed.
+ (otl_gpos_lookup6_validate): Call otl_liga_mark2_validate, not
+ otl_mark2_array_validate.
+ (otl_pos_class_set_validate, otl_pos_class_rule_validate): Removed.
+ (otl_gpos_lookup7_validate): Complete code for format 2.
+ (otl_chain_pos_class_rule_validate,
+ otl_chain_pos_class_set_validate): Removed.
+ (otl_gpos_lookup8_validate): Don't call
+ otl_chain_pos_class_set_validate but
+ otl_chain_pos_rule_set_validate.
+ Simplify some code.
+
+ * src/otlayout/otlgpos.h: Add copyright.
+
+2004-08-14 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otljstf.c (otl_jstf_gsub_mods_validate): Removed.
+ (otl_jstf_gpos_mods_validate): Renamed to...
+ (otl_jstf_gsubgpos_mods_validate): This.
+ Test whether lookup_count is zero.
+ (otl_jstf_priority_validate): Use otl_jstf_gsubgpos_mods_validate.
+ (otl_jstf_validate): Initialize gsub_lookup_count and
+ gpos_lookup_count if gsub or gpos is zero.
+
+ * src/otlayout/otlgsub.c: Rename counting variables to be more
+ meaningful.
+ Add copyright.
+ (otl_gsub_lookup1_validate): Simplify code.
+ (otl_gsub_lookup2_validate, otl_gsub_lookup3_validate,
+ otl_gsub_lookup4_validate, otl_gsub_lookup7_validate): Remove unused
+ variables.
+ (otl_gsub_lookup5_validate): Remove unused variable.
+ Fix call to otl_sub_rule_set_validate and
+ otl_sub_class_rule_set_validate.
+ (otl_chain_sub_class_rule_validate,
+ otl_chain_sub_class_set_validate): Removed.
+ (otl_gsub_lookup6_validate): Remove unused variable.
+ Fix call to otl_chain_sub_rule_set_validate.
+ (otl_gsub_lookup7_validate): Handle lookup type 8 also.
+ (otl_gsub_lookup8_validate: New function.
+ (otl_gsub_lookup1_apply, otl_gsub_lookup2_apply,
+ otl_gsub_lookup3_apply): Commented out.
+ (otl_gsub_validate_funcs): Add otl_gsub_lookup7_validate and
+ otl_gsub_lookup8_validate.
+ (otl_gsub_validate): Updated.
+
+ * src/otlayout/otlgsub.h: Add copyright.
+
+ * src/otlayout/otlcommn.c, src/otlayout/otlcommn.h
+ (otl_coverage_get_index): Comment out.
+
+2004-08-13 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otlcommn.c (otl_gsubgpos_get_lookup_count): New
+ function.
+ * src/otlayout/otlcommn.h: Updated.
+
+ * src/otlayout/otlbase.c: Rename counting variables to be more
+ meaningful.
+ Add copyright message.
+ * src/otlayout/otlbase.h: Add copyright message.
+
+ * src/otlayout/otlgdef.c: Rename counting variables to be more
+ meaningful.
+ Add copyright message.
+ Use OTL_CHECK everywhere.
+ (otl_caret_value_validate): Remove unused variable.
+ (otl_gdef_validate): All tables are optional.
+ * src/otlayout/otlgdef.h: Add copyright message.
+
+ * src/otlayout/otljstf.c: Rename counting variables to be more
+ meaningful.
+ Add copyright message.
+ (otl_jstf_gsub_mods_validate, otl_jstf_gpos_mods_validate): Add
+ parameter to pass lookup count.
+ Update all callers.
+ Check lookup array.
+ (otl_jstf_max_validate):
+ s/otl_gpos_subtable_check/otl_gpos_subtable_validate/.
+ (otl_jstf_priority_validate, otl_jstf_lang_validate,
+ otl_jstf_script_validate): Add two parameters to pass lookup counts.
+ Update all callers.
+ (otl_jstf_validate): Add two parameters to pass GPOS and GSUB
+ table offsets; use otl_gsubgpos_get_lookup_count to convert extract
+ lookup counts.
+ Fix typo.
+ * src/otlayout/otljstf.h: Updated.
+ Add copyright message.
+
+ * src/otlayout/otlgpos.c (otl_gpos_subtable_validate): New function.
+ (otl_gpos_validate): Use it.
+ * src/otlayout/otlgpos.h: Updated.
+
+2004-08-13 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otcommn.c: Use OTL_CHECK everywhere.
+ (otl_coverage_validate): Initialize `p',
+ s/count/num_glyphs/.
+ s/start_cover/start_coverage/.
+ (otl_coverage_get_index): Return OTL_Long, not OTL_Int.
+ Remove unused variables.
+ (otl_class_definition_validate): s/count/num_glyphs/.
+ Remove unused variables.
+ (otl_class_definition_get_value, otl_device_table_get_start,
+ otl_device_table_get_end, otl_device_table_get_delta,
+ otl_lookup_get_table, otl_lookup_list_get_count,
+ otl_lookup_list_get_lookup, otl_lookup_list_get_table,
+ otl_feature_get_lookups, otl_feature_list_get_count,
+ otl_feature_list_get_feature, otl_lang_get_count,
+ otl_lang_get_req_feature, otl_lang_get_features): Commented out
+ temporarily until we really need it.
+ (otl_lookup_validate): Removed.
+ (otl_lookup_table_validate): Renamed to ...
+ (otl_lookup_validate): This. Update callers.
+ (otl_lookup_list_validate): Remove already commented out definition
+ and move the other definition up.
+ (otl_feature_validate): Add parameter to pass number of lookups.
+ Update callers.
+ Check lookup indices.
+ (otl_feature_list_validate): Add parameter to pass lookup table.
+ Update callers.
+ (otl_lang_validate): Add parameter to pass number of features.
+ Update callers.
+ Handle req_feature and check feature indices.
+ (otl_script_validate): Add parameter to pass number of features.
+ Update callers.
+ (otl_script_list_validate): Add parameter to pass feature table.
+ Update callers.
+
+ * src/otlayout/otcommn.h: s/LOCALDEF/LOCAL/.
+ Comment out the same functions as in otcommn.c.
+ (otl_script_list_get_script): Removed.
+
+ * src/otlayout/otlgsub.c (otl_gsub_lookup1_apply): Change `index' to
+ type OTL_Long.
+ (otl_gsub_lookup2_apply, otl_gsub_lookup3_apply): Change `index' to
+ type OTL_Long.
+ Fix test.
+ (otl_gsub_validate): Fix order of validation.
+
+ * src/otlayout/otlgpos.c (otl_gpos_validate): Fix order of
+ validation.
+
+2004-08-12 Werner Lemberg <wl@gnu.org>
+
+ Make otlayout module compile (without actually working).
+
+ * src/otlayout/*: s/OTL_Valid/OTL_Validator/.
+ s/NULL/0/.
+
+ * src/otlayout/otlayout.h: Fix various typos.
+ (OTL_Bool): New typedef.
+ (OTL_Int, OTL_Long, OTL_Int16, OTL_Int32): Use `signed' keyword.
+ (OTL_Err_InvalidArgument): Removed.
+ (OTL_Err_InvalidData, OTL_Err_InvalidSize): New enum values.
+ (OTL_MAKE_TAG): Add missing parenthesis.
+ (OTL_INVALID_DATA): Use OTL_Err_InvalidData.
+ (OTL_INVALID_TOO_SHORT): Use OTL_Err_InvalidSize.
+ (OTL_INVALID_FORMAT, OTL_INVALID_OFFSET): New macros.
+
+ * src/otlayout/otlgpos.c: s/FT_/OTL_/.
+ s/OTL_Short/OTL_Int16/.
+ (otl_gpos_pairset_validate): Add return type.
+ (otl_base_array_validate): Fix call to otl_anchor_validate.
+ (otl_liga_array_validate): Fix call to otl_liga_attach_validate.
+ (otl_gpos_lookup5_validate): Fix typos.
+ (otl_gpos_lookup6_validate): Fix call to otl_mark2_array_validate.
+ (otl_gpos_lookup7_validate): Comment out unfinished code.
+ Fix typos.
+
+ * src/otlayout/otlgsub.c: Add forward declaration for
+ otl_gsub_validate_funcs.
+ (otl_gsub_lookup1_apply, otl_gsub_lookup2_apply,
+ otl_gsub_lookup3_apply): Fix call to otl_parser_check_property.
+ s/otl_coverage_lookup/otl_coverage_get_index/.
+ (otl_ligature_validate): Add missing variable declaration.
+ (otl_sub_rule_validate): Fix typo.
+ (otl_sub_class_rule_validate): Add missing variable declaration.
+ Fix typo.
+ (otl_gsub_lookup5_validate): Fix typo.
+ (otl_gsub_lookup6_validate): Fix call to
+ otl_chain_sub_class_set_validate.
+ (otl_gsub_validate_funcs): Don't use `const'.
+
+ * src/otlayout/otlcommn.c (otl_class_definition_get_value,
+ otl_device_table_validate, otl_device_table_get_delta,
+ otl_lookup_validate, otl_script_validate): Add missing
+ variable declarations.
+ (otl_lookup_list_validate): Comment out first definition.
+ (otl_lookup_list_foreach, otl_feature_list_foreach): Comment out.
+ (otl_feature_list_validate):
+ s/otl_feature_table_validate/otl_feature_validate/.
+ (otl_script_list_validate):
+ s/otl_script_table_validate/otl_script_validate/.
+
+ * src/otlayout/otlcommn.h: Comment out first declaration.
+ (otl_lookup_list_foreach, otl_feature_list_foreach): Comment out.
+
+ * src/otlayout/otlbase.c (otl_base_coord_validate): Fix call to
+ otl_device_table_validate.
+ (otl_base_script_validate): Add missing variable declarations.
+ (otl_base_script_list_validate): Fix call to
+ otl_base_script_validate.
+ (otl_axis_table_validate): Fix calls to otl_base_tag_list_validate
+ and otl_base_script_list_validate.
+ (otl_base_validate): Fix calls to otl_axis_table_validate.
+
+ * src/otlayout/otlgdef.c (otl_attach_list_validate): Fix call to
+ otl_attach_point_validate.
+ (otl_caret_value_validate): Add missing variable declaration.
+ Fix call to otl_device_table_validate.
+ (otl_ligature_glyph_validate): Fix call to otl_caret_value_validate.
+ (otl_ligature_caret_list_validate): Fix call to
+ otl_ligature_glyph_validate.
+ (otl_gdef_validate): Fix calls to otl_class_definition_validate,
+ otl_attach_list_validate, otl_ligature_caret_list_validate, and
+ otl_class_definition_validate.
+
+ * src/otlayout/otltable.h (otl_table_validate, otl_table_init,
+ otl_table_set_script): Comment out.
+
+ * src/otlayout/otlparse.h (OTL_ParserRec):
+ s/OTL_Alternate/OTL_GSUB_Alternate/.
+ (OTL_ParseError): Add OTL_Err_Parser_Memory and
+ OTL_Err_Parser_Internal.
+ (otl_parser_error): Fix typo.
+ (otl_parser_check_property): Remove third argument.
+
+ * src/otlayout/otlparse.c (otl_string_ensure):
+ s/OTL_Parse_Err_Memory/OTL_Err_Parser_Memory/.
+ (OTL_STRING_ENSURE, otl_parser_error, otl_parser_get_index,
+ otl_parser_replace_1, otl_parser_replace_n): Fix typos.
+ (OTL_PARSER_UNCOVERED): Removed.
+ (otl_parser_check_property): Remove third argument.
+
+ * src/otlayout/otljstf.c (otl_jstf_priority_validate): Add missing
+ variable declaration.
+
+ * src/otlayout/otlutils.h (OTL_MEM_REALLOC): Fix typo.
+
+2004-08-11 Danny <dannyboynow@yahoo.com>
+
+ * src/base/ftstream.c (FT_Stream_Close): Don't reset stream->close
+ to NULL. This allows custom close functions to delete the FT_STREAM
+ object.
+
+2004-08-11 Werner Lemberg <wl@gnu.org>
+
+ Add API to get information about SFNT tables.
+
+ * include/freetype/internal/services/svsfnt.h
+ (FT_SFNT_Table_Info_Func): New typedef.
+ (SFNT_Table): Add it.
+
+ * src/base/ftobjs (FT_Sfnt_Table_Info): New function.
+
+ * include/freetype/tttables.h: Updated.
+
+ * src/sfnt/sfdriver.c (sfnt_table_info): New function.
+ (sfnt_service_sfnt_table): Add it.
+
+ * docs/CHANGES: Updated.
+
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
+
+ * builds/unix/configure.ac (version_info): Set to 9:8:3.
+ * builds/unix/configure: Updated.
+
+ * builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj: s/219/2110/, s/2.1.9/2.1.10/.
+
+ * builds/freetype.mk (refdoc), README, Jamfile (RefDoc):
+ s/2.1.9/2.1.10/.
+
+ * docs/CHANGES, docs/VERSION.DLL: Updated.
+
+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
+ warnings.
+
+2004-08-06 Adam Piotrowski <st_intel@poczta.onet.pl>
+
+ * src/pfr/pfrload.c (pfr_sort_kerning_pairs): Single-byte
+ adjustments are unsigned, not signed.
+
+2004-08-05 David Turner <david@freetype.org>
+
+ `Activate' gray-scale specifing hinting within the TrueType
+ bytecode interpreter. This is an experimental feature which
+ should probably be made optional.
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Move the code to set the pedantic_hinting flag
+ to...
+ (TT_Load_Glyph): Here.
+ Set `grayscale' flag except for `FT_LOAD_TARGET_MONO'.
+
+ * src/truetyep/ttinterp.c (Ins_GETINFO): Return MS rasterizer
+ version 1.7.
+ Return rotation and stretching info only if glyph is rotated or
+ stretched, respectively.
+ Handle grayscale info.
+
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Add `grayscale'
+ member.
+
+2004-08-02 George Williams <gww@silcom.com>
+
+ * src/base/ftobjs.c (FT_Attach_File): Initialize `open.stream'.
+
+2004-08-01 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-08-01 George Williams <gww@silcom.com>
+
+ FreeType now can read kerning values from PFM files.
+
+ * src/type1/t1afm.c (T1_Done_AFM): Renamed to...
+ (T1_Done_Metrics): This.
+ Update all callers.
+ (T1_Read_AFM): Make it static.
+ Don't enter and leave a frame.
+ (LITTLE_ENDIAN_USHORT, LITTLE_ENDIAN_UINT): New macros.
+ (T1_Read_PFM): New function.
+ (T1_Read_Metrics): New higher-level function to be used instead of
+ T1Read_AFM.
+ Update all callers.
+
+2004-07-31 Werner Lemberg <wl@gnu.org>
+
+ * src/pcf/pcfread (pcf_load_font), src/bdf/bdfdrivr.c
+ (BDF_Face_Init), src/truetype/ttgxvar (TT_Get_MM_Var,
+ tt_face_vary_cvt): Fix compiler warnings.
+
+2004-07-26 Søren Sandmann <sandmann@daimi.au.dk>
+
+ * src/pcf/pcfread.c (pcf_interpret_style): Always allocate memory for
+ face->style_name.
+ * src/pcf/pcfdrivr.c (PCF_Face_Done): Free `style_name'.
+
+2004-07-26 Darren J Longhorn <darren.longhorn@redcom.co.uk>
+
+ * include/freetype/config/ftconfig.h (FT_SIZEOF_LONG): Recognize
+ five-byte `long' (which is avoided then).
+
+2004-07-25 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/pcf/pcfdrivr.c (PCF_Set_Pixel_Size): Compare heights, not
+ ppem values.
+ (PCF_Set_Point_Size): Don't call PCF_Set_Pixel_Size but provide own
+ code to compare ppem values.
+ * src/bdf/bdfdrivr.c (BDF_Set_Pixel_Size): Compare heights, not
+ ppem values.
+ (BDF_Set_Point_Size): Don't call BDF_Set_Pixel_Size but provide own
+ code to compare ppem values.
+
+2004-07-25 Kornfeld Eliyahu Peter <peter@e-kadmon.net>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Handle
+ TT_NAME_ID_PREFERRED_FAMILY and TT_NAME_ID_PREFERRED_SUBFAMILY.
+
+2004-07-24 Derek B. Noonburg <derekn@foolabs.com>
+
+ * src/cff/cffload.c (cff_font_load): Always create inverse mapping.
+ Even if the charstring count is the same as the CID count, it is
+ still possible that the font uses a different CID -> GID mapping.
+
+2004-07-23 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttobjs.c (tt_face_init): Accept 0x00020000 format tag
+ found in some Arphic fonts made for Chinese version of Windows 3.1.
+
+2004-07-17 David Turner <david@freetype.org>
+
+ Fixed a dangling pointer bug in the cache code that happened in very
+ rare cases, i.e., when a new family object was destroyed by an
+ out-of-memory condition during a glyph node initialization. The
+ function FTC_Cache_Lookup would flush the cache and restart the
+ lookup with a bad pointer.
+
+ * include/freetype/cache/ftcglyph.h (FTC_FAMILY_TREE): New macro.
+ (FTC_GCACHE_LOOKUP_CMP): Use it.
+ Handle reference count in `num_nodes' correctly.
+
+ * src/cache/ftcglyph.c (FTC_GNode_UnselectFamily): Use
+ FTC_FAMILY_FREE.
+ (FTC_GCache_Lookup): Handle reference count in `num_nodes' correctly.
+
+ * src/cache/ftcmanag.c (FTC_Manager_FlushN): Fixed a cache flushing
+ bug.
+
+ * src/truetype/ttinterp.c (Normalize): Fixed a bug that caused
+ long and unnecessary delays while normalizing huge vectors.
+
+2004-07-15 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+ * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix compiler
+ warning.
+
+2004-07-15 David Turner <david@freetype.org>
+
+ * src/base/ftstroke.c (FT_Stroker_ParseOutline): Single points
+ are not stroked, preventing a bug with pala.ttf and other
+ fonts.
+
+ * include/freetype/ftstroke.h: Updating documentation comments.
+
+2004-07-13 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftstroke.c (ft_stroke_border_reverse): Removed. Unused.
+
+2004-07-12 David Turner <david@freetype.org>
+
+ * src/base/ftstroke.c (ft_stroke_border_close): Add second parameter
+ to indicate reversion of points.
+ Update all callers.
+ (ft_stroke_border_reverse): Fix initialization of `point1' and
+ `tag1'.
+
+ * src/cache/ftcsbits.c (ftc_snode_load): Fixing advance computation
+ for transformed glyphs.
+
+2004-07-11 David Turner <david@freetype.org>
+
+ Fix bugs that prevented the stroker to correctly generate stroked
+ paths from closed paths, i.e., nearly all glyphs in vectorial fonts.
+
+ The code is still _very_ buggy though; treat with special care.
+
+ * src/base/ftstroke.c (FT_STROKE_TAG_BEGIN_END): New macro.
+ (ft_stroke_border_reverse): New function.
+ (ft_stroker_inside): Remove local variable `sigma'; use different
+ threshold.
+ (ft_stroker_add_reverse_left): Switch begin/end tags if necessary.
+ (FT_Stroker_EndSubPath): Call ft_stroker_inside and
+ ft_stroke_border_reverse.
+
+2004-06-26 Peter Kovar <peter.kovar@r3.roburnet.sk>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix typo.
+
+2004-06-25 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1afm.c (afm_atoindex): Fix boundary test. Reported
+ by Dirck Blaskey.
+
+2004-06-24 David Turner <david@freetype.org>
+
+
+ * Version 2.1.9 released.
+ =========================
+
+
+ * src/truetype/ttgload.c, src/truetype/ttxgvar.c: Removing
+ compiler warnings.
+
+2004-06-23 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftmemory.h [FT_DEBUG_MEMORY]: Declare
+ FT_QAlloc_Debug and FT_QRealloc_Debug.
+
+ * src/base/ftutil.c (FT_QAlloc): Fix error and debug messages.
+ (FT_QRealloc): Call FT_QAlloc if original pointer is NULL.
+ Fix error message.
+
+2004-06-23 David Turner <david@freetype.org>
+
+ * include/freetype/internal/ftmemory.h, src/base/ftutil.c
+ (FT_QAlloc, FT_QRealloc), src/base/ftdbgmem.c (FT_QAlloc_Debug,
+ FT_QRealloc_Debug): New functions that perform allocation without
+ zero-ing out the corresponding blocks.
+
+ * include/freetype/internal/ftmemory.h (FT_MEM_QALLOC,
+ FT_MEM_QREALLOC, FT_MEM_QNEW, FT_MEM_QNEW_ARRAY,
+ FT_MEM_QRENEW_ARRAY, FT_QALLOC, FT_QREALLOC, FT_QNEW, FT_QNEW_ARRAY,
+ FT_QRENEW_ARRAY): New macros.
+
+ * src/base/ftstream.c (FT_Stream_EnterFrame): Use FT_QALLOC.
+ * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use FT_QNEW_ARRAY.
+ * src/sfnt/sfobjs.c (tt_face_get_name): Use FT_QNEW_ARRAY.
+
+ * src/sfnt/ttload.c (tt_face_load_directory, tt_face_load_metrics,
+ tt_face_load_gasp): Use FT_QNEW_ARRAY.
+ (tt_face_load_kern): Use FT_QNEW_ARRAY.
+ Small optimization in the kerning table verifier; this speeds up
+ TrueType face opening by about 7%.
+ (tt_face_load_hdmx): Use FT_QNEW_ARRAY and FT_QALLOC.
+
+ * include/freetype/config/ftmodule.h: Changed the order of modules,
+ putting TrueType and Type 1 first. This dramatically improves the
+ performance of face open/close operations. For example, putting the
+ TrueType driver first in the list results in a 5x speedup when
+ opening `Vera.ttf'.
+
+ The very problem is that both the PCF and BDF drivers do a lot more
+ than necessary to detect that they cannot handle a font file.
+
+2004-06-22 Werner Lemberg <wl@gnu.org>
+
+ * src/pcf/pcfread.c (pcf_read_TOC, pcf_get_properties,
+ pcf_get_metrics, pcf_get_bitmaps, pcf_get_encodings): Improve
+ debugging messages.
+
+ * src/pcf/pcfdrivr.c (FT_COMPOMENT): Move up.
+ (PCF_Face_Init): Simplify code.
+
+ * src/bdf/bdfdrivr.h (BDF_FaceRec): New element `default_glyph'.
+
+ * src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_start),
+ src/bdf/bdf.h (bdf_font_t): s/default_glyph/default_char/.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Fix number of glyphs.
+ Set `default_glyph'.
+ (BDF_Glyph_Load): Use `default_glyph' for undefined glyph.
+
+ * docs/CHANGES: Updated.
+
+2004-06-21 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-06-21 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Don't access (unrounded)
+ `TT_Size.root.metrics' but (rounded) `TT_Size.metrics'. This fixes
+ a scaling bug that caused incorrect rendering when the bytecode
+ interpreter was enabled.
+
+2004-06-14 Huw D M Davies <h.davies1@physics.ox.ac.uk>
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Set x_ppem and y_ppem
+ based on pixel_width and pixel_height.
+ (FNT_Size_Set_Pixels): Updated.
+
+2004-06-14 Werner Lemberg <wl@gnu.org>
+
+ * src/lzw/zopen.c: Comment out inclusion of signal.h and unistd.h.
+ Reported by Hyvärinen Jyrki Juhani.
+
+2004-06-11 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-06-10 David Turner <david@freetype.org>
+
+ * src/base/ftobject.c, src/base/fthash.c, src/base/ftexcept.c,
+ src/base/ftsysio.c, src/base/ftsysmem.c, src/base/ftlist.c: Removed.
+ Obsolete.
+
+ * src/raster/ftraster.c (Alignment, PAlignment): New union to fix
+ problems with 64bit systems.
+ (AlignProfileSize): Use it.
+
+2004-06-08 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h (FT_GlyphMetrics): Move `lsb_delta'
+ and `rsb_delta' elements to...
+ (FT_GlyphSlotRec): Here to retain binary compatibility with older
+ FreeType versions.
+ Update all users.
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): Remove compiler warning.
+
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Add missing initialization
+ of slot->metrics.width and slot->metrics.height when loading a
+ Windows FNT glyph. Thanks to Huw Davies.
+
+ * include/freetype/cache/ftcmru.h (FTC_MruNode_CompareFunc): Change
+ return type to FT_Bool.
+
+ * src/cache/ftbasic.c (ftc_basic_family_compare): Change return
+ type to FT_Bool.
+
+ * src/cache/ftccache.c (FTC_Cache_Init, ftc_cache_init): Make
+ the former call the latter, not vice versa.
+ (FTC_Cache_Done, ftc_cache_done): Ditto.
+
+ * src/cache/ftcglyph.c (FTC_GNode_Compare, ftc_gnode_compare): Make
+ the former call the latter, not vice versa.
+ (FTC_GCache_Init, ftc_gcache_init): Ditto.
+ (FTC_GCache_Done, ftc_gcache_done): Ditto.
+
+ * src/cache/ftcimage.c (FTC_INode_Free, ftc_inode_free): Make the
+ former call the latter, not vice versa.
+ (FTC_INode_Weight, ftc_inode_weight): Ditto.
+
+ * src/cache/ftcmanag.c (ftc_size_node_compare,
+ ftc_size_node_compare_faceid, ftc_face_node_compare): Change return
+ type to FT_Bool.
+
+ * src/cache/ftcsbits.c (FTC_SNode_Free, ftc_snode_free): Make the
+ former call the latter, not vice versa.
+ (FTC_SNode_Weight, ftc_snode_weight): Ditto.
+ (FTC_SNode_Compare, ftc_snode_compare): Ditto.
+
+ * src/cache/ftcsbits.c: Fix some bugs and inefficiencies in the cache
+ sub-system.
+
+2004-06-05 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afloader.c (af_loader_load_g): Set `lsb_delta' and
+ `rsb_delta' in slot->metrics and tune side bearings slightly.
+
+2004-06-04 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-06-04 David Chester <davidchester@gmx.net>
+
+ Improve inter-letter spacing for autohinted glyphs.
+
+ * include/freetype/freetype.h (FT_Glyph_Metrics): Add elements
+ `lsb_delta' and `rsb_delta'.
+
+ * src/autohint/ahhint.c (ah_hinter_load): Set `lsb_delta' and
+ `rsb_delta' in slot->metrics and tune side bearings slightly.
+
+2004-06-04 David Turner <david@freetype.org>
+
+ * src/autofit/*: Important fixes to the auto-fitter. The output
+ now seems to be 100% equivalent to the auto-hinter, while being
+ about 2% faster (which proves that script-specific algorithm
+ selection isn't a performance problem).
+
+ To test it, change `autohint' to `autofit' in
+ <freetype/config/ftmodule.h> and recompile.
+
+ A few more testing is needed before making this the official
+ auto-hinting module.
+
+2004-06-02 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (compute_glyph_metrics): Fix compiler
+ warnings.
+
+2004-06-01 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): Make sure that an English
+ name record for the Apple platform is preferred to a non-English
+ entry for the Microsoft platform. Problem reported by HANDA
+ Ken'ichi.
+
+2004-05-19 George Williams <gww@silcom.com>
+
+ * src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): New
+ auxiliary functions.
+ (T1_Get_MM_Var): Provide axis tags.
+ Use mm_axis_unmap and mm_weights_unmap to provide default values
+ for design and normalized axis coordinates.
+
+ * include/freetype/t1tables.h (PS_DesignMapRec): Change type of
+ `design_points' to FT_Long.
+ Update all users.
+
+2004-05-17 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbbox.c (BBox_Conic_Check): Fix boundary cases.
+ Reported by Mikey Anbary <manbary@vizrt.com>.
+
+2004-05-15 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_done_face): Free face->postscript_name.
+
+2004-05-15 George Williams <gww@silcom.com>
+
+ * src/sfnt/ttload.c (tt_face_load_max_profile): Always set
+ face->root.num_glyphs.
+
+2004-05-14 Masatake YAMATO <jet@gyve.org>
+ George Williams <gww@silcom.com>
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Handle `bhed' properly.
+
+2004-05-14 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftcbasic.c (ftc_basic_family_compare,
+ ftc_basic_family_init, ftc_basic_family_get_count,
+ ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph,
+ ftc_basic_gnode_compare_faceid): Adjust parameters and return types
+ to prototypes given in header files from include/freetype/cache.
+ Use casts to proper types locally.
+ (ftc_basic_image_family_class, ftc_basic_image_cache_class,
+ ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class): Remove
+ casts.
+
+ * src/cache/ftccback.h: Adjust parameters and return types to
+ prototypes given in header files from include/freetype/cache.
+
+ * src/cache/ftcimage.c (ftc_inode_free, ftc_inode_new,
+ ftc_inode_weight): Adjust parameters and return types to prototypes
+ given in header files from include/freetype/cache. Use casts to
+ proper types locally.
+
+ * src/cache/ftcsbits.c (ftc_snode_free, ftc_snode_new,
+ ftc_snode_weight, ftc_snode_compare): Adjust parameters and return
+ types to prototypes given in header files from
+ include/freetype/cache. Use casts to proper types locally.
+
+ * src/cache/ftccmap.c (ftc_cmap_node_free, ftc_cmap_node_new,
+ ftc_cmap_node_weight, ftc_cmap_node_compare,
+ ftc_cmap_node_remove_faceid): Adjust parameters and return types to
+ prototypes given in header files from include/freetype/cache. Use
+ casts to proper types locally.
+ (ftc_cmap_cache_class): Remove casts.
+
+ * src/cache/ftcglyph.c (ftc_gnode_compare, ftc_gcache_init,
+ ftc_gcache_done): Adjust parameters and return types to prototypes
+ given in header files from include/freetype/cache. Use casts to
+ proper types locally.
+
+ * src/cache/ftcmanag.c (ftc_size_node_done, ftc_size_node_compare,
+ ftc_size_node_init, ftc_size_node_reset,
+ ftc_size_node_compare_faceid, ftc_face_node_init,
+ ftc_face_node_done, ftc_face_node_compare: Adjust parameters and
+ return types to prototypes given in header files from
+ include/freetype/cache. Use casts to proper types locally.
+
+ (ftc_size_list_class, ftc_face_list_class): Remove casts.
+
+2004-05-13 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahmodule.c (ft_autohinter_init, ft_autohinter_done):
+ Use FT_Module as parameter and do a cast to FT_AutoHinter locally.
+ (autohint_module_class): Remove casts.
+
+ * src/base/ftglyph.c (ft_bitmap_glyph_init, ft_bitmap_glyph_copy,
+ ft_bitmap_glyph_done, ft_bitmap_glyph_bbox, ft_outline_glyph_init,
+ ft_outline_glyph_done, ft_outline_glyph_copy,
+ ft_outline_glyph_transform, ft_outline_glyph_bbox,
+ ft_outline_glyph_prepare): Use FT_Glyph as parameter and do a cast
+ to FT_XXXGlyph locally.
+ Use FT_CALLBACK_DEF throughout.
+ (ft_bitmap_glyph_class, ft_outline_glyph_class): Remove casts.
+
+ * src/bdf/bdfdrivr.c (bdf_cmap_init, bdf_cmap_done,
+ bdf_cmap_char_index, bdf_cmap_char_next): Use FT_CMap as parameter
+ and do a cast to BDF_CMap locally.
+ (bdf_cmap_class): Remove casts.
+
+2004-05-12 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.h (CFF_Builder): Remove `error'.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Replace
+ `Memory_Error' with `Fail' und update all users.
+
+2004-05-11 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (T1_ParseState): New
+ enumeration.
+ (T1_BuilderRec): Replace `path_begun' with `parse_state'.
+ Remove `error'.
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Replace
+ `Memory_Error' with `Fail' and update all users.
+ Don't use `builder->error'.
+ Replace `path_begun' with `parse_state' and check parsing states.
+
+ * src/psaux/psobjs.c (t1_builder_init, t1_builder_start_point):
+ Replace `path_begun' with `parse_state' and check parsing states.
+
+2004-05-10 George Williams <gww@silcom.com>
+
+ * src/truetype/ttxgvar.c (ft_var_load_avar): Do free arrays in case
+ of error -- `avar' is optional so we can't rely on tt_done_blend
+ being called automatically.
+
+2004-05-09 George Williams <gww@silcom.com>
+
+ * src/truetype/ttxgvar.c (ft_var_load_avar, ft_var_load_gvar): Fix
+ error handling.
+
+2004-05-07 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/pfrobjs.c, src/pfr/pfrobjs.h (pfr_face_init,
+ pfr_face_done, pfr_face_get_kerning, pfr_slot_init, pfr_slot_done,
+ pfr_slot_load): Don't use PFR_XXX but FT_XXX arguments which are
+ typecast to the proper PFR_XXX types within the function.
+ Update code accordingly.
+
+ * src/pfr/pfrdrivr.c (pfr_get_kerning, pfr_get_advance,
+ pfr_get_metrics, pfr_get_service): Don't use PFR_XXX but FT_XXX
+ arguments which are typecast to the proper PFR_XXX types within the
+ function.
+ Update code accordingly.
+ Use FT_CALLBACK_DEF throughout.
+ (pfr_metrics_service_rec, pfr_driver_class): Remove casts.
+
+2004-05-06 Masatake YAMATO <jet@gyve.org>
+
+ * src/truetype/ttgxvar.c (ft_var_load_gvar): Use FT_FACE_STREAM.
+ (*): Rename local variable OffsetToData to offsetToData.
+
+2004-05-06 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_size_done, cff_size_init, cff_size_reset,
+ cff_slot_done, cff_slot_init, cff_face_init, cff_face_done): Access
+ root fields directly.
+ * src/cff/cffdrivr.c (Load_Glyph): Access root fields directly.
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Save current
+ frame before calling TT_Vary_Get_Glyph_Deltas.
+
+ * src/pcf/pcfdrivr.c (PCF_CMapRec): Rename `cmap' to `root' for
+ consistency.
+ (pcf_cmap_init, pcf_cmap_done, pcf_cmap_char_index,
+ pcf_cmap_char_next): Don't use PCF_XXX but FT_XXX arguments which
+ are typecast to the proper PCF_XXX types within the function.
+ Update code accordingly.
+ (pcf_cmap_class): Remove casts.
+ (PCF_Face_Done, PCF_Face_Init, PCF_Set_Pixel_Size): Don't use
+ PCF_XXX but FT_XXX arguments which are typecast to the proper
+ PCF_XXX types within the function.
+ Update code accordingly.
+ Use FT_CALLBACK_DEF throughout.
+ (PCF_Set_Point_Size): New wrapper function.
+ (PCF_Glyph_Load, pcf_driver_requester): Use FT_CALLBACK_DEF.
+ (pcf_driver_class): Remove casts.
+
+2004-05-04 Steve Hartwell <shspamsink@comcast.net>
+
+ * src/truetype/ttobjs.c (tt_driver_done): Fix typo.
+
+2004-05-04 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Done, BDF_Face_Init,
+ BDF_Set_Pixel_Size): Don't use BDF_XXX but FT_XXX arguments which
+ are typecast to the proper BDF_XXX types within the function.
+ Update code accordingly.
+ Use FT_CALLBACK_DEF throughout.
+ (BDF_Set_Point_Size): New wrapper function.
+ (bdf_driver_class): Remove casts.
+
+ * src/cff/cffdrivr.c (Get_Kerning, Load_Glyph, cff_get_interface):
+ Don't use CFF_XXX but FT_XXX arguments which are typecast to the
+ proper CFF_XXX types within the function.
+ Update code accordingly.
+ Use FT_CALLBACK_DEF throughout.
+ (cff_driver_class): Remove casts.
+
+ * src/cff/cffobjs.h, src/cff/cffobjs.c (cff_size_done,
+ cff_size_init, cff_size_reset, cff_slot_done, cff_slot_init,
+ cff_face_init, cff_face_done, cff_driver_init, cff_driver_done):
+ Don't use CFF_XXX but FT_XXX arguments which are typecast to the
+ proper CFF_XXX types within the function.
+ Update code accordingly.
+ (cff_point_size_reset): New wrapper function.
+
+ * src/cid/cidobjs.h, src/cid/cidobjs.c (cid_slot_done,
+ cid_slot_init, cid_size_done, cid_size_init, cid_size_reset,
+ cid_face_done, cid_face_init, cid_driver_init, cid_driver_done):
+ Don't use CID_XXX but FT_XXX arguments which are typecast to the
+ proper CID_XXX types within the function.
+ Update code accordingly.
+ (cid_point_size_reset): New wrapper function.
+
+ * src/cid/cidgload.c, src/cid/cidgload.h (cid_slot_load_glyph):
+ Don't use CID_XXX but FT_XXX arguments which are typecast to the
+ proper CID_XXX types within the function.
+ Update code accordingly.
+
+ * src/cid/cidriver.c (cid_get_interface):
+ Don't use CID_XXX but FT_XXX arguments which are typecast to the
+ proper CID_XXX types within the function.
+ Update code accordingly.
+ Use FT_CALLBACK_DEF.
+ (t1cid_driver_class): Remove casts.
+
+ * src/truetype/ttdriver.c (tt_get_interface): Use FT_CALLBACK_DEF.
+ * src/truetype/ttgxvar.c (ft_var_load_avar): Don't free non-local
+ variables (this is done later).
+ (ft_var_load_avar): Fix call to FT_FRAME_ENTER.
+ (TT_Get_MM_Var): Fix size for `fvar_fields'.
+ (TT_Vary_Get_Glyph_Deltas): Handle deallocation of local variables
+ correctly.
+
+ * src/base/ftdbgmem.c (ft_mem_debug_realloc): Don't abort if
+ current size is zero.
+
+2004-05-03 Steve Hartwell <shspamsink@comcast.net>
+
+ * src/truetype/ttobjs.h, src/truetype/ttobjs.c (tt_face_init,
+ tt_face_done, tt_size_init, tt_size_done, tt_driver_init,
+ tt_driver_done): Don't use TT_XXX but FT_XXX arguments which are
+ typecast to the proper TT_XXX types within the function.
+ Update code accordingly.
+
+ * src/truetype/ttdriver.c (Get_Kerning, Set_Char_Sizes,
+ Set_Pixel_Sizes, Load_Glyph, tt_get_interface): Don't use TT_XXX but
+ FT_XXX arguments which are typecast to the proper TT_XXX types
+ within the function.
+ Update code accordingly.
+ (tt_driver_class): Remove casts.
+
+2004-05-02 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (tt_face_free_names): Check that `table->names'
+ is not NULL. Reported by Gordon Childs <gchilds@quickcut.com.au>.
+
+2004-04-29 Werner Lemberg <wl@gnu.org>
+
+ * docs/formats.txt: Add more information on PFR format.
+
+2004-04-28 Werner Lemberg <wl@gnu.org>
+
+ * docs/formats.txt: New file.
+ * docs/CHANGES: Updated.
+
+2004-04-28 Masatake YAMATO <jet@gyve.org>
+
+ * include/freetype/internal/tttypes.h (GX_BlendRec_)
+ [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Fix a typo.
+
+ * src/truetype/ttgxvar.h (GX_BlendRec_): Fix a typo.
+
+2004-04-27 Masatake YAMATO <jet@gyve.org>
+
+ * src/truetype/ttgxvar.h: Use FT_LOCAL instead of FT_LOCAL_DEF
+ for function declarations.
+
+2004-04-25 George Williams <gww@silcom.com>
+
+ * src/truetype/ttgxvar.c (ft_var_apply_tuple): Fix typo.
+
+2004-04-25 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/Jamfile, docs/CHANGES: Updated.
+
+2004-04-24 Werner Lemberg <wl@gnu.org>
+
+ * src/pcf/pcfdrivr.c: Revert change from 2004-04-17.
+ * src/pcf/pcfutil.c: Use FT_LOCAL_DEF.
+ * src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H.
+ Use FT_BEGIN_HEADER and FT_END_HEADER.
+ Use FT_LOCAL.
+
+2004-04-24 George Williams <gww@silcom.com>
+
+ Add support for Apple's distortable font technology (in GX fonts).
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro.
+
+ * include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style,
+ FT_MM_Var): New structures.
+ (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
+ FT_Set_Var_Blend_Coordinates): New function declarations.
+
+ * include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func,
+ FT_Set_Var_Design_Func): New typedefs.
+ Update MultiMasters service.
+
+ * include/freetype/internal/tttypes.h
+ [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H.
+ (GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef.
+ (TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend'
+ and `blend'.
+
+ * include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New
+ macros.
+
+ * include/freetype/internal/fttrace.h: Add `ttgxvar'.
+
+ * src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
+ FT_Set_Var_Blend_Coordinates): New functions.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face)
+ [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS
+ flag for GX var fonts.
+
+ * src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files.
+
+ * src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
+ ttgxvar.c.
+
+ * src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
+ FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h.
+ (tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
+ New service.
+ (tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
+
+ * 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.
+
+ * src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
+ ttgxvar.h.
+ (tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
+ tt_done_blend.
+
+ * src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
+ ttgxvar.h.
+ (tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
+ tt_face_vary_cvt.
+
+ * src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c.
+
+ * src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var
+ and T1_Set_Var_Design.
+
+ * src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros.
+ (T1_Get_MM_Var, T1_Set_Var_Design): New functions.
+
+ * src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New
+ function declarations.
+
+2004-04-23 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftcache.h (FT_Get_CharMap_Index): Rename
+ declaration and move to...
+ * include/freetype/freetype.h (FT_Get_Charmap_Index): Here.
+ (FREETYPE_PATCH): Set to 9.
+
+ * src/base/ftobjs.c (FT_Get_Charmap_Index): New function.
+
+ * builds/unix/configure.ac (version_info): Set to 9:7:3.
+ * builds/unix/configure: Updated.
+
+ * builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj: s/218/219/.
+
+ * builds/freetype.mk (refdoc), README, Jamfile (RefDoc):
+ s/2.1.8/2.1.9/.
+
+ * docs/CHANGES, docs/VERSION.DLL: Updated.
+
+2004-04-21 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffparse.c (cff_parser_run), src/psaux/psobjs.c
+ (ps_parser_load_field): Use FT_CHAR_BIT.
+
+2004-04-21 David Turner <david@freetype.org>
+
+
+ * Version 2.1.8 released.
+ =========================
+
+
+ * src/cff/cffobjs.c (cff_face_init): Fix a small memory leak.
+
+ * src/autofit/afloader.c (af_loader_load_g), src/autofit/afmodule.c
+ (af_autofitter_load_glyph), src/base/ftdebug.c (FT_Trace_Get_Name):
+ Remove compiler warnings.
+
+ * src/autofit/aftypes.h: Undefine AF_DEBUG.
+
+ * src/lzw/zopen.c (rmask), src/pcf/pcfdrivr.c (pcf_service_bdf,
+ pcf_services), src/pcf/pcfread.c (tableNames), src/psaux/psobjs.c
+ (ft_char_table), src/type42/t42drivr.c (t42_service_glyph_dict,
+ t42_service_ps_font_name): Decorate data arrays with `const' to
+ avoid populating the `.data' segment.
+
+ * src/lzw/Jamfile: New file.
+
+2004-04-20 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psobjs.c (T1Radix): Renamed to...
+ (ps_radix): This.
+ Update current cursor position.
+
+ * docs/CHANGES: Updated.
+
+2004-04-18 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c, src/truetype/ttgload.h (TT_Load_Glyph),
+ src/ttdriver.c (Load_Glyph): Change type of `glyph_index' to
+ FT_UInt. From Lex Warners.
+
+2004-04-17 Chisato Yamauchi <cyamauch@a.phys.nagoya-u.ac.jp>
+
+ * src/sfnt/ttload.c (tt_face_load_sfnt_header): Really fix change
+ from 2004-03-19.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `ft_strlen'.
+
+ * src/pcf/pcfutil.c, src/pcf/pcfutil.h: Decorate functions with
+ `static'.
+ Remove unused function `RepadBitmap'.
+ * src/pcf/pcfdrivr.c: Don't include pcfutil.h.
+
+2004-04-16 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype-config.in (usage): Fix and improve usage
+ information.
+
+2004-04-15 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ftconfig.in, builds/vms/ftconfig.h: Define
+ FT_CHAR_BIT.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Don't apply autohinting if
+ glyph is vertically distorted or mirrored.
+
+ * src/cff/cffgload.c (cff_slot_load): Handle zero `size' properly
+ for embedded bitmaps.
+
+ * docs/CHANGES: Updated.
+
+2004-04-15 bytesoftware <bytesoftware@btinternet.com>
+
+ * include/freetype/config/ftconfig.h, src/base/ftstream.c
+ (FT_Stream_ReadFields): More fixes using FT_CHAR_BIT.
+
+2004-04-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftconfig.h (FT_CHAR_BIT): New macro.
+
+2004-04-14 Alex Strelnikov <ptktyrf@mail.ru>
+
+ * src/cache/ftcsbits.c (ftc_snode_load): Initialize `*asize' in case
+ of error.
+
+2004-04-14 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftmac.c [__GNUC__]: Define OS_INLINE.
+ * builds/unix/configure.ac: Don't try to remove `-ansi' compilation
+ switch on the Mac.
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.5.6.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.8a.
+ * builds/unix/configure: Regenerated with autoconf 2.59a.
+
+2004-04-13 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftconfig.h: Use CHAR_BIT to define
+ size of FT_SIZEOF_xxx.
+
+2004-04-12 Chisato Yamauchi <cyamauch@a.phys.nagoya-u.ac.jp>
+
+ * include/freetype/internal/sfnt.h (TT_Find_SBit_Image_Func,
+ TT_Load_SBit_Metrics_Func): New typedefs.
+ (SFNT_Interface): Add find_sbit_image and load_sbit_metrics.
+
+ * src/sfnt/sfdriver.c (sfnt_interface): Updated.
+ * src/sfnt/ttsbit.h (tt_find_sbit_image, tt_load_sbit_metrics): New
+ declarations.
+ * src/sfnt/ttsbit.c (find_sbit_image): Renamed to...
+ (tt_find_sbit_image): This.
+ Updated all callers.
+ (load_sbit_metrics): Renamed to...
+ (tt_load_sbit_metrics): This.
+ Updated all callers.
+
+2004-04-12 Werner Lemberg <wl@gnu.org>
+
+ * configure: Accept makepp also.
+
+ * builds/unix/detect.mk: Use proper path to unix-def.mk.
+ * builds/unix/unix-def.in (BUILD_DIR, PLATFORM): Remove.
+ * builds/unix/unix.mk (BUILD_DIR, PLATFORM): Define.
+ Use BUILD_DIR.
+
+ * docs/INSTALL, docs/INSTALL.GNU, docs/INSTALL.UNX: Update
+ documentation on makepp.
+
+2004-04-11 Werner Lemberg <wl@gnu.org>
+
+ * src/lzw/zopen.c: Don't include sys/param.h and sys/stat.h.
+
+2004-04-10 Werner Lemberg <wl@gnu.org>
+
+ * src/lzw/ftlzw.c: Include zopen.h dependent on
+ FT_CONFIG_OPTION_USE_LZW.
+
+ * src/base/ftdebug.c: s/index/idx/ to avoid compiler warnings.
+
+2004-04-02 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.5.2.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.8a.
+ * builds/unix/configure: Regenerated with autoconf 2.59a.
+
+2004-04-01 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ft-munmap.m4 (FT_MUNMAP_PARAM): Fix arguments of
+ AC_COMPILE_IFELSE.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.8a.
+ * builds/unix/configure: Regenerated with autoconf 2.59a.
+ * builds/unix/config.guess, builds/unix/config.sub: Updated from
+ `config' CVS module at subversions.gnu.org.
+ * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
+ `texinfo' CVS module at subversions.gnu.org.
+ * builds/freetype.mk (refdoc): Updated.
+
+2004-03-31 Werner Lemberg <wl@gnu.org>
+
+ Handle broken FNT files which don't have a trailing NULL byte
+ in the face name string.
+
+ * src/winfonts/winfnt.h (FNT_FontRec): New member `family_name'.
+ * src/winfonts/winfnt.c (fnt_font_done): Free font->family_name.
+ (FNT_Face_Init): Append a final zero byte to the font face name.
+
+2004-03-30 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (tt_face_load_sfnt_header): Fix change from
+ 2004-03-19.
+
+2004-03-27 Werner Lemberg <wl@gnu.org>
+
+ * src/base/descrip.mms (OBJS): Add ftbbox.obj.
+
+2004-03-26 George Williams <gww@silcom.com>
+
+ Add vertical phantom points.
+
+ * include/freetype/internal/tttypes.h (TT_LoaderRec): Add
+ `top_bearing', `vadvance', `pp3', and `pp4'.
+
+ * src/autofit/afloader.c (af_loader_load_g): Handle two more points.
+
+ * src/autohint/ahhint.c (ah_hinter_load): Handle two more points.
+ * src/truetype/ttgload.c (Get_VMetrics): New function.
+ (TT_Load_Simple_Glyph, TT_Process_Simple_Glyph): Handle two more
+ points.
+ (load_truetype_glyph): Use Get_VMetrics.
+ Handle two more points.
+ (compute_glyph_metrics): Thanks to vertical phantom points we now
+ can always compute `advance_height' and `top_bearing'.
+ * src/truetype/ttobjs.h (TT_SubglyphRec): Add vertical phantom
+ points.
+
+
+ * src/autohint/ahglyph.c (ah_outline_load): Fix allocation of
+ `news'.
+
+2004-03-21 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix left side bearing.
+
+2004-03-20 Steve Hartwell <shspamsink@comcast.net>
+
+ * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Handle a NULL
+ value for `selection' as `select all'.
+
+2004-03-19 Steve Hartwell <shspamsink@comcast.net>
+
+ * src/sfnt/ttload.c (tt_face_load_sfnt_header): Reject face_index
+ values > 0 if loading non-TTC fonts.
+
+ * src/base/ftmac.c (open_face_from_buffer): Set positive face_index
+ to zero before calling FT_Open_Face.
+
+ * docs/CHANGES: Updated.
+
+2004-03-04 Werner Lemberg <wl@gnu.org>
+
+ * Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h:
+ Add LZW module.
+
+ * Jamfile.in: Removed.
+
+ * docs/CHANGES: Updated.
+
+ * include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/,
+ s/ABS/FT_ABS/. Updated all callers.
+
+ * src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c
+ (PCF_Face_Init): Use FT_ERROR_BASE.
+
+2004-03-04 Albert Chin <china@thewrittenword.com>
+
+ Add support for PCF fonts compressed with LZW (extension .pcf.Z,
+ created with `compress').
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (FT_CONFIG_OPTION_USE_LZW): New macro.
+
+ * include/freetype/ftlzw.h: New file.
+ * include/freetype/config/ftheader.h (FT_LZW_H): New macro for
+ ftlzw.h.
+
+ * src/lzw/*: New files.
+
+ * src/pcf/pcfdrivr.c: Include FT_LZW_H.
+ (PCF_Face_Init): Try LZW also.
+
+ * src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate.
+ Beautify.
+
+2004-03-03 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo.c (psh_hint_table_init): Simplify code.
+
+2004-03-02 Werner Lemberg <wl@gnu.org>
+
+ Add embedded bitmap support to CFF driver.
+
+ * src/cff/cffobjs.h (CFF_SizeRec): New structure.
+
+ * src/cff/cffgload.c (cff_builder_init): Updated.
+ (cff_slot_load): Updated.
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Load sbit.
+
+ * src/cff/cffobjs.c (sbit_size_reset)
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New function.
+ (cff_size_get_globals_funcs, cff_size_done, cff_size_init): Updated.
+ (cff_size_reset): Updated.
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Call sbit_size_reset.
+
+ * src/cff/cffdrivr.c (Load_Glyph): Updated.
+ (cff_driver_class): Use CFF_SizeRec.
+
+ * docs/CHANGES: Updated.
+
+2004-03-01 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshglob.c (psh_globals_scale_widths): Don't use
+ FT_RoundFix but FT_PIX_ROUND.
+ (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_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
+ hints.
+ (ps_hints_apply): Use psh_glyph_find_blue_points.
+
+2004-02-27 Garrick Meeker <garrick@digitalanarchy.com>
+
+ * builds/unix/configure.ac: Fix compiler flags for
+ `--with-old-mac-fonts'.
+ * builds/unix/configure: Regenerated.
+
+ * src/base/ftmac.c: s/TARGET_API_MAC_CARBON/!TARGET_API_MAC_OS8/.
+ (FT_New_Face_From_Resource): New function.
+ (FT_New_Face): Use FT_New_Face_From_Resource.
+ (FT_New_Face_From_FSSpec): Use FT_New_Face_From_Resource.
+ [__MWERKS__]: Don't include FSp_fopen.h.
+
+2004-02-26 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshglob.c (psh_globals_new): Fix value of
+ `dim->stdw.count'.
+ Don't assign default values to blue scale and blue shift.
+
+2004-02-25 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-02-25 Garrick Meeker <garrick@digitalanarchy.com>
+ Steve Hartwell <shspamsink@comcast.net>
+
+ Improve MacOS fond support. Provide a new API
+ `FT_New_Face_From_FSSpec' similar to `FT_New_Face'.
+
+ * src/base/ftmac.c [__MWERKS__]: Include FSp_fpopen.h.
+ STREAM_FILE [__MWERKS__]: New macro.
+ (ft_FSp_stream_close, ft_FSp_stream_io) [__MWERKS__]: New functions.
+ (file_spec_from_path) [__MWERKS__]: Updated #if statement.
+ (get_file_type, make_lwfn_spec): Use `const' for argument.
+ (is_dfont) [TARGET_API_MAC_CARBON]: Removed.
+ (count_face_sfnt, count_faces): New functions.
+ (parse_fond): Do some range checking.
+ (read_lwfn): Change type of second argument.
+ No longer call FSpOpenResFile.
+ (OpenFileAsResource): New function.
+ (FT_New_Face_From_LWFN): Use `const' for second argument.
+ Use OpenFileAsResource.
+ (FT_New_Face_From_Suitcase): Change type of second argument.
+ No longer call FSpOpenResFile.
+ Loop over all resource indices.
+ (FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Removed.
+ (FT_GetFile_From_Mac_Name): Use `const' for first argument.
+ (ResourceForkSize): Removed.
+ (FT_New_Face): Updated to use new functions.
+ (FT_New_Face_From_FSSpec): New function.
+
+ * include/freetype/ftmac.h: Updated.
+
+2004-02-24 Malcolm Taylor <mtaylor@clear.net.nz>
+
+ * src/autohint/ahhint.c (ah_hinter_load) <FT_GLYPH_FORMAT_OUTLINE>:
+ Handle case where outline->num_vedges is zero while computing hinted
+ metrics.
+
+2004-02-24 Gordon Childs <gchilds@quickcut.com.au>
+
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Provide correct value
+ for `count'.
+
+2004-02-24 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/t1tables.h (PS_PrivateRec): Add
+ `expansion_factor'.
+
+ * src/pshinter/pshglob (psh_blues_scale_zones): Fix computation
+ of blues->no_overshoots -- `blues_scale' is stored with a
+ magnification of 1000, and `scale' returns fractional pixels.
+
+ * src/type1/t1load.c (T1_Open_Face): Initialize `blue_shift',
+ `blue_fuzz', `expansion_factor', and `blue_scale' according to the
+ Type 1 specification.
+
+ * src/type1/t1tokens.h: Handle `ExpansionFactor'.
+
+ * docs/CHANGES: Updated.
+
+2004-02-24 Masatake YAMATO <jet@gyve.org>
+
+ Provide generic access to MacOS resource forks.
+
+ * src/base/ftrfork.c, include/freetype/internal/ftrfork.h: New
+ files.
+
+ * src/base/ftobjs.c: Include FT_INTERNAL_RFORK_H.
+ (Mac_Read_POST_Resource, Mac_Read_sfnt_Resource): Remove arguments
+ `resource_listoffset' and `resource_data' and adapt code
+ accordingly. These values are calculated outside of the function
+ now.
+ Add new argument `offsets'.
+ (IsMacResource): Use `FT_Raccess_Get_HeaderInfo' and
+ `FT_Raccess_Get_DataOffsets'.
+ (load_face_in_embedded_rfork): New function.
+ (load_mac_face): Use load_face_in_embedded_rfork.
+ (ft_input_stream_new): Renamed to...
+ (FT_Stream_New): This. Use FT_BASE_DEF. Updated all callers.
+ (ft_input_stream_free): Renamed to...
+ (FT_Stream_Free): This. Use FT_BASE_DEF. Updated all callers.
+
+ * src/base/ftbase.c: Include ftrfork.c.
+
+ * src/base/rules.mk (BASE_SRC), src/base/Jamfile: Updated.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_RFORK_H):
+ New macro.
+
+ * include/freetype/internal/fttrace.h: Added `rfork' as a new
+ trace definition.
+
+ * include/freetype/internal/ftstream.h: Declare FT_Stream_New and
+ FT_Stream_Free.
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK): New option.
+
+ * include/freetype/config/ftstdlib.h (ft_strrchr): New macro.
+
+2004-02-23 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+ * include/freetype/internal/ftdebug.h: Include FT_FREETYPE_H.
+
+2004-02-23 Masatake YAMATO <jet@gyve.org>
+
+ Provide a simple API to control FreeType's tracing levels.
+
+ * include/freetype/internal/ftdebug.h (FT_Trace_Get_Count,
+ FT_Trace_Get_Name): New declarations.
+
+ * src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name): New
+ functions.
+
+2004-02-23 David Turner <david@freetype.org>
+
+ * src/autofit/afhints.c, src/autofit/afhints.h,
+ src/autofit/aflatin.c, src/autofit/afloader.c, src/types.h: Grave
+ bugs have been fixed. The auto-fitter works, doesn't crash, but
+ still produces unexpected results...
+
+2004-02-21 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD): Changed to hold
+ the accepted shift for strong points in fractional pixels (which
+ is a heuristic value).
+ (psh_glyph_find_strong_points): Compute threshold for
+ psh_hint_table_find_strong_points.
+ (psh_hint_table_find_strong_point): Add parameter to pass threshold.
+
+2004-02-20 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshrec.c (ps_mask_table_set_bits): Don't call
+ ps_mask_table_alloc but ps_mask_table_last.
+ (ps_hints_t2mask): Use correct position and number for vertical
+ and horizontal hinter mask bits.
+
+ * docs/CHANGES: Updated.
+
+2004-02-19 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftstroke.c (FT_Glyph_StrokeBorder): Fix enum handling.
+ * src/cff/cffdrivr.c (cff_get_cmap_info): Remove compiler warning.
+
+2004-02-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h: Document FT_LOAD_TARGET_XXX properly.
+
+ * src/base/ftglyph.c (ft_bitmap_glyph_class,
+ ft_outline_glyph_class): Tag with FT_CALLBACK_TABLE_DEF.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render): Handle
+ FT_RENDER_MODE_LIGHT.
+
+2004-02-17 Werner Lemberg <wl@gnu.org>
+
+ Fix callback functions in cache module.
+
+ * src/cache/ftccback.h: New file for callback declarations.
+
+ * src/cache/ftcbasic.c (ftc_basic_family_compare,
+ ftc_basic_family_init, ftc_basic_family_get_count,
+ ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph,
+ ftc_basic_gnode_compare_faceid): Use FT_CALLBACK_DEF.
+ (ftc_basic_image_family_class, ftc_basic_image_cache_class,
+ ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class):
+ Use FT_CALLBACK_TABLE_DEF and local wrapper functions.
+
+ * src/cache/ftccache.c: Include ftccback.h.
+ (ftc_cache_init, ftc_cache_done): New wrapper functions which use
+ FT_LOCAL_DEF.
+
+ * src/cache/ftccmap.c: Include ftccback.h.
+ (ftc_cmap_cache_class): Use local wrapper functions.
+
+ * src/cache/ftcglyph.c: Include ftccback.h.
+ (ftc_gnode_compare, ftc_gcache_init, ftc_gcache_done): New wrapper
+ functions which use FT_LOCAL_DEF.
+
+ * src/cache/ftcimage.c: Include ftccback.h.
+ (ftc_inode_free, ftc_inode_new, ftc_inode_weight): New wrapper
+ functions which use FT_LOCAL_DEF.
+
+ * src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class):
+ Use FT_CALLBACK_TABLE_DEF.
+
+ * src/cache;/ftcsbits.c: Include ftccback.h.
+ (ftc_snode_free, ftc_snode_new, ftc_snode_weight,
+ ftc_snode_compare): New wrapper functions which use FT_LOCAL_DEF.
+
+ * src/cache/rules.mk (CACHE_DRV_H): Add ftccback.h.
+
+2004-02-17 Masatake YAMATO <jet@gyve.org>
+
+ * include/freetype/ftmac.h (FT_GetFile_From_Mac_Name): Fix a typo
+ (FT_EXPORT_DEF -> FT_EXPORT).
+
+ * include/freetype/ftxf86.h (FT_Get_X11_Font_Format): Ditto.
+
+2004-02-15 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Fix typo.
+
+2004-02-14 Masatake YAMATO <jet@gyve.org>
+
+ * builds/unix/ftsystem.c: Include errno.h.
+ (ft_close_stream): Renamed to...
+ (ft_close_stream_by_munmap): This.
+ (ft_close_stream_by_free): New function.
+ (FT_Stream_Open): Use fallback method if mmap fails.
+ Use proper function for closing the stream.
+
+2004-02-14 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_dict): Initialize `start_binary'.
+
+2004-02-13 Robert Etheridge <roberte@stcc.cc.tx.us>
+
+ * src/type42/t42objs.c (T42_Face_Init), src/type1/t1objs.c
+ (T1_Face_Init), src/cid/cidobjs.c (cid_face_init): Fix computation
+ of underline_position and underline_thickness.
+
+2004-02-12 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Return immediately if
+ ppem values don't change. Suggested by Graham Asher.
+
+2004-02-11 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c (cid_face_open): Always allocate
+ face->cid_stream so that we can deallocate it safely.
+
+2004-02-10 Werner Lemberg <wl@gnu.org>
+
+ Make the PS parser more tolerant w.r.t. non-standard font data. In
+ general, an error is only reported in case of a syntax error; a
+ wrong type is now simply ignored (if possible). To be independent
+ of the order of various MM-specific keywords, the parse_shared_dict
+ routine has been removed -- the PS parser is now capable to skip
+ this data. It no longer fails on parsing e.g.
+
+ dup /WeightVector exch def
+
+ Since the token following /WeightVector isn't `[' (starting an
+ array) it is simply ignored.
+
+ * include/freetype/fterrdef.h: Define `FT_Err_Ignore' (0xA2) as a
+ new internal error value.
+
+ * src/type1/t1load.c (parse_blend_axis_types,
+ parse_blend_design_positions, parse_blend_design_map): Return
+ T1_Err_Ignore if no proper array is following the keyword.
+ (parse_weight_vector): Use T1_ToTokenArray, initializing `blend'
+ structure, if necessary.
+ Return T1_Err_Ignore if no proper array is following the keyword.
+ (parse_shared_dict): Removed.
+ (parse_encoding): Set parser->root.error to return T1_Err_Ignore
+ if no result can be obtained.
+ Check for errors before accessing `elements' array.
+ (t1_keywords): Remove /shareddict.
+ (parse_dict): Reset error if t1_load_keyword returns T1_Err_Ignore.
+ Set keyword_flag only in case of success.
+ Check error code if skipping an unrecognized token.
+ (T1_Open_Face) [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: Call T1_Done_Blend
+ if blend commands haven't set up a proper MM font.
+
+ * src/psaux/psobjs.c (ps_parser_load_field_table): Remove special
+ code for synthetic fonts.
+ Return PSaux_Err_Ignore if no proper value has been found.
+
+2004-02-09 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_endchar>: Preserve glyph width before calling
+ cff_operator_seac.
+
+2004-02-09 Martin Muskens <mmuskens@aurelon.com>
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Handle special
+ first argument for `hintmask' and `cntrmask' operators also.
+
+2004-02-08 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.in: Call AC_SUBST for `enable_shared',
+ `hardcode_libdir_flag_spec', and `wl'.
+ * builds/unix/configure: Regenerated.
+
+ * builds/unix/freetype-config.in: Make --prefix and --exec-prefix
+ actually work.
+ Report a proper --rpath (or -R) value for --libs argument if a
+ shared library has been built.
+
+ * docs/CHANGES: Updated.
+
+2004-02-07 Keith Packard <keithp@keithp.com>
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init, BDF_Set_Pixel_Size): Fix
+ computation of various vertical and horizontal metric values.
+
+ * src/pcfdrivr.c (PCF_Set_Pixel_Size), src/pcfread (pcf_load_font):
+ Ditto.
+
+2004-02-07 Werner Lemberg <wl@gnu.org>
+
+ * builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.dsw, docs/CHANGES: Updated.
+
+2004-02-07 Vitaliy Pasternak <v_a_pasternak@mail.ru>
+
+ * builds/win32/visualc/freetype.sln,
+ builds/win32/visualc/freetype.vcproj: New files for VS.NET 2003.
+
+2004-02-03 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP):
+ Initialize `node'.
+ * src/type1/t1load.c (parse_dict): Initialize `have_integer'.
+
+2004-02-02 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_dict): Handle `RD' and `-|' commands
+ outside of /Subrs or /CharStrings. This can happen if there is
+ additional code manipulating those two arrays so that FreeType
+ doesn't recognize them properly.
+ (T1_Open_Face): Improve an error message.
+
+2004-02-01 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_charstrings): Exit immediately if
+ there are no elements in /CharStrings. This is needed for fonts
+ like Optima-Oblique which not only define /CharStrings but access it
+ also.
+
+2004-02-01 David Turner <david@freetype.org>
+
+ * src/sfnt/Jamfile: Removing `ttcmap' from the list of sources.
+
+ * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP)
+ <FTC_INLINE>: Provide macro version which doesn't use inline code.
+ * include/freetype/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP)
+ <FTC_INLINE>: Ditto.
+ Use FTC_MRULIST_LOOKUP_CMP.
+ * include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): New
+ macro.
+ (FTC_MRULIST_LOOKUP): Use it.
+
+ * src/cache/Jamfile (_sources), src/cache/descrip.mms: Updated.
+ * src/cache/ftcbasic.c: Fix compiler warnings.
+ * src/cache/ftcmanag.c (FTC_Manager_LookupSize,
+ FTC_Manager_LookupFace) <FTC_INLINE>: Use FTC_MRULIST_LOOKUP_CMP.
+ * src/cache/ftcmru.c (FTC_MruList_Find): Fix a bug (found after
+ heavy testing).
+
+ * Jamfile: Updating `refdoc' target, and adding `autohint' to the
+ list of modules to build. Both the autohinter and autofitter will
+ be built by default. But which one will be used is determined by
+ the content of `ftmodule.h'.
+
+ * src/autofit/*: Many updates, but the code is still buggy...
+
+2004-01-31 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_operator_seac): Fix magnitude of
+ accent offset.
+ Update code similarly to the seac support for Type 1 fonts.
+ (cff_decoder_parse_charstrings) <cff_op_endchar>: Fix magnitude
+ of accent offset.
+ Don't hint glyphs twice if seac is emulated.
+ <cff_op_flex>: Assign correct point tags.
+ * docs/CHANGES: Updated.
+
+2004-01-30 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Use FT_MEM_MOVE, not
+ FT_MEM_COPY, for copying the private dict.
+
+ * src/type1/t1load.c (parse_subrs): Assign number of subrs only
+ in first run.
+ (parse_charstrings): Parse /CharStrings in second run without
+ assigning values.
+ (parse_dict): Skip all /CharStrings arrays but the first. We need
+ this for non-standard fonts like `Optima' which have different
+ outlines depending on the resolution. Note that there is no
+ guarantee that we get fitting /Subrs and /CharStrings arrays; this
+ can only be done by a real PS interpreter.
+
+2004-01-29 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * builds/win32/visualc/index.html: New file, giving detailed
+ explanations about forcing CR+LF line endings for the VC++ project
+ files.
+
+2004-01-22 Garrick Meeker <garrick@digitalanarchy.com>
+
+ * src/cff/cffload.c (cff_subfont_load): Initialize `dict'.
+
+2004-01-22 Werner Lemberg <wl@gnu.org>
+
+ Add support for the hexadecimal representation of binary data
+ started with `StartData' in CID-keyed Type 1 fonts.
+
+ * include/freetype/internal/t1types.h (CID_FaceRec): Add new
+ members `binary_data' and `cid_stream'.
+
+ * src/cid/cidload.c (cid_read_subrs): Use `face->cid_stream'.
+ (cid_hex_to_binary): New auxiliary function.
+ (cid_face_open): Add new argument `face_index' to return quickly
+ if less than zero. Updated all callers.
+ Call `cid_hex_to_binary', then open and assign memory stream to
+ `face->cid_stream' if `parser->binary_length' is non-zero.
+ * src/cid/cidload.h: Updated.
+
+ * src/cid/cidobjs.c (cid_face_done): Free `binary_data' and
+ `cid_stream'.
+
+ * src/cid/cidparse.c (cid_parser_new): Check arguments to
+ `StartData' and set parser->binary_length accordingly.
+ * src/cid/cidparse.h (CID_Parser): New member `binary_length'.
+
+ * src/cid/cidgload.c (cid_load_glyph): Use `face->cid_stream'.
+
+ * docs/CHANGES: Updated.
+
+2004-01-21 Werner Lemberg <wl@gnu.org>
+
+ include/freetype/config/ftstdlib.h (ft_atoi): Replaced with...
+ (ft_atol): This.
+ * src/base/ftdbgmem.c: s/atol/ft_atol/.
+ * src/type42/t42drivr.c: s/ft_atoi/ft_atol/.
+
+2004-01-20 Masatake YAMATO <jet@gyve.org>
+
+ * include/freetype/ftcache.h: Delete duplicated definition of
+ FTC_FaceID.
+
+ * src/cff/cffdrivr.c (cff_get_cmap_info): Call sfnt module's TT CMap
+ Info service function if the cmap comes from sfnt. Return 0 if the
+ cmap is sythesized in cff module.
+
+2004-01-20 David Turner <david@freetype.org>
+
+ * src/cache/ftcmanag.c (ftc_size_node_compare): Call
+ FT_Activate_Size.
+
+2004-01-20 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Skip exactly one
+ CR, LF, or CR/LF after `eexec'.
+
+2004-01-18 David Turner <david@freetype.org>
+
+ * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Remove compiler
+ warning.
+
+ * src/tools/docmaker/*: Updating beautifier tool.
+
+2004-01-15 David Turner <david@freetype.org>
+
+ * src/base/ftoutln.c (ft_orientation_extremum_compute): Fix
+ infinite loop bug.
+
+ * include/freetype/ftstroke.h: Include FT_GLYPH_H.
+ (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_Glyph_StrokeBorder): New
+ declarations.
+
+ * src/base/ftstroke.c: Include FT_INTERNAL_OBJECTS_H.
+ (FT_Outline_GetOutsideBorder): Inverse result.
+ (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_GlyphStrokeBorder): New
+ functions.
+ (FT_Stroker_EndSubPath): Close path if needed.
+ (FT_Stroker_Set, FT_Stroker_ParseOutline): Use FT_Stroker_Rewind.
+
+ * include/freetype/cache/ftcmanag.h (FTC_ScalerRec,
+ FTC_Manager_LookupSize): Moved to...
+ * include/freetype/ftcache.h (FTC_ScalerRec,
+ FTC_Manager_LookupSize): Here.
+
+ * src/tools/docmaker/docbeauty.py: New file to beautify the
+ documentation comments (e.g., to convert them to single block border
+ mode).
+ * src/tools/docmaker/docmaker.py (file_exists, make_file_list):
+ Moved to...
+ * src/tools/docmaker/utils.py (file_exists, make_file_list): Here.
+
+2004-01-14 David Turner <david@freetype.org>
+
+ * include/freetype/internal/ftmemory.h (FT_ARRAY_COPY,
+ FT_ARRAY_MOVE): New macros to make copying arrays easier.
+ Updated all relevant code to use them.
+
+2004-01-14 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_font_load): Load charstrings_index earlier.
+ Use number of charstrings as argument to CFF_Load_FD_Select (as
+ documented in the CFF specs).
+
+2004-01-13 Graham Asher <graham.asher@btinternet.com>
+
+ * src/pshinter/pshalgo.c (psh_glyph_init): Move assignment of
+ `glyph->memory' up to free arrays properly in case of failure.
+
+2004-01-10 Masatake YAMATO <jet@gyve.org>
+
+ Make `FT_Get_CMap_Language_ID' work with CFF. Bug reported by
+ Steve Hartwell <shspamsink@comcast.net>.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_TT_CMAP_H.
+ (cff_services): Added an entry for FT_SERVICE_ID_TT_CMAP.
+ (cff_get_cmap_info): New function.
+ (cff_service_get_cmap_info) New entry for cff_services.
+
+ * src/sfnt/ttcmap0.c: Exit loop after a format match has been found.
+ Suggested by Steve Hartwell <shspamsink@comcast.net>.
+
+2004-01-03 Masatake YAMATO <jet@gyve.org>
+
+ * src/base/ftobjs.c (destroy_charmaps): New function.
+ (destroy_face, open_face): Use `destroy_charmaps'.
+
+2004-01-01 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-01-01 Michael Jansson <mjan@em2-solutions.com>
+
+ * src/winfonts/winfnt.c (FNT_Size_Set_Pixels): Fix sign of
+ size->metrics.descender.
+
+2003-12-31 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ [FT_DEBUG_LEVEL_TRACE]: Use `%ld' in FT_TRACE4.
+ <cff_op_flex1>: Change type of dx and dy to FT_Pos and remove
+ cast for accessing arguments.
+
+2003-12-31 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Revert previous
+ change. It's not necessary.
+
+2003-12-29 Smith Charles <smith.charles@free.fr>
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle `repeated
+ flags set' correctly.
+
+2003-12-29 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Fix memory leak by deallocating
+ `full' and `weight' properly.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask> [FT_DEBUG_LEVEL_TRACE]: Use `0x' as prefix for
+ tracing output.
+
+2003-12-26 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/sfnt.h (TT_Set_SBit_Strike_Func):
+ Use FT_UInt for ppem values.
+ * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use FT_UInt for
+ ppem values.
+ * src/sfnt/ttsbit.h: Updated.
+
+ * src/base/ftobjs.c (FT_Set_Pixel_Sizes): Don't allow ppem values
+ larger than -0FFFF.
+
+2003-12-25 Werner Lemberg <wl@gnu.org>
+
+ * src/base/fttrigon.c, src/base/ftgloadr.c: Inlude
+ FT_INTERNAL_OBJECTS_H.
+
+ * src/base/ftstroke.c (FT_Outline_GetInsideBorder,
+ FT_Outline_GetOutsideBorder): s/or/o/ to make it compile with
+ C++ compilers.
+
+ * src/cache/ftcmru.c, include/freetype/cache/ftcmru.h:
+ s/select/selection/ to avoid compiler warning.
+ * src/cff/cffload.h: s/select/ftselect/ to avoid potential
+ compiler warning.
+
+2003-12-24 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftcsbits.c (FTC_SNode_Weight):
+ s/FTC_SBIT_ITEM_PER_NODE/FTC_SBIT_ITEMS_PER_NODE/.
+
+2003-12-24 David Turner <david@freetype.org>
+
+ * Fixed compilation problems in the cache sub-system.
+
+ * Partial updates to src/autofit.
+
+ * Jamfile (FT2_COMPONENTS): Add autofit module.
+
+2003-12-23 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_lookup_glyph_by_stdcharcode): Handle
+ CID-keyed fonts.
+
+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.
+ Note that `(x) & -64' causes a warning if (x) is not signed. Use
+ `(x) & ~63' instead!
+ Updated all related code.
+
+ Add support for extraction of `inside' and `outside' borders.
+
+ * src/base/ftstroke.c (FT_StrokerBorder): New enumeration.
+ (FT_Outline_GetInsideBorder, FT_Outline_GetOutsideBorder,
+ FT_Stroker_GetBorderCounts, FT_Stroker_ExportBorder): New functions.
+ (FT_StrokeBorderRec): New boolean member `valid'.
+ (ft_stroke_border_get_counts): Updated.
+ * include/freetype/ftstroke.h: Updated.
+
+2003-12-22 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftwinfnt.h (FT_WinFNT_ID_*): New definitions
+ to describe the `charset' field in FT_WinFNT_HeaderRec.
+ * src/winfonts/winfnt.c (FNT_Face_Init): Set encoding to
+ FT_ENCODING_NONE except for FT_WinFNT_ID_MAC.
+
+ * include/freetype/freetype.h (FT_Encoding): Improve comment,
+ based on work by Detlef Würkner <TetiSoft@apg.lahn.de>.
+
+ * docs/CHANGES: Updated.
+
+2003-12-22 David Turner <david@freetype.org>
+
+ * include/freetype/ftcache.h,
+ include/freetype/cache/ftcmanag.h,
+ include/freetype/cache/ftccache.h,
+ include/freetype/cache/ftcmanag.h,
+ include/freetype/cache/ftcmru.h (added),
+ include/freetype/cache/ftlru.h (removed),
+ include/freetype/cache/ftcsbits.h,
+ include/freetype/cache/ftcimage.h,
+ include/freetype/cache/ftcglyph.h,
+ src/cache/ftcmru.c,
+ src/cache/ftcmanag.c,
+ src/cache/ftccache.c,
+ src/cache/ftcglyph.c,
+ src/cache/ftcimage.c,
+ src/cache/ftcsbits.c,
+ src/cache/ftccmap.c,
+ src/cache/ftcbasic.c (added),
+ src/cache/ftclru.c (removed):
+
+ *Complete* rewrite of the cache sub-system to `solve' the
+ following points:
+
+ - all public APIs have been moved to FT_CACHE_H, everything
+ under `include/freetype/cache' is only needed by client
+ applications that want to implement their own caches
+
+ - a new function named FTC_Manager_RemoveFaceID to deal
+ with the uninstallation of FaceIDs
+
+ - the image and sbit cache are now abstract classes, that
+ can be extended much more easily by client applications
+
+ - better performance in certain areas. Further optimizations
+ to come shortly anyway...
+
+ - the FTC_CMapCache_Lookup function has changed its signature,
+ charmaps can now only be retrieved by index
+
+ - FTC_Manager_Lookup_Face => FTC_Manager_LookupFace
+ FTC_Manager_Lookup_Size => FTC_Manager_LookupSize (still in
+ private header for the moment)
+
+2003-12-21 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_dict): Stop parsing if `eexec' keyword
+ is encountered.
+
+2003-12-19 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 32. For
+ example, the Japanese Hiragino font already contains 15 subfonts.
+
+ * src/cff/cffload.c (cff_font_load): Deallocate `sids' array for
+ CID-keyed fonts.
+
+ * devel/ftoption.h: Define FT_DEBUG_MEMORY.
+
+2003-12-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ttnameid.h (TT_ADOBE_ID_LATIN_1): New macro.
+ * src/type1/t1objs.c (T1_Face_Init): Use TT_ADOBE_ID* values.
+
+2003-12-18 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cfftypes.h (CFF_FontRecDictRec): Change type of
+ `cid_count' to `FT_ULong'.
+
+ * src/cff/cffgload.c (cff_slot_load): Take care of empty `cids'
+ array.
+
+ * src/cff/cffload.c (cff_charset_done): Free `cids' array.
+ (cff_font_load): Create cids array only for CID-keyed fonts which
+ are subsetted.
+
+ * src/cff/cffobjs.c (cff_face_init): Check the availability of
+ the PSNames modules for non-pure CFFs also.
+ Set FT_FACE_FLAG_GLYPH_NAMES for a non-pure CFF also if it isn't
+ CID-keyed.
+
+ * src/cff/rules.mk (CFF_DRV_H): Add cfftypes.h.
+
+2003-12-17 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Don't set
+ FT_FACE_FLAG_GLYPH_NAMES if the font contains a version 3.0 `post'
+ table.
+
+ * docs/CHANGES: Updated.
+
+2003-12-17 Masatake YAMATO <jet@gyve.org>
+
+ Add new function FT_Get_CMap_Language_ID to extract the language ID
+ for TrueType/sfnt fonts.
+
+ * include/freetype/internal/services/svttcmap.h: New file.
+ * include/freetype/internal/ftserv.h (FT_SERVICE_TT_CMAP_H): Add
+ svttcmap.h.
+
+ * src/sfnt/sfdriver.c: Include ttcmap0.h.
+ (tt_service_get_cmap_info): New service.
+ (sfnt_services): Updated.
+
+ * src/sfnt/ttcmap0.c (tt_cmap*_get_info): New functions.
+ (tt_cmap*_class_rec): Add tt_cmap*_get_info members.
+ (tt_get_cmap_info): New function.
+ * src/sfnt/ttcmap0.h: Include FT_SERVICE_TT_CMAP_H.
+ (TT_CMap_ClassRec): New field `get_cmap_info'.
+ (tt_get_cmap_info): New declaration.
+
+ * src/base/ftobjs.c: Include FT_SERVICE_TT_CMAP_H.
+ (FT_Get_CMap_Language_ID): New function implementation.
+ * include/freetype/tttables.h (FT_Get_CMap_Language_ID): New
+ function declaration.
+
+2003-12-16 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: Removed. Obsolete.
+
+ * include/freetype/internal/sfnt.h (SFNT_Interface): Remove
+ obsolete fields `load_charmap' and `free_charmap'.
+ (TT_CharMap_Load_Func, TT_CharMap_Free_Func): Removed.
+ * src/sfnt/sfnt.c: Don't include ttcmap.c.
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttcmap.c.
+ * src/sfnt/ttload.c: Don't include ttcmap.h.
+ * src/sfnt/sfdriver.c: Don't include ttcmap.h.
+ (sfnt_interface): Updated.
+
+ * include/freetype/internal/tttypes.h (TT_TableDirRec,
+ TT_CMapDirRec, TT_CMapDirEntryRec, TT_CMap0, TT_CMap2SubHeaderRec,
+ TT_CMap2Rec, TT_CMap4Segment, TT_CMap4Rec, TT_CMap6,
+ TT_CMapGroupRec, TT_CMap8_12Rec, TT_CMap10Rec, TT_CharMap_Func,
+ TT_CharNext_Func, TT_CMapTableRec, TT_CharMapRec): Removed.
+ Obsolete.
+ * src/cff/cffobjs.h (CFF_CharMapRec): Removed. Obsolete.
+
+2003-12-15 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2003-12-15 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * builds/atari/*: New directory for building FreeType 2 on Atari
+ with the PureC compiler.
+
+2003-12-12 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add
+ cast.
+ * src/cff/cffdrivr.c (cff_ps_has_glyph_names): Assure that return
+ value is either 0 or 1.
+
+2003-12-12 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffdrivr.c (cff_get_glyph_name): Improve error message.
+ (cff_get_name_index): Return if no PSNames service is available.
+ (cff_ps_has_glyph_names): Handle CID-keyed fonts correctly.
+ * src/cff/cfftypes.h (CFF_CharsetRec): New field `cids', used for
+ CID-keyed fonts. This is the inverse mapping of `sids'.
+ * src/cff/cffload.c (cff_charset_load): New argument `invert'.
+ Initialize charset->cids if `invert' is set.
+ (cff_font_load): In call to cff_charset_load, set `invert' to true
+ for CID-keyed fonts.
+ * src/cff/cffgload.c (cff_slot_load): Handle glyph index as CID
+ and map it to the real glyph index.
+
+ * docs/CHANGES: Updated.
+
+2003-12-11 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Don't set
+ FT_FACE_FLAG_GLYPH_NAMES for CID-keyed fonts.
+ Don't construct a cmap for CID-keyed fonts.
+
+2003-12-10 Werner Lemberg <wl@gnu.org>
+
+ Use implementation specific SID value 0xFFFF to indicate that
+ a dictionary element is missing.
+
+ * src/cff/cffload.c (cff_subfont_load): Initialize all fields
+ which hold SIDs to 0xFFFF.
+ (cff_index_get_sid_string): Handle SID value 0xFFFF.
+ Handle case where `psnames' is zero.
+ (cff_font_load): Updated.
+ Don't load encoding for CID-keyed CFFs.
+
+ * src/cff/cffobjs.c (cff_face_init): Updated.
+ Don't check for PSNames module if font is CID-keyed.
+ Compute style name properly (using the same algorithm as in the
+ CID driver).
+ Fix computation of style flags.
+
+ * src/cff/cfftoken.h: Comment out handling of base_font_name.
+ Rename `postscript' field to `embedded_postscript'
+ * src/cff/cfftypes.h (CFF_FontRecDictRec): Remove `base_font_name'
+ and `postscript'.
+
+2003-12-10 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/pcf/pcfdrivr.c (pcf_get_charset_id): New function (a clone
+ of the similar BDF function).
+ (pcf_service_bdf): Use it.
+
+2003-12-09 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Set FT_FACE_FLAG_GLYPH_NAMES
+ only if a `post' table is present.
+
+2003-12-09 George Williams <gww@silcom.com>
+
+ * src/base/ftobjs.c (load_mac_face): Recent versions of Linux
+ support Mac's HFS+ file system, thus enable code to read /rsrc on
+ non-Macintosh platforms also.
+
+2003-12-08 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (PS_TableRec): Change type
+ of `lengths' to FT_PtrDist.
+ (T1_DecoderRec): Change type of `subrs_len' to FT_PtrDist.
+ * include/freetype/internal/t1types.h (T1_FontRec): Change type
+ of `subrs_len' and `charstrings_len' to FT_PtrDist.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Replace `junk'
+ variable with better solution.
+ (IsMacResource): Remove unused variable `map_len'.
+ Replace `junk' variable with better solution.
+ (FT_Open_Face) [!FT_MACINTOSH]: Add conditional
+ FT_CONFIG_OPTION_MAC_FONTS.
+
+2003-12-08 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * src/autohint/ahhint.c (ah_hinter_hint_edges,
+ ah_hinter_align_strong_points): Add some casts.
+
+ * src/base/ftoutln.c (FT_OrientationExtremumRec): Change type
+ of `pos' to FT_Long.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource,
+ Mac_Read_sfnt_Resource): Change type of `len' to FT_Long.
+
+ * src/type42/t42parse.c (t42_parse_dict): Add cast for `n_keywords'.
+
+2003-12-07 Werner Lemberg <wl@gnu.org>
+
+ * docs/raster.txt: New file, taken from FreeType 1 and completely
+ revised.
+
+2003-12-04 Masatake YAMATO <jet@gyve.org>
+
+ * src/type1/t1driver.c (Get_Interface): Remove FT_UNUSED for
+ t1_interface. t1_interface is used.
+
+2003-11-27 David Turner <david@freetype.org>
+
+ * src/pfr/pfrdrivr.c (pfr_get_metrics): Revert incorrect change of
+ 2003-11-23: For PFR fonts, metrics->x_scale and metrics->y_scale are
+ the scaling values for outline units, not for metric units.
+
+2003-11-25 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c, include/freetype/internal/ftcalc.h
+ (FT_MulDiv_No_Round): Surround code with `#ifdef
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER ... #endif'.
+
+2003-11-23 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c (FT_MulDiv_No_Round): New function (32 and
+ 64 bit version).
+ * include/freetype/internal/ftcalc.h: Updated.
+
+ * src/truetype/ttinterp.c (TT_MULDIV_NO_ROUND): New macro.
+ (TT_INT64): Removed.
+ (DO_DIV): Use TT_MULDIV_NO_ROUND.
+
+ * src/pfr/pfrdrivr.c (pfr_get_metrics): Directly use
+ metrics->x_scale and metrics->y_scale.
+
+2003-11-22 Rogier van Dalen <R.C.van.Dalen@umail.leidenuniv.nl>
+
+ * src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
+ (Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
+ functions. Similar to Direct_Move, Direct_Move_X, and
+ Direct_Move_Y but without touching.
+ (Compute_Funcs): Use new functions.
+
+ (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
+ Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
+ Round_Super_45): Fix rounding of value zero.
+
+ (DO_DIV): Don't use TT_MULDIV.
+
+ (Ins_SHC): This instruction actually touches the points.
+ (Ins_MSIRP): Fix undocumented behaviour.
+
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
+
+2003-11-22 Werner Lemberg <wl@gnu.org>
+
+ * docs/VERSION.DLL, docs/CHANGES: Updated.
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
+ metrics->y_scale really precise.
+
+ (FT_Load_Glyph): Update computation of linearHoriAdvance and
+ linearVertAdvance.
+
+ * src/truetype/ttinterp.c (Update_Max): Use FT_REALLOC.
+
+2003-11-22 David Turner <david@freetype.org>
+
+ * src/autofit/*: More updates.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
+ * builds/unix/configure.ac (version_info): Set to 9:6:3.
+ * README: Updated.
+
+2003-11-13 John A. Boyd Jr. <jaboydjr@netwalk.com>
+
+ * src/bdf/bdfdrivr.c (bdf_interpret_style), src/pcf/pcfread.c
+ (pcf_interpret_style): Replace spaces with dashes in properties
+ SETWIDTH_NAME and ADD_STYLE_NAME to simplify parsing.
+
+2003-11-11 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2003-11-11 John A. Boyd Jr. <jaboydjr@netwalk.com>
+
+ Handle SETWIDTH_NAME and ADD_STYLE_NAME properties for BDF and PCF
+ fonts.
+
+ * src/bdf/bdfdrivr.c (bdf_interpret_style): New auxiliary function.
+ (BDF_Face_Init): Don't handle style properties but call
+ bdf_interpret_style.
+
+ * src/pcf/pcfread.c (pcf_interpret_style): New auxiliary function.
+ (pcf_load_font): Don't handle style properties but call
+ pcf_interpret_style.
+
+2003-11-07 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.1.7 released.
+ =========================
+
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
+
+ * builds/unix/ft2unix.h: Fix comments.
+
+ * builds/unix/ftconfig.in: Synchronized with ANSI version.
+ Use `#undef' in templates as recommended in the autoconf
+ documentation.
+ Since real `#undef' lines don't survive during configuration, use
+ `/undef' instead; the postprocessing facility of the
+ AC_CONFIG_HEADERS autoconf macro converts them to `#undef'.
+
+ * builds/unix/install.mk (install): Install Unix version of
+ `ftconfig.h'.
+
+ * builds/unix/unix-cc.in (CFLAGS): Set FT_CONFIG_CONFIG_H macro
+ to include the correct `ftconfig.h' file.
+
+ * builds/unix/ft-munmap.m4 (FT_MUNMAP_DECL): Removed.
+ (FT_MUNMAP_PARAM): Updated syntax to autoconf 2.59.
+
+ * builds/unix/freetype2.m4: Updated syntax to autoconf 2.59.
+
+ * builds/unix/configure.ac: Use AC_CONFIG_HEADERS instead of
+ AC_CONFIG_HEADER to create ftconfig.h, and use second argument
+ to replace `/undef' with `#undef'.
+ Don't use FT_MUNMAP_DECL but AC_CHECK_DECLS to check for munmap.
+ Use AS_HELP_STRING in AC_ARG_WITH.
+ Update syntax to autoconf 2.59.
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.5.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.7.8.
+ * builds/unix/configure: Regenerated with autoconf 2.59.
+ * builds/unix/config.guess, builds/unix/config.sub: Updated from
+ `config' CVS module at subversions.gnu.org
+ * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
+ `texinfo' CVS module at subversions.gnu.org.
+
+ * builds/vms/ftconfig.h: Synchronized with ANSI version.
+
+ * docs/CUSTOMIZE: Fix documentation error.
+ * docs/CHANGES, docs/VERSION.DLL, docs/release: Updated.
+
+ * builds/freetype.mk (refdoc): Updated --title.
+
+2003-11-07 David Turner <david@freetype.org>
+
+
+ * Version 2.1.6 released.
+ =========================
+
+
+ * install: Removed. Obsolete.
+
+2003-11-04 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfdriver.c: Include FT_SERVICE_SFNT_H.
+ (sfnt_service_sfnt_table): New service.
+ (sfnt_services): Updated.
+
+ * docs/license.txt: Reworded.
+
+2003-11-03 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/*: Add a guard to all public header files which
+ load FT_FREETYPE_H to reject freetype.h from FreeType 1.
+
+2003-11-02 Patrick Welche <prlw1@newn.cam.ac.uk>
+
+ * builds/unix/freetype2.m4, builds/unix/ft-munmap.m4: Protect
+ first argument of AC_DEFUN with brackets to avoid possible
+ expansion.
+
+2003-11-02 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/cache/ftcglyph.h: Don't include stddef.h.
+
+ * include/freetype/freetype.h: Fix check for ft2build.h.
+
+2003-11-01 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h: Check that ft2build.h has been
+ loaded first.
+
+ * src/base/fttype1.c (FT_Get_PS_Font_Info): Fix incorrectly applied
+ patch.
+
+2003-10-31 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/base/fttype1.c (FT_Get_PS_Font_Info, FT_Has_PS_Glyph_Names):
+ Fix parameter order in calls to FT_FACE_FIND_SERVICE.
+
+2003-10-31 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftserv.h
+ (FT_SERVICE_POSTSCRIPT_NAMES_H): Removed. Unused.
+
+ * src/type42/t42drivr.c (t42_services): Updated.
+
+2003-10-29 David Turner <david@freetype.org>
+
+ * include/freetype/internal/bdftypes.h: Removed. Obsolete.
+ * src/base/ftbdf.c: Updated.
+
+ * include/freetype/internal/cfftypes.h: Moved to...
+ * src/cff/cfftypes.h: This place since no other module needs to
+ know about those types.
+
+ * include/freetype/internal/t42types.h: Moved to...
+ * src/type42/t42types.h: This place since no other module needs to
+ know about those types.
+
+ * include/freetype/internal/services/svbdf.h: Include FT_BDF_H.
+
+ * include/freetype/internal/services/svpsname.h: Renamed to...
+ * include/freetype/internal/services/svpscmap.h: This.
+ Updated `FT_Service_PsNames' -> `FT_Service_PsCMaps' and
+ `POSTSCRIPT_NAMES' -> `POSTSCRIPT_CMAPS' everywhere.
+
+ * include/freetype/internal/services/svpsinfo.h: New file, providing
+ PostScript info service.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_POSTSCRIPT_CMAPS_H,
+ FT_SERVICE_POSTSCRIPT_INFO_H): New macros for svpscmap.h and
+ svpsinfo.h.
+ * include/freetype/internal/internal.h (FT_INTERNAL_TYPE42_TYPES_H,
+ FT_INTERNAL_CFF_TYPES_H, FT_INTERNAL_BDF_TYPES_H): Removed.
+
+ * src/base/fttype1.c: Don't include FT_INTERNAL_TYPE1_TYPES_H and
+ FT_INTERNAL_TYPE42_TYPES_H but FT_INTERNAL_SERVICE_H and
+ FT_SERVICE_POSTSCRIPT_INFO_H.
+ (FT_Get_PS_Font_Info, FT_Has_PS_Glyph_Names): Use new
+ POSTSCRIPT_INFO service.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
+ (cff_ps_has_glyph_names): New function.
+ (cff_service_ps_info): New service.
+ (cff_services): Updated.
+
+ * src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h: Don't
+ include FT_INTERNAL_CFF_TYPES_H but cfftypes.h directly.
+
+ * src/cif/cidriver.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
+ (cid_ps_get_font_info): New function.
+ (cid_service_ps_info): New service.
+ (cid_services): Updated.
+
+ * src/type1/t1driver.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
+ (t1_ps_get_font_info, t1_ps_has_glyph_names): New functions.
+ (t1_service_ps_info): New service.
+ (t1_services): Updated.
+
+ * src/type42/t42drivr.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
+ (t42_ps_get_font_info, t42_ps_has_glyph_names): New functions.
+ (t42_service_ps_info): New service.
+
+ * src/type42/t42objs.h: Don't include FT_INTERNAL_TYPE42_TYPES_H
+ but t42types.h directly.
+
+ * src/psnames/psmodule.c (psnames_interface, psnames_services):
+ Renamed to...
+ (pscmaps_interface, pscmaps_services): This.
+ Updated all users.
+
+
+ * src/gzip/infblock.c (inflate_blocks): Remove compiler warning.
+
+2003-10-22 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_encoding): Handle `/Encoding [ ... ]'.
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Test whether `eexec'
+ is real.
+
+ * src/type42/t42parse.c (t42_parse_encoding): Improve boundary
+ checking while parsing.
+
+ * docs/CHANGES: Updated.
+
+2003-10-21 Josselin Mouette <joss@debian.org>
+
+ * include/freetype/internal/t1types.h (T1_FontRec): `paint_type'
+ and `stroke_width' aren't pointers.
+
+ * src/type42/t42objs.c (T42_Face_Done), src/type1/t1objs.c
+ (T1_Face_Done): Don't free `paint_type' and `stroke_width'.
+
+2003-10-20 Graham Asher <graham.asher@btinternet.com>
+
+ * src/winfonts/winfnt.c (fnt_cmap_class): Fix position of `const'.
+
+2003-10-19 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Patch from
+ 2003-08-18 introduced a severe bug (FT_Render_Glyph was called
+ twice under some circumstances, causing strange results). This
+ is fixed now by clearing the FT_LOAD_RENDER bit of `load_flags'.
+
+ * src/base/ftpfr.c (FT_Get_PFR_Metrics): Initialize `error'.
+ * src/psaux/psobjs.c (ps_tobytes): Initialize `n'.
+ * src/type42/t42parse.c (t42_parse_sfnts): Initialize `string_size'.
+
+2003-10-16 Werner Lemberg <wl@gnu.org>
+
+ Completely revised Type 42 parser. It now handles both fonts
+ produced with ttftot42 (tested version 0.3.1) and
+ TrueTypeToType42.ps (tested version May 2001; it is necessary to
+ fix the broken header comment to be `%!PS-TrueTypeFont...').
+
+ * src/type42/t42objs.c (T42_GlyphSlot_Load): Change fourth
+ parameter to `FT_UInt'.
+ * src/type42/t42objs.h: Updated.
+
+ * src/type42/t42parse.h (T42_ParserRec): Change type of `in_memory'
+ to FT_Bool.
+ (T42_Loader): Change type of `num_chars' and `num_glyphs' to
+ FT_UInt.
+ Add `swap_table' element.
+ * src/type42/t42parse.c (T42_KEYWORD_COUNT, T1_ToFixed,
+ T1_ToCoordArray, T1_ToTokenArray): Removed.
+ (T1_ToBytes): New macro.
+ (t42_is_alpha, t42_hexval): Removed.
+ (t42_is_space): Handle `\0'.
+ (t42_parse_encoding): Updated to use new PostScript parser routines
+ from psaux.
+ Handle `/Encoding [ ... ]' also.
+ (T42_Load_Status): New enumeration.
+ (t42_parse_sfnts): Updated to use new PostScript parser routines
+ from psaux.
+ (t42_parse_charstrings): Updated to use new PostScript parser
+ routines from psaux.
+ Handle `/CharStrings << ... >>' also.
+ Don't expect that /.notdef is the first element in dictionary. Copy
+ code from type1 module to handle this.
+ (t42_parse_dict): Updated to use new PostScript parser routines
+ from psaux.
+ Remove code for synthetic fonts (which can't occur in Type 42
+ fonts).
+ (t42_loader_done): Release `swap_table'.
+
+ * src/psaux/psobjs.c (skip_string): Increase `cur' properly.
+
+ * src/type1/t1load.c (parse_charstrings): Make test for `.notdef'
+ faster.
+
+2003-10-15 Graham Asher <graham.asher@btinternet.com>
+
+ * src/autohint/ahglobal.c (blue_chars), src/winfonts/winfnt.c
+ (fnt_cmap_class_rec, fnt_cmap_class), src/bdf/bdflib.c (empty,
+ _num_bdf_properties), src/gzip/infutil.c (inflate_mask),
+ src/gzip/inffixed.h (fixed_bl, fixed_bd, fixed_tl, fixed_td),
+ src/gzip/inftrees.h (inflate_trees_fixed), srf/gzip/inftrees.c
+ (inflate_trees_fixed): Decorate with more `const' to avoid
+ writable global variables which are disallowed on ARM.
+
+2003-10-08 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_font_matrix, parse_charstrings): Remove
+ code specially for synthetic fonts; this is handled elsewhere.
+ (parse_encoding): Remove code specially for synthetic fonts; this is
+ handled elsewhere.
+ Improve boundary checking while parsing.
+ (parse_dict): Improve boundary checking while parsing.
+ Use ft_memcmp to simplify code.
+
+2003-10-07 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs, parse_dict): Handle synthetic
+ fonts properly.
+ (parse_charstrings): Copy correct number of characters into
+ `name_table'.
+
+2003-10-06 Werner Lemberg <wl@gnu.org>
+
+ Heavy modification of the PS parser to handle comments and strings
+ correctly. This doesn't slow down the loading of PS fonts
+ significantly since charstrings aren't affected.
+
+ * include/freetype/config/ftstdlib.h (ft_xdigit): Renamed to...
+ (ft_isxdigit): This. Updated all callers.
+ (ft_isdigit): New alias to `isdigit'.
+
+ * include/freetype/internal/psaux.h (PS_Parser_FuncsRec): Renamed
+ `skip_alpha' to `skip_PS_token'.
+ Add parameter to `to_bytes' and change some argument types.
+
+ * src/psaux/psauxmod.c (ps_parser_funcs): Updated.
+ * src/psaux/psobjs.c (ft_char_table): New array to map character
+ codes (ASCII and EBCDIC) of digits to numbers.
+ (OP): New auxiliary macro holding either `>=' or `<' depending on
+ the character encoding.
+ (skip_comment): New function.
+ (skip_spaces): Use it.
+ (skip_alpha): Removed.
+ (skip_literal_string, skip_string): New functions.
+ (ps_parser_skip_PS_token): New function. This is a better
+ replacement of...
+ (ps_parser_skip_alpha): Removed.
+ (ps_parser_to_token, ps_parser_to_token_array): Updated.
+ (T1Radix): Rewritten, using `ft_char_table'.
+ (t1_toint): Renamed to...
+ (ps_toint): This. Update all callers.
+ Use `ft_char_table'.
+ (ps_tobytes): Add parameter to handle delimiters and change some
+ argument types.
+ Use `ft_char_table'.
+ (t1_tofixed): Renamed to...
+ (ps_tofixed): This. Update all callers.
+ Use `ft_char_table'.
+ (t1_tocoordarray): Renamed and updated to...
+ (ps_tocoordarray): This. Update all callers.
+ (t1_tofixedarray): Renamed and updated to...
+ (ps_tofixedarray): This. Update all callers.
+ (t1_tobool): Renamed to...
+ (ps_tobool): This. Update all callers.
+ (ps_parser_load_field): Updated.
+ (ps_parser_load_field_table): Use `T1_MAX_TABLE_ELEMENTS'
+ everywhere.
+ (ps_parser_to_int, ps_parser_to_fixed, ps_parser_to_coord_array,
+ ps_parser_to_fixed_array): Skip spaces. Updated.
+ (ps_parser_to_bytes): Add parameter to handle delimiters and change
+ some argument types. Updated.
+ * src/psaux/psobjs.h: Updated.
+
+ * src/cid/cidload.c (cid_parse_dict): Updated.
+ * src/cid/cidparse.c (cid_parser_new): Check whether the `StartData'
+ token was really found.
+ * src/cid/cidparse.h (cid_parser_skip_alpha): Updated and renamed
+ to...
+ (cid_parser_skip_PS_token): This.
+
+ * src/type1/t1parse.h (T1_ParserRec): Use `FT_Bool' for boolean
+ fields.
+ (T1_Skip_Alpha): Replaced with...
+ (T1_Skip_PS_Token): This new macro.
+ * src/type1/t1parse.c (hexa_value): Removed.
+ (T1_Get_Private_Dict): Use `ft_isxdigit' and
+ `psaux->ps_parser_funcs_to_bytes' for handling ASCII hexadecimal
+ encoding.
+ After decrypting, replace the four random bytes at the beginning
+ with whitespace.
+ * src/type1/t1load.c (t1_allocate_blend): Use proper error values.
+ (parser_blend_design_positions, parse_blend_design_map,
+ parse_weight_vector): Updated.
+ (is_space): Handle `\f' also.
+ (is_name_char): Removed.
+ (read_binary_data): Updated.
+ (parse_encoding): Use `ft_isdigit'.
+ Updated.
+ (parse_subrs): Updated.
+ (TABLE_EXTEND): New macro.
+ (parse_charstrings): Updated.
+ Provide a workaround for buggy fonts which have more entries in the
+ /CharStrings dictionary then expected; the function now adds some
+ slots and skips entries which still exceed the new limit.
+ (parse_dict): Updated.
+ Terminate on the token `closefile'.
+
+ * src/type42/t42parse.c (T1_Skip_Alpha): Replaced with...
+ (T1_Skip_PS_Token): This new macro. Updated all callers.
+ (t42_parse_encoding): Use `ft_isdigit'.
+
+
+ * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_OK if
+ success.
+
+2003-10-05 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftmodule.h: Renamed to...
+ * include/freetype/ftmodapi.h: This to avoid duplicate file names.
+ * include/freetype/config/ftheader.h (FT_MODULE_H): Updated.
+
+2003-10-04 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_OrientationExtremumRec,
+ FT_Outline_Get_Orientation): Trivial typo fixes to make it compile.
+
+2003-10-02 Markus F.X.J. Oberhumer <markus@oberhumer.com>
+
+ * src/winfonts/winfnt.c (FT_WinFNT_HeaderRec): `color_table_offset'
+ has four bytes, not two.
+ Fix all users.
+ (fnt_font_load, FNT_Load_Glyph): Add more font validity tests.
+
+2003-10-01 David Turner <david@freetype.org>
+
+ * src/autofit/*: Adding first source files of the new multi-script
+ `auto-fitter'.
+
+ * include/freetype/ftoutln.h (FT_Orientation): New enumeration.
+ (FT_Outline_Get_Orientation): New declaration.
+
+ * src/base/ftoutln.c (FT_OrientationExtremumRec): New structure.
+ (ft_orientation_extremum_compute): New auxiliary function.
+ (FT_Outline_Get_Orientation): New function to compute the fill
+ orientation of a given glyph outline.
+
+ * include/freetype/internal/ftserv.h (FT_FACE_LOOKUP_SERVICE): Fixed
+ trivial bug which could crash the font engine when a cached service
+ pointer was retrieved.
+
+2003-09-30 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c (cid_parse_dict): Skip token if no keyword is
+ found.
+
+ * src/type1/t1parse.c (IS_T1_WHITESPACE, IS_T1_LINESPACE,
+ IS_T1_SPACE): Removed.
+ (PFB_Tag): Removed.
+ (read_pfb_tag): Don't use PFB_Tag.
+
+ * src/type42/t42parse.c (t42_is_space): Handle `\f' also.
+ (t42_parse_encoding): Handle synthetic fonts.
+
+2003-09-29 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/t1types.h: Don't include
+ FT_INTERNAL_OBJECTS_H but FT_INTERNAL_SERVICE_H.
+ * src/truetype/ttobjs.c: Don't include
+ FT_SERVICE_POSTSCRIPT_NAMES_H.
+
+2003-09-29 David Turner <david@freetype.org>
+
+ Added new service to handle glyph name dictionaries, replacing the
+ old internal header named `psnames.h' by `services/svpsname.h'.
+ Note that this is different from `services/svpostnm.h' which only
+ handles the retrieval of PostScript font names for a given face.
+ (Should we merge these two services into a single header?)
+
+ * include/freetype/internal/psnames.h: Removed. Most of its
+ contents is moved to...
+ * include/freetype/internal/services/svpsname.h: New file.
+
+ * include/freetype/internal/services/svpostnm.h
+ (FT_SERVICE_ID_POSTSCRIPT_NAME): Replaced with...
+ (FT_SERVICE_ID_POSTSCRIPT_FONT_NAME): New macro.
+ (PsName): Service named changed to...
+ (PsFontName): This.
+ Updated `FT_Service_PsName' -> `FT_Service_PsFontName' and
+ `POSTSCRIPT_NAME' -> `POSTSCRIPT_FONT_NAME' everywhere.
+
+ * include/freetype/internal/internal.h
+ (FT_INTERNAL_POSTSCRIPT_NAMES_H): Removed.
+ * include/freetype/internal/psaux.h: Include
+ FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (T1_DecoderRec): Updated type of `psnames'.
+ * include/freetype/internal/t1types.h: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ Include FT_INTERNAL_OBJECTS_H.
+ * include/freetype/internal/t42types.h: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H.
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE): Changed
+ order of parameters. All callers updated.
+ (FT_FACE_FIND_GLOBAL_SERVICE): New macro to look up a service
+ globally, checking all modules.
+ (FT_ServiceCacheRec): Updated.
+ (FT_SERVICE_POSTSCRIPT_NAMES_H): New macro for accessing
+ `svpsname.h'.
+
+ * include/freetype/internal/ftobjs.h, src/base/ftobjs.c
+ (ft_module_get_service): New function.
+
+ * src/cff/cffdrivr.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (cff_get_glyph_name, cff_get_name_index): Use new POSTSCRIPT_NAMES
+ service.
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Updated.
+ * src/cff/cffload.c, src/cff/cffload.h: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (cff_index_get_sid_string): Updated.
+ * src/cff/cffobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (cff_face_init): Use new POSTSCRIPT_NAMES service.
+ * src/cff/cffobjs.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+
+ * src/cid/cidobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (cid_face_init): Use new POSTSCRIPT_NAMES service.
+ * src/cid/cidriver.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H.
+
+ * src/psaux/t1cmap.c (t1_cmap_std_init, t1_cmap_unicode_init): Use
+ 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
+ FT_INTERNAL_POSTSCRIPT_NAMES_H.
+
+ * src/psnames/psmodule.c: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (ps_build_unicode_table): Renamed to...
+ (ps_unicodes_init): This.
+ (ps_lookup_unicode): Renamed to...
+ (ps_unicodes_char_index): This.
+ (ps_next_unicode): Renamed to...
+ (ps_unicodes_char_next): This.
+ (psnames_interface): Updated.
+ (psnames_services): New services list.
+ (psnames_get_service): New function.
+ (psnames_module_class): Updated.
+
+ * src/sfnt/sfobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (sfnt_init_face): Use new POSTSCRIPT_NAMES service.
+ * src/sfnt/ttpost.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (tt_face_get_ps_name): Updated.
+
+ * src/truetype/ttobjs.c: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+
+ * src/type1/t1driver.c: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ * src/type1/t1objs.c: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (T1_Face_Init): Use new POSTSCRIPT_NAMES service.
+
+ * src/type42/t42drivr.c (t42_get_ps_name): Renamed to...
+ (t42_get_ps_font_name): This.
+ (t42_service_ps_name): Renamed to...
+ (t42_service_ps_font_name): This.
+ (t42_services): Updated.
+ * src/type42/t42objs.c (T42_Face_Init): Use new POSTSCRIPT_NAMES
+ service.
+ * src/type42/t42objs.h: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+
+
+ * src/base/ftglyph.c (FT_Get_Glyph): Don't access `slot' before
+ testing its validity. Reported by Henry Maddocks
+ <maddocks@metservice.com>.
+
+2003-09-21 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE):
+ Fix compilation warning (s/pptr/Pptr/).
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_PFR_H,
+ FT_INTERNAL_FNT_TYPES_H): Removed.
+
+2003-09-21 David Turner <david@freetype.org>
+
+ Migrating the PFR and WINFNT drivers to the new service-based
+ internal API.
+
+ * include/freetype/internal/fnttypes.h: Removed. Most of its data
+ are moved to winfnt.h and...
+ * include/freetype/internal/services/svwinfnt.h: New file.
+
+ * include/freetype/internal/pfr.h: Removed. Most of its data are
+ moved to...
+ * include/freetype/internal/services/svpfr.h: New file.
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE,
+ FT_FACE_LOOKUP_SERVICE): Simplify fix of 2003-09-16 by removing
+ pointer type argument.
+ Updated all callers.
+ Update macro names of services header files.
+
+ * src/base/ftobjs.c (FT_Get_Name_Index): Simplified code.
+
+ * src/base/ftpfr.c: Include FT_SERVICE_PFR_H instead of
+ FT_INTERNAL_PFR_H.
+ (ft_pfr_check, FT_Get_PFR_Metrics, FT_Get_PFR_Kerning,
+ FT_Get_PFR_Advance): Use services provided in `PFR_METRICS'.
+
+ * src/base/ftwinfnt.c: Include FT_SERVICE_WINFNT_H instead of
+ FT_INTERNAL_FNT_TYPES_H.
+ (FT_Get_WinFNT_Header): Use service provided in `WINFNT'.
+
+ * src/pfr/pfrdrivr.c: Include FT_SERVICE_PFR_H and
+ FT_SERVICE_XFREE86_NAME_H instead of FT_INTERNAL_PFR_H.
+ (pfr_service_bdf): Updated.
+ (pfr_services): New services list.
+ (pfr_get_service): New function.
+ (pfr_driver_class): Updated.
+
+ * src/winfonts/winfnt.c: Include FT_SERVICE_WINFNT_H and
+ FT_SERVICE_XFREE86_NAME_H instead of FT_INTERNAL_FNT_TYPES_H.
+ (winfnt_get_header, winfnt_get_service): New functions.
+ (winfnt_service_rec): New structure providing WINFNT services.
+ (winfnt_services): New services list.
+ (winfnt_driver_class): Updated.
+ * src/winfonts/winfnt.h: Add most of the removed fnttypes.h data.
+
+ * src/sfnt/sfdriver.c (sfnt_service_ps_name): Fix typo.
+
+ * src/type1/t1driver.c (t1_service_ps_name): Fix typo.
+
+ * src/cff/cffobjs.c, src/cid/cidobjs.c, src/pfr/pfrsbit.c,
+ src/psaux/psobjs.c, src/sfnt/sfobjs.c, src/truetype/ttobjs.c,
+ src/type1/t1objs.c, src/type42/t42objs.c: Removing various compiler
+ warnings.
+
+2003-09-19 David Bevan <dbevan@emtex.com>
+
+ * src/type1/t1parse.c (pfb_tag_fields): Removed.
+ (read_pfb_tag): Fix code so that it doesn't fail on end-of-file
+ indicator (0x8003).
+ * docs/CHANGES: Updated.
+
+2003-09-16 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE,
+ FT_FACE_LOOKUP_SERVICE): Add parameter to pass pointer type.
+ Ugly, I know, but this is needed for compilation with C++ --
+ maybe someone knows a better solution?
+ Updated all callers.
+
+ * src/base/ftobjs.c (FT_Get_Name_Index, FT_Get_Glyph_Name): Remove
+ C++ compiler warnings.
+
+ * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property):
+ Fix order of arguments passed to FT_FACE_FIND_SERVICE.
+
+2003-09-15 Werner Lemberg <wl@gnu.org>
+
+ Avoid header files with identical names.
+
+ * include/freetype/internal/services/bdf.h: Renamed to...
+ * include/freetype/internal/services/svbdf.h: This.
+ Add copyright notice.
+ * include/freetype/internal/services/glyfdict.h: Renamed to...
+ * include/freetype/internal/services/svgldict.h: This.
+ Add copyright notice.
+ * include/freetype/internal/services/multmast.h: Renamed to...
+ * include/freetype/internal/services/svmm.h: This.
+ Add copyright notice.
+ Add FT_BEGIN_HEADER and FT_END_HEADER.
+ * include/freetype/internal/services/sfnt.h: Renamed to...
+ * include/freetype/internal/services/svsfnt.h: This.
+ Add copyright notice.
+ * include/freetype/internal/services/postname.h: Renamed to...
+ * include/freetype/internal/services/svpostnm.h: This.
+ Add copyright notice.
+ * include/freetype/internal/services/xf86name.h: Renamed to...
+ * include/freetype/internal/services/svxf86nm.h: This.
+ Add copyright notice.
+
+ * include/freetype/internal/ftserv.h: Add FT_BEGIN_HEADER and
+ FT_END_HEADER.
+ Add copyright notice.
+ Update macro names of services header files.
+
+ * builds/freetype.mk (SERVICES_DIR): New variable.
+ (BASE_H): Add services header files.
+
+2003-09-11 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (distclean): Remove `builds/unix/freetype2.pc'.
+
+ * src/cff/cffdrivr.c: Don't load headers twice.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_SFNT_H): New macro.
+ * src/base/ftobjs.c: Include FT_SERVICE_SFNT_H.
+
+ * src/cff/cffcmap.c: Include `cfferrs.h'.
+ * src/pfr/pfrdrivr.c: Include `pfrerror.h'.
+ * src/sfnt/sfdriver.c: Include `sferrors.h'.
+ * src/psaux/psobjs.h: Add declaration for `ps_parser_to_bytes'.
+
+2003-09-11 David Turner <david@freetype.org>
+
+ Introducing the concept of `module services'. This is the first
+ step towards a massive simplification of the engine's internals, in
+ order to get rid of various numbers of hacks.
+
+ Note that these changes will break source & binary compatibility for
+ authors of external font drivers.
+
+ * include/freetype/config/ftconfig.h (FT_BEGIN_STMNT, FT_END_STMNT,
+ FT_DUMMY_STMNT): New macros.
+
+ * include/freetype/internal/ftserv.h: New file, containing the new
+ structures and macros to provide `services'.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_EXTENSION_H,
+ FT_INTERNAL_EXTEND_H, FT_INTERNAL_HASH_H, FT_INTERNAL_OBJECT_H):
+ Removed, obsolete.
+ (FT_INTERNAL_SERVICE_H): New macro for `ftserv.h'.
+
+ * include/freetype/internal/services/bdf.h,
+ include/freetype/internal/services/glyfdict.h,
+ include/freetype/internal/services/postname.h,
+ include/freetype/internal/services/xf86name.h: New files.
+
+ * include/freetype/ftmm.h (FT_Get_MM_Func, FT_Set_MM_Design_Func,
+ FT_Set_MM_Blend_Func): Function pointers moved (in modified form)
+ to...
+ * include/freetype/internal/services/multmast.h: New file.
+
+ * include/freetype/internal/sfnt.h (SFNT_Interface): `get_interface'
+ is now of type `FT_Module_Requester'.
+ (SFNT_Get_Interface_Func, SFNT_Load_Table_Func): Function pointers
+ moved (in modified form) to...
+ * include/freetype/internal/services/sfnt.h: New file.
+
+ * include/freetype/tttables.h (FT_Get_Sfnt_Table_Func): Function
+ pointer moved (in modified form) to `services/sfnt.h'.
+
+ * include/freetype/ftmodule.h (FT_Module_Interface): Make it a
+ a typedef to `FT_Pointer'.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add
+ `postscript_name'.
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
+ `postscript_name'.
+ Add `services' element.
+ (FT_LibraryRec): Remove `meta_class'.
+
+ * src/base/ftbdf.c: Include FT_SERVICE_BDF_H.
+ (test_font_type): Removed.
+ (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Use services
+ provided in `FT_SERVICE_ID_BDF'.
+
+ * src/base/ftmm.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
+ (ft_face_get_mm_service): New auxiliary function to get services
+ from `FT_SERVICE_ID_MULTI_MASTERS'.
+ (FT_Get_Multi_Master, FT_Set_MM_Design_Coordinates,
+ FT_Set_MM_Blend_Coordinates): Use `ft_face_get_mm_service'.
+
+ * src/base/ftobjs.c: Include FT_SERVICE_POSTSCRIPT_NAME_H and
+ FT_SERVICE_GLYPH_DICT_H.
+ (ft_service_list_lookup): New function to get a specific service.
+ (destroy_face): Updated.
+ (Mac_Read_POST_Resource): Simplify some code.
+ (IsMacResource): Fix warnings.
+ (FT_Get_Name_Index, FT_Get_Glyph_Name): Use services provided in
+ `FT_SERVICE_ID_GLYPH_DICT'.
+ (FT_Get_Postscript_Name): Use service provided in
+ `FT_SERVICE_ID_POSTSCRIPT_NAME'.
+ (FT_Get_Sfnt_Table, FT_Load_Sfnt_Table): Use services provided in
+ `FT_SERVICE_ID_SFNT_TABLE'.
+
+ * src/base/ftxf86.c: Include FT_SERVICE_XFREE86_NAME_H.
+ (FT_Get_X11_Font_Format): Use service provided in
+ `FT_SERVICE_ID_XF86_NAME'.
+
+ * src/bdf/bdfdrivr.c: Include FT_SERVICE_BDF_H and
+ FT_SERVICE_XFREE86_NAME_H.
+ (bdf_get_charset_id): New function.
+ (bdf_service_bdf): New structure providing BDF services.
+ (bdf_services): New services list.
+ (bdf_driver_requester): Use `ft_service_list_lookup'.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_XFREE86_NAME_H and
+ FT_SERVICE_GLYPH_DICT_H.
+ (cff_service_glyph_dict): New structure providing CFF services.
+ (cff_services): New services list.
+ (cff_get_interface): Use `ft_service_list_lookup'.
+
+ * src/cid/cidriver.c: Include FT_SERVICE_POSTSCRIPT_NAME_H and
+ FT_SERVICE_XFREE86_NAME_H.
+ (cid_service_ps_name): New structure providing CID services.
+ (cid_services): New services list.
+ (cid_get_interface): Use `ft_service_list_lookup'.
+
+ * src/pcf/pcfdrivr.c: Include FT_SERVICE_BDF_H and
+ FT_SERVICE_XFREE86_NAME_H.
+ (pcf_service_bdf): New structure providing PCF services.
+ (pcf_services): New services list.
+ (pcf_driver_requester): Use `ft_service_list_lookup'.
+
+ * src/sfnt/sfdriver.c: Include FT_SERVICE_GLYPH_DICT_H and
+ FT_SERVICE_POSTSCRIPT_NAME_H.
+ (get_sfnt_glyph_name): Renamed to...
+ (sfnt_get_glyph_name): This.
+ (get_sfnt_postscript_name): Renamed to...
+ (sfnt_get_ps_name): This.
+ Updated.
+ (sfnt_service_glyph_dict, sfnt_service_ps_name): New structures
+ providing services.
+ (sfnt_services): New services list.
+ (sfnt_get_interface): Use `ft_service_list_lookup'.
+
+ * src/truetype/ttdriver.c: Include FT_SERVICE_XFREE86_NAME_H.
+ (tt_services): New services list.
+ (tt_get_interface): Use `ft_service_list_lookup'.
+
+ * src/type1/t1driver.c: Include FT_SERVICE_MULTIPLE_MASTERS_H,
+ FT_SERVICE_GLYPH_DICT_H, FT_SERVICE_XFREE86_NAME_H, and
+ FT_SERVICE_POSTSCRIPT_NAME_H.
+ (t1_service_glyph_dict, t1_service_ps_name,
+ t1_service_multi_masters): New structures providing Type 1 services.
+ (t1_services): New services list.
+ (Get_Interface): Use `ft_service_list_lookup'.
+
+ * src/type42/t42drivr.c: Include FT_SERVICE_XFREE86_NAME_H,
+ FT_SERVICE_GLYPH_DICT_H, and FT_SERVICE_POSTSCRIPT_NAME_H.
+ (t42_service_glyph_dict, t42_service_ps_name): New strucures
+ providing Type 42 services.
+ (t42_services): New services list.
+ (T42_Get_Interface): Use `ft_service_list_lookup'.
+
+
+ * README, docs/CHANGES: Updating version numbers for 2.1.6, and
+ removing obsolete warnings in the documentation.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
+ * builds/unix/configure.ac (version_info): Set to 9:5:3.
+ * builds/unix/configure: Regenerated.
+
+ * include/freetype/internal/ftcore.h,
+ include/freetype/internal/ftexcept.h,
+ include/freetype/internal/fthash.h,
+ include/freetype/internal/ftobject.h: Removed. Obsolete.
+
+2003-09-09 David Turner <david@freetype.org>
+
+ Fixing PFR kerning support. The tables within the font file contain
+ (charcode,charcode) kerning pairs, we need to convert them to
+ (gindex,gindex).
+
+ * src/base/ftpfr.c (ft_pfr_check): Fix serious typo.
+ * src/pfr/prfload.c: Remove dead code.
+ (pfr_get_gindex, pfr_compare_kern_pairs, pfr_sort_kerning_pairs):
+ New functions.
+ (pfr_phy_font_done): Free `kern_pairs'.
+ (pfr_phy_font_load): Call `pfr_sort_kerning_pairs'.
+ * src/pfr/pfrobjs.c (pfr_face_get_kerning): Fix kerning extraction.
+ * src/pfr/pfrtypes.h (PFR_KERN_PAIR_INDEX): New macro.
+ (PFR_KernPairRec): Make `kerning' an FT_Int.
+ (PFR_PhyFontRec): New element `kern_pairs'.
+ (PFR_KernFlags): Values of PFR_KERN_2BYTE_CHAR and
+ PFR_KERN_2BYTE_ADJ were erroneously reversed.
+
+ * include/freetype/ftoption.h: Commenting out the macro
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
+
+2003-09-02 David Turner <david@freetype.org>
+
+
+ * Version 2.1.5 released.
+ =========================
+
+
+2003-08-31 Manish Singh <yosh@gimp.org>
+
+ * src/bdf/bdflib.c (_bdf_readstream): Don't use FT_MEM_COPY but
+ FT_MEM_MOVE.
+
+2003-08-30 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_ENCODING_SJIS, FT_ENCODING_GB2312,
+ FT_ENCODING_BIG5, FT_ENCODING_WANSUNG, FT_ENCODING_JOHAB): New
+ enumerations of FT_Encoding. The FT_ENCODING_MS_* variants except
+ FT_ENCODING_MS_SYMBOL are now deprecated.
+ Updated all users.
+ * docs/CHANGES: Document it.
+
+2003-08-27 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Accept lowercase characters
+ for spacing.
+
+2003-08-27 Mike FABIAN <mfabian@suse.de>
+
+ * src/pcf/pcfread.c (pcf_load_font), src/bdf/bdfdrivr.c
+ (BDF_Face_Init): Accept lowercase characters for slant and weight.
+
+2003-08-18 David Turner <david@freetype.org>
+
+ * include/freetype/config/ftoption.h: Disabling TrueType bytecode
+ interpreter until the UNPATENTED_HINTING works as advertised.
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Use `|' for
+ setting `load_flags'.
+
+ * Jamfile: Adding the `refdoc' target to the Jamfile in order to
+ build the API Reference in `docs/reference' automatically.
+
+ * include/freetype/t1tables.h (PS_FontInfoRec), src/cid/cidtoken.h,
+ src/type1/t1tokens.h, src/type42/t42parse.c: Resetting the types of
+ `italic_angle', `underline_position', and `underline_thickness' to
+ their previous values (i.e., long, short, and ushort) in order to
+ avoid breaking binary compatibility.
+
+ * 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_UNPATENTED_HINTING): This. Updated all users.
+ (TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): Removed.
+
+ * include/freetype/internal/ftobjs.h (FT_DEBUG_HOOK_TYPE1): Removed.
+ (FT_DEBUG_HOOK_UNPATENTED_HINTING): New macro. Use this with
+ `FT_Set_Debug_Hook' to get the same effect as the removed
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING.
+
+ * src/truetype/ttobjs.c (tt_face_init): Use
+ `FT_DEBUG_HOOK_UNPATENTED_HINTING'.
+
+2003-08-06 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c
+ (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Fix
+ previous change.
+
+2003-08-05 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c
+ (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Apply
+ font matrix to advance width also.
+ * docs/CHANGES: Updated.
+
+2003-07-26 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.ac (version_info): Set to 9:4:3.
+ * builds/unix/configure: Updated.
+ * docs/CHANGES, docs/VERSION.DLL: Updated.
+
+ * include/freetype/freetype.h (FT_GlyphSlot): Change 2003-06-16
+ also breaks binary compatibility. Reintroduce an unsigned integer
+ at the old position of `flags' called `reserved'.
+
+2003-07-25 Werner Lemberg <wl@gnu.org>
+
+ Make API reference valid HTML 4.01 transitional.
+
+ * src/tools/docmaker/tohtml.py (html_header_1): Add doctype
+ and charset.
+ (html_header_2): Fix style elements and add some more.
+ Fix syntax.
+ (block_header, block_footer, description_header, description_footer,
+ marker_header, marker_footer, source_header, source_footer,
+ chapter_header): Don't use <center>...</center> but `align=center'
+ table attribute.
+ (chapter_inter, chapter_footer): Add <li> and use special <ul>
+ class.
+ Use double quotes around table widths given in percent.
+ (keyword_prefix, keyword_suffix): Don't change font colour directly
+ but use a new <span> class.
+ (section_synopsis_header, section_synopsis_footer): Don't change
+ colour.
+ (code_header, code_footer): Don't change font colour directly but
+ use a special <pre> class.
+ (print_html_field): <tr> gets the `valign' attribute, not <table>.
+ (print_html_field_list): Ditto.
+ (index_exit): Don't use <center>...</center> but `align=center'
+ table attribute.
+ (section_enter): Ditto.
+ (toc_exit): Don't emit </table>.
+ (block_enter): Use <h4><a>, not <a><h4>.
+ (__init__): Fix tag order in self.html_footer.
+
+2003-07-25 David Turner <david@freetype.org>
+
+ This change reimplements fix from 2003-05-30 without breaking
+ binary compatibility.
+
+ * include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
+ `is_fixed_pitch', `underline_position', `underline_thickness' are
+ reverted to be normal values.
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Remove
+ `T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
+ `T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
+ (T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
+ T1_FIELD_FIXED_1000_P): Removed.
+ (T1_FIELD_TYPE_BOOL): Renamed to...
+ (T1_FIELD_BOOL): New macro. Updated all callers.
+
+ * src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
+ `underline_position', `underline_thickness', `paint_type',
+ `stroke_width' are reverted to be normal values.
+ (T42_KEYWORD_COUNT): New macro.
+ (t42_parse_dict): New array `keyword_flags' to mark that a value has
+ already been assigned to a dictionary entry.
+ * src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
+
+ * src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
+ `underline_position', `underline_thickness' are reverted to be
+ normal values.
+ * src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
+
+ * src/psaux/psobjs.c (ps_parser_load_field): Updated.
+
+ * src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
+ `underline_position', `underline_thickness', `paint_type',
+ `stroke_width' are reverted to be normal values.
+ * src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
+ * src/type1/t1load.c (T1_FIELD_COUNT): New macro.
+ (parse_dict): Add parameter for keyword flags.
+ Record only first instance of a field.
+ (T1_Open_Face): New array `keyword_flags'.
+
+2003-07-24 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
+ * builds/unix/configure.ac (version_info): Set to 10:0:3.
+ * builds/unix/configure: Updated.
+ * builds/freetype.mk (refdoc): Fix --title.
+
+ * docs/CHANGES, docs/VERSION.DLL, README: Updated.
+
+ * src/tools/docmaker/sources.py (re_crossref): Fix regular
+ expression to handle trailing punctuation characters.
+ * src/tools/docmaker/tohtml.py (make_html_word): Updated.
+
+ * docs/release: New file.
+
+2003-07-23 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
+
+ * include/freetype/internal/psaux.h (PS_Parser_FuncsRec): New
+ member function `to_bytes'.
+
+ * src/psaux/psauxmod.c (ps_parser_funcs): New member
+ `ps_parser_to_bytes'.
+ (psaux_module_class): Increase version to 0x20000L.
+
+ * src/psaux/psobjs.c (IS_T1_LINESPACE): Add \f.
+ (IS_T1_NULLSPACE): New macro.
+ (IS_T1_SPACE): Add it.
+ (skip_spaces, skip_alpha): New functions.
+ (ps_parser_skip_spaces, ps_parser_skip_alpha): Use them.
+ (ps_tobytes, ps_parser_to_bytes): New functions.
+
+2003-07-07 Werner Lemberg <wl@gnu.org>
+
+ * builds/freetype.mk (DOC_DIR): New variable.
+ (refdoc): Use *_DIR variables.
+ (distclean): Remove documentation files.
+
+ * builds/detect.mk (std_setup, dos_setup): Mention `make refdoc'.
+
+ * configure: Set DOC_DIR variable.
+
+2003-07-07 Patrik Hägglund <patrik.hagglund@bredband.net>
+
+ * builds/freetype.mk (refdoc): New target to build the
+ documentation.
+ (.PHONY): Updated.
+
+ * include/freetype/freetype.h: Improve documentation of FT_CharMap.
+ * include/freetype/ftimage,h: Fix documentation of FT_OUTLINE_FLAGS.
+ * include/freetype/tttables.h: Document FT_Sfnt_Tag.
+
+2003-07-06 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfread.c
+ (pcf_load_font): Fix computation of height if PIXEL_SIZE property is
+ missing.
+
+2003-07-01 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftcsbits.c (ftc_sbit_node_compare): Only add `size' if
+ there is no error. Reported by Knut St. Osmundsen
+ <bird-freetype@anduin.net>.
+
+2003-06-30 Werner Lemberg <wl@gnu.org>
+
+ A new try to synchronize bitmap font access.
+
+ * include/freetype/freetype.h (FT_Bitmap_Size): `height' is now
+ defined to return the baseline-to-baseline distance. This was
+ already the value returned by the BDF and PCF drivers.
+
+ The `width' field now gives the average width. I wasn't able to
+ find something better. It should be taken as informative only.
+
+ New fields `size', `x_ppem', and `y_ppem'.
+
+ * src/pcf/pcfread.c (pcf_load_font): Updated to properly fill
+ FT_Bitmap_Size.
+ Do proper rounding and conversion from 72.27 to 72 points.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated to properly fill
+ FT_Bitmap_Size.
+ Do proper rounding and conversion from 72.27 to 72 points.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Updated to properly fill
+ FT_Bitmap_Size.
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Updated to properly fill
+ FT_Bitmap_Size.
+
+2003-06-29 Werner Lemberg <wl@gnu.org>
+
+ Redesigning the FNT driver to return multiple faces, not multiple
+ strikes. At least one font (app850.fon from WinME) contains
+ different FNT charmaps for its subfonts. Consequently, the previous
+ design of having multiple bitmap strikes in a single font face fails
+ since we have only one charmap per face.
+
+ * include/freetype/internal/fnttypes.h (FNT_Size_Rec): Removed.
+ (FNT_FaceRec): Remove `num_fonts' field and replace `fonts' with
+ `font'.
+
+ * src/base/ftwinfnt.c (FT_Get_WinFNT_Header): Updated.
+
+ * src/winfonts/winfnt.c (fnt_font_load): Don't set pixel_width equal
+ to pixel_height.
+ (fnt_face_done_fonts): Removed.
+ (fnt_face_get_dll_fonts): Renamed to...
+ (fnt_face_get_dll_font): This. Add second function argument to
+ select face index.
+ Updated to load just one subfont.
+ (fnt_font_done, FNT_Face_Done): Updated.
+ (FNT_Face_Init): Handle `face_index'.
+ Updated.
+ (FNT_Size_Set_Pixels): Simplified; similar to BDF and PCF, the
+ bitmap width is now ignored.
+ (FNT_Load_Glyph): Updated.
+ Fix glyph index computation.
+ (winfnt_driver_class): Updated.
+
+2003-06-25 Owen Taylor <otaylor@redhat.com>
+
+ * src/sfnt/ttload.c (tt_face_load_hdmx): Don't assign
+ num_records until we actually decide to load the table,
+ otherwise, we'll segfault in tt_face_free_hdmx.
+
+2003-06-24 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffdrivr.c (cff_get_glyph_name): Protect against zero
+ glyph name pointer. Reported by Mikey Anbary <manbary@vizrt.com>.
+
+2003-06-23 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/glnames.py: Updated to AGL 2.0.
+ * src/psnames/pstables.h: Regenerated.
+
+2003-06-22 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/cache/ftcglyph.h, include/freetype/ttnameid.h,
+ src/base/ftcalc.c, src/base/fttrigon.c, src/cff/cffgload.c,
+ src/otlayout/otlgsub.c, src/pshinter/pshrec.c,
+ src/psnames/psmodule.c, src/sfnt/sfobjs.c, src/truetype/ttdriver.c:
+ Decorate constants with `U' and `L' if appropriate.
+
+ * include/freetype/ftmoderr.h: Updated to include recent module
+ additions.
+
+ * src/pshinter/pshnterr.h (FT_ERR_BASE): Define as
+ `FT_Mod_Err_PShinter'.
+ * src/type42/t42error.h (FT_ERR_BASE): Define as
+ `FT_Mod_Err_Type42'.
+
+ * src/pshinter/pshrec.h (PS_HINTS_MAGIC): Removed. Not used.
+
+ * include/freetype/config/ftconfig.h [__MWERKS__]: Define FT_LONG64
+ and FT_INT64.
+
+2003-06-21 Werner Lemberg <wl@gnu.org>
+
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in
+ computation of glyph_index.
+ (FNT_Size_Set_Pixels): To find a strike, first check pixel_height
+ only, then try to find a better hit by comparing pixel_width also.
+ Without this fix it isn't possible to access all strikes.
+ Also compute metrics.max_advance to be in sync with other bitmap
+ drivers.
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
+ (FT_Set_Pixel_Size): Assign value to `metrics' after validation of
+ arguments.
+
+2003-06-20 Werner Lemberg <wl@gnu.org>
+
+ Synchronize computation of height and width for bitmap strikes. The
+ `width' field in the FT_Bitmap_Size structure is now only useful to
+ enumerate different strikes. The `max_advance' field of the
+ FT_Size_Metrics structure should be used to get the (maximum) width
+ of a strike.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Don't use AVERAGE_WIDTH for
+ computing `available_sizes->width' but make it always equal to
+ `available_sizes->height'.
+
+ * src/pcf/pcfread.c (pcf_load_font): Don't use RESOLUTION_X for
+ computing `available_sizes->width' but make it always equal to
+ `available_sizes->height'.
+
+ * src/truetype/ttdriver.c (Set_Pixel_Sizes): Pass only single
+ argument to function.
+
+ * src/psnames/psmodule.c (ps_unicode_value): Handle `.' after
+ `uniXXXX' and `uXXXX[X[X]]'.
+
+2003-06-19 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c: s/FT_Err_/BDF_Err/.
+ * src/cache/ftccache.c, src/cache/ftcsbits.c, src/cache/ftlru.c:
+ s/FT_Err_/FTC_Err_/.
+ * src/cff/cffcmap.c: s/FT_Err_/CFF_Err_/.
+ * src/pcf/pcfdrivr.c: s/FT_Err_/PCF_Err_/.
+ * src/psaux/t1cmap.c: Include psauxerr.h.
+ s/FT_Err_/PSaux_Err_/.
+ * src/pshinter/pshnterr.h: New file.
+ * src/pshinter/rules.mk: Updated.
+ * src/pshinter/pshalgo.c, src/pshinter/pshrec.c: Include pshnterr.h.
+ s/FT_Err_/PSH_Err_/.
+ * src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c:
+ s/FT_Err_/PFR_Err_/.
+ * src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
+ src/sfnt/ttload.c: s/FT_Err_/SFNT_Err_/.
+ * src/truetype/ttgload.c: s/FT_Err_/TT_Err_/.
+ * src/gzip/ftgzip.c: Load FT_MODULE_ERRORS_H and define
+ FT_ERR_PREFIX and FT_ERR_BASE.
+ s/FT_Err_/Gzip_Err_/.
+
+2003-06-19 Dirck Blaskey <listtarget@danbala.com>
+
+ * src/cff/cffload (cff_encoding_load): `nleft' must be FT_UInt,
+ otherwise adding 1 might wrap the result.
+
+2003-06-18 Werner Lemberg <wl@gnu.org>
+
+ * src/psnames/psmodule.c (ps_unicode_value): Add support to
+ recognize `uXXXX[X[X]]' glyph names.
+ Don't handle glyph names starting with `uni' which have more than
+ four digits.
+
+2003-06-16 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_Open_Flags): Replaced with
+ #defines for the constants.
+ (FT_Open_Args): Change type of `flags' to FT_UInt.
+ (FT_GlyphSlot): Move `flags' to FT_Slot_Internal.
+
+ * include/freetype/ftimage.h (FT_Outline_Flags, FT_Raster_Flag):
+ Replaced with #defines for the constants.
+
+ * include/freetype/internal/ftobjs.h (FT_Slot_Internal): New
+ field `flags' (from FT_GlyphSlot).
+ Updated all affected source files.
+ (FT_GLYPH_OWN_BITMAP): New macro (from ftgloadr.h).
+
+ * include/freetype/internal/ftgloadr.h (FT_GLYPH_OWN_BITMAP): Moved
+ to ftobjs.h.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Use dummy
+ FT_GlyphSlot_Internal object.
+
+2003-06-15 Werner Lemberg <wl@gnu.org>
+
+ * builds/compiler/gcc.mk, builds/compiler/gcc-dev.mk (CFLAGS):
+ Add -fno-strict-aliasing to get rid of zillion warnings from gcc
+ version 3.3.
+
+2003-06-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
+ ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
+ ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
+ FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
+ FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
+ The lowercase variants are now (deprecated aliases) to the uppercase
+ versions.
+ Updated all other files.
+
+ * include/freetype/ftmodule.h (ft_module_font_driver,
+ ft_module_renderer, ft_module_hinter, ft_module_styler,
+ ft_module_driver_scalable, ft_module_driver_no_outlines,
+ ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
+ FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
+ FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
+ FT_MODULE_DRIVER_HAS_HINTER.
+ The lowercase variants are now (deprecated aliases) to the uppercase
+ versions.
+ Updated all other files.
+
+ * src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
+ as enumeration.
+
+ * src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
+ (winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
+ the FT_MODULE_DRIVER_NO_OUTLINES flag.
+
+2003-06-13 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/pfr/pfrobjs.c (pfr_slot_load): Apply font matrix.
+
+2003-06-13 Werner Lemberg <wl@gnu.org>
+
+ * builds/dos/detect.mk: Test not only for `Dos' but for `DOS' also.
+
+ * builds/dos/dos-emx.mk, builds/compiler/emx.mk: New files for
+ EMX gcc compiler.
+ * builds/dos/detect.mk: Add target `emx'.
+
+ * builds/compiler/watcom.mk (LINK_LIBRARY): GNU Make for DOS doesn't
+ like a trailing semicolon; add a dummy command.
+
+ * src/cid/cidload.c: Remove parse_font_bbox code (already enclosed
+ with #if 0 ... #endif).
+
+ * src/type1/t1tokens.h: Handle /FontName.
+ * src/type1/t1load.c (parse_font_name): Removed.
+ Remove parse_font_bbox code (already enclosed with #if 0 ...
+ #endif).
+
+ * src/type42/t42parse.c (t42_parse_font_name): Removed.
+ Remove t42_parse_font_bbox code (already enclosed with #if 0 ...
+ #endif).
+ (t42_keywords): Handle /FontName with T1_FIELD_KEY.
+
+2003-06-12 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Add
+ T1_FIELD_TYPE_KEY.
+ (T1_FIELD_KEY): New macro.
+ * src/psaux/psobjs.c (ps_parser_load_field): Handle
+ T1_FIELD_TYPE_KEY.
+
+ * src/cid/cidtoken.h: Use T1_FIELD_KEY for /CIDFontName.
+
+2003-06-11 Alexander Malmberg <alexander@malmberg.org>
+
+ * src/cache/ftlru.c (FT_LruList_Remove_Selection): Decrease
+ number of nodes.
+ (FT_LruList_Lookup): Fix assertion for out-of-memory case.
+
+2003-06-11 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c (cid_decrypt): Removed.
+ (cid_read_subrs): Use t1_decrypt from psaux module.
+ * src/cid/cidload.h: Updated.
+ * src/cid/cidgload.c (cid_load_glyph): Use t1_decrypt from psaux
+ module.
+
+2003-06-10 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidobjs.c: Apply change 2003-05-31 from <Ron.Dev@gmx.de>.
+ Compute style flags.
+ Fix computation of root->height.
+ * src/cid/cidtoken.h: Handle FontBBox.
+ * 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.
+
+ * src/type42/t42parse.c (t42_parse_font_bbox): Commented out.
+ (t42_keywords): Handle FontBBox with T1_FIELD_BBOX, not with
+ T1_FIELD_CALLBACK.
+ (t42_parse_font_bbox): Commented out.
+ (t42_load_keyword): Handle T1_FIELD_LOCATION_BBOX.
+ * src/type42/t42objs.c (T42_Face_Init): Apply change 2003-05-31
+ from <Ron.Dev@gmx.de>.
+
+2003-06-09 George Williams <gww@silcom.com>
+
+ * src/truetype/ttinterp.c (SetSuperRound) <0x30>: Follow Apple's
+ TrueType specification.
+ (Ins_MDRP, Ins_MIRP): Fix single width cut-in test.
+
+2003-06-09 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/gzip/ftgzip.c: (inflate_mask): Replaced with...
+ (NO_INFLATE_MASK): This.
+ * src/gzip/infutil.h: Declare `inflate_mask' conditionally by
+ NO_INFLATE_MASK.
+
+2003-06-09 Alexis S. L. Carvalho <alexis@cecm.usp.br>
+
+ * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Handle Z_STREAM_END
+ correctly.
+
+2003-06-09 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * src/pshinter/pshglob.c (psh_globals_new): Change calculation of
+ dim->stdw.count to avoid compiler problem.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Move the block
+ variables to the beginning of the function to avoid compiler
+ problems.
+ Add casts necessary for 16bit compilers.
+
+2003-06-09 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/rules.mk (PFR_DRV_SRC): Add pfrsbit.c.
+ (PFR_DRV_H): Add pfrtypes.h.
+
+ * include/freetype/config/ftconfig.h: s/__MWKS__/__MWERKS__/.
+
+2003-06-08 Karl Schultz <kschultz@rsinc.com>
+
+ * src/pfr/pfrsbit.c (pfr_bitwriter_init): Change type of third
+ argument to FT_Bool.
+ (pfr_lookup_bitmap_data): Change type of third and fourth argument
+ to FT_UInt. Updated caller.
+ (pfr_load_bitmap_bits): Change type of fourth argument to FT_Bool.
+
+2003-06-08 Werner Lemberg <wl@gnu.org>
+
+ Completely revised FreeType's make management.
+
+ . In all makefiles `/' is used as the path separator. The
+ conversion to the real path separators is done as late as
+ possible using $(subst ...).
+
+ . $(HOSTSEP) no longer exists. Now, $(SEP) gives the path separator
+ for the operating system, and the new $(COMPILER_SEP) the path
+ separator for the compiler tools.
+
+ . $(BUILD) has been renamed to $(BUILD_DIR). In general, all
+ directory variables end with `_DIR'. The variants ending in `_'
+ (like `BASE_' have been removed).
+
+ The following ChangeLog entries only describe changes which are
+ not related to the redesign.
+
+ * builds/beos/beos-def.mk (BUILD_DIR): Fix typo.
+ * builds/compiler/watcom.mk (LINK_LIBRARY): Fix linker call to avoid
+ overlong arguments as suggested by J. Ali Harlow
+ <ali@avrc.city.ac.uk>.
+ * builds/dos/dos-wat.mk: New file.
+ * builds/freetype.mk (FREETYPE_H): Include header files from the
+ `devel' subdirectory.
+
+ * builds/os2/os2-dev.mk, builds/unix/unixddef.mk,
+ builds/unix/unixddef.mk, builds/win32/w32-bccd.mk,
+ builds/win32/w32-dev.mk (BUILD_DIR): Fix path.
+
+ * builds/unix/configure.ac, builds/unix/configure: Updated.
+ * builds/unix/unix-def.in (DISTCLEAN): Add `freetype2.pc'.
+
+2003-06-07 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftmac.c (FT_New_Face_From_SFNT): s/rlen/sfnt_size/ to
+ make it compile.
+
+ * devel/ftoption.h: Updated.
+
+2003-06-07 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * include/freetype/internal/psaux.h, src/truetype/ttgload.h:
+ s/index/idx/ to fix compiler warnings.
+
+ * src/sfnt/ttcmap0.c (tt_face_build_cmaps): Use more `volatile' to
+ fix compiler warning.
+
+ * src/gzip/ftgzip.c (BUILDFIXED): Removed.
+ * src/gzip/inftrees.c (inflate_trees_fixed) [!BUILDFIXED]: Use
+ FT_UNUSED to remove compiler warning.
+
+2003-06-06 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftstroker.h: Renamed to...
+ * include/freetype/ftstroke.h: This.
+
+ * src/base/ftstroker.c: Renamed to...
+ * src/base/ftstroke.c: This.
+
+ * include/freetype/config/ftheader.h (FT_STROKER_H): Updated.
+
+ * src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk:
+ Updated.
+
+ * src/pcf/pcfdriver.c: Renamed to...
+ * src/pcf/pcfdrivr.c: This.
+ * src/pcf/pcfdriver.h: Renamed to...
+ * src/pcf/pcfdrivr.h: This.
+
+ * src/pcf/Jamfile, src/pcf/rules.mk: Updated.
+
+2003-06-05 Wenlin Institute (Tom Bishop) <wenlin@wenlin.com>
+
+ * src/base/ftmac.c (file_spec_from_path) [TARGET_API_MAC_CARBON]:
+ Add `#if !defined(__MWERKS__)'.
+
+2003-06-05 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Add
+ T1_FIELD_TYPE_FIXED_1000 and T1_FIELD_TYPE_FIXED_1000_P.
+ (T1_FIELD_FIXED_1000, T1_FIELD_FIXED_1000_P): New macros.
+ * src/psaux/psobjs.c (ps_parser_load_field): Handle
+ T1_FIELD_TYPE_FIXED_1000 and T1_FIELD_TYPE_FIXED_1000_P.
+
+ * src/cff/cffparse.c (cff_kind_fixed_thousand): New enumeration.
+ (CFF_FIELD_FIXED_1000): New macro.
+ (cff_parser_run): Handle cff_kind_fixed_thousand.
+ * src/cff/cfftoken.h: Use CFF_FIELD_FIXED_1000 for blue_scale.
+ * src/cff/cffload (cff_subfont_load): Fix default values of
+ expansion_factor and blue_scale.
+
+ * src/cif/cidtoken.h, src/type1/t1tokens.h: Use T1_FIELD_FIXED_1000
+ for blue_scale.
+
+ * src/pshinter/pshglob.c (psh_globals_new): Fix default value of
+ blue_scale.
+
+2003-06-04 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * include/freetype/internal/ftdriver.h,
+ include/freetype/internal/ftobjs.h,
+ include/freetype/internal/psaux.h, src/cid/cidgload.c,
+ src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h,
+ src/pshinter/pshrec.c, src/pshinter/pshalgo.c,
+ src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c,
+ src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c,
+ src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c,
+ src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c,
+ src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h:
+ Many casts and slight argument type changes to make it work with
+ a 16bit compiler.
+
+2003-06-04 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftoption.h: Defining
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING by default is a bad idea
+ since some fonts (e.g. Arial) produce worse results than without
+ hinting. Reverted.
+
+2003-06-04 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Call
+ FT_GlyphLoader_CheckPoints before adding phantom points. This fixes
+ a segfault bug with fonts (e.g. htst3.ttf) which have nested
+ subglyphs more than one level deep. Reported by Anthony Fok.
+
+ * include/freetype/config/ftoption.h: Define
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER,
+ TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, and
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING to make it the new
+ default.
+
+2003-06-03 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahhint.c (ah_hinter_hint_edges): Removed. Just a
+ wrapper for ah_hint_edges.
+ (ah_hint_edges): Renamed to...
+ (ah_hinter_hint_edges): This.
+
+ * src/base/ftobjs.c (FT_Set_Hint_Flags): Removed. Unused.
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec),
+ include/freetype/internal/psaux.h (T1_DecoderRec),
+ src/cff/cffgload.h (CFF_Builder): Remove `hint_flags' field.
+ Unused.
+
+ * src/cff/cffgload.c (cff_builder_init): Updated.
+ (cff_decoder_parse_charstrings) <cff_op_endchar>: Call hinter->apply
+ with decoder->hint_mode instead of builder->hint_flags.
+ * src/psaux/t1decode.c (t1_decoder_init): Updated.
+
+ * src/base/ftstroker.c (ft_stroke_border_export): s/index/idx/.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Commented out code which
+ increased root->height by 15% if the line gap was zero. There exist
+ fonts (containing e.g. form drawing characters) which intentionally
+ have a zero line gap value.
+
+ * src/truetype/ttinterp.c (Free_Project, CUR_Func_freeProj):
+ Removed. Unused.
+ Updated all callers.
+
+2003-06-02 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Use symbolic names for
+ Adobe specific encoding IDs (there was a wrong EID value for custom
+ encoding).
+
+ * src/cff/cffcmap.h (CFF_CMapStdRec): Remove `count'.
+ * src/cff/cffcmap.c (cff_cmap_encoding_init,
+ cff_cmap_encoding_done): Updated.
+ (cff_cmap_encoding_char_index, cff_cmap_encoding_char_next): Use
+ 256 as limit for character code.
+
+2003-06-01 Werner Lemberg <wl@gnu.org>
+
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Revert change from
+ 2003-03-20.
+
+2003-05-31 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/fttrigon.h (FT_Vector_Normalize): Removed.
+
+2003-05-31 <Ron.Dev@gmx.de>
+
+ * src/type1/t1objs.c (T1_Face_Init): Improve algorithm for guessing
+ the font style by ignoring spaces and hyphens.
+
+ * builds/unix/freetype2.in: Fix `Version' field.
+
+2003-05-30 Werner Lemberg <wl@gnu.org>
+
+ Avoid overwriting of numeric font dictionary entries for synthetic
+ fonts. Additionally, some entries were handled as `integer' instead
+ of `number'.
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Add
+ T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
+ T1_FIELD_TYPE_FIXED_P.
+ (T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
+ * src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
+
+ * include/freetype/internal/cfftypes.h (CFF_FontRecDict),
+ src/cff/cfftoken.h: Change type of underline_position and
+ underline_thickness to FT_Fixed.
+ * src/cff/cffload.c (cff_subfont_load): Fix default values of
+ underline_position and underline_thickness.
+ * src/cff/cffobjs.c (cff_face_init): Set underline_position
+ and underline_thickness in `root'.
+
+ * include/freetype/internal/t1types.h (T1_Font): Change point_type
+ and stroke_width to pointers.
+ * include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
+ is_fixed_pitch, underline_position, and underline_thickness to
+ pointers.
+ * src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
+ underline_position, and underline_thickness to pointers. Change
+ the type of the latter two to `fixed'.
+ Change type of stroke_width to `fixed' and make it a pointer.
+ Change paint_type to pointer.
+ * src/type1/t1objs.c (T1_Face_Done): Updated.
+ (T1_Face_Init): Updated.
+ Fix assignment of underline_position and underline_thickness.
+
+ * src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
+ underline_position, and underline_thickness to pointers. Change
+ the type of the latter two to `fixed'.
+ Change type of stroke_width to `fixed'.
+ * src/cid/cidobjs.c (cid_face_done): Updated.
+ (cid_face_init): Updated.
+ Fix assignment of underline_position and underline_thickness.
+
+ * src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
+ underline_position, and underline_thickness to pointers. Change the
+ type of the latter two to `fixed'.
+ Change type of stroke_width to `fixed' and make it a pointer.
+ Change paint_type to pointer.
+ * src/type42/t42objs.c (T42_Face_Init): Updated.
+ Fix assignment of underline_position and underline_thickness.
+ (T42_Face_Done): Updated.
+
+ * src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
+ * src/pshinter/pshglob.c, src/pshinter/pshglob.h
+ (psh_globals_set_scale): Make it a local function.
+
+ * test/gview.c: Fix renaming ps3->ps typo.
+ Formatting.
+
+2003-05-29 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo1.[ch], src/pshinter/pshalgo2.[ch]: Removed.
+ * src/pshinter/pshalgo.h: Removed.
+
+ * src/pshinter/pshalgo3.[ch]: Renamed to...
+ * src/pshinter/pshalgo.[ch]: New files.
+ s/PSH3/PSH/.
+ s/psh3/psh/.
+ s/ps3/ps/.
+
+ * src/pshinter/pshrec.c, src/pshinter/pshinter.c: Updated.
+ * src/pshinter/rules.mk, src/pshinter/Jamfile: Updated.
+
+ * src/pshinter/pshglob.[ch] (psh_dimension_snap_width): Commented
+ out.
+
+ * tests/gview.c: Remove code for pshalgo1 and pshalgo2.
+ Updated.
+
+2003-05-28 Martin Zinser <zinser@decus.de>
+
+ * vms_make.com: Reworked support for shareable images on VMS. The
+ first version was kind of a hack; the current implementation of the
+ procedure to extract the required symbols is much cleaner.
+
+ Reworked creation of MMS files, avoiding a number of temporary files
+ which were created in the previous version.
+
+ Further work on creating descrip.mms files on the fly.
+
+ * builds/vms/descrip.mms, src/autohint/descrip.mms,
+ src/type1/descrip.mms: Removed.
+
+2003-05-28 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo3.c (psh3_glyph_compute_extrema): Skip
+ contours with only a single point to avoid segfault.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Activate code for
+ handling `origin'.
+
+2003-05-24 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahtypes.h (AH_OPTION_NO_STRONG_INTERPOLATION):
+ Removed since unused.
+
+2003-05-21 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftstdlib.h (ft_strcat): New wrapper macro
+ for strcat.
+
+ * src/base/ftmac.c (create_lwfn_name): s/isupper/ft_isupper/.
+ (parse_font): s/memcpy/ft_memcpy/.
+ (is_dfont) [TARGET_API_MAC_CARBON]: s/memcmp/ft_memcmp/.
+ * src/base/ftobjs.c (load_mac_face) [FT_MACINTOSH]:
+ s/strlen/ft_strlen/.
+ s/strcat/ft_strcat/.
+ s/strcpy/ft_strcpy/.
+ * src/gzip/zutil.h: s/memset/ft_memset/.
+ s/memcmp/ft_memcmp/.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
+ (PCF_Face_Init): Test for charset registry case-insensitively.
+
+ * src/gzip/ftgzip.c (ft_gzip_fil_io): Revert change from yesterday;
+ it has already been fixed differently.
+
+ * src/truetype/ttinterp.c (DO_SFVTL): Add missing braces around
+ if-clause.
+
+2003-05-21 Martin Zinser <zinser@decus.de>
+
+ * t1load.c (parse_blend_axis_types): Fix compiler warning.
+
+ * descrip.mms: Removed. Now created by...
+
+ * vms_make.com: New file.
+
+2003-05-21 Weiqi Gao <weiqigao@networkusa.net>
+
+ * src/gzip/ftgzip.c (ft_gzip_file_io): Avoid zero value of `delta'
+ to prevent infinite loop.
+
+2003-05-21 Lars Clausen <lrclause@cs.uiuc.edu>
+
+ * docs/VERSION.DLL: Provide better autoconf snippet to check
+ FreeType version.
+
+2003-05-21 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (open_face): Free `internal' not
+ `face->internal' in case of error to avoid possible segfault.
+
+ * src/pshinter/pshalgo3.c (ps3_hints_apply): Check whether we
+ actually have an outline.
+
+2003-05-20 David Chester <davidchester@qmx.net>
+
+ * src/pshinter/pshalgo3.c (ps3_hints_apply): Try to optimize
+ y_scale so that the top of non-capital letters is aligned on a pixel
+ boundary whenever possible.
+
+ * src/autohint/ahhint.c (ah_hint_edges): Make sure that lowercase
+ m's maintain their symmetry.
+
+2003-05-20 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Oops! David's
+ patch from yesterday has been resolved already in a different
+ way. Reverted.
+
+2003-05-19 David Chester <davidchester@qmx.net>
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Don't scale
+ y_scale locally but face->size->metrics.y_scale.
+
+2003-05-19 David Turner <david@freetype.org>
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_char_next): Select proper start
+ value for `hi' to avoid infinite loop.
+
+2003-05-18 Yong Sun <sunyong@njstar.com>
+
+ * src/raster/ftraster.c (Insert_Y_Turn): Fix overflow test.
+
+2003-05-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftoption.h [FT_CONFIG_OPTION_MAC_FONTS]:
+ New macro.
+ * src/base/ftobjs.c: Use it to control mac font support on non-mac
+ platforms.
+
+2003-05-17 George Williams <gww@silcom.com>
+
+ Implement partial support of Mac fonts on non-Mac platforms.
+
+ * src/base/ftobjs.c (memory_stream_close, new_memory_stream,
+ open_face_from_buffer, Mac_Read_POST_Resource,
+ Mac_Read_sfnt_Resource, IsMacResource, IsMacBinary, load_mac_face)
+ [!FT_MACINTOSH]: New functions.
+ (FT_Open_Face) [!FT_MACINTOSH]: Use load_mac_face.
+
+2003-05-17 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Scale linear advance width only
+ if FT_FACE_FLAG_SCALABLE is set (otherwise we have a division by
+ zero since FNT and friends don't define `face->units_per_EM').
+
+2003-05-15 David Turner <david@freetype.org>
+
+ * src/base/fttrigon.c (FT_Vector_Rotate): Avoid rounding errors
+ for small values.
+
+2003-05-15 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahtypes.h (AH_PointRec): Remove unused `in_angle'
+ and `out_angle' fields.
+
+2003-05-14 George Williams <gww@silcom.com>
+
+ * src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also.
+
+2003-05-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h: Fix typo in comment
+ (FT_HAS_FIXED_SIZES).
+
+2003-05-10 Dan Williams <dan@bigw.org>
+
+ * builds/unix/aclocal.m4: Comment out definition of
+ `allow_undefined_flag' for Darwin 1.3.
+ * builds/unix/configure.ac: Add option --with-old-mac-fonts.
+ * builds/unix/ltmain.sh: Fix version numbering for Darwin 1.3.
+ * builds/unix/configure: Regenerated.
+
+ * include/freetype/config/ftconfig.h: Fix conditions for defining
+ `FT_MACINTOSH'.
+ * src/base/ftbase.c: Include `ftmac.c' conditionally.
+ * src/base/ftmac.c: Handle __GNUC__.
+
+2003-05-07 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
+
+ * src/cid/cidload.c (is_alpha): Removed.
+ (cid_parse_dict): Use `cid_parser_skip_alpha' instead of `is_alpha'.
+
+2003-05-07 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahoptim.c, src/autohint/ahoptim.h: Obsolete, removed.
+
+2003-05-07 David Turner <david@freetype.org>
+
+ * src/autohint/ahglyph.c (ah_setup_uv): Exchange `for' loop and
+ `switch' statement to make it run faster.
+ (ah_outline_compute_segments): Reset `segment->score' and
+ `segment->link'.
+ (ah_outline_link_segments): Provide alternative code which does
+ the same but runs much faster.
+ Handle major direction also.
+ (ah_outline_compute_edges): Scale `edge_distance_threshold' down
+ after rounding instead of scaling comparison value in loop.
+
+ * src/autohint/ahhint.c (ah_hinter_align_stong_points): Provide
+ alternative code which runs faster.
+ Handle `before->scale == 0'.
+
+ * src/autohint/ahtypes.h (AH_SegmentRec): Move some fields down.
+ (AH_EdgeRec): Move some fields in structure.
+ New field `scale'.
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_char_next): Use binary search.
+
+2003-05-02 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahoptim.c (LOG): Renamed to...
+ (AH_OPTIM_LOG): This.
+ (AH_Dump_Springs): Fix log message format.
+
+ * src/autohint/ahhint.c (ah_hint_edges_3): Renamed to...
+ (ah_hint_edges): This.
+
+2002-05-02 Keith Packard <keithp@keithp.com>
+
+ * src/bdf/bdfdrivr.c (BDF_Set_Pixel_Size): Initialize `max_advance'.
+
+2003-05-01 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahglyph.c (ah_test_extrema): Renamed to...
+ (ah_test_extremum): This.
+
+2003-04-28 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.ac: Generate `freetype.pc' from
+ `freetype.in'.
+ * builds/unix/configure: Regenerated.
+ * builds/unix/install.mk (install, uninstall): Handle `freetype.pc'.
+
+2003-04-28 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * builds/unix/freetype2.in: New file. Contains building information
+ for the `pkg-config' package.
+
+2003-04-28 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for
+ `glyph_index'.
+
+2003-04-25: Graham Asher <graham.asher@btinternet.com>
+
+ Added the optional unpatented hinting system for TrueType. It
+ allows typefaces which need hinting to produce correct glyph forms
+ (e.g., Chinese typefaces from Dynalab) to work acceptably without
+ infringing Apple patents. This system is compiled only if
+ TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined in
+ ftoption.h.
+
+ * include/freetype/ttunpat.h: New file. Defines
+ FT_PARAM_TAG_UNPATENTED_HINTING.
+
+ * include/freetype/config/ftheader.h (FT_TRUETYPE_UNPATENTED_H): New
+ macro to use when including ttunpat.h.
+
+ * include/freetype/config/ftoption.h
+ (TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING,
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): New configuration macros
+ (not defined, but in comments) for the unpatented hinting system.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: New element `FT_Bool
+ unpatented_hinting'.
+
+ * src/truetype/ttinterp.c (NO_APPLE_PATENT, APPLE_THRESHOLD):
+ Removed.
+ (GUESS_VECTOR): New macro.
+ (TT_Run_Context) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]:
+ Set `both_x_axis'.
+ (tt_default_graphics_state)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Updated.
+ (Current_Ratio) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]:
+ Handle `unpatented_hinting'.
+ (Direct_Move) [NO_APPLE_PATENT]: Removed.
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Insert assertion.
+ (Project, FreeProject)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Insert assertion.
+ (Compute_Funcs) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]:
+ Implement unpatented hinting.
+ (DO_SPVTCA, DO_SFVTCA, DO_SPVTL, DO_SFVTL, DO_SPVFS, DO_SFVFS,
+ Ins_SDPVTL): Call `GUESS_VECTOR'.
+ (DO_GPV, DO_GFV) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]:
+ Handle `unpatented_hinting'.
+ (Compute_Point_Displacement) [NO_APPLE_PATENT]: Removed.
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Implement unpatented
+ hinting.
+ (Move_Zp2_Point, Ins_SHPIX, Ins_DELTAP, Ins_DELTAC)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Implement unpatented
+ hinting.
+ (TT_RunIns): Updated.
+
+ * src/truetype/ttobjs.c
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Include
+ FT_TRUETYPE_UNPATENTED_H.
+ (tt_face_init) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING,
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING]: Check
+ FT_PARAM_TAG_UNPATENTED_HINTING.
+
+ * src/truetype/ttobjs.h (TT_GraphicsState)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Add `both_x_axis'.
+
+2003-04-25 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdflib.c (hash_bucket, hash_lookup): Use `const' for first
+ argument.
+ (bdf_get_font_property): Use `const' for third argument.
+ Updated all callers.
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Set pixel width and height
+ similar to the PCF driver.
+ * src/bdf/bdf.h (_hashnode): Use `const' for `key'.
+ Updated.
+
+ * src/gzip/ftgzip.c: C++ doesn't like that the array `inflate_mask'
+ is declared twice. It is perhaps better to modify the zlib source
+ files directly instead of this hack.
+ (zcalloc, zfree, ft_gzip_stream_close, ft_gzip_stream_io): Add casts
+ to make build with g++ successful.
+
+2003-04-24 Manish Singh <yosh@gimp.org>
+
+ * src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c
+ (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Split on `-'
+ also for searching the style name.
+
+2003-04-24 David Turner <david@freetype.org>
+
+ * src/pcf/pcfread.c (pcf_load_font): Fixed the computation of
+ face->num_glyphs. We must increase the value by 1 to respect the
+ convention that glyph index 0 always corresponds to the `missing
+ glyph'.
+
+2003-04-24 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/unix-cc.in (CFLAGS): Add @CPPFLAGS@.
+
+2003-04-24 Dieter Baron <dillo@netbsd.org>
+
+ * builds/unix/freetype-config.in (cflags): Emit FreeType 2's include
+ files first. Otherwise there are conflicts with FreeType 1
+ installed simultaneously.
+
+2003-04-23 Werner Lemberg <wl@gnu.org>
+
+ Fixing bugs reported by Nelson Beebe.
+
+ * src/base/ftstroker.c (FT_Stroker_ParseOutline): Remove unused
+ variable `in_path'.
+
+ * src/base/ftobjs (ft_glyphslot_set_bitmap): Change type of
+ second argument to `FT_Byte*'.
+ * include/freetype/internal/ftobjs.h: Updated.
+
+ * src/bdf/bdflib.c (_bdf_readstream): Remove unused variable `res'.
+ (_bdf_parse_glyphs): Remove unused variable `next'.
+ Mark `call_data' as unused.
+
+ * src/cache/ftlru.c (FT_LruList_Lookup): Remove unused variable
+ `plast'.
+
+ * src/pcf/pcfread.c (pcf_seek_to_table_type): Slight recoding to
+ actually use `error'.
+ (pcf_load_font): Remove unused variable `avgw'.
+
+ * src/pfr/pfrobjs.c (pfr_face_get_kerning): Change return type
+ to `void'.
+ Mark `error' as unused.
+ * src/pfr/pfrobjs.h: Updated.
+ * src/pfr/pfrdrivr.c (pfr_get_kerning): Updated.
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Remove unused variable
+ `format_tag'.
+
+ * src/sfnt/ttcmap0.c (tt_cmap6_validate, tt_cmap10_validate): Remove
+ unused variable `start'.
+ (tt_cmap10_char_next): Remove unused variable `result'
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): Mark `error' as unused.
+
+ * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Mark `error' as
+ unused.
+
+ * src/type1/t1objs.c (T1_Face_Init): Remove unused variable
+ `pshinter'.
+
+ * src/type1/t1gload.c (T1_Load_Glyph): Use `glyph_data_loaded'
+ only for FT_CONFIG_OPTION_INCREMENTAL.
+
+2003-04-23 Akito Hirai <akito@kde.gr.jp>
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_validate): Provide a weak variant
+ of the glyph ID bounding check if FT_VALIDATE_TIGHT is not active.
+ Without this change, many CJK fonts from Dynalab are rejected.
+
+2003-04-23 Joe Marcus Clarke <marcus@FreeBSD.org>
+
+ * src/base/ftbdf.c (FT_Get_BDF_Property): Check for valid
+ `get_interface'.
+
+2003-04-23 Paul Miller <paulm@profoundeffects.com>
+
+ * src/base/ftmac.c (parse_fond): Fix handling of style names.
+
+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'.
+
+2003-04-22 Werner Lemberg <wl@gnu.org>
+
+ * src/gzip/ftgzip.c (zcalloc) [!FT_CONFIG_OPTION_SYSTEM_ZLIB]:
+ Convert K&R format to modern C usage.
+ (FT_Stream_OpenGzip): Use long constant.
+
+2003-04-21 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c (ftc_cache_lookup): Remove shadow declaration
+ of `manager'.
+
+2003-04-20 Werner Lemberg <wl@gnu.org>
+
+ * doc/INSTALL.UNX: Cleaned up.
+
+2003-04-09 Torrey Lyons <torrey@mrcla.com>
+
+ * src/base/ftmac.c (open_face_from_buffer): Removed a double-free
+ bug that had nasty consequences when trying to open an `invalid'
+ font on a Mac.
+
+2003-04-09 Mike Fabian <mfabian@suse.de>
+
+ * src/bdf/bdfdrivr.h (BDF_encoding_el), src/pcf/pcf.h
+ (PCF_EncodingRec): Changed FT_Short to FT_UShort in order to be able
+ to access more than 32768 glyphs in fonts.
+
+2003-04-08 David Turner <david@freetype.org>
+
+
+ * Version 2.1.4 released.
+ =========================
+
+
+2003-04-03 Martin Muskens <mmuskens@aurelon.com>
+
+ * src/type1/t1load.c (T1_Open_Face): Fixed the code to make it
+ handle special cases where a font only contains a `.notdef' glyph
+ (happens in PDF-embedded fonts). Otherwise, FT_Panic was called.
+
+2003-03-27 David Turner <david@freetype.org>
+
+ * README: Udpated.
+
+ * README.UNX: Removed (now replaced by docs/INSTALL.UNX).
+
+ * src/pshinter/pshalgo3.c: The hinter now performs as in 2.1.3 and
+ will ignore stem quantization only when FT_LOAD_TARGET_SMOOTH is
+ used.
+ (psh3_dimension_quantize_len): Enabled.
+ (psh3_hint_align): Enable commented code.
+ (psh3_hint_align_light): Commented out.
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Changed the default
+ computations to include rounding in all cases; this is required to
+ provide accurate kerning data when native TrueType hinting is
+ enabled.
+
+ * src/type1/t1load.c (is_name_char): The Type 1 loader now accepts
+ more general names according to the PostScript specification (the
+ previous one was too restrictive).
+ (parse_font_name, parse_encoding, parse_charstrings, parse_dict):
+ Use `is_name_char'.
+ (parse_subrs): Handle empty arrays.
+
+2003-03-20 David Turner <david@freetype.org>
+
+ Serious rewriting of the documentation.
+
+ * docs/BUGS, docs/BUILD: Removed.
+ * docs/DEBUG.TXT: Renamed to...
+ * docs/DEBUG: This.
+ * docs/CUSTOMIZE, docs/TRUETYPE, docs/UPGRADE.UNX: New files.
+ * docs/INSTALL.ANY, docs/INSTALL.UNX, docs/INSTALL.GNU New files,
+ containing platform specific information previously in INSTALL.
+ * docs/readme.vms: Renamed to...
+ * docs/INSTALL.VMS: This.
+
+ * docs/*: Updated.
+
+ Introduced three new functions to deal with glyph bitmaps within
+ FT_GlyphSlot objects:
+
+ ft_glyphslot_free_bitmap
+ ft_glyphslot_alloc_bitmap
+ ft_glyphslot_set_bitmap
+
+ These functions are much more convenient to use than managing the
+ FT_GLYPH_OWN_BITMAP flag manually.
+
+ * include/freetype/internal/ftobjs.h (ft_glyphslot_free_bitmap,
+ ft_glyphslot_alloc_bitmap, ft_glyphslot_set_bitmap): New functions.
+ * src/base/ftobjs.c: Implement them.
+ (ft_glyphslot_done): Use ft_glyphslot_free_bitmap.
+
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/pcf/pcfdriver.c
+ (PCF_Glyph_Load): Remove unused variable `memory'.
+ Use `ft_glyphslot_*' functions.
+ Don't set `FT_GLYPH_OWN_BITMAP'.
+
+ * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Use
+ `ft_glyphslot_alloc_bitmap'.
+
+ * src/sfnt/ttsbit.c (Load_SBit_Image): Change 5th argument to type
+ `FT_GlyphSlot'.
+ Adding argument `depth' to handle recursive calls.
+ Use `ft_glyphslot_alloc_bitmap'.
+ (tt_face_load_sbit_image): Remove unused variable `memory'.
+ Don't handle `FT_GLYPH_OWN_BITMAP'.
+ Update call to Load_SBit_Image.
+
+ * src/type42/t42objs.c (ft_glyphslot_clear): Renamed to...
+ (t42_glyphslot_clear): This. Updated caller.
+ Call `ft_glyphslot_free_bitmap'.
+
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Use
+ `ft_glyphslot_set_bitmap'.
+ Don't handle `FT_GLYPH_OWN_BITMAP'.
+
+ * src/cache/ftlru.c (FT_LruList_Lookup): Fixed an invalid assertion
+ check.
+
+ * src/autohint/ahglyph.c (ah_outline_load): Add two scaling
+ arguments.
+ * src/autohint/ahglyph.h: Updated.
+ * src/autohint/ahhint.c (ah_hinter_load): Updated.
+ * src/autohint/ahglobal.c (ah_hinter_compute_widths): Updated.
+
+ * src/cache/ftccache.c (ftc_family_done): Fixed small bug that could
+ crash the cache in rare circumstances (mostly with broken fonts).
+
+2003-03-15 David Turner <david@freetype.org>
+
+ * src/truetype/ttdriver.c (Set_Char_Sizes): Fixed a small rounding
+ bug. Actually, it seems that previous versions of FreeType didn't
+ perform TrueType rounding exactly as appropriate.
+
+2003-03-14 David Turner <david@freetype.org>
+
+ * src/truetype/ttdriver.c (Set_Char_Sizes): Fixing the small
+ TrueType native rendering glitches; they came from a small rounding
+ error.
+
+2003-03-13 David Turner <david@freetype.org>
+
+ Added new environment variables to control memory debugging with
+ FreeType. See the description of `FT2_DEBUG_MEMORY',
+ `FT2_ALLOC_TOTAL_MAX' and `FT2_ALLOC_COUNT_MAX' in DEBUG.TXT.
+
+ * src/base/ftdbgmem.c (FT_MemTableRec): Add `alloc_count',
+ `bound_total', `alloc_total_max', `bound_count', `alloc_count_max'.
+ (ft_mem_debug_alloc): Handle new variables.
+ (ft_mem_debug_init): s/FT_DEBUG_MEMORY/FT2_DEBUG_MEMORY/.
+ Handle new environment variables.
+ * docs/DEBUG.TXT: Updated.
+
+ Fixed the cache sub-system to correctly deal with out-of-memory
+ conditions.
+
+ * src/cache/ftccache.c (ftc_node_destroy): Comment out generic
+ check.
+ (ftc_cache_lookup): Implement loop.
+ * src/cache/ftccmap.c: Define FT_COMPONENT.
+ * src/cache/ftcsbits.c (ftc_sbit_node_load): Handle
+ FT_Err_Out_Of_Memory.
+ * src/cache/ftlru.c: Include FT_INTERNAL_DEBUG_H.
+ (FT_LruList_Lookup): Implement loop.
+
+ * src/pfr/pfrobjs.c (pfr_face_done): Fix memory leak.
+ (pfr_face_init): Fixing compiler warnings.
+
+ * src/psaux/psobjs.c (reallocate_t1_table): Fixed a bug (memory
+ leak) that only happened when a try to resize an array would end in
+ an out-of-memory condition.
+
+ * src/smooth/ftgrays.c (gray_convert_glyph): Removed compiler
+ warnings / volatile bug.
+
+ * src/truetype/ttobjs.c (tt_glyphzone_done): Removed segmentation
+ fault that happened in tight memory environments.
+
+2003-02-28 Pixel <pixel@mandrakesoft.com>
+
+ * src/gzip/ftgzip.c (ft_gzip_file_done): Fixed memory leak: The ZLib
+ stream was not properly finalized.
+
+2003-02-25 Anthony Fok <anthony@thizlinux.com>
+
+ * src/cache/ftccmap.c: Include FT_TRUETYPE_IDS_H.
+ (ftc_cmap_family_init): The cmap cache now
+ supports UCS-4 charmaps when available in Asian fonts.
+
+ * src/sfnt/ttload.c, src/base/ftobjs.c: Changed `asian' to `Asian'
+ in comments.
+
+2003-02-25 David Turner <david@freetype.org>
+
+ * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Fixed a bug that
+ caused FreeType to loop endlessly when trying to read certain
+ compressed gzip files. The following test reveals the bug:
+
+ touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz
+
+ Several fixes to the PFR font driver:
+
+ - The list of available embedded bitmaps was not correctly set in
+ the root FT_FaceRec structure describing the face.
+
+ - The glyph loader always tried to load the outlines when
+ FT_LOAD_SBITS_ONLY was specified.
+
+ - The table loaded now scans for *undocumented* elements of a
+ physical font's auxiliary data record. This is necessary to
+ retrieve the `real' family and style names.
+
+ NOTE THAT THESE CHANGES THE FAMILY NAME OF MANY PFR FONTS!
+
+ * src/pfr/pfrload.c (pfr_aux_name_load): New function.
+ (pfr_phy_font_done): Free `family_name' and `style_name' also.
+ Remove unused variables.
+ (pfr_phy_font_load): Extract useful information from the auxiliary
+ bytes.
+
+ * src/pfr/pfrobjs.c (pfr_face_done): Set pointers to NULL.
+ (pfr_face_init): Provide fallback values for `family_name' and
+ `style_name'.
+ Handle strikes.
+ (pfr_slot_load): Handle FT_LOAD_SBITS_ONLY.
+ * src/pfr/pfrtypes.h (PFR_PhyFontRec): Add fields `ascent',
+ `descent', `leading', `family_name', and `style_name'.
+
+ * src/truetype/ttdriver.c (Set_Char_Sizes): Fixed a rounding bug
+ when computing the scale factors for a given character size in
+ points with resolution.
+
+ * devel/ft2build.h, devel/ftoption.h: New files (in a new directory)
+ which are special development versions of include/ft2build.h and
+ include/freetype/config/ftoption.h, respectively.
+
+2003-02-18 David Turner <david@freetype.org>
+
+ Fixing the slight distortion problem that occurred due to the latest
+ auto-hinter changes.
+
+ * src/base/ftobjs.c (ft_recompute_scaled_metrics): Fix rounding.
+
+ * src/truetype/ttdriver.c (Set_Char_Sizes): New variable `metrics2'.
+ [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Removed.
+
+ * src/truetype/ttobjs.h (TT_SizeRec): New field `metrics'.
+ * src/truetype/ttobjs.c (Reset_Outline_Size): Fix initialization of
+ `metrics'.
+ [FT_CONFIG_CHESTER_ASCENDER]: Code removed.
+ (Reset_SBit_Size): Fix initialization of `metrics'.
+
+ * src/truetype/ttinterp.c (TT_Load_Context): Fix initialization of
+ `exec->metrics'.
+
+ * src/autohint/ahhint.c (ah_hinter_load): Disabled the advance width
+ `correction' which seemed to provide more trouble than benefits.
+
+2003-02-13 Graham Asher <graham.asher@btinternet.com>
+
+ Changed the incremental loading interface in a way that makes it
+ simpler and allows glyph metrics to be changed (e.g., by adding a
+ constant, as required by CFF fonts) rather than just overridden.
+ This was required to make the GhostScript-to-FreeType bridge work.
+
+ * src/cff/cffgload.c (cff_slot_load) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Allow metrics to be overridden.
+ * src/cid/cidgload.c (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Ditto.
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Simplify.
+ (compute_glyph_metrics) [FT_CONFIG_OPTION_INCREMENTAL]: Code block
+ moved down.
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+
+ * include/freetype/ftincrem.h: Updated.
+
+2003-01-31 David Turner <david@freetype.org>
+
+ * docs/CHANGES, docs/VERSION.DLL, docs/TODO: Updating documentation
+ for the 2.1.4 release.
+
+ * builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/index.html: Updating the project file for
+ 2.1.4.
+
+ * src/gzip/adler32.c, src/gzip/ftgzip.c, src/gzip/infblock.c,
+ src/gzip/infcodes.c, src/gzip/inflate.c, src/gzip/inftrees.c,
+ src/gzip/infutil.c: Removed old-style (K&R)function definitions.
+ This avoids warnings with Visual C++ at its most pedantic mode.
+
+ * src/pfr/pfrsbit.c: Removed compiler warnings.
+
+ * src/cache/ftccmap.c (ftc_cmap_family_init): Changed an FT_ERROR
+ into an FT_TRACE1 since it caused `ftview' and others to dump too
+ much junk when trying to display a waterfall with a font without a
+ Unicode charmap (e.g. SYMBOL.TTF).
+
+ Implemented FT_CONFIG_CHESTER_BLUE_SCALE, corresponding to the last
+ patch from David Chester, but with a much simpler (and saner)
+ implementation.
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph)
+ [FT_CONFIG_CHESTER_BLUE_SCALE]: Try to optimize the y_scale so that
+ the top of non-capital letters is aligned on a pixel boundary
+ whenever possible.
+
+ * src/base/ftobjs.c (FT_Set_Char_Size)
+ [FT_CONFIG_CHESTER_BLUE_SCALE]: Round differently.
+ * src/truetype/ttdriver.c (Set_Char_Sizes)
+ [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Do some rounding only
+ if this macro is defined.
+
+ * src/truetype/ttobjs.c (Reset_Outline_Size)
+ [FT_CONFIG_CHESTER_ASCENDER]: Round differently.
+
+ * src/pshinter/pshalgo3.c: Improved the Postscript hinter. Getting
+ rid of stem snapping seems to work well here (though the stems are
+ still slightly moved to increase contrast).
+ (psh3_dimension_quantize_len): Commented out.
+ (psh3_hint_align_light): New function.
+ (psh3_hint_align): Comment out some code.
+
+ THIS IMPROVES ANTI-ALIASED RENDERING, BUT MONOCHROME AND LCD MODES
+ STILL SUCK.
+
+2003-01-22 David Chester <davidchester@qmx.net>
+
+ * src/autohint/ahhint.c (ah_compute_stem_width): Small fix to the
+ stem width optimization.
+
+2003-01-22 David Turner <david@freetype.org>
+
+ Adding a new API `FT_Get_BDF_Property' to retrieve the BDF
+ properties of a given PCF or BDF font.
+
+ * include/freetype/ftbdf.h (FT_PropertyType): New enumeration.
+ (BDF_Property, BDF_PropertyRec): New structure.
+ FT_Get_BDF_Property): New function.
+ * include/freetype/internal/bdftypes.h: Include FT_BDF_H.
+ (BDF_GetPropertyFunc): New function pointer.
+
+ * src/base/ftbdf.c (test_font_type): New helper function.
+ (FT_Get_BDF_Charset_ID): Use `test_font_type'.
+ (FT_Get_BDF_Property): New function.
+
+ * src/bdf/bdfdrivr.c: Include FT_BDF_H.
+ (bdf_get_bdf_property, bdf_driver_requester): New functions.
+ (bdf_driver_class): Use `bdf_driver_requester'.
+
+ * src/pcf/pcfdrivr.c: Include FT_BDF_H.
+ (pcf_get_bdf_property, pdc_driver_requester): New functions
+ (pcf_driver_class): Use `pcf_driver_requester'.
+
+ * src/pcf/pcfread.c: Include `pcfread.h'.
+ (pcf_find_property): Decorate it with FT_LOCAL_DEF.
+ * src/pcf/pcfread.h: New file, providing `pcf_find_property'.
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Relaxed the `head' table size
+ verification to accept a few broken fonts who pad the size
+ incorrectly (the table should be padded, but its `size' field
+ shouldn't according to the specification).
+
+2003-01-18 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.4.3.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.7.1.
+ * builds/unix/configure: Regenerated with autoconf 2.54.
+ * builds/unix/config.guess, builds/unix/config.sub: Updated from
+ `config' CVS module at subversions.gnu.org.
+ * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
+ `automake' CVS module at subversions.gnu.org.
+
+2003-01-15 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h: Fixed documentation for
+ FT_Size_Metrics.
+
+2003-01-15 James Su <suzhe@turbolinux.com.cn>
+
+ * src/gzip/ftgzip.c (ft_gzip_check_header): Bugfix: couldn't read
+ certain gzip-ed font files (typo: `&&' -> `&').
+
+2003-01-15 Huw D M Davies <h.davies1@physics.ox.ac.uk>
+
+ Added a Windows .FNT specific API (mostly for Wine). Also fixed a
+ nasty bug in the header loader which would cause invalid memory
+ overwrites.
+
+ * include/freetype/config/ftheader.h (FT_WINFONTS_H): New macro
+ for ftwinfnt.h.
+ * include/freetype/internal/fnttypes.h: Include FT_WINFONTS_H.
+ (FNT_FontRec): Updated.
+ Move Windows FNT definition to...
+ * include/freetype/ftwinfnt.h: This new file.
+ (FT_WinFNT_HeaderRec): Rename `reserved2' to `reserved1'.
+ * src/base/ftwinfnt.c: New file, providing `FT_Get_WinFNT_Header'.
+ * src/winfonts/winfnt.c (winfnt_header_fields): Updated.
+ Rename `reserved2' to `reserved1'.
+ (fnt_font_load): Updated.
+
+ * src/base/Jamfile, src/base/descrip.mms, src/base/rules.mk:
+ Updated.
+
+2003-01-14 Graham Asher <graham.asher@btinternet.com>
+
+ * include/freetype/ftglyph.h, src/base/ftglyph.c: Added `const' to
+ the type of the first argument to FT_Matrix_Multiply, which isn't
+ changed -- this adds documentation and convenience.
+
+2003-01-13 Graham Asher <graham.asher@btinternet.com>
+
+ * src/sfnt/ttload.c (tt_face_load_metrics)
+ [FT_CONFIG_OPTION_INCREMENTAL]: TrueType typefaces without
+ horizontal metrics (without the `hmtx' table) are now tolerated if
+ an incremental interface has been specified that has a
+ get_glyph_metrics function, implying that metrics will be supplied
+ from outside. This happens for certain Type 42 fonts passed from
+ GhostScript.
+
+2003-01-11 David Chester <davidchester@qmx.net>
+
+ Patches to the auto-hinter in order to slightly improve the output.
+ Note that everything is controlled through the new
+ FT_CONFIG_OPTION_CHESTER_HINTS defined in `ftoption.h'. There are
+ also individual FT_CONFIG_CHESTER_XXX macros to control individual
+ `features'.
+
+ Note that all improvements are enabled by default, but can be
+ tweaked for optimization and testing purposes. The configuration
+ macros will most likely disappear in the short future.
+
+ * include/freetype/config/ftoption.h
+ (FT_CONFIG_OPTION_CHESTER_HINTS): New macro.
+ (FT_CONFIG_CHESTER_{SMALL_F,ASCENDER,SERIF,STEM,BLUE_SCALE})
+ [FT_CONFIG_OPTION_CHESTER_HINTS]: New macros to control individual
+ features.
+
+ * src/autohint/ahglobal.c (blue_chars) [FT_CONFIG_CHESTER_SMALL_F]:
+ Add blue zone for `fijkdbh'.
+ * src/autohint/ahglobal.h (AH_IS_TOP_BLUE)
+ [FT_CONFIG_CHESTER_SMALL_F]: Use `AH_BLUE_SMALL_F_TOP'.
+ * src/autohint/ahglyph.c (ah_outline_compute_edges)
+ [FT_CONFIG_CHESTER_SERIF]: Use `AH_EDGE_SERIF'.
+ (ah_outline_compute_blue_edges) [FT_CONFIG_CHESTER_SMALL_F]:
+ Increase threshold for `best_dist'.
+ * src/autohint/ahhint.c (ah_compute_stem_width)
+ [FT_CONFIG_CHESTER_SERIF]: Provide new version for improved serif
+ handling.
+ (ah_align_linked_edge) [FT_CONFIG_CHESTER_SERIF]: Use special
+ version of `ah_compute_stem_width'.
+ (ah_hint_edges_3) [FT_CONFIG_CHESTER_STEM]: A new algorithm for stem
+ alignment when stem widths are less than 1.5 pixels wide centers the
+ stem slightly off-center of the center of a pixel (this increases
+ sharpness and consistency).
+ [FT_CONFIG_CHESTER_SERIF]: Use special version of
+ `ah_compute_stem_width'.
+ * src/autohint/ahtypes.h [FT_CONFIG_CHESTER_SMALL_F]: Add
+ `AH_BLUE_SMALL_F_TOP'.
+
+2003-01-11 David Turner <david@freetype.org>
+
+ * include/freetype/internal/fnttypes.h (WinFNT_HeaderRec): Increase
+ size of `reserved2' to avoid memory overwrites.
+
+2003-01-08 Huw Davies <huw@codeweavers.com>
+
+ * src/winfonts/winfnt.c (winfnt_header_fields): Read 16 bytes into
+ `reserved2', not `reserved'.
+
+ * src/base/ftobjs.c (find_unicode_charmap): Fixed the error code
+ returned when the font doesn't contain a Unicode charmap. This
+ allows FT2 to load `symbol.ttf' and a few others correctly since the
+ last release.
+ (open_face): Fix return value.
+
+2003-01-08 Owen Taylor <owen@redhat.com>
+
+ Implemented the FT_RENDER_MODE_LIGHT hinting mode in the auto and
+ postscript hinters.
+
+ * src/autohint/ahtypes.h (AH_HinterRec): Add `do_stem_adjust'.
+ * src/autohint/ahhint.c (ah_compute_stem_width): Handle
+ hinter->do_stem_adjust.
+ (ah_hinter_load_glyph): Set hinter->do_stem_adjust.
+
+ * src/pshinter/pshalgo3.h (PSH3_GlyphRec): Add `do_stem_adjust'.
+ * src/pshinter/pshalgo3.c (psh3_hint_align): Use `do_stem_adjust'.
+ (ps3_hints_apply): Handle FT_RENDER_MODE_LIGHT.
+
+ * include/freetype/freetype.h (FT_Render_Mode): Add
+ FT_RENDER_MODE_LIGHT.
+
+ * src/truetype/ttgload.c: Fixing the TrueType loader to handle
+ invalid composites correctly by limiting the recursion depth.
+ (TT_MAX_COMPOSITE_RECURSE): New macro.
+ (load_truetype_glyph): Add argument `recurse_count'.
+ Load a composite only if the numbers of contours is -1, emit error
+ otherwise.
+ (TT_Load_Glyph): Updated.
+
+2003-01-08 David Turner <david@freetype.org>
+
+ * Jamrules, Jamfile, Jamfile.in, src/*/Jamfile: Small changes to
+ support the compilation of FreeType 2 as part of larger projects
+ with their own configuration options (only with Jam).
+
+2003-01-07 David Turner <david@freetype.org>
+
+ * src/base/ftstroker.c: Probably the last bug-fixes to the stroker;
+ the API is likely to change, however.
+ (ft_stroke_border_close): Don't record empty paths.
+ (ft_stroke_border_get_counts): Increase `num_points' also in for loop.
+ (ft_stroke_border_export): Don't increase `write' twice in for loops.
+ (ft_stroker_outside): Handle `phi' together with `theta'.
+ (FT_Stroker_ParseOutline): New function.
+
+ * src/base/fttrigon.c (FT_Angle_Diff): Fixing function: It returned
+ invalid values for large negative angle differences (resulting in
+ incorrect stroker computations, among other things).
+
+ * src/cache/ftccache.c (ftc_node_hash_unlink): Removing incorrect
+ assertion, and changing code to avoid hash table size contraction.
+
+ * src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: Adding
+ `ftstroker' to default build, as optional component.
+
+2002-12-26 David Turner <david@freetype.org>
+
+ * src/gzip/adler32.c, src/gzip/infblock.c, src/gzip/inflate.c,
+ src/gzip/inftrees.c, src/gzip/zconf.h, src/gzip/zlib.h,
+ src/gzip/zutil.h: Updates to allow compilation without compiler
+ warnings with LCC-Win32.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
+ * builds/unix/configure.ac (version_info): Increased to 9:3:3.
+ * builds/unix/configure: Regenerated.
+ * docs/VERSION.DLL: Updated.
+
+2002-12-23 Anthony Fok <anthony@thizlinux.com>
+
+ * builds/unix/configure.ac, builds/unix/unix-cc.in (LINK_LIBRARY),
+ builds/unix/unix-def.in (SYSTEM_ZLIB): Small fix to configure
+ sub-system on Unix to allow other programs to correctly link with
+ zlib when needed.
+
+2002-12-19 David Turner <david@freetype.org>
+
+ * include/freetype/internal/sfnt.h (SFNT_Load_Table_Func): New
+ function pointer.
+
+ * include/freetype/tttables.h (FT_Load_Sfnt_Table): New function.
+ * src/base/ftobjs.c: Implement it.
+
+ * src/sfnt/sfdriver.c (sfnt_get_interface): Handle `load_sfnt'
+ module request.
+
+2002-12-17 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (find_unicode_charmap): Added some comments to
+ better explain what's happening there.
+ (open_face): Included Graham Asher's fix to prevent faces without
+ Unicode charmaps from loading.
+
+ * src/winfonts/winfnt.c: Included George Williams's fix to support
+ version 2 fonts correctly.
+ (winfnt_header_fields): Updated.
+ (fnt_font_load): Handle version 2 fonts.
+ (FNT_Load_Glyph): Updated.
+
+2002-12-16 David Turner <david@freetype.org>
+
+ * docs/VERSION.DLL: Updating document to better explain the
+ differences between the three version numbers being used on Unix, as
+ well as providing an autoconf fragment provided by Lars Clausen.
+
+ * src/smooth/ftgrays.c (gray_render_conic): Fixed small bug that
+ prevented Bézier arcs with negative vertical coordinates to be
+ rendered appropriately.
+
+2002-12-02 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * src/base/ftobjs.c: Modified the logic to get Unicode charmaps.
+ Now it loads UCS-4 charmaps when there is one.
+ (find_unicode_charmap): New function.
+ (open_face): Refer to the above one.
+ (FT_Select_Charmap): Idem.
+
+2002-11-29 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * include/freetype/ftgzip.h: Correct the name of the controlling
+ macro (was __FTXF86_H__ ...).
+
+2002-11-27 Vincent Caron <v.caron@zerodeux.net>
+
+ * builds/unix/unix-def.in, builds/unix/freetype-config.in,
+ builds/unix/configure.ac, src/gzip/rules.mk, src/gzip/ftgzip.c
+ [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Adding support for system zlib
+ installations if available on the target platform (Unix only).
+
+2002-11-23 David Turner <david@freetype.org>
+
+ * src/cff/cffload.c (cff_charset_load, cff_encoding_load): Modified
+ charset loader to accept pre-defined charsets, even when the font
+ contains fewer glyphs. Also enforced more checks to ensure that we
+ never overflow the character codes array in the encoding.
+
+2002-11-22 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * include/freetype/ttnameid.h: Updated to latest OpenType
+ specification.
+
+2002-11-18 David Turner <david@freetype.org>
+
+
+ * Version 2.1.3 released.
+ =========================
+
+
+2002-11-07 David Turner <david@freetype.org>
+
+ * src/cache/ftcsbit.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/otlgsub.c, src/otlayout/otlgsub.h,
+ src/otlayout/otlparse.c, src/otlayout/otlparse.h,
+ src/otlayout/otlutils.h: Updating the OpenType Layout code, adding
+ support for the first GSUB lookups. Nothing that really compiles
+ for now though.
+
+ * src/autohint/ahhint.c (ah_align_serif_edge): Disabled serif stem
+ width quantization. It produces slightly better shapes though this
+ is not distinguishable with many fonts.
+ Remove other dead code.
+
+ * src/Jamfile, src/*/Jamfile: Simplified.
+ Use $(FT2_SRC_DIR).
+
+2002-11-06 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h (FT_LOAD_TARGET_LIGHT): New macro.
+ (FT_LOAD_TARGET, FT_LOAD_TARGET_MODE): Use `& 15' instead of `& 7'.
+
+2002-11-05 David Turner <david@freetype.org>
+
+ * include/freetype/config/ftoption.h, src/gzip/ftgzip.c: Added
+ support for the FT_CONFIG_OPTION_SYSTEM_ZLIB option, used to specify
+ the use of system-wide zlib.
+
+ Note that this macro, as well as
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER, is not #undef-ed anymore.
+ This allows the build system to define them depending on the
+ configuration (typically by adding -D flags at compile time).
+
+ * src/sfnt/ttcmap0.c (tt_face_build_cmaps): Removed compiler
+ warnings in optimized mode relative to the `volatile' local
+ variables. This was not a compiler bug after all, but the fact that
+ a pointer to a volatile variable is not the same as a volatile
+ pointer to a variable :-)
+
+ The fix was to change
+ `volatile FT_Byte* p'
+ into
+ `FT_Byte* volatile p'.
+
+ * src/pfr/pfrload.c (pfr_phy_font_load), src/pfr/pfrdrivr.c
+ (pfr_get_metrics), src/gzip/inftrees.c: Removed compiler warnings in
+ optimized modes.
+
+ * src/gzip/*.[hc]: Modified our zlib copy in order to prevent
+ exporting any zlib function names outside of the component. This
+ prevents linking problems on some platforms, when applications want
+ to link FreeType _and_ zlib together.
+
+2002-11-05 Juliusz <jch@pps.jussieu.fr>
+
+ * src/psaux/psobjs.c (ps_table_add): Modified increment loop in
+ order to implement exponential behaviour.
+
+2002-11-01 David Turner <david@freetype.org>
+
+ Added PFR-specific public API. Fixed the kerning retrievel routine
+ (it returned invalid values when the outline and metrics resolution
+ differ).
+
+ * include/freetype/ftpfr.h, include/freetype/internal/pfr.h: New
+ files.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_PFR_H): New
+ macro for pfr.h.
+
+ * src/base/ftpfr.c: New file.
+ * src/base/Jamfile, src/base/descrip.mms: Updated.
+
+ * src/pfr/pfrdrivr.c: Include FT_INTERNAL_PFR_H.
+ (pfr_get_kerning, pfr_get_advance, pfr_get_metrics): New functions.
+ (pfr_service_rec): New format interface.
+ (pfr_driver_class): Use `pfr_service_rec'.
+ Replace `pfr_face_get_kerning' with `pfr_get_kerning'.
+ * src/pfr/pfrobjs.c: Remove dead code.
+
+ * src/base/ftobjs.c (ft_glyphslot_clear): Small internal fix to
+ better support bitmap-based font formats.
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Fix handling of
+ `scale'.
+ Fix arguments to `FT_Vector_From_Polar'.
+
+2002-10-31 David Turner <david@freetype.org>
+
+ Add support for automatic handling of gzip-compressed PCF files.
+
+ * src/gzip/*: New files, taken from the zlib package (except
+ ftgzip.c).
+
+ * include/freetype/ftgzip.h, src/gzip/ftgzip.c: New files.
+ * include/freetype/config/ftheader.h (FT_GZIP_H): New macro for
+ `ftgzip.h'.
+
+ * src/pcf/pcfdriver.c: Include FT_GZIP_H and FT_ERRORS_H.
+ (PCF_Face_Init): If normal open fails, try to open gzip stream.
+ (PCF_Face_Done): Close gzip stream.
+
+ * include/freetype/internal/pcftypes.h (PCF_Public_FaceRec),
+ src/pcf/pcf.h (PCF_FaceRec): Add `gzip_stream' and `gzip_source'.
+
+ * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_ZLIB):
+ New macro.
+ (T1_CONFIG_OPTION_DISABLE_HINTER, FT_CONFIG_OPTION_USE_CMAPS
+ FT_CONFIG_OPTION_NO_CONVENIENCE_FUNCS,
+ FT_CONFIG_OPTION_ALTERNATE_GLYPH_FORMATS): Removed.
+
+ (FT_EXPORT, FT_EXPORT_DEF, FT_DEBUG_LEVEL_ERROR,
+ FT_DEBUG_LEVEL_TRACE, FT_DEBUG_MEMORY): Comment out definitions so
+ that platform specific configuration file can override.
+
+ * include/freetype/internal/ftstream.h: Include FT_SYSTEM_H.
+
+2002-10-30 David Turner <david@freetype.org>
+
+ * FreeType 2.1.3rc3 released.
+
+2002-10-25 David Turner <david@freetype.org>
+
+ * include/freetype/ftcache.h (FT_POINTER_TO_ULONG): New macro.
+ (FTC_FACE_ID_HASH): Rewritten, using FT_POINTER_TO_ULONG.
+
+2002-10-22 Giuseppe Ghibò <ghibo@mandrakesoft.com>
+
+ * include/freetype/freetype.h (FT_Encoding): Fix entry for latin-2.
+
+2002-10-07 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_Open_Face): Use `const' for `args'
+ (suggested by Graham).
+ * src/base/ftobjs.c (FT_Open_Face): Updated.
+ (ft_input_stream_new): Ditto.
+
+2002-10-05 David Turner <david@freetype.org>
+
+ Adding support for embedded bitmaps to the PFR driver, and rewriting
+ its kerning loader/handler to use all kerning pairs in a physical
+ font (and not just the first item).
+
+ * src/pfr/pfr.c: Include `pfrsbit.c'.
+ * src/pfr/pfrgload.c: Include `pfrsbit.h'.
+ * src/pfr/pfrload.c (pfr_extra_item_load_kerning_pairs): Rewritten.
+ (pfr_phy_font_done, pfr_phy_font_load): Updated.
+ * src/pfr/pfrobks.c: Include `pfrsbit.h'.
+ (pfr_face_init): Handle kerning and embedded bitmaps.
+ (pfr_slot_load): Load embedded bitmaps.
+ (PFR_KERN_INDEX): Removed.
+ (pfr_face_get_kerning): Rewritten.
+ * src/pfr/pfrsbit.c, src/pfr/pfrsbit.h: New files.
+ * src/pfr/pfrtypes.h (PFR_KernItemRec): New structure.
+ (PFR_KERN_INDEX): New macro.
+ (PFR_PhyFontRec): Add items for kerning and embedded bitmaps.
+ * src/pfr/Jamfile (_sources) [FT2_MULTI]: Add `pfrsbit'.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Don't load bitmap fonts if
+ FT_LOAD_NO_RECURSE is set.
+ Load embedded bitmaps only if FT_LOAD_NO_BITMAP isn't set.
+
+ * src/tools/docmaker/content.py, src/tools/docmaker/sources.py,
+ src/tools/docmaker/tohtml.py: Fixing a few nasty bugs.
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_validate): The validator for format 4
+ sub-tables is now capable of dealing with invalid `length' fields at
+ the start of the sub-table. This allows fonts like `mg______.ttf'
+ (i.e. Marriage) to return accurate charmaps.
+
+ * docs/CHANGES: Updated.
+
+2002-10-05 Werner Lemberg <wl@gnu.org>
+
+ * src/smooth/ftgrays.c (SUBPIXELS): Add cast to `TPos'.
+ Update all callers.
+ (TRUNC): Add cast to `TCoord'.
+ Update all callers.
+ (TRaster): Use `TPos' for min_ex, max_ex, min_ey, max_ey, and
+ last_ey.
+ Update all casts.
+ (gray_render_line): Fix casts for `p' and `first'.
+
+2002-10-02 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/bdf/bdflib.c (bdf_load_font): Allocate the _bdf_parse_t
+ structure with FT_ALLOC instead of using the stack.
+
+2002-09-27 Werner Lemberg <wl@gnu.org>
+
+ * src/include/freetype/internal/tttypes.h (num_sbit_strikes,
+ num_sbit_scales): Use `FT_ULong'.
+ * src/sfnt/sfobjs.c (sfnt_load_face): Updated accordingly.
+ * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Ditto.
+ (find_sbit_image): Remove cast.
+ * src/raster/ftrend1.c (ft_raster1_render): Fix cast.
+
+2002-09-27 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * src/sfnt/ttload.c (tt_face_load_names): Use cast.
+ * src/sfnt/ttcmap.c (code_to_next2): Use long constant.
+ (code_to_index4): Use cast.
+ (code_to_index8_12): Fix cast.
+ * src/sfnt/ttcmap0.c (tt_cmap4_char_next, tt_cmap8_char_index,
+ tt_cmap12_char_index): Use cast for `result'.
+ (tt_face_build_cmaps): Use cast.
+ * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_ucs4): Use cast for
+ `code'.
+ (sfnt_load_face): Use FT_Int32 for `flags'.
+
+ * src/smooth/ftgrays.c (gray_render_scanline, gray_render_line,
+ gray_compute_cbox, gray_convert_glyph, gray_raster_reset): Add casts
+ to `TCoord' and `int'.
+ More 16bit fixes.
+ s/FT_Pos/TPos/.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Add casts.
+
+2002-09-26 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names,
+ tt_face_get_ps_name): Replace switch statement with if clauses to
+ make it more portable.
+
+ * src/cff/cffobjs.c (cff_face_init): Ditto.
+
+ * include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for
+ `module_size'.
+ * include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for
+ `glyph_size'.
+
+ * src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to
+ `FT_Render_Mode'.
+ (FT_Render_Glyph_Internal): Change third parameter to
+ `FT_Render_Mode'.
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter
+ to `FT_Render_Mode'.
+
+ * src/raster/ftrend1.c (ft_raster1_render): Change third parameter
+ to `FT_Render_Mode'.
+ * src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd,
+ ft_smooth_render_lcd_v): Ditto.
+ (ft_smooth_render_generic): Change third and fifth parameter to
+ `FT_Render_Mode'.
+
+ * include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
+ include/freetype/ftglyph.h: Updated.
+
+ * src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c
+ (PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load),
+ src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c
+ (T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change
+ fourth parameter to `FT_Int32'.
+
+ * src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters
+ and declare them as unused.
+
+ * src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'.
+
+ * src/psnames/psnames.h (PS_Unicode_Value_Func): Change return
+ value to FT_UInt32.
+ * src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table):
+ Updated accordingly.
+
+2002-09-26 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'.
+ (cff_get_glyph_name): Use cast for result of ft_strlen.
+ * src/cff/cffparse.c (cff_parse_real): User cast for assigning
+ `exp'.
+ * src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for
+ some local variables.
+ (cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some
+ switch statements.
+ (cff_font_load): Use cast in call to CFF_Load_FD_Select.
+ * src/cff/cffobjs.c (cff_size_init): Use more casts.
+ (cff_face_init): Use FT_Int32 for `flags'.
+ * src/cff/cffgload.c (cff_operator_seac): Use cast for assigning
+ `adx' and `ady'.
+ (cff_decoder_parse_charstrings): Use FT_ULong for third parameter.
+ Use more casts.
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'.
+
+ * src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'.
+ * src/cid/cidgload.c (cid_load_glyph): Add missing cast for
+ `cid_get_offset'.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use
+ cast for `num_points'.
+ (t1_decoder_init): Use cast for assigning `decoder->num_glyphs'.
+
+ * src/base/ftdebug.c (ft_debug_init): Use FT_Int.
+ * include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use
+ `FT_Int32' for fourth parameter.
+ * src/base/ftobjs.c (open_face): Use cast for calling
+ clazz->init_face.
+
+ * src/raster/ftraster.c (Set_High_Precision): Use `1' instead of
+ `1L'.
+ (Finalize_Profile_Table, Line_Up, ft_black_init): Use casts.
+ * src/raster/ftrend1.c (ft_raster1_render): Ditto.
+
+ * src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long
+ constant.
+
+2002-09-26 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/include/freetype/config/ftmodule.h: Updated.
+
+2002-09-25 David Turner <david@freetype.org>
+
+ * src/autohint/ahtypes.h (AH_HINT_METRICS): Disabling metrics
+ hinting in the auto-hinter. This produces much better anti-aliased
+ text.
+
+ * docs/CHANGES: Updating the changes documentation.
+
+2002-09-25 Anthony Fok <anthony@thizlinux.com>
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_validate, tt_cmap4_char_index,
+ tt_cmap4_char_next): Added support for opens___.ttf (it contains a
+ charmap that uses offset=0xFFFFU instead of 0x0000 to indicate a
+ missing glyph).
+
+2002-09-21 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * src/truetype/ttdriver.c (Load_Glyph): Fourth parameter must be
+ FT_Int32.
+ * src/truetype/ttgload.c, src/truetype/ttgload.h (TT_Load_Glyph):
+ Ditto.
+
+2002-09-19 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ More 16bit fixes.
+
+ * src/autohint/ahglobal.c (sort_values): Use FT_Pos for `swap'.
+ (ah_hinter_compute_widths): Use FT_Pos for `dist'.
+ Use AH_MAX_WIDTHS.
+ * src/autohint/ahglyph.c (ah_outline_scale_blue_edges): Use FT_Pos
+ for `delta'.
+ (ah_outline_compute_edges): Replace some ints with FT_Int and
+ FT_Pos.
+ (ah_test_extrema): Clean up code.
+ (ah_get_orientation): Use 4 FT_Int variables instead of FT_BBox to
+ hold indices.
+ * src/autohint/ahtypes.h (AH_SegmentRec): Change type of `score'
+ to FT_Pos.
+
+2002-09-19 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/config.guess, builds/unix/config.sub: Updated to
+ recent versions.
+
+2002-09-18 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (FT_Library_Version): Bugfix.
+
+ * FreeType 2.1.3rc2 (release candidate 2) is released!
+
+2002-09-17 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h, include/freetype/ftimage.h,
+ include/freetype/ftstroker.h, include/freetype/ftsysio.h,
+ include/freetype/ftsysmem.h, include/freetype/ttnameid.h: Updating
+ the in-source documentation.
+
+ * src/tools/docmaker/tohtml.py: Updating the HTML formatter in the
+ DocMaker tool.
+
+ * src/tools/docmaker.py: Removed.
+
+2002-09-17 Werner Lemberg <wl@gnu.org>
+
+ More 16bit fixes.
+
+ * src/psaux/psobjs.c (reallocate_t1_table): Use FT_Long for
+ second parameter.
+
+2002-09-16 Werner Lemberg <wl@gnu.org>
+
+ 16bit fixes from Wolfgang Domröse.
+
+ * src/type1/t1parse.h (T1_ParserRec): Change type of `base_len'
+ and `private_len' to FT_Long.
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Remove cast for
+ `private_len'.
+ * src/type1/t1load.c: Use FT_Int cast for most calls of T1_ToInt.
+ Use FT_PtrDist where appropriate.
+ (parse_encoding): Use FT_Long for `count' and `n'.
+ (read_binary_data): Use FT_Long* for second parameter.
+ * src/type1/t1afm.c (afm_atoindex): Use FT_PtrDist.
+
+ * src/cache/ftcsbits.c (ftc_sbit_node_load): Remove unused label.
+ * src/pshinter/pshalgo3.c (psh3_hint_align): Remove unused variable.
+
+2002-09-14 Werner Lemberg <wl@gnu.org>
+
+ Making ftgrays.c compile stand-alone again.
+
+ * include/freetype/ftimage.h: Include ft2build.h only if _STANDALONE_
+ isn't defined.
+ * src/smooth/ftgrays.c [_STANDALONE_]: Define ft_memset,
+ FT_BEGIN_HEADER, FT_END_HEADER.
+ (FT_MEM_ZERO): Define.
+ (TRaster) [GRAYS_USE_GAMMA]: Use `unsigned char' instead of FT_Byte.
+ (gray_render_span, gray_init_gamma): Don't use `FT_UInt'.
+ Don't cast with `FT_Byte'.
+ (grays_init_gamma): Don't use `FT_UInt'.
+
+2002-09-14 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftinit.c (FT_Add_Default_Modules): Improve error message.
+ * src/pcf/pcfdriver.c (PCF_Face_Done): Improve tracing message.
+ * include/freetype/config/ftoption.h (FT_MAX_MODULES): Increased
+ to 32.
+
+2002-09-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.ac (version_info): Set to 9:2:3.
+ * builds/unix/configure: Regenerated.
+ * docs/VERSION.DLL: Updated.
+
+2002-09-09 David Turner <david@freetype.org>
+
+ * src/pshinter/pshalgo2.c (psh2_glyph_find_strong_points),
+ src/pshinter/pshalgo3.c (psh3_glyph_find_strong_points): Adding fix
+ to prevent seg fault when hints are provided in an empty glyph.
+
+ * src/cache/ftccache.i (GEN_CACHE_LOOKUP) [FT_DEBUG_LEVEL_ERROR]:
+ Removed conditional code. This fixes a bug that prevented
+ compilation in debug mode of template instantiation.
+
+ * include/freetype/ftimage.h: Removed incorrect `zft_' definitions
+ and updated constants documentation comments.
+
+ * src/cff/cffparse.c (cff_parser_run): Fixed the CFF table loader.
+ It didn't accept empty arrays, and this prevented the loading of
+ certain fonts.
+
+ * include/freetype/freetype.h (FT_FaceRec): Updating documentation
+ comment. The `descender' value is always *negative*, not positive.
+
+2002-09-09 Owen Taylor <owen@redhat.com>
+
+ * src/pcf/pcfdriver.c (PCF_Glyph_Load): Fixing incorrect computation
+ of bitmap metrics.
+
+2002-09-08 David Turner <david@freetype.org>
+
+ Various updates to correctly support sub-pixel rendering.
+
+ * include/freetype/config/ftmodule.h: Add two renderers for LCD.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Updated.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_lcd,
+ ft_smooth_render_lcd_v): Set FT_PIXEL_MODE_LCD and
+ FT_PIXEL_MODE_LCD_V, respectively.
+
+ * include/freetype/cache/ftcimage.h (FTC_ImageTypeRec): New
+ structure.
+ Updated all users.
+ (FTC_ImageDesc): Removed.
+ (FTC_ImageCache_Lookup): Second parameter is now of type
+ `FTC_ImageType'.
+ Updated all users.
+ (FTC_IMAGE_DESC_COMPARE): Updated and renamed to...
+ (FTC_IMAGE_TYPE_COMPARE): This.
+ (FTC_IMAGE_DESC_HASH): Updated and renamed to...
+ (FTC_IMAGE_TYPE_HASH): This.
+
+ * include/freetype/cache/ftcsbits.h (FTC_SBitRec): Field `num_grays'
+ replaced with `max_grays'.
+ `pitch' is now FT_Short.
+ (FTC_SBitCache_Lookup): Second parameter is now of type
+ `FTC_ImageType'.
+ Updated all users.
+
+ * src/cache/ftcimage.c (FTC_ImageQueryRec, FTC_ImageFamilyRec):
+ Updated.
+ (ftc_image_node_init): Updated.
+ Moved code to convert type flags to load flags to...
+ (FTC_Image_Cache_Lookup): This function.
+ (ftc_image_family_init): Updated.
+
+ * src/cache/ftcsbit.c (FTC_SBitQueryRec, FTC_SBitFamilyRec):
+ Updated.
+ (ftc_sbit_node_load): Updated.
+ Moved code to convert type flags to load flags to...
+ (FTC_SBitCache_Lookup): This function.
+
+ * src/autohint/ahtypes.h (AH_HinterRec): Replace `no_*_hints' with
+ `do_*_snapping'.
+ Update all users (with negation).
+ * src/autohint/ahhint.c (ah_compute_stem_width): Fix threshold for
+ `dist' for `delta' < 40.
+
+ * src/pshinter/pshalgo3.h (PSH3_GlyphRec): Replace `no_*_hints' with
+ `do_*_snapping'.
+ Update all users (with negation).
+ * src/pshinter/pshalgo3.c (psh3_dimension_quantize_len): New
+ function.
+ (psh3_hint_align): Use it.
+ Improve hinting code.
+ [STRONGER]: Removed.
+ (STRONGER): Removed.
+
+ * include/freetype/freetype.h (FT_Set_Hint_Flags, FT_HINT_*):
+ Removed.
+
+2002-09-05 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidobjs.c (CID_Size_Init): Renamed to...
+ (cid_size_init): This.
+ * src/psaux/psobjs.c (T1_Builder_Add_Point1): Renamed to...
+ (t1_builder_add_point1): This.
+
+ Updated all affected code.
+
+ * src/pshinter/pshalgo3.c (psh3_hint_align): Fix compiler warnings.
+ * src/type1/t1gload.c (T1_Compute_Max_Advance): Ditto.
+
+2002-09-04 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h: Corrected the definition of
+ ft_encoding_symbol to be FT_ENCODING_MS_SYMBOL (instead of
+ the erroneous FT_ENCODING_SYMBOL).
+
+ * builds/unix/unix-def.in (datadir): Initialize it (thanks to
+ Anthony Fok).
+
+2002-08-29 David Turner <david@freetype.org>
+
+ Slight modification to the Postscript hinter to slightly increase
+ the contrast of smooth hinting. This is very similar to what the
+ auto-hinter does when it comes to stem width computations. However,
+ it produces better results with well-hinted fonts.
+
+ * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Add hint
+ mode to `init' member function.
+ (T1_DecoderRec): Add hint mode.
+ * include/freetype/internal/pshints (T1_Hints_ApplyFunc,
+ T2_Hints_ApplyFunc): Pass `hint_mode', not `hint_flags'.
+ * src/psaux/t1decode.c (t1_decoder_init): Add hint mode argument.
+ * src/pshinter/pshalgo1.c (ps1_hints_apply): Pass hint mode, not
+ hint flags.
+ * src/pshinter/pshalgo2.c (ps2_hints_apply): Ditto.
+ * src/pshinter/pshalgo3.c (ps3_hints_apply): Ditto.
+ (STRONGER): New macro.
+ (psh3_hint_align, psh3_hint_table_align_hints): Pass `glyph' instead
+ of `hint_flags'.
+ Implement announced changes.
+ * src/pshinter/pshalgo3.h (PSH3_GlyphRec): Add flags to control
+ vertical and horizontal hints and snapping.
+
+ * README, docs/CHANGES: Updating for the 2.1.3 release.
+
+2002-08-27 David Turner <david@freetype.org>
+
+ * Massive re-formatting changes to many, many source files. I don't
+ want to list them all here. The operations performed were all
+ logical transformations of the sources:
+
+ - trying to convert all enums and constants to CAPITALIZED_STYLE,
+ #with define definitions like
+
+ #define my_old_constants MY_NEW_CONSTANT
+
+ - big, big update of the documentation comments
+
+ * include/freetype/freetype.h, src/base/ftobjs.c,
+ src/smooth/ftsmooth.c, include/freetype/ftimage.h: Adding support
+ for LCD-optimized rendering though the new constants/enums:
+
+ FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
+ FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
+
+ This is still work in progress, don't expect everything to work
+ correctly though most of the features have been implemented.
+
+ * Adding new FT_LOAD_XXX flags, used to specify both hinting and
+ rendering targets:
+
+ FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
+ FT_LOAD_TARGET_MONO :: monochrome bitmaps
+ FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated
+ hinting & rendering
+ FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated
+ hinting & rendering
+
+ Note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
+ behaviour of the font engine is _unchanged_.
+
+ * include/freetype/ftimage.h
+ (FT_Outline_{Move,Line,Conic,Cubic}To_Func): Renamed to...
+ (FT_Outline_{Move,Line,Conic,Cubic}ToFunc): This.
+ (FT_Raster_Span_Func): Renamed to ...
+ (FT_SpanFunc): This.
+ (FT_Raster_{New,Done,Reset,Set_Mode,Render}_Func): Renamed to ...
+ (FT_Raster_{New,Done,Reset,SetMode,Render}Func}: This.
+
+ Updated all affected code.
+
+ * include/freetype/ftrender.h
+ (FT_Glyph_{Init,Done,Transform,BBox,Copy,Prepare}_Func): Renamed
+ to ...
+ (FT_Glyph_{Init,Done,Transform,GetBBox,Copy,Prepare}Func): This.
+ (FTRenderer_{render,transform,getCBox,setMode}): Renamed to ...
+ (FT_Renderer_{RenderFunc,TransformFunc,GetCBoxFunc,SeteModeFunc}):
+ This.
+
+ Updated all affected code.
+
+ * src/autohint/ahtypes.h (AH_Point, AH_Segment, AH_Edge, AH_Globals,
+ AH_Face_Globals, AH_Outline, AH_Hinter): These typedefs are now
+ pointers to the corresponding `*Rec' structures. All source files
+ have been updated accordingly.
+
+ * src/cff/cffgload.c (cff_decoder_init): Add hint mode as parameter.
+ * src/cff/cffgload.h (CFF_Decoder): Add `hint_mode' element.
+
+ * src/cid/cidgload.c (CID_Compute_Max_Advance): Renamed to...
+ (cid_face_compute_max_advance): This.
+ (CID_Load_Glyph): Renamed to...
+ (cid_slot_load_glyph): This.
+ * src/cid/cidload.c (CID_Open_Face): Renamed to...
+ (cid_face_open): This.
+ * src/cid/cidobjs.c (CID_GlyphSlot_{Done,Init}): Renamed to...
+ (cid_slot_{done,init}): This.
+ (CID_Size_{Get_Globals_Funcs,Done,Reset): Renamed to...
+ (cid_size_{get_globals_funcs,done,reset): This.
+ (CID_Face_{Done,Init}): Renamed to...
+ (cid_face_{done,init}): This.
+ (CID_Driver_{Done,Init}: Renamed to...
+ (cid_driver_{done,init}: This.
+ * src/cid/cidparse.c (CID_{New,Done}_Parser): Renamed to...
+ (cid_parser_{new,done}): This.
+ * src/cid/cidparse.h (CID_Skip_{Spaces,Alpha}): Renamed to...
+ (cid_parser_skip_{spaces,alpha}): This.
+ (CID_To{Int,Fixed,CoordArray,FixedArray,Token,TokenArray}): Renamed
+ to...
+ (cid_parser_to_{int,fixed,coord_array,fixed_array,token,token_array}):
+ This.
+ (CID_Load_{Field,Field_Table): Renamed to...
+ (cid_parser_load_{field,field_table}): This.
+ * src/cid/cidriver.c (CID_Get_Interface): Renamed to...
+ (cid_get_interface): This.
+
+ Updated all affected code.
+
+ * src/psaux/psobjs.c (PS_Table_*): Renamed to...
+ (ps_table_*): This.
+ (T1_Builder_*): Renamed to...
+ (t1_builder_*): This.
+ * src/psaux/t1decode.c (T1_Decoder_*): Renamed to...
+ (t1_decoder_*): This.
+
+ * src/psnames/psmodule.c (PS_*): Renamed to...
+ (ps_*): This.
+
+ Updated all affected code.
+
+ * src/sfnt/sfdriver (SFNT_Get_Interface): Renamed to...
+ (sfnt_get_interface): This.
+ * src/sfnt/sfobjs.c (SFNT_*): Renamed to...
+ (sfnt_*): This.
+ * src/sfnt/ttcmap.c (TT_CharMap_{Load,Free}): Renamed to...
+ (tt_face_{load,free}_charmap): This.
+ * src/sfnt/ttcmap0.c (TT_Build_CMaps): Renamed to...
+ (tt_face_build_cmaps): This.
+ * src/sfnt/ttload.c (TT_*): Renamed to...
+ (tt_face_*): This.
+ * src/sfnt/ttpost.c (TT_Post_Default_Names): Renamed to...
+ (tt_post_default_names): This.
+ (Load_*): Renamed to...
+ (load_*): This.
+ (TT_*): Renamed to...
+ (tt_face_*): This.
+ * src/sfnt/ttsbit.c (TT_*): Renamed to...
+ (tt_face_*): This.
+ ({Find,Load,Crop}_*): Renamed to...
+ ({find,load,crop}_*): This.
+
+ Updated all affected code.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render): Renamed to...
+ (ft_smooth_render_generic): This.
+ Make function more generic by adding vertical and horizontal scaling
+ factors.
+ (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
+ classes.
+
+ * src/truetype/ttobjs.c (TT_{Done,New}_GlyphZone): Renamed to...
+ (tt_glyphzone_{done,new}): This.
+ (TT_{Face,Size,Driver}_*): Renamed to...
+ (tt_{face,size,driver}_*): This.
+ * src/truetype/ttpload.c (TT_Load_Locations): Renamed to...
+ (tt_face_load_loca): This.
+ (TT_Load_Programs): Renamed to...
+ (tt_face_load_fpgm): This.
+ (TT_*): Renamed to...
+ (tt_face_*): This.
+
+2002-08-27 Werner Lemberg <wl@gnu.org>
+
+ * docs/VERSION.DLL: New file.
+
+2002-08-23 Graham Asher <graham.asher@btinternet.com>
+
+ * src/cff/cffgload.c (cff_operator_seac)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Incremental fonts (actually not
+ incremental in the case of CFF but just using callbacks to get glyph
+ recipes) pass the character code, not the glyph index, to the
+ get_glyph_data function; they have no valid charset table.
+
+ * src/cff/cffload.c (cff_font_load): Removed special cases for
+ FT_CONFIG_OPTION_INCREMENTAL, which are no longer necessary; CFF
+ fonts provided via the incremental interface now have to conform
+ more closely to the CFF font format.
+
+ * src/cff/cffload.h (cff_font_load): Removed argument now unneeded.
+
+ * src/cff/cffobjs.c (cff_face_init): Changed call to cff_font_load
+ to conform with new signature.
+
+2002-08-22 David Turner <david@freetype.org>
+
+ * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c,
+ src/bdf/bdfdrivr.c: Removed compiler warnings.
+
+2002-08-21 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo3.c (psh3_glyph_compute_inflections,
+ psh3_glyph_compute_extrema, psh3_hint_table_find_strong_point): Fix
+ compiler warnings and resolve shadowing of local variables.
+
+2002-08-21 David Turner <david@freetype.org>
+
+ The automatic and Postscript hinter now automatically detect
+ inflection points in glyph outlines and treats them specially. This
+ is very useful to prevent nasty effect like the disappearing
+ diagonals of `S' and `s' in many, many fonts.
+
+ * src/autohint/ahtypes.h (ah_flag_inflection): New macro.
+ * src/autohint/ahangles.c (ah_angle_diff): New function.
+ * src/autohint/ahangles.h: Updated.
+ * src/autohint/ahglyph.c (ah_outline_compute_inflections): New
+ function.
+ (ah_outline_detect_features): Use it.
+ * src/autohint/ahhint.c (ah_hinter_align_strong_points)
+ [!AH_OPTION_NO_WEAK_INTERPOLATION]: Handle inflection.
+
+ * src/tools/docmaker/docmaker.py, src/tools/docmaker/utils.py,
+ src/tools/docmaker/tohtml.py: Updating the DocMaker tool.
+
+ * include/freetype/freetype.h: Changing the type of the `load_flags'
+ parameter from `FT_Int' to `FT_Int32', this in order to support more
+ options. This should only break binary and/or source compatibility
+ on 16-bit platforms (Atari?).
+ (FT_LOAD_NO_AUTOHINT): New macro.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Updated.
+ Handle FT_LOAD_NO_AUTOHINT.
+ (FT_Load_Char): Updated.
+
+ * src/pshinter/pshalgo3.c, src/base/ftobjs.c, src/base/ftobject.c,
+ src/autohint/ahglyph.c, include/freetype/freetype.h: Fixing typos
+ and removing compiler warnings.
+
+2002-08-20 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (TT_Get_Metrics): Add guard for k = 0.
+
+2002-08-20 David Turner <david@freetype.org>
+
+ * src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
+ src/pshinter/pshglob.c, src/pshinter/pshrec.c,
+ src/autohint/ahmodule.c [DEBUG_HINTER]: Removing compiler warnings
+ (only used in development builds anyway).
+
+ Improve support of local extrema and stem edge points.
+
+ * src/pshinter/pshalgo3.h (PSH3_Hint_TableRec): Use PSH3_ZoneRec
+ for `zones'.
+ (PSH3_DIR_UP, PSH3_DIR_DOWN): Exchange values.
+ (PSH3_DIR_HORIZONTAL, PSH3_DIR_VERTICAL): New macros.
+ (PSH3_DIR_COMPARE, PSH3_DIR_IS_HORIZONTAL, PSH3_IS_VERTICAL): New
+ macros.
+ (PSH3_POINT_INFLEX): New enum.
+ (psh3_point_{is,set}_{off,inflex}): New macros.
+ (PSH3_POINT_{EXTREMUM,POSITIVE,NEGATIVE,EDGE_MIN,EDGE_MAX): New
+ enum values.
+ (psh3_point_{is,set}_{extremum,positive,negative,edge_min,edge_max}):
+ New macros.
+ (PSH3_PointRec): New members `flags2' and `org_v'.
+ (PSH3_POINT_EQUAL_ARG, PSH3_POINT_ANGLE): New macros.
+
+ * src/pshinter/pshalgo3.c [DEBUG_HINTER]: Removing compiler
+ warnings.
+ (COMPUTE_INFLEXS): New macro.
+ (psh3_hint_align): Simplify some basic arithmetic computations.
+ (psh3_point_is_extremum): Removed.
+ (psh3_glyph_compute_inflections) [COMPUTE_INFLEXS]: New function.
+ (psh3_glyph_init) [COMPUTE_INFLEXS]: Use it.
+ (psh3_glyph_compute_extrema): New function.
+ (PSH3_STRONG_THRESHOLD): Increased to 30.
+ (psh3_hint_table_find_strong_point): Improved.
+ (psh3_glyph_find_strong_points,
+ psh3_glyph_interpolate_strong_points): Updated.
+ (psh3_hints_apply): Use psh3_glyph_compute_extrema.
+
+ * test/gview.c (draw_ps3_hint, ps3_draw_control_points): New
+ functions.
+ Other small updates.
+
+ * Jamfile: Small updates.
+
+2002-08-18 Arkadiusz Miskiewicz <misiek@pld.ORG.PL>
+
+ * builds/unix/install.mk (install, uninstall): Add $(DESTDIR) to
+ make life easier for package maintainers.
+
+2002-08-18 Werner Lemberg <wl@gnu.org>
+
+ * src/pcf/pcfdriver.c (PCF_Glyph_Load): Fix computation of
+ horiBearingX.
+ * src/bdf/bdfdrivr.c (BDF_GlyphLoad): Fix computation of
+ horiBearingY.
+
+2002-08-16 George Williams <gww@silcom.com>
+
+ Add support for Apple composite glyphs.
+
+ * include/freetype/config/ftoption.h
+ (TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED): New macro.
+
+ * src/truetype/ttgload.c (OVERLAP_COMPOUND, SCALED_COMPONENT_OFFSET,
+ UNSCALED_COMPONENT_OFFSET): New macros for additional OpenType
+ glyph loading flags.
+ (load_truetype_glyph): Implement it.
+
+2002-08-16 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_free_glyph_data),
+ src/cff/cffload.c (cff_font_load): Use FT_UNUSED.
+
+2002-08-15 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Initialize `error'.
+ * src/sfnt/sfobjs.c (SFNT_Load_Face): Fix compiler warning.
+
+2002-08-15 Graham Asher <graham.asher@btinternet.com>
+
+ Implemented the incremental font loading system for the CFF driver.
+ Tested using the GhostScript-to-FreeType bridge (under development).
+
+ * src/cff/cffgload.c (cff_get_glyph_data, cff_free_glyph_data): New
+ functions.
+ (cff_operator_seac, cff_compute_max_advance, cff_slot_load): Use
+ them.
+ * src/cff/cffload.c (cff_font_load): Add `face' parameter.
+ Load charset and encoding only if there are glyphs.
+ [FT_CONFIG_OPTION_INCREMENTAL]: Incremental fonts don't need
+ character recipes.
+ * src/cff/cffload.h, src/cff/cffobjs.c: Updated.
+
+ * src/cid/cidgload.c (cid_load_glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Corrected the incremental font
+ loading implementation to use the new system introduced on
+ 2002-08-01.
+
+2002-08-06 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffcmap.c: Remove compiler warnings.
+ * src/cache/ftccache.c, src/cache/ftccache.i,
+ src/pfr/pfrload.c, src/pfr/pfrgload.c: s/index/idx/.
+ * src/cff/cffload.c: s/select/fdselect/.
+ * src/raster/ftraster.c: s/wait/waiting/.
+
+2002-08-01 Graham Asher <graham.asher@btinternet.com>
+
+ * src/type1/t1load.c (T1_Open_Face): Tolerate a face with no
+ charstrings if there is an incremental loading interface. Type 1
+ faces supplied by PostScript interpreters like GhostScript will
+ typically not provide any charstrings at load time, so this is
+ essential if they are to work.
+
+2002-08-01 Graham Asher <graham.asher@btinternet.com>
+
+ Modified incremental loading interface to be closer to David's
+ preferences. The header freetype.h is not now affected, the
+ interface is specified via an FT_Parameter, the pointer to the
+ interface is hidden in an internal part of the face record, and all
+ the definitions are in ftincrem.h.
+
+ * include/freetype/freetype.h [FT_CONFIG_OPTION_INCREMENTAL]:
+ Removed.
+ * include/freetype/internal/ftobjs.h [FT_CONFIG_OPTION_INCREMENTAL]:
+ Include FT_INCREMENTAL_H.
+ (FT_Face_InternalRec) [FT_CONFIG_OPTION_INCREMENTAL]: Add
+ `incremental_interface'.
+
+ * src/base/ftobjs.c (open_face, FT_Open_Face)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ * src/sfnt/sfobjs.c (SFNT_Load_Face) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Updated.
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ Free loaded glyph data properly.
+ (compute_glyph_metrics, TT_Load_Glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ * src/truetype/ttobjs.c (TT_Face_Init)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ (T1_Parse_Glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ Free loaded glyph data properly.
+ (T1_Load_Glyph): Updated.
+ [FT_CONFIG_OPTION_INCREMENTAL]: Free loaded glyph data properly.
+
+2002-07-30 David Turner <david@freetype.org>
+
+ * include/freetype/ftincrem.h: Adding new experimental header file
+ to demonstrate a `cleaner' API to support incremental font loading.
+
+ * include/freetype/config/ftheader.h (FT_INCREMENTAL_H): New macro.
+
+ * src/tools/docmaker/*: Adding new (more advanced) version of
+ the DocMaker tool, using Python's sophisticated regexps.
+
+2002-07-28 Werner Lemberg <wl@gnu.org>
+
+ s/ft_memset/FT_MEM_SET/.
+ s/FT_MEM_SET/FT_MEM_ZERO/ where appropriate.
+
+2002-07-27 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Make it work with TTCs.
+
+2002-07-26 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: s/memset/ft_memset/.
+
+ * src/autohint/ahhint.c (ah_hint_edges_3): Fix compiler warning.
+ * src/cff/cffload.c (cff_encoding_load): Remove `memory' variable.
+ * src/cff/cffcmap.c (cff_cmap_encoding_init): Remove `psnames'
+ variable.
+ * src/truetype/ttgload.c (load_truetype_glyph): Remove statement
+ without effect.
+ * src/truetype/ttdriver (Get_Char_Index, Get_Next_Char): Removed.
+
+ * src/pshinter/pshalgo3.c (psh3_hint_table_record,
+ psh3_hint_table_init, psh3_hint_table_activate_mask): Fix error
+ message.
+
+2002-07-24 Graham Asher <graham.asher@btinternet.com>
+
+ * src/truetype/ttobjs.c: Fix for bug reported by Sven Neumann
+ [sven@gimp.org] on the FreeType development forum: `If
+ FT_CONFIG_OPTION_INCREMENTAL is undefined (this is the default), the
+ TrueType loader crashes in line 852 of src/truetype/ttgload.c when
+ it tries to access face->glyph_locations.'
+
+2002-07-18 Graham Asher <graham.asher@btinternet.com>
+
+ Added types and structures to support incremental typeface loading.
+ The FT_Incremental_Interface structure, defined in freetype.h, is
+ designed to be passed to FT_Open_Face to provide callback functions
+ to obtain glyph recipes and metrics, for fonts like those passed
+ from PostScript that do not necessarily provide all, or any, glyph
+ information, when first opened.
+
+ * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_INCREMENTAL):
+ New configuration macro to enable incremental face loading. By
+ default it is not defined.
+
+ * include/freetype/freetype.h (FT_Basic_Glyph_Metrics,
+ FT_Get_Glyph_Data_Func, FT_Get_Glyph_Metrics_Func,
+ FT_Incremental_Interface_Funcs, FT_Incremental_Interface)
+ [FT_CONFIG_OPTION_INCREMENTAL]: New.
+ (FT_Open_Args, FT_FaceRec) [FT_CONFIG_OPTION_INCREMENTAL]: New field
+ `incremental_interface'.
+ (FT_Open_Flags) [FT_CONFIG_OPTION_INCREMENTAL]: New enum
+ `ft_open_incremental'.
+
+ * include/freetype/fttypes.h: Include FT_CONFIG_CONFIG_H.
+ (FT_Data): New structure to represent binary data.
+
+ * src/base/ftobjs.c (open_face) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Add parameter for incremental loading.
+ (FT_Open_Face) [FT_CONFIG_OPTION_INCREMENTAL]: Use incremental
+ interface.
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Added the incremental loading system
+ for the TrueType driver.
+ (compute_glyph_metrics): Return FT_Error.
+ [FT_CONFIG_OPTION_INCREMENTAL]: Check for overriding metrics.
+ (TT_Load_Glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Don't look for
+ the glyph table while handling an incremental font.
+ Get glyph offset.
+
+ * src/truetype/ttobjs.c (TT_Face_Init)
+ [FT_CONFIG_OPTION_INCOREMENTAL]: Added the incremental loading
+ system for the TrueType driver.
+
+ * src/cid/cidgload.c (cid_load_glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Added the incremental loading system
+ for the CID driver.
+
+ * src/sfnt/sfobjs.c (SFNT_Load_Face) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Changes to support incremental Type 42 fonts: Assume a font has
+ glyphs if it has an incremental interface object.
+
+ * src/type1/t1gload.c (T1_Parse_Glyph): Renamed to...
+ (T1_Parse_Glyph_And_Get_Char_String): This.
+ [FT_CONFIG_OPTION_INCREMENTAL]: Added support for incrementally
+ loaded Type 1 faces.
+ (T1_Parse_Glyph): New function.
+ (T1_Load_Glyph): Updated.
+
+2002-07-17 David Turner <david@freetype.org>
+
+ Cleaning up the cache sub-system code; linear hashing is now the
+ default.
+
+ * 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.
+
+ FT_CONFIG_OPTION_USE_CMAPS is now the default.
+
+ * include/freetype/internal/ftdriver.h (FT_Driver_ClassRec): Remove
+ `get_char_index' and `get_next_char'.
+
+ * include/freetype/config/ftoption.h,
+ include/freetype/internal/tttypes.h, src/base/ftobjs.c,
+ src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/pcf/pcfdrivr.c,
+ src/pfr/pfrdrivr.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
+ src/sfnt/ttcmap0.h, src/sfnt/ttload.c, src/type1/t1objs.c,
+ src/type42/t42objs.c, src/winfonts/winfnt.c
+ [!FT_CONFIG_OPTION_USE_CMAPS]: Removed. The new cmap code is now
+ the default.
+
+ * src/type42/t42objs.c (T42_CMap_CharIndex, T42_CMap_CharNext):
+ Removed.
+ * src/type42/t42objs.h: Updated.
+
+ * src/cid/cidriver.c (Cid_Get_Char_Index, Cid_Get_Next_Char):
+ Removed.
+ (t1_cid_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.
+ * src/type42/t42drivr.c (t42_driver_class): Updated.
+
+ * src/base/ftobjs.c (open_face): Select Unicode cmap by default.
+
+ * src/sfnt/ttload.c (TT_Load_SFNT_Header): Fixed a recent bug that
+ prevented OpenType fonts to be recognized by FreeType.
+
+2002-07-11 David Turner <david@freetype.org>
+
+ Changing the SFNT loader to check for SFNT-based font files
+ differently. We now ignore the range `helper' fields and check the
+ `head' table's magic number instead.
+
+ * include/freetype/internal/tttypes.h (SFNT_HeaderRec): Add `offset'
+ field.
+
+ * src/sfnt/ttload.c (sfnt_dir_check): New function.
+ (TT_Load_SFNT_HeaderRec): Renamed to...
+ (TT_Load_SFNT_Header): This.
+ Implement new functionality.
+ * src/sfnt/ttload.h: Updated.
+ * src/sfnt/sfdriver.c (sfnt_interface): Updated.
+
+ * src/base/ftobject.c, src/base/fthash.c: Updated object sub-system
+ and dynamic hash table implementation (still experimental, don't
+ use).
+ * include/freetype/internal/fthash.h: Updated.
+ * include/freetype/internal/ftobjs.h (FT_LibraryRec): New member
+ `meta_class'.
+
+ Fixing a bug in the Type 1 loader that prevented valid font bounding
+ boxes to be loaded from multiple master fonts.
+
+ * include/freetype/t1tables.h (PS_BlendRec): Add `bboxes' field.
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Add
+ `T1_FIELD_TYPE_BBOX'.
+ (T1_FieldLocation): Add `T1_FIELD_LOCATION_BBOX'.
+ (T1_FIELD_BBOX): New macro.
+
+ * src/psaux/psobjs.c (PS_Parser_LoadField): Handle T1_FIELD_TYPE_BBOX.
+ * src/type1/t1load.c (t1_allocate_blend): Create blend->bboxes.
+ (T1_Done_Blend): Free blend->bboxes.
+ (t1_load_keyword): Handle T1_FIELD_LOCATION_BBOX.
+ (parse_font_bbox): Commented out.
+ (t1_keywords): Comment out `parse_font_bbox'.
+ * src/type1/t1tokens.h: Define `FontBBox' field.
+
+2002-07-10 David Turner <david@freetype.org>
+
+ * src/cff/cffobjs.c: Small fix to select the Unicode charmap by
+ default when needed.
+ Small fix to allow OpenType fonts to support Adobe charmaps when
+ needed.
+
+ * src/cff/cffcmap.c, src/cff/cffcmap.h: New files to support
+ charmaps for CFF fonts.
+
+ * src/cff/cff.c, src/cff/Jamfile, src/cff/rules.mk: Updated.
+
+ * include/freetype/internal/cfftypes.h (CFF_EncodingRec): Use
+ fixed-length arrays for `sids' and `codes'. Add `count' member.
+ (CFF_FontRec): Add `psnames' member.
+
+ * src/cff/cffdrivr.c, src/cff/cffload.c, src/cff/cffload.h,
+ src/cff/cffobjs.c, src/cff/cffobjs.h, src/cff/cffparse.c,
+ src/cffparse.h, src/cff/cffgload.c, src/cff/cffgload.h: Adding
+ support for CFF charmaps, reformatting the sources, and removing
+ some bugs in the Encoding and Charset loaders.
+ Many fonts renamed to use lowercase only:
+
+ CFF_Builder_Init -> cff_builder_init
+ CFF_Builder_Done -> cff_builder_done
+ CFF_Init_Decoder -> cff_decoder_init
+ CFF_Parse_CharStrings -> cff_decoder_parse_charstrings
+ CFF_Load_Glyph -> cff_slot_load
+ CFF_Init_Decoder -> cff_decoder_init
+ CFF_Prepare_Decoder -> cff_decoder_prepare
+ CFF_Get_Standard_Encoding -> cff_get_standard_encoding
+ CFF_Access_Element -> cff_index_access_element
+ CFF_Forget_Element -> cff_index_forget_element
+ CFF_Get_Name -> cff_index_get_name
+ CFF_Get_String -> cff_index_get_sid_string
+ CFF_Get_FD -> cff_fd_select_get
+ CFF_Done_Charset -> cff_charset_done
+ CFF_Load_Charset -> cff_charset_load
+ CFF_Done_Encoding -> cff_encoding_done
+ CFF_Load_Encoding -> cff_encoding_load
+ 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_Done -> cff_size_done
+ CFF_Size_Init -> cff_size_init
+ CFF_Size_Reset -> cff_size_reset
+ CFF_GlyphSlot_Done -> cff_slot_done
+ CFF_GlyphSlot_Init -> cff_slot_init
+ CFF_StrCopy -> cff_strcpy
+ CFF_Face_Init -> cff_face_init
+ CFF_Face_Done -> cff_face_done
+ CFF_Driver_Init -> cff_driver_init
+ CFF_Driver_Done -> cff_driver_done
+ CFF_Parser_Init -> cff_parser_init
+ CFF_Parser_Run -> cff_parser_run
+
+ add_point -> cff_builder_add_point
+ add_point1 -> cff_builder_add_point1
+ add_contour -> cff_builder_add_contour
+ close_contour -> cff_builder_close_contour
+ cff_explicit_index -> cff_index_get_pointers
+
+2002-07-09 Owen Taylor <owen@redhat.com>
+
+ * src/pshinter/pshglob.c (psh_globals_new): Fixed a bug that
+ prevented the hinter from using correct standard width and height
+ values, resulting in hinting bugs with certain fonts (e.g. Utopia).
+
+2002-07-07 David Turner <david@freetype.org>
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Added code to return
+ successfully when the function is called with a bitmap glyph (the
+ previous code simply returned with an error).
+
+ * docs/DEBUG.TXT: Adding debugging support documentation.
+
+ * src/base/ftdebug.c (ft_debug_init), builds/win32/ftdebug.c
+ (ft_debug_init), builds/amiga/src/ftdebug.c (ft_debug_init): Changed
+ the syntax of the FT2_DEBUG environment variable used to control
+ debugging output (i.e. logging and error messages). It must now
+ look like:
+
+ any:6 memory:4 io:3 or
+ any:6,memory:4,io:3 or
+ any:6;memory:4;io:3
+
+2002-07-07 Owen Taylor <owen@redhat.com>
+
+ * src/pshinter/pshglob.c (psh_blues_snap_stem): Adding support for
+ blue fuzz.
+ * src/pshinter/pshglob.h (PSH_BluesRec): Add `blue_fuzz' field.
+ * src/type1/t1load.c (T1_Open_Face): Initialize `blue_fuzz'.
+
+ Adding support for hinter-specific bit flags, and the new
+ FT_Set_Hint_Flags high-level API.
+
+ * include/freetype/freetype.h (FT_Set_Hint_Flags): New function.
+ (FT_HINT_NO_INTEGER_STEM, FT_HINT_NO_HSTEM_ALIGN,
+ FT_HINT_NO_VSTEM_ALIGN): New macros.
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add
+ `hint_flags' member.
+
+ * src/base/ftobjs.c (FT_Set_Hint_Flags): New function.
+
+ * include/freetype/internal/psaux.h (T1_DecoderRec): Add `hint_flags'
+ member.
+
+ * include/freetype/internal/pshints.h (T1_Hints_ApplyFunc,
+ T2_Hints_ApplyFunc): Add parameter to pass hint flags.
+
+ * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings,
+ T1_Decoder_Init): Use decoder->hint_flags.
+ * src/cff/cffgload.h (CFF_Builder): Add `hint_flags' field.
+ * src/cff/cffgload.c (CFF_Builder_Init): Set builder->hint_flags.
+ (CFF_Parse_CharStrings): Updated.
+ * src/pshinter/pshalgo1.c (ps1_hints_apply): Add parameter to handle
+ hint flags (unused).
+ * src/pshinter/pshalgo1.h: Updated.
+ * src/pshinter/pshalgo2.c (ps2_hints_apply): Add parameter to handle
+ hint flags (unused).
+ * src/pshinter/pshalgo2.h: Updated.
+ * src/pshinter/pshalgo3.c (ps3_hints_apply): Add parameter to handle
+ hint flags.
+ * src/pshinter/pshalgo3.h: Updated.
+
+2002-07-04 David Turner <david@freetype.org>
+
+ * src/pfr/pfrobjs.c (pfr_slot_load): Fixed a small bug that returned
+ incorrect advances when the outline resolution was different from
+ the metrics resolution.
+
+ * src/autohint/ahhint.c: Removing compiler warnings.
+
+ * src/autohint/ahglyph.c: s/FT_MEM_SET/FT_ZERO/ where appropriate.
+ (ah_outline_link_segments): Slight improvements to the serif
+ detection code. More work is needed though.
+
+2002-07-03 David Turner <david@freetype.org>
+
+ Small improvements to the automatic hinter. Uneven stem-widths have
+ now disappeared and everything looks much better, even if there are
+ still issues with serifed fonts.
+
+ * src/autohint/ahtypes.h (AH_Globals): Added `stds' array.
+ * src/autohint/ahhint.c (OPTIM_STEM_SNAP): New #define.
+ (ah_snap_width): Commented out.
+ (ah_align_linked_edge): Renamed to...
+ (ah_compute_stem_width): This.
+ Don't allow uneven stem-widths.
+ (ah_align_linked_edge): New function.
+ (ah_align_serifed_edge): Don't strengthen serifs.
+ (ah_hint_edges_3, ah_hinter_scale_globals): Updated.
+
+2002-07-03 Owen Taylor <owen@redhat.com>
+
+ Adding new algorithm based on Owen Taylor's recent work.
+
+ * src/pshinter/pshalgo3.c, src/pshinter/pshalgo3.h: New files.
+ * src/pshinter/pshalgo.h: Updated.
+ Use pshalgo3 by default.
+ * src/pshinter/pshinter.c: Include pshalgo3.c.
+
+ * src/pshinter/Jamfile, src/pshinter/rules.mk: Updated.
+
+2002-07-01 Owen Taylor <owen@redhat.com>
+
+ * src/pshinter/pshalgo2.c (psh2_glyph_find_strong_points): Fix a bug
+ where, if a glyph has more than hint mask, the second mask gets
+ applied to points that should have been covered by the first mask.
+
+2002-07-01 Keith Packard <keithp@keithp.com>
+
+ * src/sfnt/ttcmap0.c (tt_cmap8_char_next, tt_cmap12_char_next):
+ Fixing the cmap 8 and 12 parsing routines.
+
+2002-07-01 David Turner <david@freetype.org>
+
+ * src/base/ftsynth.c: Include FT_TRIGONOMETRY_H.
+ (FT_Outline_Embolden): Renamed to...
+ (FT_GlyphSlot_Embolden): This.
+ Updated to new trigonometric functions.
+ (FT_Outline_Oblique): Renamed to...
+ (FT_GlyphSlot_Oblique): This.
+ (ft_norm): Removed.
+ * include/freetype/ftsynth.h: Updated.
+
+2002-06-26 David Turner <david@freetype.org>
+
+ * include/freetype/internal/ftobject.h: Updating the object
+ sub-system definitions (still experimental).
+
+ * src/base/fthash.c (ft_hash_remove): Fixing a small reallocation
+ bug.
+
+ * src/base/fttrigon.c (FT_Vector_From_Polar, FT_Angle_Diff): New
+ functions.
+ * include/freetype/fttrigon.h: Updated.
+
+
+ Adding path stroker component (work in progress).
+
+ * include/freetype/ftstroker.h, src/base/ftstroker.c: New files.
+ * src/base/Jamfile: Updated.
+
+ * include/freetype/config/ftheader.h (FT_STROKER_H): New macro.
+
+
+ * src/truetype/ttgload.c (TT_Load_Composite_Glyph),
+ src/base/ftoutln.c (FT_Vector_Transform): Fixed Werner's latest fix.
+ FT_Vector_Transform wasn't buggy, the TrueType composite loader was.
+
+2002-06-24 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
+
+2002-06-21 David Turner <david@freetype.org>
+
+
+ * Version 2.1.2 released.
+ =========================
+
+
+2002-06-21 Roberto Alameda <ojancano@geekmail.de>.
+
+ * include/freetype/internal/t42types.h (T42_Font): Removed since
+ it is already in t42objs.h.
+ (T42_Face): Use T1_FontRec.
+
+ * src/base/fttype1.c (FT_Get_PS_Font_Info): Updated.
+ (FT_Has_PS_Glyph_Names): Check for type42 driver name also.
+ * src/type42/t42objs.h: Include FT_INTERNAL_TYPE42_TYPES_H.
+ (T42_Face): Removed since it is already in t42types.h.
+
+2002-06-21 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/pfrgload.c (pfr_glyph_load_compound): Fix loading of composite
+ glyphs.
+
+2002-06-21 Sven Neumann <sven@convergence.de>
+
+ * src/prf/pfrtypes.h (PFR_KernPair): New structure.
+ (PFR_PhyFont): Use it.
+ (PFR_KernFlags): New enumeration.
+ * src/pfr/pfrload.c (pfr_extra_item_load_kerning_pairs): New
+ function.
+ (pfr_phy_font_extra_items): Use it.
+ (pfr_phy_font_done): Updated.
+ * src/pfr/pfrobjs.c (pfr_face_init): Set kerning flag conditionally.
+ (pfr_face_get_kerning): New function.
+ * src/pfr/pfrobjs.h: Updated.
+ * src/pfr/pfrdrivr.c (pfr_driver_class): Updated.
+
+2002-06-21 David Turner <david@freetype.org>
+
+ * README, docs/CHANGES: Preparing the 2.1.2 release.
+
+2002-06-19 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/base/fttype1.c: Include FT_INTERNAL_TYPE42_TYPES_H.
+ (t1_face_check_cast): Removed.
+ (FT_Get_PS_Font_Info): Make it work with CID and Type 42 drivers
+ also.
+
+2002-06-19 Sebastien BARRE <http://barre.nom.fr/contact.html#email>
+
+ * src/type42/t42parse.c (t42_parse_sfnts): Fix compiler warning.
+
+2002-06-19 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_Vector_Transform): Fix serious typo
+ (xy <-> yx).
+ * src/truetype/ttgload.c (load_truetype_glyph): Replace `|' with
+ `||' to make code easier to read.
+
+2002-06-18 Roberto Alameda <ojancano@geekmail.de>.
+
+ * src/type42/t42objs.c (t42_check_size_change): Removed.
+ (T42_Size_SetChars, T42_Size_SetPixels): Use FT_Activate_Size
+ instead.
+ (T42_GlyphSlot_Load): Remove call to t42_check_size_change.
+
+2002-06-18 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/psaux/t1cmap.c (t1_cmap_custom_char_index,
+ t1_cmap_custom_char_next): Fix index computation -- indices start
+ with 0 and not with cmap->first.
+
+ Provide default charmaps.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
+ (PCF_Face_Init), src/pfr/pfrobjs.c (pfr_face_init),
+ src/type1/t1objs (T1_Face_Init), src/winfonts/winfnt.c
+ (FNT_Face_Init): Implement it.
+
+2002-06-17 Sven Neumann <sven@gimp.org>
+
+ * src/pfr/pfrobjs.c (pfr_face_init): Fix typo.
+
+2002-06-16 Leonard Rosenthol <leonardr@lazerware.com>
+
+ Updated Win32/VC++ projects to include the new PFR driver.
+
+ * builds/win32/visualc/freetype.dsp: Updated.
+
+2002-06-16 Anthony Fok <fok@debian.org>
+
+ Install freetype2.m4.
+
+ * builds/unix/install.mk (install, uninstall): Handle it.
+
+2002-06-16 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ Same fix for PFR driver.
+
+ * src/pfr/pfrcmap.c (pfr_cmap_char_index, pfr_cmap_char_next):
+ Increase return value by 1.
+ * src/pfr/pfrobjs.c (pfr_slot_load): Decrease index by 1.
+
+2002-06-15 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ Fix glyph indices to make index zero always the undefined glyph.
+
+ * src/bdf/bdfdrivr.c (bdf_cmap_init): Don't decrease
+ cmap->num_encodings.
+ (bdf_cmap_char_index, bdf_cmap_char_next, BDF_Get_Char_Index):
+ Increase result by 1 for normal cases.
+ (BDF_Glyph_Load): Decrease index by 1.
+
+ * src/pcf/pcfdriver.c (pcf_cmap_char_index, pcf_cmap_char_next,
+ PCF_Char_Get_Index): Increase result by 1 for normal cases.
+ (PCF_Glyph_Load): Decrease index by 1.
+ * src/pcf/pcfread.c (pcf_get_encodings): Don't decrease j for
+ allocating `encoding'.
+
+ * src/base/ftobjs.c (FT_Load_Glyph, FT_Get_Glyph_Name): Fix
+ bounding tests.
+
+2002-06-14 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ Add new cmap support to BDF driver.
+
+ * src/bdf/bdfdrivr.c (BDF_CMapRec) [FT_CONFIG_OPTION_USE_CMAPS]:
+ New structure.
+ (bdf_cmap_init, bdf_cmap_done, bdf_cmap_char_index,
+ bdf_cmap_char_next) [FT_CONFIG_OPTION_USE_CMAPS]: New functions.
+ (BDF_Get_Char_Index) [!FT_CONFIG_OPTION_USE_CMAPS]: Use only
+ conditionally.
+ (BDF_Face_Init): Handle `AVERAGE_WIDTH' and `POINT_SIZE' keywords.
+ Implement new cmap handling.
+ (bdf_driver_class): Updated.
+
+2002-06-14 Werner Lemberg <wl@gnu.org>
+
+ * Makefile, configure, */*.mk, builds/unix/unix-def.in,
+ docs/CHANGES, docs/INSTALL: s/TOP/TOP_DIR/.
+
+2002-06-12 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdflib.c: s/FT_Short/short/ for consistency.
+
+2002-06-11 David Turner <david@freetype.org>
+
+ * builds/win32/ftdebug.c: Added a missing #endif.
+
+ * src/sfnt/ttload.c, src/bdf/bdflib.c: Removing compiler warnings.
+
+ Removed the bug in Type 42 driver that prevented un-hinted outlines
+ to be loaded.
+
+ * src/type42/t42objs.c (T42_Face_Init): Call FT_Done_Size.
+ (T42_Size_Init): Call FT_Activate_Size.
+ (t42_check_size_change): New function.
+ (T42_Size_SetChars, T42_Size_SetPixels): Use it.
+ (ft_glyphslot_clear): Replace FT_MEM_SET with FT_ZERO.
+ (T42_GlyphSlot_Load): Use t42_check_size_change.
+ Initialize more fields of `glyph'.
+
+ * builds/win32/visualc/freetype.dsp: Updated.
+
+2002-06-09 David Turner <david@freetype.org>
+
+
+ * Version 2.1.1 released.
+ =========================
+
+
+2002-06-08 Juliusz Chroboczek <jch@pps.jussieu.fr>
+
+ * include/freetype/internal/ftobjs.h, src/autohint/ahglyph.c,
+ src/base/ftobjs.c, src/sfnt/ttcmap0.c, src/smooth/ftgrays.c: Don't
+ use `setjmp', `longjmp', and `jmp_buf' but `ft_setjmp', `ft_longjmp',
+ and `ft_jmp_buf'.
+ Removed direct references to <stdio.h> and <setjmp.h> when
+ appropriate, to eventually replace them with a
+ FT_CONFIG_STANDARD_LIBRARY_H. Useful for the XFree86 Font Server
+ backend based on FT2.
+
+ * src/base/fttype1.c (FT_Has_PS_Glyph_Names): Fix return value.
+
+2002-06-08 David Turner <david@freetype.org>
+
+ * src/pcf/pcfdriver.c (pcf_cmap_char_next): Fixed a bug that caused
+ the function to return invalid values.
+
+ * src/cache/ftccache.i: Removing a typo that prevented
+ the source's compilation.
+
+ * src/cache/ftccache.c (ftc_node_hash_unlink): Fixed a
+ bug that caused nasty memory overwrites. The hash table's
+ buckets array wasn't correctly resized when shrunk.
+
+2002-06-08 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/smakefile, builds/amiga/makefile: Updated.
+
+2002-06-08 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c (ftc_node_hash_unlink, ftc_node_hash_link)
+ [FTC_CACHE_USE_LINEAR_HASHING]: Fix returned error code.
+ Fix debugging messages.
+ * src/cache/ftccache.i (GEN_CACHE_LOOKUP): Move declaration of
+ `family' and `hash' up to make it compilable with g++.
+
+ * src/type42/t42error.h: New file.
+ * src/type42/t42drivr.c, src/type42/t42objs.c,
+ src/type42/t42parse.c: Use t42 error codes.
+ * src/type42/rules.mk: Updated.
+
+ * src/base/ftnames.c: Include FT_INTERNAL_STREAM_H.
+
+2002-06-08 David Turner <david@freetype.org>
+
+ * src/cache/ftccmap.c: GEN_CACHE_FAMILY_COMPARE,
+ GEN_CACHE_NODE_COMPARE, GEN_CACHE_LOOKUP) [FTC_CACHE_USE_INLINE]:
+ New macros.
+ (ftc_cmap_cache_lookup) [!FTC_CACHE_USE_INLINE]: Typedef to
+ ftc_cache_lookup.
+ (FTC_CMapCache_Lookup): Updated.
+
+ Adding various experimental optimizations to the cache manager.
+
+ * include/freetype/cache/ftccache.h (FTC_CACHE_USE_INLINE,
+ FTC_CACHE_USE_LINEAR_HASHING): New options.
+ (FTC_CacheRec) [FTC_CACHE_USE_LINEAR_HASHING]: New elements `p',
+ `mask', and `slack'.
+
+ * src/cache/ftccache.c (FTC_HASH_MAX_LOAD, FTC_HASH_MIN_LOAD,
+ FTC_HASH_SUB_LOAD) [FTC_CACHE_USE_LINEAR_HASHING,
+ FTC_HASH_INITIAL_SIZE]: New macros.
+ (ftc_node_mru_link, ftc_node_mru_up): Optimized.
+ (ftc_node_hash_unlink, ftc_node_hash_link)
+ [FTC_CACHE_USE_LINEAR_HASHING]: New variants.
+ (FTC_PRIMES_MIN, FTC_PRIMES_MAX, ftc_primes, ftc_prime_closest,
+ FTC_CACHE_RESIZE_TEST, ftc_cache_resize)
+ [!FTC_CACHE_USE_LINEAR_HASHING]: Define it conditionally.
+ (ftc_cache_init, ftc_cache_clear) [FTC_CACHE_USE_LINEAR_HASHING]:
+ Updated.
+ (ftc_cache_lookup) [FTC_CACHE_USE_LINEAR_HASHING]: Implement it.
+
+ * src/cache/ftccache.i: New file.
+
+ * src/cache/ftcsbits.c (GEN_CACHE_FAMILY_COMPARE,
+ GEN_CACHE_NODE_COMPARE, GEN_CACHE_LOOKUP) [FTC_CACHE_USE_INLINE]:
+ New macros.
+ (ftc_sbit_cache_lookup) [!FTC_CACHE_USE_INLINE]: Typedef to
+ ftc_cache_lookup.
+ (FTC_SBitCache_Lookup): Updated.
+
+ * src/type42/t42parse.c: Removing duplicate function.
+
+2002-06-07 Graham Asher <graham.asher@btinternet.com>
+
+ * src/base/ftobjs.c (FT_Render_Glyph_Internal): Changed definition
+ from FT_EXPORT_DEF to FT_BASE_DEF.
+
+2002-06-07 David Turner <david@freetype.org>
+
+ Fixed the bug that prevented the correct display of fonts with
+ `ftview'.
+
+ * src/type42/t42drivr.c: Split into...
+ * src/type42/t42drivr.h, src/type42/t42parse.c,
+ src/type42/t42parse.h, src/type42/t42objs.h, src/type42/t42objs.c,
+ src/type42/type42.c: New files.
+
+ (t42_get_glyph_name, t42_get_ps_name, t42_get_name_index): Use
+ `face->type1'.
+
+ (Get_Interface): Renamed to...
+ (T42_Get_Interface): This.
+ Updated.
+ (T42_Open_Face, T42_Face_Done): Updated.
+ (T42_Face_Init): Add new cmap support.
+ Updated.
+ (T42_Driver_Init, T42_Driver_Done, T42_Size_Init, T42_Size_Done,
+ T42_GlyphSlot_Init, T42_GlyphSlot_Done): Updated.
+ (Get_Char_Index, Get_Next_Char): Renamed to...
+ (T42_CMap_CharIndex, T42_CMap_CharNext): This.
+ Updated.
+ (T42_Char_Size, T42_Pixel_Size): Renamed to...
+ (T42_Size_SetChars, T42_Size_SetPixels): This.
+ (T42_Load_Glyph): Renamed to...
+ (T42_GlyphSlot_Load): This.
+
+ (t42_init_loader, t42_done_loader): Renamed to...
+ (t42_loader_init, t42_loader_done): This.
+ (T42_New_Parser, T42_Finalize_Parser): Renamed to...
+ (t42_parser_init, t42_parser_done): This.
+ (parse_dict): Renamed to...
+ (t42_parse_dict): This.
+ (is_alpha, is_space, hexval): Renamed to...
+ (t42_is_alpha, t42_is_space, t42_hexval): This.
+ (parse_font_name, parse_font_bbox, parse_font_matrix,
+ parse_encoding, parse_sfnts, parse_charstrings, parse_dict):
+ Renamed to...
+ (t42_parse_font_name, t42_parse_font_bbox, t42_parse_font_matrix,
+ t42_parse_encoding, t42_parse_sfnts, t42_parse_charstrings,
+ t42_parse_dict): This.
+ Updated.
+
+ (t42_keywords): Updated.
+
+ * src/type42/Jamfile, src/type42/descrip.mms: Updated.
+
+2002-06-03 Werner Lemberg <wl@gnu.org>
+
+ Add 8bpp support to BDF driver.
+
+ * src/bdf/bdflib.c (_bdf_parse_start): Handle 8bpp.
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Ditto.
+ * src/bdf/README: Updated.
+
+2002-06-02 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/pfr/pfrload.c (pfr_phy_font_done): Free `blue_values' array.
+
+2002-05-29 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/bdf/bdflib.c (_bdf_readstream): Allocate `buf' dynamically.
+ (_bdf_parse_glyphs): Use correct size for allocating
+ `font->unencoded'.
+ (bdf_load_font): Free array conditionally.
+ Return proper error code in case of failure.
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Make it more robust against
+ unusual fonts.
+
+2002-05-29 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/descrip.mms, src/type42/descrip.mms: New files.
+ * descrip.mms (all): Updated.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix typo which prevented
+ compilation.
+ * src/pshglob.c (psh_blues_scale_zones): Fix compiler warning.
+
+2002-05-28 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/makefile, builds/amiga/smakefile,
+ amiga/include/freetype/config/ftmodule.h: Updated to include
+ support for BDF and Type42 drivers.
+
+ * docs/modules.txt: Updated.
+
+2005-05-28 David Turner <david@freetype.org>
+
+ * docs/CHANGES: Updating file for next release (2.1.1).
+
+ * src/bdf/bdflib.c: Removing compiler warnings.
+
+ * include/freetype/ftxf86.h, src/base/ftxf86.c: New files.
+ They provide a new API (FT_Get_X11_Font_Format) to retrieve an
+ X11-compatible string describing the font format of a given face.
+ This was put in a new optional base source file, corresponding to a
+ new public header (named FT_XFREE86_H since this function should
+ only be used within the XFree86 font server IMO).
+
+ * include/freetype/config/ftheader.h (FT_XFREE86_H): New macro (not
+ documented yet).
+
+ * src/base/fttype1.c: New file, providing two new API functions
+ (FT_Get_PS_Font_Info and FT_Has_PS_Glyph_Names).
+ * include/freetype/t1tables.h: Updated.
+
+ * src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms:
+ Updating build control files for the new files `ftxf86.c' and
+ `fttype1.c' in src/base.
+
+ * src/pshinter/pshglob.c (psh_blues_scale_zones): Fixed a bug that
+ prevented family blue zones substitution from hapenning correctly.
+
+ * include/freetype/ftbdf.h FT_Get_BDF_Charset_ID): Adding
+ documentation comment.
+
+2002-05-28 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftnames.c (FT_Get_Sfnt_Name): Don't use FT_STREAM_READ_AT
+ but FT_STREAM_READ.
+ Declare `stream' variable.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs): Replace floating point math
+ with calls to `FT_MulDiv'.
+
+2002-05-28 David Turner <david@freetype.org>
+
+ Fixing the SFNT name table loader to support various buggy fonts.
+ It now ignores empty name entries, entries with invalid pointer
+ Offsets and certain fonts containing tables with broken
+ `storageOffset' fields.
+
+ Name strings are now loaded on demand, which reduces the memory
+ requirements for a given FT_Face tremendously (for example, the name
+ table of Arial.ttf is about 10Kb and contains 70 names).
+
+ This is a temporary fix. The whole name table loader and interface
+ will be rewritten in a much more cleanly way shortly, once CSEH have
+ been introduced in the sources.
+
+ * include/freetype/internal/tttypes.h (TT_NameEntryRec): Change
+ type of `stringOffset' to FT_ULong.
+ (TT_NameTableRec): Change type of `numNameRecords' and
+ `storageOffset' to FT_UInt.
+ Replace `storage' with `stream'.
+ * src/base/ftnames.c (FT_Get_Sfnt_Name): Load name on demand.
+ * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto.
+ Make code more robust.
+ * src/sfnt/sfobjs.c (TT_NameEntry_ConvertFunc): New typedef.
+ (tt_face_get_name): Use it.
+ Make code more robust.
+ * src/sfnt/ttload.c (TT_Load_Names): Use `static' for arrays.
+ Handle invalid `storageOffset' data better.
+ Set length fields to zero for invalid or ignored data.
+ Remove code within FT_DEBUG_LEVEL_TRACE.
+ (TT_Free_Names): Updated.
+
+2002-05-24 Tim Mooney <enchanter@users.sourceforge.net>
+
+ * builds/unix/ft-munmap.m4: New file, extracted FT_MUNMAP_DECL and
+ FT_MUNMAP_PARAM from aclocal.m4 into here, so aclocal.m4 can be
+ rebuilt from sources. Set macro serial to 1, and use third argument
+ to AC_DEFINE for our two custom symbols, so ftconfig.in could one day
+ be rebuilt with autoheader (not recommended now, ftconfig.in is a
+ custom source file)
+
+2002-05-22 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftheader.h (FT_BEZIER_H): Removed.
+ (FT_BDF_H): New macro for accessing `ftbdf.h'.
+
+ * src/type42/t42drivr.c (hexval): Fix typo.
+
+2002-05-21 Martin Muskens <mmuskens@aurelon.com>
+
+ * src/psaux/psobjs.c (T1Radix): New function.
+ (t1_toint): Use it to handle numbers in radix format.
+
+ * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Add dummy
+ for undocumented, obsolete opcode 15.
+
+2002-05-21 David Turner <david@freetype.org>
+
+ * src/bdf/bdflib.c: Removed compiler warning, and changed all tables
+ to the `static const' storage specifier (instead of simply
+ `static').
+
+ * src/type42/t42drivr.c (hexval): Use more efficient code.
+ Removing compiler warnings.
+ * src/bdf/bdfdrivr.c: Removing compiler warnings.
+
+ * include/freetype/internal/ftbdf.h, src/base/ftbdf.c,
+ src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk
+ (FT_Get_BDF_Charset_ID): New API to retrieve BDF-specific strings
+ from a face. This is much cleaner than accessing the internal types
+ `BDF_Public_Face' defined in FT_INTERNAL_BDF_TYPES_H.
+
+2002-05-21 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/README: Mention Microsoft's SBIT tool.
+
+ * src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdriver.c,
+ src/truetype/ttdriver.c, src/type1/t1driver.c,
+ src/winfonts/winfnt.c, src/type42/t42drivr.c, src/bdf/bdfdrivr.c
+ [FT_CONFIG_OPTION_DYNAMIC_DRIVERS]: Completely removed. It has
+ been never used.
+
+2002-05-21 Roberto Alameda <ojancano@geekmail.de>.
+
+ * src/type42/t42drivr.c: s/T42_ENCODING_TYPE_/T1_ENCODING_TYPE_/.
+ (parse_font_matrix): Remove unnecessary code.
+ (parse_sfnts): Initialize some variables.
+ (t42_driver_class) [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Use
+ ft_module_driver_has_hinter conditionally.
+ Moved some type 42 specific structure definitions to...
+ * include/freetype/internal/t42types.h: New file.
+ * include/freetype/internal/internal.h (FT_INTERNAL_T42_TYPES_H):
+ New macro.
+
+2002-05-20 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/cache/ftcsbits.h (FTC_SBit): Added a new field
+ `num_grays' for specifying the number of used gray levels.
+ * src/cache/ftcsbits.c (ftc_sbit_node_load): Initialize it.
+
+2002-05-19 Werner Lemberg <wl@gnu.org>
+
+ Adding a driver for BDF fonts written by Francesco Zappa Nardelli
+ <Francesco.Zappa.Nardelli@ens.fr>. Heavily modified by me to
+ better adapt it to FreeType, removing unneeded stuff. Additionally,
+ it now supports Mark Leisher's BDF extension for anti-aliased
+ bitmap glyphs with 2 and 4 bpp.
+
+ * src/bdf/*: New driver.
+ * include/freetype/internal/bdftypes.h: New file.
+ * include/freetype/internal/fttrace.h: Added BDF driver components.
+ * include/freetype/fterrdef.h: Added error codes for BDF driver.
+ * include/freetype/config/ftmodule.h, src/Jamfile: Updated.
+ * include/freetype/internal/internal.h (FT_INTERNAL_BDF_TYPES_H):
+ New macro.
+
+ * include/freetype/config/ftstdlib.h (ft_sprintf): New alias for
+ sprintf.
+
+2002-05-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/fttrace.h: Added Type 42 driver
+ component.
+ * src/type42/t42drivr.c: Use it.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_PCF_TYPES_H):
+ New macro.
+
+2002-05-17 Werner Lemberg <wl@gnu.org>
+
+ * src/type42/Jamfile: New file.
+
+2002-05-14 Werner Lemberg <wl@gnu.org>
+
+ Adding a driver for Type42 fonts written by Roberto Alameda
+ <ojancano@geekmail.de>.
+
+ * src/type42/*: New driver.
+ * include/freetype/config/ftmodule.h, src/Jamfile: Updated.
+ * include/freetype/config/ftstdlib.h (ft_xdigit, ft_memcmp,
+ ft_atoi): New aliases for xdigit, memcmp, and atoi, respectively.
+
+2002-05-12 Owen Taylor <otaylor@redhat.com>
+
+ * src/sfnt/ttload.c (TT_LookUp_Table): Protect against tables
+ with a zero length value.
+
+2002-05-12 Michael Pfeiffer <michael.pfeiffer@utanet.at>
+
+ * builds/beos/beos.mk: Include `link-std.mk'.
+
+2002-05-12 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.h (T1_Loader): Renamed to...
+ (T1_LoaderRec): This.
+ (T1_Loader): Now pointer to T1_LoaderRec.
+ * src/type1/t1load.c: Updated.
+
+ * include/freetype/internal/t1types.h, src/type1/t1load.c,
+ src/type1/t1objs.c:
+ s/T1_ENCODING_TYPE_EXPORT/T1_ENCODING_TYPE_EXPERT/.
+
+2002-05-06 Werner Lemberg <wl@gnu.org>
+
+ * README: Add a note regarding libttf vs. libfreetype.
+
+2002-05-05 Werner Lemberg <wl@gnu.org>
+
+ FreeType 2 can now be built in an external directory with the
+ configure script also.
+
+ * builds/freetype.mk (INCLUDES): Add `OBJ_DIR'.
+
+ * builds/unix/detect.mk (have_mk): New variable to test for
+ external build.
+ (unix-def.mk): Defined according to value of `have_mk'.
+ * builds/unix/unix.mk (have_mk): New variable to test for
+ external build.
+ Select include paths for unix-def.mk and unix-cc.mk according
+ to value of `have_mk'.
+ * builds/unix/unix-def.in (OBJ_BUILD): New variable.
+ (DISTCLEAN): Use it.
+ * builds/unix/unix-cc.in (LIBTOOL): Define default value only
+ if not yet defined.
+ * builds/unix/install.mk (install): Use `OBJ_BUILD' for installing
+ freetype-config.
+
+ * configure: Don't depend on bash features.
+ (ft2_dir, abs_curr_dir, abs_ft2_dir): New variables (code
+ partially taken from Autoconf).
+ Build a dummy Makefile if not building in source tree.
+
+ * docs/INSTALL: Document it.
+
+2002-05-04 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Finally fixing the last
+ bug that prevented FreeType 2.x and FreeType 1.x to produce
+ bit-by-bit identical monochrome glyph bitmaps with native TrueType
+ hinting. The culprit was a single-bit flag that wasn't set
+ correctly by the TrueType glyph loader.
+
+ * src/otlayout/otlayout.h, src/otlayout/otlbase.c,
+ src/otlayout/otlbase.h, src/otlayout/otlconf.h,
+ src/otlayout/otlgdef.c, src/otlayout/otlgdef.h,
+ src/otlayout/otlgpos.c, src/otlayout/otlgpos.h,
+ src/otlayout/otlgsub.c, src/otlayout/otlgsub.h,
+ src/otlayout/otljstf.c, src/otlayout/otljstf.h,
+ src/otlayout/otltable.c, src/otlayout/otltable.h,
+ src/otlayout/otltags.h: New OpenType Layout source files. The
+ module is still incomplete.
+
+2002-05-02 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_char_index): Fix serious typo
+ (0xFFFU -> 0xFFFFU).
+
+2002-05-01 Werner Lemberg <wl@gnu.org>
+
+ * docs/INSTALL: Fix URL of makepp.
+
+2002-05-01 David Turner <david@freetype.org>
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): Fixing a bug that caused
+ FreeType to crash when certain broken fonts (e.g. `hya6gb.ttf')
+ were opened.
+
+ * src/sfnt/ttload.c (TT_Load_Names): Applied a small work-around to
+ manage fonts containing a broken name table (e.g. `hya6gb.ttf').
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_validate): Fixed over-restrictive
+ validation test. The charmap validator now accepts overlapping
+ ranges in format 4 charmaps.
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_char_index): Switched to a binary
+ search algorithm. Certain fonts contain more than 170 distinct
+ segments!
+
+ * include/freetype/config/ftstdlib.h: Adding an alias for the `exit'
+ function. This will be used in the near future to panic in case of
+ unexpected exception (which shouldn't happen in theory).
+
+ * include/freetype/internal/fthash.h, src/base/fthash.c: New files.
+ This is generic implementation of dynamic hash tables using a linear
+ algorithm (to get rid of `stalls' during resizes). In the future
+ this will be used in at least three parts of the library: the cache
+ sub-system, the object sub-system, and the memory debugger.
+
+ * src/base/Jamfile: Updated.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_HASH_H,
+ FT_INTERNAL_OBJECT_H): New macros.
+
+ * include/freetype/internal/ftcore.h: New file to group all new
+ definitions related to exception handling and memory management. It
+ is very likely that this file will disappear or be renamed in the
+ future.
+
+ * include/freetype/internal/ftobject.h, include/freetype/ftsysmem.h:
+ Adding comments to better explain the object sub-system as well as
+ the new memory manager interface.
+
+2002-04-30 Wenlin Institute (Tom Bishop) <wenlin@wenlin.com>
+
+ * src/base/ftmac.c (p2c_str): Removed.
+ (file_spec_from_path) [TARGET_API_MAC_CARBON]: Added support for
+ OS X.
+ (is_dfont) [TARGET_API_MAC_CARBON]: Define only for OS X.
+ Handle `nameLen' <= 6 also.
+ (parse_fond): Remove unused variable `name_table'.
+ Use functionality of old p2c_str directly.
+ Add safety checks.
+ (read_lwfn): Initialize `size_p'.
+ Check for size_p == NULL.
+ (new_memory_stream, open_face_from_buffer): Updated to FreeType 2.1.
+ (FT_New_Face_From_LWFN): Remove unused variable `memory'.
+ Remove some dead code.
+ (FT_New_Face_From_SFNT): Remove unused variable `stream'.
+ (FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Define only for
+ OS X.
+ (FT_New_Face_From_FOND): Remove unused variable `error'.
+ (ResourceForkSize): New function.
+ (FT_New_Face): Use it.
+ Handle empty resource forks.
+ Conditionalize some code for OS X.
+ Add code to call normal loader as a fallback.
+
+2002-04-30 Werner Lemberg <wl@gnu.org>
+
+ `interface' is reserved on the Mac.
+
+ * include/freetype/ftoutln.h, include/freetype/internal/sfnt.h,
+ src/base/ftoutln.c: s/interface/func_interface/.
+ * src/base/ftbbox.c (FT_Outline_Get_BBox):
+ s/interface/bbox_interface/.
+ * src/cff/cffdrivr.c: s/interface/module_interface/.
+ * src/cff/cffload.c, src/cff/cffload.h:
+ s/interface/psnames_interface/.
+ * src/cid/cidriver.c: s/interface/cid_interface/.
+ * src/sfnt/sfdriver.c: s/interface/module_interface/.
+ * src/smooth/ftgrays.c: s/interface/func_interface/.
+ * src/truetype/ttdriver.c: s/interface/tt_interface/.
+ * src/type1/t1driver.c: s/interface/t1_interface/.
+
+ Some more variable renames to avoid troubles on the Mac.
+
+ * src/raster/ftraster.c:
+ s/Unknown|Ascending|Descending|Flat/\1_State/.
+ * src/smooth/ftgrays.c: s/TScan/TCoord/.
+
+ Other changes for the Mac.
+
+ * include/freetype/config/ftconfig.h: Define FT_MACINTOSH for
+ Mac platforms.
+ * src/base/ftobjs.c: s/macintosh/FT_MACINTOSH/.
+
+ * src/raster/ftrend1.c (ft_raster1_render): Make `pitch' always
+ an even number.
+
+2002-04-29 Jouk Jansen <joukj@hrem.stm.tudelft.nl>
+
+ * descrip.mms (all): Add pfr driver.
+
+2002-04-28 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/pfrerror.h: New file.
+ * include/freetype/ftmoderr.h: Add PFR error codes.
+ * src/pfr/pfrgload.c: Include pfrerror.h.
+ Use PCF error codes.
+ (pfr_extra_item_load_stem_snaps): Fix debug message.
+ * src/pfr/pfrgload.c: Include pfrerror.h.
+ Use PCF error codes.
+ (pfr_extra_item_load_bitmap_info, pfr_glyph_load_simple,
+ pfr_glyph_load_compound): Fix debug message.
+ * src/pfr/pfrobjs.c: Include pfrerror.h.
+ Use PCF error codes.
+ (pfr_face_init): Return PFR_Err_Unknown_File_Format.
+ * src/pfr/rules.mk (PFR_DRV_H): Include pfrerror.h.
+
+ * src/pcf/pcfdriver.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_CMAPS]:
+ `root' -> `face->root'.
+ * src/sfnt/ttcmap0.c (TT_Build_CMaps) [!FT_CONFIG_OPTION_USE_CMAPS]:
+ Removed.
+ * src/sfnt/ttcmap0.c: Declare TT_Build_CMaps only for
+ FT_CONFIG_OPTION_USE_CMAPS.
+
+2002-04-27 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c (ftc_cache_lookup),
+ src/cache/ftccmap.c (ftc_cmap_family_init),
+ src/cache/ftcmanag.c (ftc_family_table_alloc),
+ src/cache/ftcsbits.c (FTC_SBit_Cache_Lookup): Use FTC_Err_*.
+ src/cache/ftcimage.c (FTC_Image_Cache_Lookup): Use FTC_Err_*.
+ (FTC_ImageCache_Lookup): Fix handling of invalid arguments.
+
+2002-04-22 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.ac: Set `version_info' to 9:1:3 (FT2
+ version 2.0.9 has 9:0:3).
+ * builds/unix/configure: Regenerated (using autoconf 2.53).
+
+2002-04-19 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/pfrload.c (pfr_extra_items_farse): Fix debug message.
+ (pfr_phy_font_load): s/size/Size/ for local variable to avoid
+ compiler warning.
+ * src/pfr/pfrobjs.c (pfr_face_init): Fix debug message.
+ (pfr_slot_load): Remove redundant local variable.
+
+2002-04-19 David Turner <david@freetype.org>
+
+ Adding a PFR font driver to the FreeType sources. Note that it
+ doesn't support embedded bitmaps or kerning tables yet.
+
+ src/pfr/*: New files.
+
+ * include/freetype/config/ftmodule.h,
+ include/freetype/internal/fttrace.h, src/Jamefile: Updated.
+
+ * src/type1/t1gload.h (T1_Load_Glyph), src/type1/t1gload.c
+ (T1_Load_Glyph): Fixed incorrect parameter sign-ness in callback
+ function.
+
+ * include/freetype/internal/ftmemory.h (FT_MEM_ZERO, FT_ZERO): New
+ macros.
+
+ * include/freetype/internal/ftstream.h (FT_NEXT_OFF3, FT_NEXT_UOFF3,
+ FT_NEXT_OFF3_LE, FT_NEXT_UOFF3_LE): New macros to parse in-memory
+ 24-bit integers.
+
+2002-04-18 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c, builds/win32/ftdebug.c,
+ builds/amiga/src/base/ftdebug.c: Version 2.1.0 couldn't be linked
+ against applications in Win32 and Amiga builds due to changes to
+ `src/base/ftdebug.c' that were not properly propagated to
+ `builds/win32' and `builds/amiga'. This has been fixed.
+
+ * include/freetype/internal/ftobject.h,
+ include/freetype/internal/ftexcept.h, include/freetype/ftsysmem.h,
+ include/freetype/ftsysio.h, src/base/ftsysmem.c, src/base/ftsysio.c:
+ New experimental files.
+
+2002-04-17 David Turner <david@freetype.org>
+
+
+ * Version 2.1.0 released.
+ =========================
+
+
+2002-04-17 Michael Jansson <mjan@em2-solutions.com>
+
+ * src/type1/t1gload.c (T1_Compute_Max_Advance): Fixed a small bug
+ that prevented the function to return the correct value.
+
+2002-04-16 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
+
+ * src/pcf/pcfread (pcf_get_accell): Fix parsing of accelerator
+ tables.
+
+2002-04-15 David Turner <david@freetype.org>
+
+ * docs/FTL.txt: Formatting.
+
+ * include/freetype/config/ftoption.h: Reduce the size of the
+ render pool from 32kByte to 16kByte.
+
+ * src/pcf/pcfread.c (pcf_seek_to_table_type): Remove compiler
+ warning.
+
+ * include/freetype/config/ftoption.h (FT_MAX_EXTENSIONS): Removed.
+
+ * docs/CHANGES: Preparing 2.1.0 release.
+
+2002-04-13 Werner LEMBERG <wl@gnu.org>
+
+ * src/cff/cffgload.c (CFF_Parse_CharStrings): s/rand/Rand/ to avoid
+ compiler warning.
+
+2002-04-12 David Turner <david@freetype.org>
+
+ * README.UNX: Updated the Unix-specific quick-compilation guide to
+ warn about the GNU Make requirement at compile time.
+
+ * include/freetype/config/ftstdlib.h,
+ include/freetype/config/ftconfig.h,
+ include/freetype/config/ftheader.h,
+ include/freetype/internal/ftmemory.h,
+ include/freetype/internal/ftobjs.h,
+
+ src/autohint/ahoptim.c,
+
+ src/base/ftdbgmem.c, src/base/ftdebug.c, src/base/ftmac.c,
+ src/base/ftobjs.c, src/base/ftsystem.c,
+
+ src/cache/ftcimage.c, src/cache/ftcsbits.c,
+
+ src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,
+
+ src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,
+
+ src/pcf/pcfdriver.c, src/pcf/pcfread.c,
+
+ src/psaux/t1cmap.c, src/psaux/t1decode.c,
+
+ src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
+ src/pshinter/pshrec.c,
+
+ src/psnames/psmodule.c,
+
+ src/raster/ftraster.c,
+
+ src/sfnt/sfdriver.c, src/sfnt/ttload.c,
+
+ src/smooth/ftgrays.c,
+
+ src/type1/t1afm.c, src/type1/t1driver.c, src/type1/t1gload.c,
+ src/type1/t1load.c, src/type1/t1objs.c, src/type1/t1parse.c,
+
+ builds/unix/ftconfig.in, builds/vms/ftconfig.h,
+
+ builds/amiga/src/base/ftdebug.c:
+
+ Added the new configuration file `ftstdlib.h' used to define
+ aliases for all ISO C library functions used by the engine
+ (e.g. strlen, qsort, setjmp, etc.).
+
+ This eases the porting of FreeType 2 to environments like
+ XFree86 modules/extensions.
+
+ Also removed many #include <string.h>, #include <stdlib.h>, etc.
+ from the engine's sources where they are not needed.
+
+ * src/sfnt/ttpost.c: Use macro name for psnames.h.
+
+2002-04-12 Vincent Caron <v.caron@zerodeux.net>
+
+ * configure, builds/detect.mk: Updated the build system to print
+ a warning message in case GNU Make isn't used to build the library.
+
+2002-04-11 David Turner <david@freetype.org>
+
+ * README, docs/CHANGES, Jamfile.in: Updates for the 2.1.0 release.
+
+ * docs/FTL.txt: Updated license text to provide a preferred
+ disclaimer and adjust copyright dates/extents.
+
+ * include/freetype/cache/ftcglyph.h: Removing obsolete (and
+ confusing) comment.
+
+ * Jamfile.in: New file.
+
+2002-04-11 Maxim Shemanarev <mcseemagg@yahoo.com>
+
+ * src/smooth/ftgrays.c (gray_hline): Minor optimization.
+
+2002-04-02 Werner Lemberg <wl@gnu.org>
+
+ Fixes from the stable branch:
+
+ * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_OLD_CALCS):
+ Removed.
+ [FT_CONFIG_OPTION_OLD_CALCS]: Removed.
+ * include/freetype/internal/ftcalc.h, src/base/ftcalc.c
+ [FT_CONFIG_OPTION_OLD_CALCS]: Removed.
+
+ * src/base/fttrigon.c (FT_Vector_Length): Change algorithm to match
+ output of FreeType 1.
+
+ * src/pshinter/pshglob.c (psh_globals_scale_widths): Fixed a small
+ bug that created un-even stem widths when hinting Postscript fonts.
+
+ * src/type1/t1driver.c, src/type1/t1parse.c: 16bit fixes.
+
+2002-04-01 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c: 16bit fixes.
+ (TT_Load_Simple_Glyph): Improve debug messages.
+ (load_truetype_glyph): Remove dead code.
+ * src/truetype/ttinterp.c: 16bit fixes.
+ * src/truetype/ttobjs.c: Ditto.
+
+ * include/freetype/ftsnames.h, include/freetype/internal/sfnt.h,
+ src/cff/cffload.h, src/psaux/psobjs.h, src/truetype/ttinterp.[ch],
+ src/sfnt/ttpost.h: s/index/idx/.
+
+2002-03-31 Yao Zhang <yaoz@vidar.niaaa.nih.gov>
+
+ * src/truetype/ttobjs.c (TT_Size_Init): Fix typo.
+
+2002-03-31 Werner Lemberg <wl@gnu.org>
+
+ * src/otlayout/otlcommn.c, src/otlayout/otlcommn.h: s/index/idx/.
+ * src/psaux/t1cmap.c: Ditto.
+ * src/sfnt/ttcmap0.c: Ditto.
+
+ * include/freetype/internal/tttypes.h,
+ include/freetype/internal/sfnt.h (TT_Goto_Table_Func): Renamed to ...
+ (TT_Loader_GotoTableFunc): This.
+ * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Fix debug
+ messages.
+ * src/psnames/psmodule.c (psnames_interface)
+ [!FT_CONFIG_OPTION_ADOBE_GLYPH_LIST]: Fix typo.
+ * src/sfnt/sfdriver.c (get_sfnt_table): 16bit fix.
+ * src/sfnt/ttcmap.c: 16bit fixes (0xFFFF -> 0xFFFFU).
+ * src/sfnt/ttcmap0.c: 16bit fixes.
+ (TT_Build_CMaps): Simplify debug messages.
+ (tt_cmap12_char_next): Fix offset.
+ * src/sfnt/ttload.c (TT_Load_Names, TT_Load_CMap): Fix debug
+ messages.
+ (TT_Load_OS2): 16bit fix.
+
+2002-03-30 David Turner <david@freetype.org>
+
+ * include/freetype/internal/tttypes.h: Adding comments to some of
+ the TT_FaceRec fields.
+
+ * src/sfnt/ttcmap0.c (TT_Build_CMaps): Removed compiler warnings.
+
+ * src/sfnt/sfobjs.c (tt_name_entry_ascii_from_{utf16,ucs4,other}:
+ New functions.
+ (tt_face_get_name): Use them to properly extract an ascii font name.
+
+2002-03-30 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/t1tables.h (t1_blend_max): Fix typo.
+ * src/base/ftstream.c: Simplify FT_ERROR calls.
+ * src/cff/cffdrivr.c (cff_get_glyph_name): Fix debug message.
+
+ * src/cff/cffobjs.c (CFF_Driver_Init, CFF_Driver_Done)
+ [TT_CONFIG_OPTION_EXTEND_ENGINE]: Removed.
+ * src/cff/sfobjs.c (SFNT_Load_Face)
+ [TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto.
+ * src/truetype/ttobjs.c (TT_Init_Driver, TT_Done_Driver)
+ [TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto.
+
+ * src/truetype/ttdriver.c, src/truetype/ttobjs.c,
+ src/truetype/ttobjs.h: Renaming driver functions to the
+ FT_<Subject>_<Action> scheme:
+
+ TT_Init_Driver => TT_Driver_Init
+ TT_Done_Driver => TT_Driver_Done
+ TT_Init_Face => TT_Face_Init
+ TT_Done_Face => TT_Face_Done
+ TT_Init_Size => TT_Size_Init
+ TT_Done_Size => TT_Size_Done
+ TT_Reset_Size => TT_Size_Reset
+
+2002-03-29 Werner Lemberg <wl@gnu.org>
+
+ * builds/vms/ftconfig.h: Rename LOCAL_DEF and LOCAL_FUNC to
+ FT_LOCAL and FT_LOCAL_DEF, respectively, as with other ftconfig.h
+ files.
+ * builds/unix/ftconfig.in: Add argument to FT_LOCAL and
+ FT_LOCAL_DEF.
+ * src/truetype/ttinterp.c: s/FT_Assert/FT_ASSERT/.
+ * builds/unix/configure.ac: Temporarily deactivate creation of
+ ../../Jamfile.
+ * builds/unix/configure: Updated.
+
+2002-03-28 KUSANO Takayuki <AE5T-KSN@asahi-net.or.jp>
+
+ * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fix serious typos.
+
+2002-03-28 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (PSAux_ServiceRec): Fix
+ compiler warnings.
+ * include/freetype/internal/t1types.h (T1_FaceRec): Use `const' for
+ some members.
+ * src/base/ftapi.c (FT_New_Memory_Stream): Fix typos.
+ * src/psaux/t1cmap.c (t1_cmap_std_init, t1_cmap_unicode_init): Add
+ cast.
+ (t1_cmap_{standard,expert,custom,unicode}_class_rec): Use
+ `FT_CALLBACK_TABLE_DEF'.
+ * src/psaux/t1cmap.h: Updated.
+ * src/sfnt/ttcmap0.c (TT_Build_CMaps): Use `ft_encoding_none'
+ instead of zero.
+ * src/type1/t1objs.c (T1_Face_Init): Use casts.
+
+2002-03-26 David Turner <david@freetype.org>
+
+ * src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c:
+ Fixed a small bug in the FT_CMaps support code.
+
+2002-03-25 David Turner <david@freetype.org>
+
+ * src/truetype/ttinterp.c (Norm): Replaced with...
+ (TT_VecLen): This.
+ (TT_MulFix14, TT_DotFix14): New functions.
+ (Project, Dual_Project, Free_Project, Compute_Point_Displacement,
+ Ins_SHPIX, Ins_MIAP, Ins_MIRP): Use them.
+ [FT_CONFIG_OPTION_OLD_CALCS]: Removed all code.
+
+2002-03-22 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c, src/sfnt/ttcmap0.c, src/type1/t1objs.c:
+ Various fixes to make the FT_CMaps support work correctly (more
+ tests are still needed).
+
+ * include/freetype/internal/ftobjs.h, src/sfnt/Jamfile,
+ src/sfnt/rules.mk, src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
+ src/sfnt/ttload.c, src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h: Updated
+ the SFNT charmap support to use FT_CMaps.
+
+ * include/freetype/fterrdef.h: New file.
+ * include/freetype/fterrors.h: Include it. It contains all error
+ codes.
+ * include/freetype/config/ftheader.h (FT_ERROR_DEFINITIONS_H): New
+ macro.
+
+ * include/freetype/internal/ftmemory.h, and a lot of other files:
+ Changed the names of memory macros. Examples:
+
+ MEM_Set => FT_MEM_SET
+ MEM_Copy => FT_MEM_COPY
+ MEM_Move => FT_MEM_MOVE
+
+ ALLOC => FT_ALLOC
+ FREE => FT_FREE
+ REALLOC = >FT_REALLOC
+
+ FT_NEW was introduced to allocate a new object from a _typed_
+ pointer.
+
+ Note that ALLOC_ARRAY and REALLOC_ARRAY have been replaced by
+ FT_NEW_ARRAY and FT_RENEW_ARRAY which take _typed_ pointer
+ arguments.
+
+ This results in _lots_ of sources being changed, but makes the code
+ more generic and less error-prone.
+
+ * include/freetype/internal/ftstream.h, src/base/ftstream.c,
+ src/cff/cffload.c, src/pcf/pcfread.c, src/sfnt/ttcmap.c,
+ src/sfnt/ttcmap0.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
+ src/sfnt/ttsbit.c, src/truetype/ttgload.c, src/truetype/ttpload.c,
+ src/winfonts/winfnt.c: Changed the definitions of stream macros.
+ Examples:
+
+ NEXT_Byte => FT_NEXT_BYTE
+ NEXT_Short => FT_NEXT_SHORT
+ NEXT_UShortLE => FT_NEXT_USHORT_LE
+ READ_Short => FT_READ_SHORT
+ GET_Long => FT_GET_LONG
+ etc.
+
+ Also introduced the FT_PEEK_XXXX functions.
+
+ * src/cff/cffobjs.c (CFF_Build_Unicode_Charmap): Removed commented
+ out function.
+ (find_encoding): Removed.
+ (CFF_Face_Init): Remove charmap support.
+
+ * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_CMAPS,
+ TT_CONFIG_CMAP_FORMAT{0,2,4,6,8,10,12}): New macros to fine-tune
+ support of cmaps.
+
+2002-03-21 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c, src/pcf/pcfdriver.c, src/pcf/pcfread.c: Updated
+ to new FT_CMap definitions.
+
+ * src/psaux/t1cmap.h, src/psaux/t1cmap.c, src/type1/t1cmap.h,
+ src/type1/t1cmap.c: Updating and moving the Type 1 FT_CMap support
+ from `src/type1' to `src/psaux' since it is going to be shared by
+ the Type 1 and CID font drivers.
+
+ * src/psaux/Jamfile, src/psaux/psaux.c, src/psaux/psauxmod.c,
+ src/psaux/rules.mk, include/freetype/internal/psaux.h: Added support
+ for Type 1 FT_CMaps.
+
+2002-03-20 David Turner <david@freetype.org>
+
+ * src/base/ftgloadr.c (FT_GlyphLoader_CheckSubGlyphs): Fixed a
+ memory allocation bug that was due to un-careful renaming of the
+ FT_SubGlyph type.
+
+ * src/base/ftdbgmem.c (ft_mem_table_destroy): Fixed a small bug that
+ caused the library to crash with Electric Fence when memory
+ debugging is used.
+
+ * Renaming stream macros. Examples:
+
+ FILE_Skip => FT_STREAM_SKIP
+ FILE_Read => FT_STREAM_READ
+ ACCESS_Frame => FT_FRAME_ENTER
+ FORGET_Frame => FT_FRAME_EXIT
+ etc.
+
+ * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fixed memory leak.
+
+ * include/freetype/internal/ftobjs.h: Changing the definition of
+ FT_CMap_CharNextFunc slightly.
+
+ * src/cff/*.c: Updating CFF type definitions.
+
+2002-03-14 David Turner <david@freetype.org>
+
+ * include/freetype/internal/autohint.h, src/autohint/ahmodule.c,
+ src/base/ftapi.c, src/base/ftobjs.c: Updating the type definitions
+ for the auto-hinter module.
+
+ FT_AutoHinter_Interface => FT_AutoHinter_ServiceRec
+ FT_AutoHinter_Interface* => FT_AutoHinter_Service
+ etc.
+
+ FT_AutoHinter_Get_Global_Func => FT_AutoHinter_GlobalGetFunc
+ FT_AutoHinter_Done_Global_Func => FT_AutoHinter_GlobalDoneFunc
+ etc.
+
+ * ahloader.h [_STANDALONE_]: Removed all conditional code.
+
+ * include/freetype/internal/cfftypes.h, src/cff/*.c: Updating the
+ type definitions of the CFF font driver.
+
+ CFF_Font => CFF_FontRec
+ CFF_Font* => CFF_Font
+ etc.
+
+ * include/freetype/internal/fnttypes.h, src/winfonts/*.c: Updating
+ type definitions of the Windows FNT font driver.
+
+ * include/freetype/internal/ftdriver.h,
+ include/freetype/internal/ftobjs.h, src/base/ftapi.c,
+ src/base/ftobjs.c, src/cff/cffdrivr.c, src/cff/cffdrivr.h,
+ src/cid/cidriver.c, src/cid/cidriver.h, src/pcf/pcfdriver.c,
+ src/pcf/pcfdriver.h, src/truetype/ttdriver.c,
+ src/truetype/ttdriver.h, src/type1/t1driver.c, src/type1/t1driver.h,
+ src/winfonts/winfnt.c, src/winfonts/winfnt.h: Updating type
+ definitions for font drivers.
+
+ FTDriver_initFace => FT_Face_InitFunc
+ FTDriver_initGlyphSlot => FT_Slot_InitFunc
+ etc.
+
+ * src/cid/cidobjs.c (CID_Face_Init): Remove dead code.
+
+ * include/freetype/internal/ftobjs.h, src/base/ftobjs.c: Updated a
+ few face method definitions:
+
+ FT_PSName_Requester => FT_Face_GetPostscriptNameFunc
+ FT_Glyph_Name_Requester => FT_Face_GetGlyphNameFunc
+ FT_Name_Index_Requester => FT_Face_GetGlyphNameIndexFunc
+
+ * src/base/ftapi.c: New file. It contains backwards compatibility
+ functions.
+
+ * include/freetype/internal/psaux.h, src/cid/cidload.c,
+ src/cidtoken.h, src/psaux/psobjs.c, src/psaux/psobjs.h,
+ src/psaux/t1decode.c, stc/type1/t1load.c, src/type1/t1tokens.h:
+ Updated common PostScript type definitions.
+ Renamed all enumeration values like to uppercase variants:
+
+ t1_token_any => T1_TOKEN_TYPE_ANY
+ t1_field_cid_info => T1_FIELD_LOCATION_CID_INFO
+ etc.
+
+ * include/freetype/internal/psglobals.h: Removed.
+ * include/freetype/internal/pshints.h, src/pshinter/pshglob.h:
+ Updated.
+
+ * include/freetype/internal/tttypes.h,
+ include/freetype/internal/sfnt.h, src/base/ftnames.c,
+ src/cff/cffdrivr.c, src/sfnt/*.c, src/truetype/*.c: Updated
+ SFNT/TrueType type definitions.
+
+ * include/freetype/freetype.h, include/freetype/internal/ftgloadr.h:
+ Updating type definitions for the glyph loader.
+
+2002-03-13 Antoine Leca <antoine@oriolnet.com>
+
+ * include/freetype/config/ftoption.h: Changed the automatic
+ detection of Microsoft C compilers to automatically support 64-bit
+ integers only since revision 9.00 (i.e. >= Visual C++ 2.0).
+
+2002-03-08 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftutil.c (FT_Realloc): Use MEM_Set instead of memset.
+
+2002-03-07 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new,
+ ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free,
+ ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug,
+ 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,
+ CFF_GlyphSlot_Init): Ditto.
+ * src/cid/cidobjs.c (CID_GlyphSlot_Init,
+ CID_Size_Get_Globals_Funcs): Ditto.
+ * src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init):
+ Ditto.
+ * src/pshinter/pshmod.c (pshinter_interface): Use `static const'.
+ * src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused
+ variables.
+
+ * include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed
+ to...
+ (T1_Builder_FuncsRec): This.
+ (T1_Builder_Funcs): New typedef.
+ (PSAux_Interface): Remove compiler warnings.
+ * src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h
+ (t1_builder_funcs): Updated.
+
+ * src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ...
+ (PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines.
+ (PSH_AlignmentRec): Updated.
+
+ * include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix
+ typo.
+ * include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto.
+ * src/base/ftstream (FT_Get_Char): Rename to...
+ (FT_Stream_Get_Char): This.
+
+ * src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is
+ a built-in function in gcc, causing warning messages with gcc 3.0.
+ * src/autohint/ahglyph.c (ah_outline_load): Ditto.
+ * src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto.
+ * src/cache/ftcmanag.c (ftc_family_table_alloc,
+ ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache):
+ Ditto.
+ * src/cff/cffload.c (cff_new_index, cff_done_index,
+ cff_explicit_index, CFF_Access_Element, CFF_Forget_Element,
+ CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font,
+ CFF_Done_Font): Ditto.
+ * src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto.
+ * src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
+ * src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit,
+ ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3,
+ * src/pshinter/pshalgo1.c (psh1_hint_table_record,
+ psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto.
+ * src/pshinter/pshalgo2.c (psh2_hint_table_record,
+ psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto.
+ * src/sfnt/ttpost.c (Load_Format_20, Load_Format_25,
+ TT_Get_PS_Name): Ditto.
+ * src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics,
+ load_truetype_glyph): Ditto.
+ * src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto.
+ * src/type1/t1afm.c (T1_Get_Kerning): Ditto.
+ * include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto.
+
+2002-03-06 David Turner <david@freetype.org>
+
+ * src/type1/t1objs.c (T1_Face_Init), src/cid/cidobjs.c
+ (CID_Face_Init): Fixed another bug related to the
+ ascender/descender/text height of Postscript fonts.
+
+ * src/pshinter/pshalgo2.c (print_zone): Renamed to ...
+ (psh2_print_zone): This.
+ * src/pshinter/pshalgo1.c (print_zone): Renamed to ...
+ (psh1_print_zone): This.
+
+ * include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
+ src/base/ftobjs.c: Adding the new FT_Library_Version API to return
+ the library's current version in dynamic links.
+ * src/base/ftinit.c (FT_Init_FreeType): Updated.
+
+2002-03-06 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshglob.h (PSH_DimensionRec): s/std/stdw/.
+ * src/pshinter/pshglob.c (psh_global_scale_widths,
+ psh_dimension_snap_width, psh_globals_destroy, psh_globals_new):
+ Ditto.
+
+2002-03-05 David Turner <david@freetype.org>
+
+ * src/type1/t1objs.c (T1_Face_Init), src/cff/cffobjs.c
+ (CFF_Face_Init), src/cid/cidobjs.c (CID_Face_Init): Removing the bug
+ that returned global BBox values in 16.16 fixed format (instead of
+ integer font units).
+
+ * src/cid/cidriver.c (cid_get_postscript_name): Fixed a bug that
+ caused the CID driver to return Postscript font names with a leading
+ slash (`/') as in `/MOEKai-Regular'.
+
+ * src/sfnt/ttload.c (TT_Load_Names), src/sfnt/sfobjs.c (Get_Name),
+ src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fixed the loader so
+ that it accepts broken fonts like `foxjump.ttf', which made FreeType
+ crash when trying to load them.
+
+ Also improved the name table parser to be able to load
+ Windows-encoded entries before Macintosh or Unicode ones, since it
+ seems some fonts don't have reliable values here anyway.
+
+ * include/freetype/internal/psnames.h: Add typedef for
+ `PSNames_Service'.
+
+2002-03-05 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/aclocal.m4, builds/unix/ltmain.sh: Update to libtool
+ 1.4.2.
+ Apply a small patch for AIX to make shared libraries work (this
+ patch is already in the CVS version of libtool).
+
+ * builds/unix/config.sub, builds/unix/config.guess: Updated to
+ recent versions.
+
+ * builds/unix/configure.ac: Fix typo
+ (AC_CONFIG_FILE->AC_CONFIG_FILES).
+
+ * builds/unix/configure: Regenerated.
+
+2002-02-28 David Turner <david@freetype.org>
+
+ * include/freetype/ftconfig.h: Changed `FT_LOCAL xxxx' to
+ `FT_LOCAL( xxxx )' everywhere in the source. The same goes for
+ `FT_LOCAL_DEF xxxx' which is translated to `FT_LOCAL_DEF( xxxxx )'.
+
+ * include/freetype/freetype.h (FREETYPE_MINOR, FREETYPE_PATCH):
+ Changing version to 2.1.0 to indicate an unstable branch.
+ Added the declarations of FT_Get_First_Char and FT_Get_Next_Char.
+
+ * src/base/ftobjs.c: Implement FT_Get_First_Char and
+ FT_Get_Next_Char.
+
+ * include/freetype/t1tables.h: Renaming structure types. This
+
+ typedef T1_Struct_
+ {
+ } T1_Struct;
+
+ becomes
+
+ typedef PS_StructRec_
+ {
+ } PS_StructRec, *PS_Struct;
+
+ typedef PS_StructRec T1_Struct; /* backwards-compatibility */
+
+ Hence, we increase the coherency of the source code by effectively
+ using the `Rec' prefix for structure types.
+
+2002-02-27 David Turner <david@freetype.org>
+
+ * src/sfnt/ttload.c (TT_Load_Names): Simplifying and securing the
+ names table loader. Invalid individual name entries are now handled
+ correctly. This allows the loading of very buggy fonts like
+ `foxjump.ttf' without allocating tons of memory and causing crashes.
+
+ * src/otlayout/otlcommon.h, src/otlayout/otlcommon.c: Adding (still
+ experimental) code for OpenType Layout tables validation and
+ parsing.
+
+ * src/type1/t1cmap.h, src/type1/t1cmap.c: Adding (still
+ experimental) code for Type 1 charmap processing.
+
+ * src/sfnt/ttcmap0.c: New file. It contains a new, still
+ experimental SFNT charmap processing support.
+
+ * include/freetype/internal/ftobjs.h: Adding validation support as
+ well as internal charmap object definitions (FT_CMap != FT_CharMap).
+
+2002-02-24 David Turner <david@freetype.org>
+
+ * Renaming stream functions to the FT_<Subject>_<Action> scheme:
+
+ FT_Seek_Stream => FT_Stream_Seek
+ FT_Skip_Stream => FT_Stream_Skip
+ FT_Read_Stream => FT_Stream_Read
+ FT_Read_Stream_At => FT_Stream_Read_At
+ FT_Access_Frame => FT_Stream_Enter_Frame
+ FT_Forget_Frame => FT_Stream_Exit_Frame
+ FT_Extract_Frame => FT_Stream_Extract_Frame
+ FT_Release_Frame => FT_Stream_Release_Frame
+ FT_Get_XXXX => FT_Stream_Get_XXXX
+ FT_Read_XXXX => FT_Stream_Read_XXXX
+
+ FT_New_Stream( filename, stream ) =>
+ FT_Stream_Open( stream, filename )
+
+ (The function doesn't create the FT_Stream structure, it simply
+ initializes it for reading.)
+
+ FT_New_Memory_Stream( library, FT_Byte* base, size, stream ) =>
+ FT_Stream_Open_Memory( stream, const FT_Byte* base, size )
+
+ FT_Done_Stream => FT_Stream_Close
+ FT_Stream_IO => FT_Stream_IOFunc
+ FT_Stream_Close => FT_Stream_CloseFunc
+
+ ft_close_stream => ft_ansi_stream_close (in base/ftsystem.c only)
+ ft_io_stream => ft_ansi_stream_io (in base/ftsystem.c only)
+
+ * src/base/ftutil.c: New file. Contains all memory and list
+ management code (previously in `ftobjs.c' and `ftlist.c',
+ respectively).
+
+ * include/freetype/internal/ftobjs.h: Moving all code related to
+ glyph loaders to ...
+ * include/freetype/internal/ftgloadr.h: This new file.
+ `FT_GlyphLoader' is now a pointer to the structure
+ `FT_GlyphLoaderRec'.
+ (ft_glyph_own_bitmap): Renamed to ...
+ (FT_GLYPH_OWN_BITMAP): This.
+ * src/base/ftobjs.c: Moving all code related to glyph loaders
+ to ...
+ * src/base/ftgloadr.c: This new file.
+
+2002-02-22 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftdebug.h (FT_Trace): Remove comma in
+ enum to avoid compiler warnings.
+
+2002-02-21 David Turner <david@freetype.org>
+
+ Modified the debug sub-system initialization. Trace levels can now
+ be specified within the `FT2_DEBUG' environment variable. See the
+ comments within `ftdebug.c' for more details.
+
+ * src/base/ftdebug.c: (FT_SetTraceLevel): Removed.
+ (ft_debug_init): New function.
+ (ft_debug_dummy): Removed.
+ Updated to changes in ftdebug.h
+
+ * include/freetype/internal/ftdebug.h: Always define
+ FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE is defined.
+ (FT_Assert): Renamed to ...
+ (FT_ASSERT): This.
+ Some stuff from ftdebug.h has been moved to ...
+
+ * include/freetype/internal/fttrace.h: New file, to define the trace
+ levels used for debugging. It is used both to define enums and
+ toggle names for FT2_DEBUG.
+
+ * include/freetype/internal/internal.h: Updated.
+
+ * src/base/ftobjs.c, src/base/ftstream.c: Updated.
+
+ * include/freetype/internal/ftextend.h, src/base/ftextend.c:
+ Removed. Both files are now completely obsolete.
+ * src/base/Jamfile, src/base/rules.mk: Updated.
+
+ * include/freetype/fterrors.h: Adding `#undef FT_ERR_CAT' and
+ `#undef FT_ERR_XCAT' to avoid warnings with certain compilers (like
+ LCC).
+
+ * src/pshinter/pshalgo2.c (print_zone): Renamed to ...
+ (psh2_print_zone): This to avoid errors during compilation of debug
+ library.
+
+ * src/smooth/ftgrays.c (FT_COMPONENT): Change definition to as
+ `trace_smooth'.
+
+2002-02-20 David Turner <david@freetype.org>
+
+ * README: Adding `devel@freetype.org' address for bug reports.
+
+2002-02-20 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/install.mk (check): New dummy target.
+ (.PHONY): Add it.
+
+2002-02-19 Werner Lemberg <wl@gnu.org>
+
+ * builds/freetype.mk (FT_CFLAGS): Use $(INCLUDE_FLAGS) first.
+
+ * src/cache/ftccache.c (ftc_cache_resize): Mark `error' as unused
+ to avoid compiler warning.
+ * src/cff/cffload.c (CFF_Get_String): Ditto.
+ * src/cff/cffobjs.c (CFF_StrCopy): Ditto.
+ * src/psaux/psobjs.c (PS_Table_Done): Ditto.
+ * 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
+ `orig_y'.
+ (t1operator_seac): Comment out more dead code.
+ * src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER'
+ conditional.
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Add `TT_CONFIG_OPTION_BYTECODE_INTERPRETER'
+ conditional.
+
+2002-02-18 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahglyph.c (ah_outline_link_segments): Remove unused
+ variables.
+ * src/autohint/ahhint.c (ah_align_serif_edge): Use FT_UNUSED instead
+ of UNUSED.
+ * src/autohint/ahmodule.c (ft_autohinter_reset): Ditto.
+ * src/pshinter/pshrec.c (ps_mask_table_merge): Fix typo in variable
+ swapping code.
+ * src/pshinter/pshglob.h (PSH_Blue_Align): Add PSH_BLUE_ALIGN_NONE.
+ * src/pshinter/pshglob.c (psh_blues_snap_stem): Use it.
+ * src/pshinter/pshalgo1.c (psh1_hint_table_optimize): Ditto.
+ * src/pshinter/pshalgo2.c (psh2_hint_align): Ditto.
+ * include/freetype/internal/ftobjs.h (UNUSED): Removed.
+
+2002-02-10 Roberto Alameda <ojancano@geekmail.de>
+
+ Add support for ISOLatin1 PS encoding.
+
+ * include/freetype/freetype.h (ft_encoding_latin_1): New tag
+ (`lat1').
+ * include/freetype/internal/t1types.h (T1_Encoding_Type): Add
+ `t1_encoding_isolatin1'.
+ * src/type1/t1driver.c (Get_Char_Index, Get_Next_Char): Handle
+ ft_encoding_latin_1.
+ * src/type1/t1load.c (parse_encoding): Handle `ISOLatin1Encoding'.
+ * src/type1/t1objs.c (T1_Face_Init): Handle `t1_encoding_isolatin1'.
+
+----------------------------------------------------------------------------
+
+Copyright 2002, 2003, 2004, 2005, 2007, 2008 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/3party/freetype/ChangeLog.22 b/3party/freetype/ChangeLog.22
new file mode 100644
index 0000000000..4144288a5b
--- /dev/null
+++ b/3party/freetype/ChangeLog.22
@@ -0,0 +1,2837 @@
+2006-05-12 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.2.1 released.
+ =========================
+
+
+ Tag sources with `VER-2-2-1'.
+
+2006-05-12 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/docmaker/sources.py (re_source_keywords): Add word
+ boundary markers.
+ * src/tools/docmaker/content.py (re_field): Allow `.' in field names
+ (but not at the beginning or end).
+ * src/tools/docmaker/tohtml.py (html_header_1): Use `utf-8' charset.
+ (block_footer): Split into...
+ (block_footer_start, block_footer_middle, block_footer_end): This to
+ add navigation buttons.
+ (HtmlFormatter::block_exit): Updated.
+
+ * include/freetype/*: Many minor documentation improvements (adding
+ links, spelling errors, etc.).
+
+2006-05-11 Werner Lemberg <wl@gnu.org>
+
+ * README: Minor updates.
+
+ * include/freetype/*: s/scale/scaling value/ where appropriate.
+ Many other minor documentation improvements.
+
+ * src/tools/docmaker/sources.py (re_italic, re_bold): Handle
+ trailing punctuation.
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word): Add
+ warning message for undefined cross references.
+ Update handling of re_italic and re_bold.
+
+2006-05-11 Masatake YAMATO <jet@gyve.org>
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Check errno only if
+ read system call returns -1.
+ Remove a redundant parenthesis.
+
+2006-05-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Avoid infinite loop if
+ given an empty, un-mmap()able file. Reported and suggested fix in
+ Savannah bug #16555.
+
+ * builds/freetype.mk (refdoc): Write-protect the `docmaker'
+ directory to suppress generation of .pyc files. According to the
+ Python docs there isn't a more elegant solution (currently).
+
+ * builds/toplevel.mk (dist): New target which builds .tar.gz,
+ .tar.bz2, and .zip files. Note that the version number is still
+ hard-coded.
+ (do-dist): Sub-target of `dist'.
+ (CONFIG_GUESS, CONFIG_SUB): New variables.
+ (.PHONY): Updated.
+
+2006-05-09 Rajeev Pahuja <rpahuja@esri.com>
+
+ * builds/win32/visualc/freetype.sln,
+ builds/win32/visualc/freetype.vcproj: Upgraded to VS.NET 2005 from
+ VS.NET 2003
+ Added files ftbbox.c, fttype1.c, ftwinfnt.c, ftsynth.c.
+
+ * builds/win32/visualc/index.html: Updated.
+
+2006-05-07 Werner Lemberg <wl@gnu.org>
+
+ Put version information into the configure script. Reported by Paul
+ Watson <pwatson@redlinepy.com>.
+
+ * builds/unix/configure.ac: Renamed to...
+ * builds/unix/configure.raw: This which now serves (with appropriate
+ modifications) as a template for configure.ac.
+
+ * version.sed: New script.
+
+ * autogen.sh: Generate configure.ac from configure.raw, using
+ FREETYPE_MAJOR, FREETYPE_MINOR, and FREETYPE_PATCH from freetype.h.
+
+2006-05-06 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
+
+ * builds/unix/configure.ac (version_info): Set to 9:10:3.
+
+ * builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj, builds/freetype.mk (refdoc),
+ Jamfile (RefDoc), README: s/220/221/, s/2.2.0/2.2.1/.
+ Minor updates.
+
+ * docs/CHANGES, docs/VERSION.DLL, docs/PROBLEMS, README.CVS:
+ Updated.
+
+ * builds/unix/install-sh: Updated from `texinfo' CVS module at
+ savannah.gnu.org.
+
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
+2006-05-04 Werner Lemberg <wl@gnu.org>
+
+ * src/lzw/ftlzw2.c: Renamed to...
+ * src/lzw/ftlzw.c: This.
+
+ * src/lzw/Jamfile, src/lzw/rules.mk: Updated.
+
+ * 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: Updated.
+
+2006-05-03 David Turner <david@freetype.org>
+
+ Allow compilation again with C++ compilers.
+
+ * include/freetype/internal/ftmemory.h (FT_ASSIGNP,
+ FT_ASSIGNP_INNER): New macros which do the actual assignment, and
+ which exist in two variants (for C and C++).
+ Update callers accordingly.
+
+2006-05-03 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftoption.h (FT_STRICT_ALIASING): Removed.
+
+2006-05-02 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftmemory.h: s/new/newsz/ (for C++).
+ (FT_ALLOC): Remove redundant redefinition.
+
+ * builds/compiler/gcc-dev.mk (CFLAGS) [g++]: Don't use
+ `-Wstrict-prototypes'.
+
+ * src/base/ftstream.c (FT_Stream_EnterFrame): Add cast.
+
+ * include/freetype/config/ftconfig.h (FT_BASE_DEF) [__cplusplus]:
+ Remove `extern'.
+
+2006-05-02 David Turner <david@freetype.org>
+
+ Update the memory management functions and macros to safely deal
+ with array size buffer overflows. This corresponds to attempts to
+ allocate arrays that are too large. For an example, consider the
+ following code:
+
+ count = read_uint32_from_file(); array = malloc( sizeof ( Item ) *
+ count ); for ( nn = 0; nn < count; nn++ )
+ array[nn] = read_item_from_file();
+
+ If `count' is larger than `FT_UINT_MAX/sizeof(Item)', the
+ multiplication overflows, and the array allocated os smaller than
+ the data read from the file. In this case, the heap will be
+ trashed, and this can be used as a denial-of-service attack, or make
+ the engine crash later.
+
+ The FT_ARRAY_NEW and FT_ARRAY_RENEW macros now ensure that the new
+ count is no larger than `FT_INT_MAX/item_size', otherwise a new
+ error code `FT_Err_Array_Too_Large' will be returned.
+
+ Note that the memory debugger now works again when FT_DEBUG_MEMORY
+ is defined. FT_STRICT_ALIASING has disappeared; the corresponding
+ code is now the default.
+
+
+ * include/freetype/config/ftconfig.h (FT_BASE_DEF) [!__cplusplus]:
+ Don't use `extern'.
+
+ * include/freetype/fterrdef.h (FT_Err_Array_Too_Large): New error
+ code.
+
+ * include/freetype/internal/ftmemory.h (FT_DEBUG_INNER)
+ [FT_DEBUG_MEMORY]: New macro.
+ (ft_mem_realloc, ft_mem_qrealloc): Pass new object size count also.
+ (ft_mem_alloc_debug, ft_mem_qalloc_debug, ft_mem_realloc_debug,
+ ft_mem_qrealloc_debug, ft_mem_free_debug): Removed.
+ (FT_MEM_ALLOC, FT_MEM_REALLOC, FT_MEM_QALLOC, FT_MEM_QREALLOC,
+ FT_MEM_FREE): Redefine.
+ (FT_MEM_NEW_ARRAY, FT_MEM_RENEW_ARRAY, FT_MEM_QNEW_ARRAY,
+ FT_MEM_QRENEW_ARRAY): Redefine.
+ (FT_ALLOC_MULT, FT_REALLOC_MULT, FT_MEM_QALLOC_MULT,
+ FT_MEM_QREALLOC_MULT): New macros. Update callers where
+ appropriate.
+ (FT_MEM_SET_ERROR): Slightly redefine.
+
+
+ * 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
+ `line_no'. Update all callers.
+ (ft_mem_debug_alloc) [FT_DEBUG_MEMORY]: Avoid possible integer
+ overflow.
+ (ft_mem_alloc_debug, ft_mem_realloc_debug, ft_mem_qalloc_debug,
+ ft_mem_qrealloc_debug, ft_mem_free_debug): Removed.
+
+ * src/base/ftmac.c (read_lwfn): Catch integer overflow.
+ * src/base/ftrfork.c (raccess_guess_darwin_hfsplus): Ditto.
+ * src/base/ftutil.c: Remove special code for FT_STRICT_ALIASING.
+ (ft_mem_alloc, ft_mem_realloc, ft_mem_qrealloc): Rewrite.
+
+
+ * include/freetype/ftstream.h (FT_FRAME_ENTER, FT_FRAME_EXIT,
+ FT_FRAME_EXTRACT, FT_FRAME_RELEASE): Use FT_DEBUG_INNER to report the
+ place where the frames were entered, extracted, exited or released
+ in the memory debugger.
+
+ * src/base/ftstream.c (FT_Stream_ReleaseFrame) [FT_DEBUG_MEMORY]:
+ Call ft_mem_free.
+ (FT_Stream_EnterFrame) [FT_DEBUG_MEMORY]: Use ft_mem_qalloc.
+ (FT_Stream_ExitFrame) [FT_DEBUG_MEMORY]: Use ft_mem_free.
+
+2006-04-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Correct pfb_pos
+ initialization, remove extra cast to copy to pfb_lenpos. This fixes
+ parsing of PFB fonts with MacOS resource fork (bug introduced
+ 2003-09-11). Patch provided by Huib-Jan Imbens <ft@imbens.nl>.
+
+2006-04-29 Werner Lemberg <wl@gnu.org>
+
+ Further C library abstraction. Based on a patch from
+ msn2@bidyut.com.
+
+ * include/freetype/config/ftstdlib.h (FT_CHAR_BIT, FT_FILE,
+ ft_fopen, ft_fclose, ft_fseek, ft_ftell, ft_fread, ft_smalloc,
+ ft_scalloc, ft_srealloc, ft_sfree, ft_labs): New wrapper macros for
+ C library functions. Update all users accordingly (and catch some
+ other places where the C library function was used instead of the
+ wrapper functions).
+
+ * src/base/ftsystem.c: Don't include stdio.h and stdlib.h.
+ * src/gzip/zutil.h [MSDOS && !(__TURBOC__ || __BORLANDC__)]: Don't
+ include malloc.h.
+
+
+ * builds/unix/unix-def.in (datarootdir): Define, for autoconf 2.59c
+ and forthcoming versions.
+
+2006-04-28 Werner Lemberg <wl@gnu.org>
+
+ * src/lzw/ftlzw.c, src/lzw/zopen.c, src/lzw/zopen.h: Removed,
+ obsolete.
+
+2006-04-27 yi luo <luoyi.ly@gmail.com>
+
+ * builds/win32/visualc/freetype.vcproj: Updated.
+
+2006-04-26 David Turner <david@freetype.org>
+
+
+ * Version 2.2 released.
+ =======================
+
+
+ Tag sources with `VER-2-2-0'.
+
+2006-04-26 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psobjs.c (shift_elements): Don't use FT_Long but
+ FT_PtrDiff for `delta'. Reported by Céline PILLET
+ <Celine.Pillet@Tagginfo.com>.
+
+2006-04-21 David Turner <david@freetype.org>
+
+ * include/freetype/ftincrem.h: Documentation updates.
+ (FT_Incremental_Interface): New typedef.
+
+ * include/freetype/ftmodapi.h, include/freetype/ftglyph.h:
+ Documentation updates.
+
+ * include/freetype/freetype.h: Documentation update.
+ (FT_HAS_FAST_GLYPHS): Always set to 0.
+
+ * include/freetype/ftstroke.h, src/base/ftstroke.c (FT_Stroker_New):
+ Take an FT_Library argument instead of FT_Memory.
+
+ * src/sfnt/ttcmap.c: Remove compiler warnings (gcc-4.0.2).
+
+2006-04-13 David Turner <david@freetype.org>
+
+ * src/autofit/afloader.c (af_loader_init, af_loader_load_g): Remove
+ superfluous code in the auto-fitter's loader.
+
+2006-04-05 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/makefile, builds/amiga/makefile.os4,
+ builds/amiga/smakefile: Added FT2_BUILD_LIBRARY define.
+
+2006-04-03 luoyi <luoyi.ly@gmail.com>
+
+ * builds/compiler/intelc.mk (TE): New variable.
+ (ANSIFLAGS): Updated.
+
+2006-04-03 Werner Lemberg <wl@gnu.org>
+
+ * builds/exports.mk (clean_symbols_list, clean_apinames): Removed.
+ (CLEAN): Add $(EXPORTS_LIST) and $(APINAMES_EXE).
+ (.PHONY): Updated.
+
+ * configure.ac: Minor fixes to improve --help output.
+
+
+ * docs/PROBLEMS: New file.
+
+2006-04-01 David Turner <david@freetype.org>
+
+ * docs/CHANGES: Updated.
+
+ * include/freetype/ftcache.h, include/freetype/config/ftheader.h:
+ Update documentation comments.
+
+2006-04-01 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/install.mk (uninstall): Don't handle `cache'
+ directory which no longer exists.
+
+2006-03-29 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * src/psaux/psconv.c: Changed some variables which are expected to
+ hold negative values from `char' to `FT_Char' to allow building with
+ a compiler where `char' is unsigned by default.
+
+2006-03-27 David Turner <david@freetype.org>
+
+ * src/sfnt/ttkern.c (tt_face_get_kerning): Fix a serious bug that
+ causes some programs to go into an infinite loop when dealing with
+ fonts that don't have a properly sorted kerning sub-table.
+
+2006-03-26 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdflib.c (ERRMSG4): New macro.
+ (_bdf_parse_glyphs): Handle invalid BBX values.
+
+ * include/freetype/fterrdef.h (FT_Err_Bbx_Too_Big): New error
+ macro.
+
+2006-03-23 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+
+ * src/tools/docmaker/tohtml.py (html_header_2): Add horizontal
+ padding between table elements.
+ (html_header_1): The `DOCTYPE' comment must be in uppercase.
+ (make_html_para): Convert `...' quotations into real left and
+ right single quotes.
+ Use `para_header' and `para_footer'.
+
+ * src/tools/docmaker/sources.py (re_bold, re_italic): Accept "'"
+ also.
+
+2006-03-23 David Turner <david@freetype.org>
+
+ Add FT_Get_SubGlyph_Info API to retrieve subglyph data. Note that
+ we do not expose the FT_SubGlyphRec structure.
+
+ * include/freetype/internal/ftgloadr.h (FT_SUBGLYPH_FLAGS_*): Moved
+ to...
+ * include/freetype/freetype.h (FT_SUBGLYPH_FLAGS_*): Here.
+ (FT_Get_SybGlyph_Info): New declaration.
+
+ * src/base/ftobjs.c (FT_Get_SubGlyph_Info): New function.
+
+
+ * src/autofit/afloader.c (af_loader_load_g): Compute lsb_delta and
+ rsb_delta correctly in edge cases.
+
+2006-03-22 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c, (ftc_node_mru_up, FTC_Cache_Lookup)
+ [!FTC_INLINE]: Compile conditionally.
+ * src/cache/ftccache.h: Updated.
+
+ * src/cache/ftcglyph.c (FTC_GNode_Init, FTC_GNode_UnselectFamily,
+ FTC_GNode_Done, FTC_GNode_Compare, FTC_Family_Init, FTC_GCache_New):
+ s/FT_EXPORT/FT_LOCAL/.
+ (FTC_GCache_Init, FTC_GCache_Done): Commented out.
+ (FTC_GCache_Lookup) [!FTC_INLINE]: Compile conditionally.
+ s/FT_EXPORT/FT_LOCAL/.
+ * src/cache/ftcglyph.h: Updated.
+
+ * src/cache/ftcimage.c (FTC_INode_Free, FTC_INode_New):
+ s/FT_EXPORT/FT_LOCAL/.
+ (FTC_INode_Weight): Commented out.
+ * src/cache/ftcimage.h: Updated.
+
+ * src/cache/ftmanag.c (FTC_Manager_Compress,
+ FTC_Manager_RegisterCache, FTC_Manager_FlushN):
+ s/FT_EXPORT/FT_LOCAL/.
+ * src/cache/ftmanag.h: Updated.
+
+ * src/cache/ftcsbits.c (FTC_SNode_Free, FTC_SNode_New,
+ FTC_SNode_Compare): s/FT_EXPORT/FT_LOCAL/.
+ (FTC_SNode_Weight): Commented out.
+ * src/cache/ftcsbits.h: Updated.
+
+2006-03-22 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c, src/cache/ftccache.h (FTC_Node_Destroy):
+ Remove, unused.
+
+ * src/cache/ftccmap.h: Remove, unused.
+
+ * src/cache/rules.mk (CACHE_DRV_H): Remove ftccmap.h.
+
+2006-03-21 Zhe Su <james.su@gmail.com>
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Improve
+ algorithm.
+
+2006-03-21 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cfftypes.h (CFF_CharsetRec): Add `max_cid' member.
+
+ * src/cff/cffload.c (cff_charset_load): Set `charset->max_cid'.
+
+ * src/cff/cffgload.c (cff_slot_load): Change type of third parameter
+ to `FT_UInt'.
+ Check range of `glyph_index'.
+ * src/cff/cffgload.h: Updated.
+
+
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Handle invalid offset
+ correctly.
+
+
+ * builds/freetype.mk (refdoc), docs/CHANGES, Jamfile (RefDoc),
+ README: s/2.1.10/2.2/.
+
+2006-03-21 David Turner <david@freetype.org>
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale): Fix small bug
+ that crashes the auto-hinter (introduced by previous patch).
+
+2006-03-20 Werner Lemberg <wl@gnu.org>
+
+ * builds/freetype.mk (CACHE_DIR, CACHE_H): Remove.
+ (FREETYPE_H): Updated.
+
+ * src/cache/rules.mk (CACHE_H_DIR): Remove.
+ (CACHE_DRV_H): Updated.
+
+2006-03-20 David Turner <david@freetype.org>
+
+ * include/freetype/cache/ftccache.h,
+ include/freetype/cache/ftccmap.h, include/freetype/cache/ftcglyph.h
+ include/freetype/cache/ftcimage.h include/freetype/cache/ftcmanag.h
+ include/freetype/cache/ftcmru.h include/freetype/cache/ftcsbits.h:
+ Move to...
+
+ * src/cache/ftccache.h, src/cache/ftcglyph.h, src/cache/ftcimage.h,
+ src/cache/ftcsbits.h, src/cache/ftcmanag.h, src/cache/ftccmap.h,
+ src/cache/ftcmru.h: This new location.
+ Update declarations according to the changes in the corresponding
+ source files.
+
+ Note that these files are not used by FreeType clients; all public
+ APIs of the cache module have been already moved to
+ `include/freetype/ftcache.h', and all FT_CACHE_INTERNAL_XXXX_H
+ macros resolve to it.
+
+ Reason for the move is to allow modifications of the internals
+ without interferences with rogue clients. Note that there are no
+ known clients that access the cache internals at the moment.
+
+ * builds/unix/install.mk (install): Don't install headers from
+ $(CACHE_H).
+ Remove `freetype/cache' from the target directory.
+
+ * include/freetype/config/ftheader.h (FT_CACHE_MANAGER_H,
+ FT_CACHE_INTERNAL_MRU_H, FT_CACHE_INTERNAL_MANAGER_H,
+ FT_CACHE_INTERNAL_CACHE_H, FT_CACHE_INTERNAL_GLYPH_H,
+ FT_CACHE_INTERNAL_IMAGE_H, FT_CACHE_INTERNAL_SBITS_H): Point to
+ FT_CACHE_H.
+
+ * src/cache/ftcbasic.c, src/cache/ftccache.h, src/cache/ftccback.h,
+ src/cache/ftccmap.c, 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.h, src/cache/ftcsbits.c,
+ src/cache/ftcsbits.h: Don't use the FT_CACHE_INTERNAL_XXX_H macros
+ but include the headers directly (which are now in `src/cache').
+
+ * src/cache/ftccache.c: Don't use the FT_CACHE_INTERNAL_XXX_H
+ macros but include the headers directly.
+ (FTC_Cache_Init, FTC_Cache_Done, FTC_Cache_NewNode,
+ FTC_Cache_Lookup, FTC_Cache_RemoveFaceID): Declare as FT_LOCAL_DEF.
+
+ * src/cache/ftccache.c: Don't use the FT_CACHE_INTERNAL_XXX_H
+ macros but include the headers directly.
+ (FTC_MruNode_Prepend, FTC_MruNode_Up, FTC_MruNode_Remove,
+ 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
+ conditionally.
+ Declare as FT_LOCAL_DEF.
+
+
+ * builds/win32/visualc/freetype.dsp: Update project file, add
+ missing base source files (ftstroke.c, ftxf86.c, etc.).
+
+
+ * src/autofit/afcjk.c, src/autofit/aflatin.c, src/base/ftobjs.c,
+ src/cff/cffobjs.c, src/cid/cidobjs.c, src/pfr/pfrobjs.c,
+ src/sfnt/sfobjs.c, src/sfnt/ttmtx.c, src/type1/t1afm.c,
+ src/type1/t1objs.c: Remove compiler warnings when building with
+ Visual C++ 6 and /W4.
+
+ * src/autofit/aflatin.c (af_latin_hints_init): Disable horizontal
+ hinting for italic/oblique fonts.
+
+
+
+ * src/truetype/ttpload.c, src/truetype/ttpload.h
+ (tt_face_get_device_metrics): Change second argument to `FT_UInt'.
+
+2006-03-06 David Turner <david@freetype.org>
+
+ * src/cache/ftcmanag.c (FTC_Manager_Lookup_Size): Prevent crashes in
+ Mozilla/FireFox print preview in Ubuntu Hoary.
+
+2006-02-28 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftutil.c (ft_mem_qalloc) [FT_STRICT_ALIASING]: Do not
+ return error when size == 0.
+
+2006-02-28 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftobjs.c (FT_Done_Library): Remove modules in reverse
+ order so that type42 module is removed before truetype module. This
+ avoids double free in some occasions.
+
+2006-02-28 David Turner <david@freetype.org>
+
+ * Release candidate VER-2-2-0-RC4.
+ ----------------------------------
+
+ * docs/CHANGES: Documentation updates.
+
+2006-02-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * modules.cfg (BASE_EXTENSIONS): Compile in ftgxval.c by default to
+ build ftvalid in ft2demos. It works as dummy ABI if gxvalid is not
+ built.
+
+2006-02-27 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/cache/ftccache.h
+ [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove declaration of
+ ftc_node_done.
+
+ * src/cache/ftccache.c (ftc_node_destroy)
+ [!FT_CONFIG_OPTION_OLD_INTERNALS]: Mark as FT_LOCAL_DEF. This
+ should now fix all possible compilation options.
+
+2006-02-27 David Turner <david@freetype.org>
+
+ * src/base/ftutil.c (ft_mem_alloc, ft_mem_qalloc, ft_mem_realloc,
+ ft_mem_qrealloc): Return an error if a negative size is passed in
+ parameters.
+
+ * src/cache/ftccache.c (ftc_node_destroy): Mark as FT_BASE_DEF since
+ it needs to be exported for rogue clients.
+
+ * src/pshinter/pshglob.c (psh_blues_set_zones_0): Prevent problems
+ with malformed fonts which have an odd number of blue values (these
+ are broken according to the specs).
+
+ * src/cff/cffload.c (cff_subfont_load), src/type1/t1load.c
+ (T1_Open_Face): Modify the loaders to force even-ness of
+ `num_blue_values'.
+
+ (cff_index_access_element): Ignore invalid entries in index files.
+
+2006-02-27 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Check the case where width
+ or height is 0.
+
+2006-02-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * 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: Update to new header
+ inclusion introduced on 2006-02-16.
+
+2006-02-27 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftobjs.c (GRID_FIT_METRICS): New macro.
+ (ft_glyphslot_grid_fit_metrics, FT_Load_Glyph) [GRID_FIT_METRICS]:
+ Re-enable glyph metrics grid-fitting. It is now done in the base
+ layer.
+ (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Make sure the width and
+ height are not too small or too large, just like we were doing in
+ 2.1.10.
+
+ * src/autofit/afloader.c (af_loader_load_g): The vertical metrics
+ are not scaled.
+
+2006-02-26 Werner Lemberg <wl@gnu.org>
+
+ * docs/release: Minor additions and clarifications.
+
+ * docs/CHANGES: Updated to reflect many fixes for backwards
+ compatibility. Still incomplete.
+
+2006-02-26 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (ft_recompute_scaled_metrics): Re-enable
+ conservative rounding of metrics to avoid breaking clients like
+ Pango (see http://bugzilla.gnome.org/show_bug.cgi?id=327852).
+
+2006-02-25 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
+ * src/cache/ftccache.c (ftc_node_destroy): Use FT_LOCAL_DEF (again).
+
+2006-02-25 David Turner <david@freetype.org>
+
+ Fix compiler warnings as well as C++ compilation problems.
+ Add missing prototypes.
+
+ * src/autofit/afcjk.c, src/base/ftobjs.c, src/base/ftutil.c,
+ src/bdf/bdfdrivr.c, src/cff/cffcmap.c, src/cff/cffobjs.c,
+ src/psaux/afmparse.c,, src/psaux/t1cmap.c, src/smooth/ftgrays.c
+ src/tools/apinames.c, src/truetype/ttdriver.c: Add various casts,
+ initialize variables, and decorate functions with FT_CALLBACK_DEF,
+ etc., to fix compiler warnings (and C++ compiling errors).
+
+ * src/cache/ftcbasic.c: Fix `-Wmissing-prototypes' warnings with
+ gcc.
+
+ * builds/unix/ftsystem.c: Don't include FT_INTERNAL_OBJECTS_H but
+ FT_INTERNAL_STREAM_H.
+
+ * src/base/ftsystem.c: Include FT_INTERNAL_STREAM_H.
+
+ * include/freetype/config/ftheader.h (FT_PFR_H): New macro.
+
+ * include/freetype/config/ftoption.h (FT_STRICT_ALIASING): Don't
+ define for C++.
+
+ * include/freetype/internal/services/svotval.h: Don't include
+ FT_OPENTYPE_VALIDATE_H but FT_INTERNAL_VALIDATE_H.
+
+ * include/freetype/internal/services/svpfr.h: Include FT_PFR_H.
+
+ * src/gzip/ftgzip.c: Include FT_GZIP_H.
+
+ * src/lzw/ftlzw.c, src/lzw/ftlzw2.c: Include FT_LZW_H.
+
+ * src/sfnt/ttbdf.c (tt_face_load_bdf_props): Rearrange code.
+
+2006-02-24 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftoutln.c (FT_OUTLINE_GET_CONTOUR, ft_contour_has,
+ ft_contour_enclosed, ft_outline_get_orientation): Commented out. We
+ have to wait until `FT_GlyphSlot_Own_Bitmap' is stabilized.
+ (FT_Outline_Embolden): Use `FT_Outline_Get_Orientation'.
+
+2006-02-24 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Update
+ documentation.
+
+ * include/freetype/ftsynth.h (FT_GlyphSlot_Own_Bitmap),
+ src/base/ftsynth.c (FT_GlyphSlot_Own_Bitmap): New function to make
+ sure a glyph slot owns its bitmap. It is also marked experimental
+ and due to change.
+ (FT_GlyphSlot_Embolden): Undo the last change. It turns out that
+ rendering the outline confuses some applications.
+
+2006-02-24 David Turner <david@freetype.org>
+
+ * Release candidate VER-2-2-0-RC3.
+ ----------------------------------
+
+ * src/cache/ftcbasic.c: Correct compatibility hack bug.
+
+2006-02-24 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/freetype.h (FT_Size_RequestRec): Change the type
+ of `width' and `height' to `FT_Long'.
+ (enum FT_Size_Request_Type), src/base/ftobjs.c (FT_Request_Metrics):
+ New request type `FT_SIZE_REQUEST_TYPE_SCALES' to specify the scales
+ directly.
+
+2006-02-23 David Turner <david@freetype.org>
+
+ Two BDF patches from Debian libfreetype6 for 2.1.10.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a bug with zero-width
+ glyphs.
+ Fix a problem with large encodings.
+
+
+ Fix binary compatibility issues for gnustep-back (GNUstep backend
+ module) which still crashes under Sarge.
+
+ * src/cache/ftccmap.c (FTC_OldCMapType, FTC_OldCMapIdRec,
+ FTC_OldCMapDesc) [FT_CONFIG_OPTION_OLD_INTERNALS]: New data
+ structures and enumerations.
+ (FTC_CMapCache_Lookup) [FT_CONFIG_OPTION_OLD_INTERNALS]: New
+ compatibility code.
+
+ * src/cache/ftcbasic.c: Fix a silly bug that prevented our `hack' to
+ support rogue clients compiled against 2.1.7 to work correctly.
+ This probably explains the GNUstep crashes with the second release
+ candidate.
+
+2006-02-23 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/ftoutln.h (enum FT_Orientation): New value
+ `FT_ORIENTATION_NONE'.
+
+ * src/base/ftoutln.c (FT_OUTLINE_GET_CONTOUR, ft_contour_has,
+ ft_contour_enclosed, ft_outline_get_orientation): Another version of
+ `FT_Outline_Get_Orientation'. This version differs from the public
+ one in that each part (contour not enclosed in another contour) of the
+ outline is checked for orientation.
+ (FT_Outline_Embolden): Use `ft_outline_get_orientation'.
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Render the outline and
+ use bitmap's embolden routine when the outline one failed.
+
+2006-02-22 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * modules.cfg: Compile in ftotval.c and ftxf86.c by default for ABI
+ compatibility.
+
+ * src/sfnt/sfobjs.c (sfnt_done_face): Fix a memory leak.
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_bit_aligned,
+ tt_sbit_decoder_load_byte_aligned) [FT_OPTIMIZE_MEMORY]: Fix sbit
+ loading. (Only tested with bit aligned sbit with x_pos == 0.)
+
+ * src/truetype/ttpload.c (tt_face_load_hdmx,
+ tt_face_get_device_metrics) [FT_OPTIMIZE_MEMORY]: `hdmx' is not
+ actually used.
+
+2006-02-21 David Turner <david@freetype.org>
+
+ Add a new API named FT_Get_TrueType_Engine_Type to determine whether
+ we have a patented, unpatented, or unimplemented TrueType bytecode
+ interpreter.
+
+ The FT_Get_Module_Flags API was removed consequently.
+
+ * include/freetype/ftmodapi.h (FT_Module_Get_Flags): Removed.
+ Replaced with...
+ (FT_Get_TrueType_Engine_Type): This.
+ (FT_TrueTypeEngineType): New enumeration.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_TRUETYPE_ENGINE_H):
+ New macro.
+
+ * src/base/ftobjs.c: Include FT_SERVICE_TRUETYPE_ENGINE_H.
+ (FT_Module_Get_Flags): Removed. Replaced with...
+ (FT_Get_TrueType_Engine_Type): This.
+
+ * src/truetype/ttdriver.c: Include FT_SERVICE_TRUETYPE_ENGINE_H.
+ (tt_service_truetype_engine): New service structure.
+ (tt_services): Register it.
+
+ * include/freetype/internal/services/svtteng.h: New file.
+
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Fix silly bug that prevented
+ embedded bitmaps from being correctly listed and used.
+
+
+ * src/sfnt/ttmtx.c (tt_face_load_hmtx): Disable memory optimization
+ if FT_CONFIG_OPTION_OLD_INTERNALS is used. The is necessary because
+ libXfont is directly accessing the HMTX data, unfortunately.
+ Fix some compiler warnings.
+ (tt_face_get_metrics): Ditto.
+
+
+ * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Fix handling of
+ character advances.
+
+2006-02-20 David Turner <david@freetype.org>
+
+ Support binary compatibility with the X.Org server's Xfont library.
+ Note that this change unfortunately prevents memory optimizations
+ for the embedded bitmap loader.
+
+ * include/freetype/internal/sfnt.h (SFNT_Interface): Move
+ `set_sbit_strike' and `load_sbit_metrics' fields to the location of
+ version 2.1.8.
+
+ * src/sfnt/sfdriver.c (tt_face_set_sbit_strike_stub): Call
+ FT_Size_Request.
+ (sfnt_interface): Updated.
+
+ * src/sfnt/ttsbit.c [FT_CONFIG_OPTION_OLD_INTERNALS]: Don't load
+ ttsbit0.c.
+ (tt_load_sbit_metrics): Make `sbit_small_metrics_fields' static.
+
+ * src/sfnt/ttsbit.h: Updated.
+
+2006-02-17 David Turner <david@freetype.org>
+
+ * builds/unix/unix-cc.in (LINK_LIBRARY): Don't filter out exported
+ functions anymore. This ensures that all FT_BASE internal functions
+ are available for dynamic linking.
+
+ * 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_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
+ cache sub-system. We try to recognize old legacy signatures with a
+ gross hack (hope it works).
+
+2006-02-17 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
+2006-02-16 David Turner <david@freetype.org>
+
+ Massive changes to the internals to respect the internal object
+ layouts and exported functions of FreeType 2.1.7. Note that the
+ cache sub-system cannot be fully retrofitted, unfortunately.
+
+ * include/freetype/config/ftoption.h
+ (FT_CONFIG_OPTION_OLD_INTERNALS): New macro.
+
+ * include/freetype/ftcache.h, include/freetype/cache/ftccache.h,
+ include/freetype/cache/ftccmap.h,
+ include/freetype/internal/ftcalc.h,
+ include/freetype/internal/ftdriver.h,
+ include/freetype/internal/ftmemory.h,
+ include/freetype/internal/ftobjs.h,
+ include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
+ include/freetype/internal/t1types.h,
+ include/freetype/internal/tttypes.h, src/base/ftcalc.c,
+ src/base/ftdbgmem.c, src/base/ftobjs.c, src/base/ftutil.c,
+ src/bdf/bdfdrivr.c, src/cache/ftccache.c, src/cache/ftccback.h,
+ src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
+ src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
+ src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
+ src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
+ Use FT_CONFIG_OPTION_OLD_INTERNALS to revive old functions and data
+ structures.
+
+ Move newly added structure elements to the end of the affected
+ structure and add stub fields (if FT_CONFIG_OPTION_OLD_INTERNALS is
+ defined) to assure binary compatibility with older FreeType
+ versions.
+ Use FT_CONFIG_OPTION_OLD_INTERNALS to add function stubs for old
+ functions:
+
+ ft_stub_set_char_sizes
+ ft_stub_set_pixel_sizes
+
+ Rename the following internal functions to provide the old function
+ names as stubs:
+
+ FT_Alloc -> ft_mem_alloc
+ FT_QAlloc -> ft_mem_qalloc
+ FT_Realloc -> ft_mem_realloc
+ FT_QRealloc -> ft_mem_qrealloc
+ FT_Free -> ft_mem_free
+ FT_Alloc_Debug -> ft_mem_alloc_debug
+ FT_QAlloc_Debug -> ft_mem_qalloc_debug
+ FT_Realloc_Debug -> ft_mem_realloc_debug
+ FT_QRealloc_Debug -> ft_mem_qrealloc_debug
+ FT_Free_Debug -> ft_mem_free_debug
+
+2006-02-15 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
+ unused `max_points' and `max_contours'.
+
+ * src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c
+ (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Update.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
+ `max_components'.
+
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Remove unused
+ `loadSize' and `loadStack'.
+
+ * src/truetype/ttinterp.c (TT_Done_Context, TT_Load_Context),
+ src/sfnt/ttload.c (tt_face_load_maxp): Update.
+
+ * src/cff/cffobjs.h (cff_size_select), src/sfnt/sfdriver.c
+ (sfnt_interface), src/truetype/ttdriver.c (tt_size_request): Fix
+ compiler errors/warnings when TT_CONFIG_OPTION_EMBEDDED_BITMAPS is not
+ defined.
+
+ * src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics): Fix
+ possible segment faults for the non-FT_OPTIMIZE_MEMORY'ed versions.
+ (finally!)
+
+
+ For most OpenType tables, `tt_face_load_xxxx' simply loads the table
+ and `face->root' is set later in `sfnt_load_face'. Here, we try to
+ make this work for _all_ tables. Also improve tracing messages.
+
+ * src/sfnt/ttsbit.c, src/sfnt/ttsbit0.c, src/sfnt/ttload.c,
+ src/sfnt/ttmtx.c: all `tt_face_load_xxxx' should load the table and
+ then exit. Error handling or setting face->root is done later in
+ `sfnt_load_face'.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Work harder.
+ Mac bitmap-only fonts are not scalable.
+ Check that `face->header.Units_Per_EM' is not zero.
+ (LOAD_, LOADM_): Emit pretty trace messages.
+
+ * src/sfnt/ttsbit0.c (tt_face_load_strike_metrics): Read metrics
+ from `eblc'.
+
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps), src/sfnt/ttpost.c
+ (load_format_20, load_format_25, tt_face_get_ps_name): Use
+ face->max_profile.numGlyphs, instead of face->root.num_glyphs.
+
+2006-02-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftoutln.h (FT_Outline_Embolden): Mention in
+ documentation that negative strength values are possible.
+ Give an example call.
+
+ * include/freetype/freetype.h (FT_GlyphSlotRec): Improve
+ documentation of `outline' field.
+
+ * src/sfnt/sfobjc.s: Inckude FT_INTERNAL_DEBUG_H.
+ * src/sfnt/sfdriver.c: Include ttmtx.h.
+
+ * src/autofit/afcjk.c: Include aftypes.h and aflatin.h.
+
+2006-02-14 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/ttmtx.c (tt_face_get_metrics): Typo.
+
+2006-02-14 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/ttmtx.c (tt_face_load_hhea, tt_face_load_hmtx): Simply
+ return error if table is missing.
+ Check table length in non-FT_OPTIMIZE_MEMORY'ed `tt_face_load_hmtx'.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Take care of missing metrics
+ tables. The last change makes Mac bitmap-only font not load and
+ this fixes it.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation
+ error when FT_CONFIG_OPTION_INCREMENTAL is defined.
+
+2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ Clean up the SFNT_Interface. In this final pass, `load_hmtx' is
+ split from `load_hhea'.
+
+ * include/freetype/internal/sfnt.h, src/sfnt/sfdriver.c,
+ src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Split `hmtx' from `hhea'.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Update.
+
+2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/ttmtx.h, src/sfnt/ttmtx.c: Why are there two copies of
+ code...
+
+2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ Clean up the SFNT_Interface. In this pass, we want to treat the
+ font directory (offset table and table directory) as a normal table
+ like the others. This also means that TTCs are no longer recognized
+ there but in `init_face'.
+
+ * include/freetype/internal/sfnt.h (SFNT_Interface),
+ src/sfnt/sfdriver.c: `load_sfnt_header' and `load_directory' are
+ combined and renamed to `load_font_dir'.
+
+ * src/sfnt/ttload.h, src/sfnt/ttload.c:
+ s/sfnt_dir_check/check_table_dir/.
+ `sfnt_init' is moved to sfobjs.c and renamed to `sfnt_open_font'.
+ `tt_face_load_sfnt_header' and `tt_face_load_directory' are combined
+ and renamed to `tt_face_load_font_dir'.
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Recognize TTC here.
+
+2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ Clean up the SFNT_Interface. Table loading functions are now named
+ after the tables' tags; `hdmx' is TrueType-specific and thus the
+ code is moved to the truetype module; `get_metrics' is moved here
+ from the truetype module so that the code can be shared with the cff
+ module.
+
+ This pass involves no real changes. That is, the code is moved
+ verbatim mostly. The only exception is the return value of
+ `tt_face_get_metrics'.
+
+ * include/freetype/internal/sfnt.h, src/sfnt/rules.mk,
+ src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
+ src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c,
+ src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface.
+
+ * src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: New files. Metrics-related
+ tables' loading and parsing code is moved to here.
+ Move `tt_face_get_metrics' here from the truetype module. The
+ return value is changed from `void' to `FT_Error'.
+
+ * include/freetype/internal/fttrace.h: New trace: ttmtx.
+
+ * src/truetype/ttpload.c, src/truetype/ttpload.h: `hdmx' loading and
+ parsing code is moved here.
+ New function `tt_face_load_prep' split from `tt_face_load_fpgm'.
+ `tt_face_load_fpgm' returns `FT_Err_Ok' if `fpgm' doesn't exist.
+
+ * src/cff/cffgload.c, src/cff/cffobjs.c: Update.
+
+ * src/truetype/ttgload.c, src/truetype/ttobjs.c: Update.
+
+2006-02-11 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/autofit/afcjk.c (af_cjk_metrics_init): Fix a stupid bug...
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths): Use
+ AF_LatinMetricsRec as the dummy metrics because we cast the metrics
+ to it later in `af_latin_hints_link_segments'.
+
+2006-02-11 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_CJK): #define
+ to enable autofit CJK script support. (#define'd by default.)
+
+ * src/autofit/aflatin.h (AF_LATIN_CONSTANT): New macro.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths): Make sure
+ that `edge_distance_threshold' is always set.
+ (af_latin_hints_link_segments): Potential divide-by-zero bug.
+ Use latin constant in the scoring formula.
+
+ * src/autofit/afcjk.c: Minor updates due to the above three changes.
+
+ * docs/TODO, docs/CHANGES: Updated.
+
+2006-02-09 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ Introduce experimental autofit CJK module based on akito's autohint
+ patch. You need to #define AF_MOD_CJK in afcjk.c to enable it.
+
+ * src/autofit/afglobal.c, src/autofit/afcjk.h, src/autofit/afcjk.c,
+ src/autofit/rules.mk, src/autofit/autofit.c, src/autofit/aftypes.h:
+ Add CJK module based on akito's autohint patch.
+
+ * src/autofit/afhints.h (AF_SegmentRec): New field `len' for the
+ overlap length of the segments.
+ (AF_SEGMENT_LEN, AF_SEGMENT_DIST): New macros.
+
+ * src/autofit/aflatin.h (af_latin_metrics_init_widths),
+ src/autofit/aflatin.c (af_latin_metrics_init_widths): Made
+ `FT_LOCAL'.
+ Use the character given by the caller.
+ (af_latin_metrics_init_widths, af_latin_hints_link_segments): Scale
+ the thresholds.
+
+ * src/autofit/afloader.c (af_loader_load_g): Respect
+ AF_SCALER_FLAG_NO_ADVANCE.
+
+2006-02-09 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidparse.c (cid_parse_new): Remove shadowing variable.
+
+2006-02-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/cid/cidparse.c (cid_parse_new): Fix for abnormally short or
+ broken CIDFont. Reported by Taek Kwan(TK) Lee (see ft-devel
+ 2005-11-02).
+
+2006-02-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.ac: Fix bug for `--with-old-mac-fonts'
+ option on UNIX platform. It has been broken since 2006-01-11.
+
+2006-02-01 Werner Lemberg <wl@gnu.org>
+
+ * src/otvalid/module.mk: s/otvalid_module_class/otv_module_class/.
+ * src/gxvalid/module.mk: s/gxvalid_module_class/gxv_module_class/.
+
+ * builds/unix/unixddef.mk: Actually do define PLATFORM (fixing
+ change from 2006-01-31).
+ (TOP_DIR, OBJ_DIR): Update.
+
+ * builds/unix/install.mk (install): Fix path for ftmodule.h.
+
+ * Makefile, *.mk, builds/unix/unix-cc.in, builds/unix-def.in: Use
+ `?=' where appropriate.
+
+ * builds/detect.mk (TOP_DIR), builds/os2/os2-dev.mk (TOP_DIR),
+ builds/win32/w32-dev.mk (TOP_DIR): Removed. Defined elsewhere.
+
+2006-01-31 Werner Lemberg <wl@gnu.org>
+
+ Implement new, simplified module selection. With GNU make it is now
+ sufficient to modify a single file, `modules.cfg', to control the
+ inclusion of modules and base extension files.
+
+ This change also fixes the creation of ftmodule.h; it now depends on
+ `modules.cfg' and thus is rebuilt only if necessary.
+
+ Finally, a version of `ftoption.h' in OBJ_DIR is preferred over the
+ default location.
+
+ * modules.cfg: New file.
+
+ * builds/freetype.mk: Don't include `modules.mk'.
+ Include all `rules.mk' files as specified in `modules.cfg'.
+ (FTOPTION_FLAG, FTOPTION_H): New variables.
+ (FT_CFLAGS): Add macro definition for FT_CONFIG_MODULES_H.
+ Add FTOPTION_FLAG.
+ ($(FT_INIT_OBJ)): Don't use FT_MODULE_LIST.
+ (CONFIG_H): Add FTMODULE_H and FTOPTION_H.
+ (INCLUDES): Add DEVEL_DIR.
+ (INCLUDE_FLAGS, FTSYS_SRC, FTSYS_OBJ, FTDEBUG_SRC, FTDEBUG_OBJ,
+ OBJ_M, OBJ_S): Use `:=', not `='.
+ (remove_ftmodule_h): New phony target to delete `ftmodule.h'.
+ (distclean): Add remove_ftmodule_h.
+
+ * builds/modules.mk: (MODULE_LIST): Removed.
+ (make_module_list, clean_module_list): Replace targets
+ with...
+ (FTMODULE_H_INIT, FTMODULE_H_CREATE, FTMODULE_H_DONE): New
+ variables. Reason for the change is that it is not possible to have
+ a phony prerequisite which is run only if the target file must be
+ rebuilt (phony prerequisites act like subroutines and are *always*
+ executed). We only want to rebuild `ftmodule.h' if `module.cfg' is
+ changed.
+ Update all callers.
+ ($FTMODULE_H)): Rule to create `ftmodule.h', depending on
+ `modules.cfg'.
+
+ * builds/toplevel.mk: Rewrite and simplify module handling.
+ (MODULES_CFG, FTMODULE_H): New variables.
+ Include MODULES_CFG.
+ (MODULES): New variable to include all `module.mk' and `rules.mk'
+ files. We no longer use make's `wildcard' function for this.
+
+ * Makefile (USE_MODULES): Remove. Update all users.
+ (OBJ_DIR): Define it here.
+
+ * src/*/module.mk: Change
+
+ make_module_list: foo
+ foo: ...
+
+ to
+
+ FTMODULE_H_COMMANDS += FOO
+ define FOO
+ ...
+ endef
+
+ in all files. `FTMODULE_H_COMMANDS' is used in `FTMODULE_H_CREATE'.
+
+ * src/base/rules.mk (BASE_EXT_SRC): Use BASE_EXTENSIONS.
+
+ * builds/unix/detect.mk (setup): Always execute `configure' script.
+ (have_mk): Rename to...
+ (have_Makefile): This.
+ Don't use `strip' function.
+
+ * builds/unix/unix.mk: Include `install.mk' only if BUILD_PROJECT is
+ defined.
+ (have_mk): Don't use `strip' function.
+ Test for unix-def.mk in OBJ_DIR, not BUILD_DIR (and invert the test
+ accordingly).
+
+ * builds/unix/install.mk (install, uninstall): Handle `ftmodule.h'.
+
+ * builds/os2/os2-dev.mk, builds/unix/unix-dev.mk,
+ builds/win32/w32-bccd.mk, builds/win32/w32-dev.mk: Don't define
+ BUILD_DIR but DEVEL_DIR for development header files.
+
+ * builds/ansi/ansi-def.mk (TOP_DIR, OBJ_DIR),
+ builds/beos/beos-def.mk (TOP_DIR, OBJ_DIR), builds/unix/unix-def.in
+ (TOP_DIR, OBJ_DIR): Removed. Defined elsewhere.
+
+ * builds/dos/dos-def.mk (OBJ_DIR), builds/os2/os2-def.mk (OBJ_DIR),
+ builds/win32/win32-def.mk (OBJ_DIR): Removed. Defined elsewhere.
+
+ * builds/unix/unixddef.mk: Don't define BUILD_DIR but DEVEL_DIR for
+ development header files.
+ Don't define PLATFORM.
+
+ * configure: Copy `modules.cfg' to builddir if builddir != srcdir.
+ Update snippet taken from autoconf's m4sh.m4 to current CVS version.
+ Be more verbose.
+
+ * include/freetype/config/ftmodule.h: Add comments -- this file is
+ no longer used if FreeType is built with GNU make.
+
+ * docs/CHANGES, docs/CUSTOMIZE, docs/INSTALL, docs/INSTALL.ANY,
+ docs/INSTALL.GNU, docs/INSTALL.UNX: Document new build mechanism.
+ Other minor updates.
+
+ * modules.txt: Removed. Contents included in `modules.cfg'.
+
+
+ * include/freetype/internal/ftmemory.h (FT_QAlloc_Debug,
+ FT_Free_Debug) [FT_STRICT_ALIASING]: Fix typos.
+
+ * src/base/ftdbgmem.c (FT_Alloc_Debug, FT_Realloc_Debug,
+ FT_QAlloc_Debug, FT_QRealloc_Debug, FT_Free_Debug)
+ [FT_STRICT_ALIASING]: Implement.
+
+2006-01-31 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c
+ (cid_face_init), src/pfr/pfrobjs.c (pfr_face_init),
+ src/type1/t1objs.c (T1_Face_Init): Set face->height to MAX(1.2 *
+ units_per_EM, ascender - descender).
+
+2006-01-31 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/internal/t1types.h (AFM_FontInfo),
+ src/psaux/afmparse.c, src/tools/test_afm.c: Read `FontBBox',
+ `Ascender', and `Descender' from an AFM.
+
+ * src/type1/t1afm.c (T1_Read_Metrics): Use the metrics from the AFM.
+
+ * include/freetype/freetype.h (FT_FaceRec): Mention that fields may
+ be changed after file attachment.
+
+2006-01-28 Werner Lemberg <wl@gnu.org>
+
+ * src/*/module.mk (.PHONY): Add.
+
+2006-01-27 Werner Lemberg <wl@gnu.org>
+
+ * README, docs/FTL.TXT: Fix email address for bug reports.
+ Other minor formatting.
+
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
+ * src/autofit/module.mk (add_autofit_module), src/bdf/module.mk
+ (add_bdf_module), src/type42/module.mk (add_type42_driver): Fix
+ whitespace.
+
+ * src/smooth/module.mk (add_smooth_renderer): Add lcd and lcdv
+ renderer classes.
+
+2006-01-27 David Turner <david@freetype.org>
+
+ * builds/unix/configure.ac: Fix build problem on Cygwin.
+
+ * builds/unix/install.mk (install): Don't install the internal
+ headers, and remove existing ones if found in the target install
+ directory.
+
+ * src/autofit/afwarp.c: Add simple #ifdef to prevent compilation
+ if the warp hinter isn't active (it shouldn't, still experimental).
+
+ * Jamfile, include/freetype/config/ftmodule.h: Remove `gxvalid'
+ and `otvalid' from the list of modules that are linked statically
+ to a given FreeType library. Functionality has been moved to the
+ `ftvalid' CVS module.
+
+ Note also that current Make-based build system still compiles the
+ modules though.
+
+ * include/freetype/config/ftoption.h (FT_STRICT_ALIASING): New macro
+ which controls the definitions of the memory management functions to
+ avoid warnings with recent versions of GCC. This macro is only here
+ to be disabled, in case we detect problems with the new scheme.
+
+ NOTE: Disable macro to use the memory debugger -- this will be fixed
+ later!
+
+ * include/freetype/internal/ftmemory.h, src/base/ftutil.c (FT_Alloc,
+ FT_QAlloc, FT_Realloc, FT_QRealloc, FT_Free) [FT_STRICT_ALIASING]:
+ New versions.
+
+
+ * builds/win32/visualc/freetype.dsp: Updating project file to
+ define FT2_BUILD_LIBRARY, and remove gxvalid + otvalid modules from
+ compilation.
+
+
+ * builds/freetype.mk (FT_CFLAGS), Jamfile (DEFINES): Define the
+ macro FT2_BUILD_LIBRARY when compiling the library.
+
+ * include/freetype/config/ftheader.h: Remove inclusions of internal
+ headers except if the macro FT2_BUILD_LIBRARY is defined.
+
+
+ * include/freetype/internal/psaux.h (AFM_KernPair, AFM_TrackKern,
+ AFM_FontInfo): Move structure declarations to...
+ * include/freetype/internal/t1types.h: This file.
+
+
+ * (many files): Fix compiler warnings.
+ Various minor reorganizations.
+
+
+ * src/cff/cffload.c (cff_font_done): Don't free static array
+ `subfonts'.
+
+ * src/otvalid/otvcommn.c (otv_ClassDef_validate),
+ src/otvalid/otvgpos.c (otv_x_sxy): Fix debugging information.
+
+
+ Get rid of writable static variables (i.e., the string table) in
+ afmparse, and fix compilation in FT2_MULTI mode.
+
+ * src/psaux/afmparse.c: Include ft2build.h and FT_FREETYPE_H.
+ (AFM_MAX_ARGUMENTS): Define...
+ * src/psaux/afmparse.h: Here.
+ * src/psaux/Jamfile (_sources): Add afmparse.
+
+ * src/psaux/psconv.c: Include psconv.h.
+
+ * src/type1/t1afm.c: Don't include FT_INTERNAL_TYPE1_TYPES_H but
+ FT_INTERNAL_POSTSCRIPT_AUX_H.
+ * src/type1/t1afm.h: Include FT_INTERNAL_TYPE1_TYPES_H.
+
+2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/freetype.h (FT_Select_Size): Rename the second
+ argument from `idx' to `strike_index'.
+ (FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of
+ this enum.
+
+ * include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH,
+ FT_REQUEST_HEIGHT): New macros to get the width and height of a
+ request, in fractional pixels.
+
+ * include/freetype/internal/ftobjs.h (FT_Select_Metrics,
+ FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics,
+ FT_Request_Metrics): New base functions to set the font metrics. They
+ were part of FT_Select_Size/FT_Request_Size and are made independent
+ functions so that metrics are not set again and again.
+
+ * src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set
+ only when driver's size_select/size_request is NULL. That is, drivers
+ should set the metrics themselves.
+ (FT_Match_Size): Round before matching. This was what we did and it
+ does cause some problems without rounding.
+
+ * src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c
+ (tt_size_select): Set the font metrics.
+ s/index/strike_index/.
+ The scaled metrics are always preferred over strikes' metrics, even
+ when some strike is selected. This is done because the strikes'
+ metrics are not reliable, e.g., the sign of the descender is wrong for
+ some fonts.
+
+ * src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c
+ (tt_size_request): Set the font metrics.
+ Call cff_size_select/tt_size_select when some strike is matched.
+
+ * src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c,
+ src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c,
+ src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c:
+ Set the font metrics.
+ s/index/strike_index/.
+
+ * src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these
+ files were committed. Just a catch-up.
+ (PS_Conv_ToFixed): Remove the `goto'.
+ (PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little.
+
+ * src/sfnt/ttsbit.c (tt_face_load_sbit_strikes,
+ tt_face_load_strike_metrics), src/sfnt/ttsbit0.c
+ (tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The
+ advertised metrics in `available_sizes' are different from those
+ actually used.
+
+2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/psaux/psaux.c src/psaux/psauxmod.c src/type1/t1driver.c: Make
+ AFM parser optional, controlled by `T1_CONFIG_OPTION_NO_AFM'.
+
+2006-01-22 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
+ `texinfo' CVS module at savannah.gnu.org.
+
+2006-01-21 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/rules.mk (AUTOF_DRV_SRC): Add afwarp.c.
+
+ * src/autofit/afloader.c (af_loader_load_g): Move AF_USE_WARPER up
+ to avoid compiler warnings.
+
+ * src/autofit/afwarp.c (af_warper_compute_line_best): Remove
+ shadowing variable declarations.
+ Fix warning parameters and replace printf with AF_LOG.
+ (af_warper_compute): Remove unused variable.
+
+2006-01-20 David Turner <david@freetype.org>
+
+ Adding experimental implementation of `warp hinting' (new hinting
+ algorithm for gray-level and LCD rendering). It is disabled by
+ default, you need to #define AF_USE_WARPER in aftypes.h.
+
+ * src/autofit/afhints.c (af_glyph_hints_scale_dim) [AF_USE_WARPER]:
+ New function.
+ * src/autofit/afhints.h: Updated.
+
+ * src/autofit/aflatin.c [AF_USE_WARPER]: Include afwarp.h.
+ (af_latin_hints_init) [AF_USE_WARPER]: Reset mode to
+ FT_RENDER_MODE_NORMAL if an LCD mode is selected.
+ (af_latin_hints_apply) [AF_USE_WARPER]: Call af_warper_compute
+ appropriately.
+
+ * src/autofit/afloader.c (af_loader_load_g) [!AF_USER_WARPER]:
+ Isolate code for adjusting metrics.
+
+ * src/autofit/aftypes.h (AF_USE_WARPER): New macro (commented out by
+ default).
+
+ * src/autofit/afwarp.c, src/autofit/afwarp.h: New files.
+
+ * src/autofit/autofit.c [AF_USE_WARPER]: Include afwarp.c.
+
+ * src/autofit/Jamfile (_sources): Add afwarp.
+
+2006-01-19 David Turner <david@freetype.org>
+
+ * src/sfnt/ttsbit0.c (tt_face_load_strike_metrics): Fix small bug
+ that prevented compilation when FT_OPTIMIZE_MEMORY is defined.
+
+2006-01-19 Brian Weed <bw@imaginengine.com>
+
+ * builds/win32/visualc/freetype.dsp: Updated.
+
+2006-01-17 Werner Lemberg <wl@gnu.org>
+
+ Use pscmap service in CFF module.
+
+ * src/cff/cffcmap.c (cff_cmap_uni_pair_compare): Removed.
+ (cff_sid_to_glyph_name): New function.
+ (cff_cmap_unicode_init, cff_cmap_unicode_done,
+ cff_cmap_unicode_char_index, cff_cmap_unicode_char next): Use pscmap
+ service.
+ (cff_cmap_unicode_class_rec): Updated.
+ * src/cff/cffcmap.h (CFF_CMapUnicode, CFF_CMap_UniPair): Removed.
+
+
+ * src/psnames/psmodule.c (ps_unicodes_char_next): Fix `unicode'
+ return value.
+
+
+ * src/psaux/afmparse.c (afm_parser_read_vals): Use double casting
+ to avoid compiler warnings regarding type-punning.
+
+2006-01-16 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
+ implement an AFM parser.
+
+ * src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
+ conversion functions (e.g., PS real number => FT_Fixed) for the
+ PS_Parser and AFM_Parser. Some of the functions are taken, with
+ some modifications, from the file psobjs.c.
+
+ * src/psaux/psobjs.c: Use functions from psconv.c.
+
+ * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Add
+ `AFM_Parser' to the `psaux' service.
+
+ * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Include
+ those new files.
+
+ * src/tools/test_afm.c: A test program for AFM parser.
+
+ * include/freetype/internal/services/svkern.h: New file providing a
+ `Kerning' service. It is currently only used to get the track
+ kerning information.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_KERNING_H): New
+ macro.
+
+ * src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
+ src/type1/t1afm.h: Update to use the AFM parser.
+ Provide the `Kerning' service.
+
+ * include/freetype/freetype.h, src/base/ftobjs.c: New API
+ `FT_Get_Track_Kerning'.
+
+2006-01-15 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/internal/ftobjs.h, src/base/ftobjs.c,
+ src/bdf/bdfdrivr.c, src/cff/cffgload.c, src/cid/cidgload.c,
+ src/pcf/pcfdrivr.c, src/type1/t1gload.c, src/winfonts/winfnt.c:
+ s/ft_fake_vertical_metrics/ft_synthesize_vertical_metrics/.
+
+ * docs/CHANGES: Mention that vertical metrics are synthesized for
+ fonts not having this info.
+
+2006-01-15 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/internal/ftobjs.h (ft_fake_vertical_metrics),
+ src/base/ftobjs.c (ft_fake_vertical_metrics): New function to fake
+ vertical metrics.
+
+ * src/cff/cffgload.c, src/cid/cidgload.c, src/pcf/pcfdrivr.c,
+ src/type1/t1gload.c, src/winfonts/winfnt.c: Fake vertical metrics,
+ which are monotone.
+
+ * src/truetype/ttgload.c (compute_glyph_metrics): Some fixes and
+ formattings in vertical metrics faking. There is still room for
+ improvements (and so does the CFF module).
+
+2006-01-15 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/pcf/pcfdrivr.c
+ (PCF_Glyph_Load), src/winfonts/winfnt.c (FNT_Load_Glyph): Don't set
+ the linear advance fields as they are only used by the outline
+ glyphs.
+
+ * include/freetype/freetype.h: Documentation updates and
+ clarifications.
+ The meaning of FT_LOAD_FORCE_AUTOHINT is changed so that no real
+ change need be made to the code.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Resolve flag dependencies and
+ decide whether to use the auto-hinter according to documentation.
+ There should to be no real difference.
+ Some checks (e.g., is text height positive?) after the glyph is
+ loaded.
+ (FT_Select_Size, FT_Request_Size): Scales are set to wrong values.
+ Be careful that scales won't be negative.
+
+2006-01-14 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * docs/CHANGES: Mention the size selection change.
+
+ * src/bdf/bdfdrivr.c (BDF_Size_Request, BDF_Size_Select),
+ src/pcf/pcfdrivr.c (PCF_Size_Request, PCF_Size_Select),
+ src/winfonts/winfnt.c (FNT_Size_Request, FNT_Size_Select): Do size
+ matching for requests of type NOMINAL and REAL_DIM.
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Print trace message when
+ `pixel_height' is used for nominal height.
+
+ * src/base/ftobjs.c (FT_Request_Size): Call `FT_Match_Size' if the
+ face is bitmap only and driver doesn't provide `request_size'. This
+ is added merely for completion as no driver satisfies the conditions.
+
+2006-01-13 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ Introduce new size selection interface.
+
+ * include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec):
+ Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and
+ `select_size'.
+
+ * include/freetype/freetype.h (FT_Select_Size, FT_Size_Request_Type,
+ FT_Size_Request, FT_Request_Size, FT_Select_Size), src/base/ftobjs.c
+ (FT_Select_Size, FT_Request_Size): API additions to export the new
+ size selection interface.
+
+ * src/base/ftobjs.c (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Use
+ `FT_Request_Size'.
+
+ * include/freetype/internal/ftobjs.h (FT_Match_Size),
+ src/base/ftobjs.c (FT_Match_Size): New function to match a size
+ request against `available_sizes'. Drivers supporting bitmap strikes
+ can use this function to implement `request_size'.
+
+ * src/bdf/bdfdrivr.c, src/cid/cidobjs.c, src/cid/cidobjs.h,
+ src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/type1/t1driver.c,
+ src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42drivr.c,
+ src/type42/t42objs.c, src/type42/t42objs.h, src/winfonts/winfnt.c:
+ Update to new size selection interface.
+
+ * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffobjs.c,
+ src/cff/cffobjs.h, src/truetype/ttdriver.c, src/truetype/ttgload.c,
+ src/truetype/ttobjs.c, src/truetype/ttobjs.h: Update to new size
+ selection interface.
+ Make `strike_index' FT_ULong and always defined.
+ Use `load_strike_metrics' provided by SFNT interface.
+
+2006-01-13 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/internal/sfnt.h (SFNT_Interface): New method
+ `load_strike_metrics' used to load the strike's metrics.
+
+ * src/sfnt/sfdriver.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
+ src/sfnt/ttsbit0.c: New function `tt_face_load_strike_metrics'.
+
+ * src/pfr/pfrobjs.c (pfr_face_init): Set FT_Bitmap_Size correctly.
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Use `nominal_point_size' for
+ nominal size unless it is obviously incorrect.
+
+ * include/freetype/freetype.h (FT_Bitmap_Size): Update the comments on
+ FNT driver.
+
+2006-01-12 Werner Lemberg <wl@gnu.org>
+
+ Prepare use of pscmap service within CFF module.
+
+ * include/freetype/internal/services/svpscmap.h: Include
+ FT_INTERNAL_OBJECTS_H.
+ (PS_Unicode_Index_Func): Removed. Unused.
+ (PS_Macintosh_Name_Func): Renamed to...
+ (PS_Macintosh_NameFunc): This.
+ Update all callers.
+ (PS_Adobe_Std_Strings_Func): Renamed to...
+ (PS_Adobe_Std_StringsFunc): This.
+ Update all callers.
+ (PS_UnicodesRec): This is the former `PS_Unicodes' structure.
+ Add `cmap' member.
+ Update all callers.
+ (PS_Unicodes): This is now a typedef'd pointer to PS_UnicodesRec.
+ Update all callers.
+ (PS_Glyph_NameFunc): New typedef.
+ (PS_Unicodes_InitFunc): Change arguments to expect a function
+ and generic data pointer which returns a glyph name from a given
+ index.
+
+ * src/psnames/psmodule.c (ps_unicodes_init, ps_unicodes_char_index,
+ ps_unicodes_char_next, pscmaps_interface): Updated.
+
+ * include/freetype/internal/t1types.h (T1_FaceRec): Updated.
+
+ * src/psaux/t1cmap.h (T1_CmapStdRec): Updated.
+ (T1_CmapUnicode, T1_CmapUnicodeRec): Removed.
+
+ * src/psaux/t1cmap.c (t1_get_glyph_name): New callback function.
+ (t1_cmap_unicode_init, t1_cmap_unicode_done,
+ t1_cmap_unicode_char_index, t1_cmap_unicode_char_next,
+ t1_cmap_unicode_class_rec): Updated.
+
+ * src/type42/t42types.h (T42_FaceRec): Updated.
+
+2006-01-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/ftmac.h: Add declaration of new functions
+ FT_New_Face_From_FSRef and FT_GetFile_From_Mac_ATS_Name that
+ were introduced by the jumbo patch on 2006-01-11.
+
+2006-01-11 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #15056 and use pscmap service in psaux module.
+
+ * include/freetype/internal/services/svpscmap.h (PS_UniMap): Use
+ FT_UInt32 for `glyph_index'.
+ (PS_Unicodes_InitFunc): Use FT_String for `glyph_names'.
+ (PS_Unicodes_CharIndexFunc): Use FT_UInt32 for `unicode'.
+ (PS_Unicodes_CharNextFunc): Make second argument a pointer to
+ FT_UInt32.
+
+ * src/psnames/psmodule.c (VARIANT_BIT, BASE_GLYPH): New macros.
+ (ps_unicode_value): Set VARIANT_BIT in return value if glyph is a
+ variant glyph (this is, it has non-leading `.' in its name).
+ (compare_uni_maps): Sort base glyphs before variant glyphs.
+ (ps_unicodes_init): Use FT_String for `glyph_names' argument.
+ Reallocate only if number of used entries is much smaller.
+ Updated to handle variant glyphs.
+ (ps_unicodes_char_index, ps_unicodes_char_next): Prefer base glyphs
+ over variant glyphs.
+ Simplify code.
+
+ * src/psaux/t1cmap.c (t1_cmap_uni_pair_compare): Removed.
+ (t1_cmap_unicode_init, t1_cmap_unicode_char_index,
+ t1_cmap_unicode_char_next): Use pscmap service.
+ (t1_cmap_unicode_done): Updated.
+
+ * src/psaux/t1cmap.h (T1_CMapUniPair): Removed.
+ (T1_CMapUnicode): Use PS_Unicodes structure.
+
+2006-01-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Jumbo patch to fix `deprecated' warning of cross-build for Tiger on
+ Intel, as reported by Sean McBride <sean@rogue-research.com> on
+ 2005-08-24.
+
+ * src/base/ftmac.c: Heavy change to build without deprecated Carbon
+ functions on Tiger.
+
+ * builds/unix/configure.ac: Add options and autochecks for Carbon
+ functions availabilities, for MacOS X.
+
+ * builds/mac/ascii2mpw.py: Add converter for character `\305'.
+ * builds/mac/FreeType.m68k_{far|cfm}.make.txt: Add conditional
+ macros to avoid unavailable functions.
+ ftmac.c must be compiled without `-strict ansi', because it disables
+ cpp macro to use ToolBox system call.
+
+ * builds/mac/FreeType.ppc_{classic|carbon}.make.txt: Add conditional
+ macros to avoid unavailable functions.
+
+ * builds/mac/README: Detailed notes on function availabilities.
+
+ * docs/CHANGES: Notes about (possible) incompatibilities.
+
+2006-01-08 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2006-01-08 Huw D M Davies <h.davies1@physics.ox.ac.uk>
+
+ * include/freetype/ftmodapi.h (FT_Module_Get_Flags): New
+ declaration.
+
+ * src/base/ftobjs.c (FT_Module_Get_Flags): New function.
+
+2006-01-07 Werner Lemberg <wl@gnu.org>
+
+ * src/pcf/pcfread.c (pcf_get_bitmaps): Remove unused variable
+ `bitmaps'. Reported by Yu Lei <yulei0@gmail.com>.
+
+ * src/base/ftutil.c (ft_highpow2): s/FT_BASE/FT_BASE_DEF/.
+ Reported by Niels Boldt <nielsboldt@gmail.com>.
+
+2005-12-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/sfnt/sfnt/ttbdf.c: Add newline '\n' to the end of file, for
+ MPW compiler.
+
+2005-12-23 David Turner <david@freetype.org>
+
+ * Jamfile (RefDoc), docs/reference/README: Fix it so that `jam
+ refdoc' works correctly to generate the API reference in
+ `docs/reference'.
+
+ * src/tools/docmaker/tohtml.py (print_html_field,
+ print_html_field_list): Update to output nicer fields lists in the
+ API reference.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): FT_LOAD_TARGET_LIGHT now
+ forces auto-hinting.
+
+ * freetype/freetype.h: Updating the documentation for
+ FT_LOAD_TARGET_XXX and FT_Render_Mode values.
+
+2005-12-23 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (FT_New_Face_From_Suitcase): Count scalable faces
+ in supported formats (sfnt, LWFN) only, and ignore bitmap faces in
+ unsupported formats (fbit, NFNT). The number of available faces are
+ passed via face->num_faces. If bitmap faces are embedded in sfnt
+ resource, face->num_fixed_size is correctly set. In public API,
+ FT_New_Face() and FT_New_Face_From_FSSpec() count the faces as
+ FT_GetFile_From_Mac_Name(), which ignores NFNT resources.
+
+ * doc/CHANGES: Mention the changes.
+
+2005-12-17 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/truetype/ttinterp.c (Update_Max): Set current size of buffer
+ correctly (so that memory debug system won't panic).
+
+2005-12-16 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/internal/ftobjs.h (ft_glyphslot_grid_fit_metrics),
+ src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Removed.
+
+ * src/base/ftobjs.c (ft_recompute_scaled_metrics): Do not round.
+
+ * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
+ (cid_slot_load_glyph), src/truetype/ttgload.c (compute_glyph_metrics),
+ src/type1/t1gload.c (T1_Load_Glyph): Do not round glyph metrics.
+
+ * doc/CHANGES: Mention the changes.
+
+2005-12-13 David Turner <david@freetype.org>
+
+ Change the implementation of the LIGHT hinting mode to completely
+ disable horizontal hinting. This is an experimental effort to
+ integrate David Chester's latest patch without affecting the other
+ hinting modes as well.
+
+ Note that this doesn't force auto-hinting for all fonts, however.
+
+ * src/autofit/afhints.c (af_glyph_hints_reload): Don't set
+ scaler_fiags here but...
+ (af_glyph_hints_rescale): Here.
+
+ * src/autofit/aflatin.c (af_latin_hints_init): Disable horizontal
+ hinting for `light' hinting mode.
+
+
+ * Jamfile: Small fix to ensure that ftexport.sym is placed into the
+ same location as other generated objects (i.e., within the `objs'
+ directory of the current directory).
+
+
+ Add support for an embedded `BDF ' table within SFNT-based bitmap
+ font files. This is used to store atoms & properties from the
+ original BDF fonts that were used to generate the font file.
+
+ The feature is controlled by TT_CONFIG_OPTION_BDF within
+ `ftoption.h' and is used to implement FT_Get_BDF_Property for these
+ font files.
+
+ At the moment, this is still experimental, the BDF table format
+ isn't cast into stone yet.
+
+ * include/freetype/config/ftoption.h (TT_CONFIG_OPTION_BDF): New
+ macro.
+
+ * include/freetype/config/ftstdlib.h (ft_memchr): New macro.
+
+ * include/freetype/internal/tttypes.h (TT_BDFRec, TT_BDF)
+ [TT_CONFIG_OPTION_BDF]: New structure.
+ (TT_FaceRec) [TT_CONFIG_OPTION_BDF]: New member `bdf'.
+
+ * include/freetype/ttags.h (TTAG_BDF): New macro.
+
+ * src/sfnt/Jamfile (_sources): Add ttbdf.
+
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Add ttbdf.c.
+
+ * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_BDF]: Include ttbdf.h and
+ FT_SERVICE_BDF_H.
+ (sfnt_get_charset_it) [TT_CONFIG_OPTION_BDF]: New function.
+ (sfnt_service_bdf) [TT_CONFIG_OPTION_BDF]: New service.
+ (sfnt_services) [TT_CONFIG_OPTION_BDF]: Add sfnt_service_bdf.
+
+ * src/sfnt/sfnt.c [TT_CONFIG_OPTION_BDF]: Include ttbdf.c.
+
+ * src/sfnt/sfobjs.c [TT_CONFIG_OPTION_BDF]: Include ttbdf.h.
+ (sfnt_done_face) [TT_CONFIG_OPTION_BDF]: Call
+ tt_face_free_bdf_props.
+
+ * src/sfnt/ttbdf.h, src/sfnt/ttbdf.c: New files.
+
+2005-12-07 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjc.c (sfnt_init_face): Move tag check to...
+ * src/sfnt/ttload.c (sfnt_init): Here, before handling TTCs.
+
+2005-12-06 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/truetype/ttobjs.c (tt_size_init): size->ttmetrics.valid is
+ initialized twice.
+ size->strike_index is not initialized.
+
+2005-12-02 Taek Kwan(TK) Lee <taeklee@gmail.com>
+
+ * src/type42/t42objs.c (T42_Face_Init): Replace call to
+ FT_New_Memory_Face with call to FT_Open_Face to pass `params'.
+
+2005-11-30 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Document ftdump's `-v' option.
+ Document latest charmap code changes.
+
+ * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h:
+ s/TT_CMAP_FLAG_OVERLAPPED/TT_CMAP_FLAG_OVERLAPPING/.
+
+2005-11-30 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary,
+ tt_cmap12_char_map_binary): Fix compiler warnings.
+
+2005-11-29 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ Major update to distinguish between unsorted and overlapping
+ segments for cmap format 4. For overlapping but sorted segments,
+ which is previously considered unsorted, we still use binary search.
+
+ * src/sfnt/ttcmap.h (TT_CMapRec_): Replace `unsorted' by `flags'.
+ (TT_CMAP_FLAG_UNSORTED, TT_CMAP_FLAG_OVERLAPPED): New macros.
+
+ * src/sfnt/ttcmap.c (OPT_CMAP4): Removed as it is always defined.
+ (TT_CMap4Rec_): Remove `old_charcode' and `table_length'.
+ (tt_cmap4_reset): Removed.
+ (tt_cmap4_init): Updated accordingly.
+ (tt_cmap4_next): Updated accordingly.
+ Take care of overlapping segments.
+ (tt_cmap4_validate): Make sure the subtable is large enough.
+ Do not check glyph_ids because some fonts set the length wrongly.
+ Also, if all segments have offset 0, glyph_ids is always invalid.
+ It does not cause any problem so far only because the check misses
+ equality.
+ Distinguish between unsorted and overlapping segments.
+ (tt_cmap4_char_map_linear, tt_cmap4_char_map_binary): New functions
+ to do `charcode => glyph index' by linear/binary search.
+ (tt_cmap4_char_index, tt_cmap4_char_next): Use
+ tt_cmap4_char_map_linear and tt_cmap4_char_map_binary.
+ (tt_face_build_cmaps): Treat the return value of validator as flags
+ for cmap.
+
+2005-11-29 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/ttcmap.c (TT_CMap12Rec_, tt_cmap12_init, tt_cmap12_next):
+ New structures and functions for fast `next char'.
+ (tt_cmap12_char_map_binary): New function to do `charcode => glyph
+ index' by binary search.
+ (tt_cmap12_char_index, tt_cmap12_char_next): Use
+ tt_cmap12_char_map_binary.
+ (tt_face_build_cmaps): Check table and offset correctly (equality is
+ missing).
+
+2005-11-15 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/smakefile: Adjusted the compiler options
+ to the current sources, now really builds the gxvalid, gzip
+ and psnames modules.
+
+ * builds/amiga/src/base/ftsystem.c: The assumed Seek() position
+ in the file cache was off by one byte which could cause false
+ errors in font files.
+
+2005-11-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/mac/FreeType.m68k_far.make.txt,
+ builds/mac/FreeType.m68k_cfm.make.txt,
+ builds/mac/FreeType.ppc_classic.make.txt,
+ builds/mac/FreeType.ppc_carbon.make.txt:
+ Updated for MPW to build all available modules.
+
+2005-11-21 HÃ¥vard Wall <haavardw@ifi.uio.no>
+
+ * src/bdf/bdfdrivr.c (bdf_interpret_style, BDF_Face_Done): Fix small
+ memory leak.
+
+2005-11-21 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (sfnt_init): Add tracing message.
+
+2005-11-21 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Image_offset was
+ added twice to image_start if image_format was 2 or 5.
+
+2005-11-21 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Check that format_tag is known
+ before loading the table directory.
+
+ * src/sfnt/ttload.c (tt_face_load_sfnt_header,
+ tt_face_load_directory): Delay sfnt_dir_check from
+ tt_face_load_sfnt_header to tt_face_load_directory.
+
+2005-11-20 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Clean up and return correct
+ error code.
+ (sfnt_init): New function to fill in face->ttc_header. A non-TTC font
+ is synthesized into a TTC font with one offset table.
+ (tt_face_load_sfnt_header): Use sfnt_init.
+ Fix an invalid access if the font is TTC and face_index is -1.
+
+2005-11-18 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (tt_face_load_metrics): Ignore excess number
+ of metrics instead of aborting. Patch suggested by Derek Noonburg.
+
+ * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
+ (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Scale
+ the glyph properly if no hinter is available.
+
+ * docs/CHANGES: Mention scaling bug.
+
+2005-11-18 susuzki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/ftgxval.h, src/base/ftgxval.c
+ (FT_TrueTypeGX_Free, FT_ClassicKern_Free): New functions to free
+ buffers allocated by gxvalid module.
+ * include/freetype/ftotval.h, src/base/ftotval.c
+ (FT_OpenType_Free): New function to free buffer allocated by
+ otvalid module.
+
+2005-11-18 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * builds/unix/ftsystem.c (FT_Stream_Open, FT_New_Memory,
+ FT_Done_Memory), builds/vms/ftsystem.c (FT_Stream_Open, FT_New_Memory,
+ FT_Done_Memory), builds/win32/ftdebug.c (FT_Message, FT_Panic):
+ s/FT_EXPORT/FT_BASE/.
+
+2005-11-17 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/src/base/ftdebug.c (FT_Trace_Get_Count,
+ FT_Trace_Get_Name, FT_Message, FT_Panic),
+ builds/amiga/src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory,
+ FT_Stream_Open): s/FT_EXPORT/FT_BASE/.
+
+2005-11-17 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/makefile, builds/amiga/makefile.os4,
+ builds/amiga/smakefile,
+ builds/amiga/include/freetype/config/ftmodule.h: Updated the Amiga
+ build files (added support for the gxvalid module).
+
+2005-11-17 Werner Lemberg <wl@gnu.org>
+
+ Add vertical metrics support to OpenType CFF outlines. Based on a
+ patch from Mike Moening <MikeM@RetekSolutions.com>.
+
+ * src/cff/cffgload.c (cff_face_get_vertical_metrics): New function.
+ (cff_slot_load): Use cff_face_get_vertical_metrics.
+
+ * docs/CHANGES: Updated.
+
+2005-11-17 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftcalc.c (FT_MulTo64): Commented out.
+
+ * include/freetype/internal/ftcalc.h (FT_SqrtFixed),
+ src/base/ftcalc.c (FT_SqrtFixed),
+ include/freetype/internal/ftdebug.h (FT_Trace_Get_Count,
+ FT_Trace_Get_Name, FT_Message, FT_Panic), src/base/ftdebug.c
+ (FT_Trace_Get_Count, FT_Trace_Get_Name, FT_Message, FT_Panic),
+ include/freetype/internal/ftobjs.h (FT_New_Memory, FT_Done_Memory),
+ include/freetype/internal/ftstream.h (FT_Stream_Open),
+ src/base/ftsystem.c (FT_New_Memory, FT_Done_Memory, FT_Stream_Open):
+ s/FT_EXPORT/FT_BASE/.
+
+ * builds/exports.mk: Manually add TT_New_Context to EXPORTS_LIST
+ too.
+
+2005-11-15 David Turner <david@freetype.org>
+
+ * src/base/fttrigon.c (ft_trig_prenorm): Fix a bug that created
+ invalid computations, resulting in very weird bugs in TrueType
+ bytecode hinted fonts.
+
+ * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Don't perform a
+ structure copy each time.
+
+2005-11-11 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c (FTC_Cache_Clear), src/cache/ftcmanag.c
+ (FTC_Manager_Check): Remove FT_EXPORT_DEF tag.
+
+ * src/base/ftcalc.c (FT_Add64): Remove FT_EXPORT_DEF tag.
+ (FT_Div64by32, FT_Sqrt32): Commented out. Unused.
+
+ * include/freetype/internal/ftcalc.h (SQRT_32): Removed. Unused.
+ (FT_Sqrt32): Commented out. Unused.
+
+ * include/freetype/cache/ftccache.h:
+ s/ftc_node_destroy/FTC_Node_Destroy/.
+
+ * src/cache/ftccback.h (ftc_node_destroy): New declaration.
+
+ * src/cache/ftccache.c (ftc_node_destroy): Use FT_LOCAL_DEF tag.
+ (FTC_Node_Destroy): New exported wrapper function for
+ ftc_node_destroy.
+
+ * src/cache/ftcmanag.c: Include ftccback.c.
+
+2005-11-10 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afangles.c, src/autofit/aftypes.h (af_angle_diff):
+ Comment out. Unused.
+
+ * builds/exports.mk ($(EXPORTS_LIST)): Add TT_RunIns.
+
+2005-11-10 Christian Biesinger <cbiesinger@web.de>
+
+ * builds/beos/beos.mk: Call beos-def.mk before anything else to
+ define the separator.
+
+ * builds/unix/unix-cc.in (LINK_LIBRARY): Add `-no-undefined' flag.
+
+2005-11-07 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1afm.c (T1_Read_PFM): Zero offset means `no kerning
+ table available'. From Sergey Tolstov <stolstov@esri.com>.
+
+2005-11-03 Ville Syrjälä <syrjala@sci.fi>
+
+ * src/base/ftobjs.c (FT_Open_Face): Avoid possible memory leak.
+
+2005-11-02 Werner Lemberg <wl@gnu.org>
+
+ Make compiling instructions in docs/CUSTOMIZE work again.
+
+ * builds/unix/unix-cc.in (CPPFLAGS): New variable.
+ (CFLAGS): Don't include @CPPFLAGS@.
+ * builds/freetype.mk (FT_CFLAGS): Add CPPFLAGS.
+
+2005-10-28 David Turner <david@freetype.org>
+
+ Update build system to support the generation of a list of exported
+ symbols or Windows .DEF files by parsing the public headers with the
+ `apinames' tool located in src/tools/apinames.c.
+
+ Only tested on Unix at the moment. On Windows, the .DEF file is
+ generated but isn't used yet to generate a DLL.
+
+ * builds/exports.mk: New file.
+
+ * builds/freetype.mk: Include exports.mk.
+ (dll): New target.
+ (clean_project_dos): Fix rule.
+
+ * builds/compiler/visualc.mk (TE), builds/dos/dos-def.mk (E),
+ builds/os2/os2-def.mk (E), builds/win32/win32-def.mk (E): New
+ variables for controlling executable extensions.
+
+ * builds/unix/unix-cc.in (EXPORTS_LIST, CCexe),
+ builds/win32/w32-bcc.mk, builds/win32/w32-gcc.mk,
+ builds/win32/w32-icc.mk, builds/win32/w32-icc.mk,
+ builds/win32/w32-mingw32.mk, builds/win32/w32-vcc,
+ builds/win32/w32-wat.mk (EXPORTS_LIST, EXPORT_OPTIONS,
+ APINAMES_OPTIONS): New targets for controlling the `apinames' tool.
+
+ * Jamfile (GenExportSymbols): Updated.
+
+
+ * src/pfr/pfrtypes.h, src/pfr/pfrload.c, src/pfr/pfrobjs.c
+ [!FT_OPTIMIZE_MEMORY]: Fold memory optimization code into
+ FT_OPTIMIZE_MEMORY chunks for better maintainability and simplicity.
+
+
+ * src/base/fttrigon.c (ft_trig_prenorm), src/base/ftcalc.c
+ (FT_MulFix): Performance optimizations.
+
+
+ * include/freetype/internal/ftgloadr.h (FT_GLYPHLOADER_CHECK_P,
+ FT_GLYPHLOADER_CHECK_C, FT_GLYPHLOADER_CHECK_POINTS): New macros for
+ checking points and contours. Update callers to use
+ FT_GLYPHLOADER_CHECK_POINTS instead of FT_GlyphLoader_CheckPoints
+ at profile-detected hot-spots.
+
+ * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Set `adjust'
+ to 0 to not call `AdjustPoints' every time.
+
+
+ * src/autofit/aftypes.h (AF_ANGLE_DIFF): New macro to inline
+ FT_Angle_Diff.
+
+ * src/autofit/afhints.c (af_direction_compute): Re-implement.
+ (af_glyph_hints_compute_inflections, af_glyph_hints_reload): Use
+ AF_ANGLE_DIFF to speed up the detection of inflexions.
+
+
+ * src/tools/apinames.c: Include <string.h>.
+ (OutputFormat): New enumeration.
+ (names_dump): Add two parameters to control output format and DLL
+ name.
+ (names_dump_windef): Removed. Code folded into `names_dump'.
+ (read_header_file): Use isalnum, not isalpha. Otherwise function
+ names with digits aren't read correctly.
+ (usage): Updated.
+ (main): New option `-o' to control output file name.
+ New option `-d' to indicate DLL file name.
+ Extend `-w' flag to handle Borland and Watcom compilers and linkers.
+
+2005-10-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/mac/ftlib.prj, builds/mac/freetype.mak: Removed.
+ ftlib.prj is unmaintained and incompatible with current tree.
+ freetype.mak is unrecoverably broken.
+
+ * builds/mac/ftlib.prj.xml: Added.
+ Generated by Metrowerks CodeWarrior 9.0.
+
+ * builds/mac/FreeType.m68k_far.make.txt,
+ builds/mac/FreeType.m68k_cfm.make.txt,
+ builds/mac/FreeType.ppc_classic.make.txt,
+ builds/mac/FreeType.ppc_carbon.make.txt: Added.
+ Skeleton files of MPW makefiles.
+
+ * builds/mac/ascii2mpw.py: Added.
+ Python script to make MPW makefile from skeleton.
+
+ * builds/mac/README: Updated.
+ Almost rewritten to use new files.
+
+2005-10-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c: Fix invalid casts from NULL to integer typed
+ variables. Advised by David Turner, Masatake YAMATO, Sean McBride,
+ and George Williams.
+
+2005-10-27 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftsysmem.h, include/freetype/ftsysio.h: Removed.
+ Obsolete.
+
+2005-10-25 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfdriver.c (sfnt_interface): Move out
+ `tt_face_get_kerning' from a #ifdef clause. Reported by Tony J.
+ Ibbs <tibs@sj.co.uk>.
+
+2005-10-23 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftdbgmem.c (ft_mem_debug_realloc): Make it compile with
+ C++.
+
+2005-10-21 David Turner <david@freetype.org>
+
+ * src/base/ftdbgmem.c (ft_mem_table_set, ft_mem_debug_realloc):
+ Another realloc memory counting bug fix.
+
+ * src/tools/Jamfile: Add missing file.
+
+ * src/lzw/Jamfile: Fix incorrect source file reference.
+
+2005-10-20 David Turner <david@freetype.org>
+
+ * src/base/ftdbgmem.c (ft_mem_table_set, ft_mem_table_remove,
+ ft_mem_debug_alloc, ft_mem_debug_free, ft_mem_debug_realloc): Fixes
+ to better account for memory reallocations.
+
+ * src/lzw/ftlzw2.c, src/lzw/ftzopen.h, src/lzw/ftzopen.c,
+ src/lzw/rules.mk: First version of LZW loader re-implementation.
+ Apparently, this saves about 330 KB of heap memory when loading
+ timR24.pcf.Z.
+
+2005-10-20 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/ftbitmap.h (FT_Bitmap_Copy, FT_Bitmap_Embolden),
+ src/base/ftbdf.c (FT_Get_BDF_Property), src/cache/ftcmru.c
+ (FTC_MruList_Reset, FTC_MruList_Done, FTC_MruList_Lookup): Fix
+ FT_EXPORT/FT_EXPORT_DEF tagging.
+
+2005-10-19 Chia-I Wu <b90201047@ntu.edu.tw>
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Allow size->ttmetrics to
+ be invalid when FT_LOAD_NO_SCALE is set.
+
+2005-10-17 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (FT_Open_Face): Don't call FT_New_GlyphSlot and
+ FT_New_Size if we are opening a face with face_index < 0 (which is
+ only used for testing the format).
+
+ * src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_entry_validate):
+ Remove compiler warning.
+
+2005-10-16 David Turner <david@freetype.org>
+
+ * src/tools/apinames.c: Add new tool to extract public API function
+ names from header files.
+
+2005-10-05 Werner Lemberg <wl@gnu.org>
+
+ Add FT_FACE_FLAG_HINTER to indicate that a specific font driver has
+ a hinting engine of its own.
+
+ * include/freetype/freetype.h (FT_FACE_FLAG_HINTER): New macro.
+
+ * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c
+ (cid_face_init), src/truetype/ttobjs.c (tt_face_init)
+ [TT_CONFIG_OPTION_BYTECODE_INTERPRETER], src/type1/t1objs.c
+ (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init)
+ [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Update face flags.
+
+ * docs/CHANGES: Document it.
+
+2005-09-27 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype2.m4: Add license exception so that the file
+ can be used in any other autoconf script.
+
+2005-09-26 David Turner <david@freetype.org>
+
+ * src/autofit/aflatin.c (af_latin_compute_stem_width): Fix bad
+ computation of the `vertical' flag, causing ugly things in LCD mode
+ and others.
+
+2005-09-23 David Turner <david@freetype.org>
+
+ * src/autofit/aflatin.c (af_latin_hints_init): Fix a bug that
+ prevented internal hint mode bitflags from being computed correctly.
+
+ * src/base/Jamfile: Adding src/base/ftgxval.c.
+
+ * src/gxvalid/gxvbsln.c, src/gxvalid/gxvcommn.c,
+ src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c, src/gxvalid/gxvkern.c,
+ src/gxvalid/gxvlcar.c, src/gxvalid/gxvmort.c,
+ 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/gxvmorx0.c, src/gxvalid/gxvmorx1.c,
+ src/gxvalid/gxvmorx2.c, src/gxvalid/gxvmorx5.c,
+ src/gxvalid/gxvopbd.c, src/gxvalid/gxvprop.c,
+ src/truetype/ttgload.c: Remove _many_ compiler warnings when
+ compiling with Visual C++ at maximum level (/W4).
+
+ * src/autofit/afangles.c (af_angle_atan): Replaced CORDIC-based
+ implementation with one using lookup tables. This simple thing
+ speeds up glyph loading by 18%, according to ftbench!
+
+ * src/sfnt/sfdriver.c (sfnt_get_interface): Don't check for
+ `get_sfnt' and `load_sfnt' module interfaces.
+
+2005-09-22 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Mention SING Glyphlet support.
+
+2005-09-22 David Turner <david@freetype.org>
+
+ * src/base/Jamfile: Disable compilation of ftgxval module
+ temporarily.
+
+2005-09-19 David Somers <dsomers@omz13.com>
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Modified to allow a
+ font to have no `head' table if tables `SING' and `META' are
+ present; this is to support `SING Glyphlet'.
+
+ `SING Glyphlet' is an extension to OpenType developed by Adobe
+ primarily to facilitate adding supplemental glyphs to an OpenType
+ font (with emphasis on, but not necessarily limited to, gaiji to a
+ CJK font). A SING Glyphlet Font is an OpenType font that contains
+ the outline(s), either in a `glyf' or `CFF' table, for a glyph;
+ `cmap', `BASE', and `GSUB' tables are present with the same format
+ and functionaliy as a regular OpenType font; there are no `name',
+ `head', `OS/2', and `post' tables; there are two new tables, `SING'
+ which contains details about the glyphlet, and `META' which contains
+ metadata.
+
+ Further information on the SING Glyphlet format can be found at:
+
+ http://www.adobe.com/products/indesign/sing_gaiji.html
+
+ * include/freetype/ttags.h (TTAG_SING, TTAG_META): New macros for
+ the OpenType tables `SING' and `META'. These two tables are used in
+ SING Glyphlet Format fonts.
+
+2005-09-09 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Reactivate code to set
+ FT_FACE_FLAG_KERNING which has been commented out erroneously.
+
+ * docs/CHANGES: Document it.
+
+2005-09-05 Werner Lemberg <wl@gnu.org>
+
+ Fixes for `make multi' and using C++ compiler.
+
+ * src/gxvalid/gxvcommn.c (gxv_set_length_by_ushort_offset,
+ gxv_set_length_by_ulong_offset, gxv_array_getlimits_byte,
+ gxv_array_getlimits_ushort): Declare with FT_LOCAL_DEF.
+ (gxv_compare_ranges): Make it static.
+ (gxv_LookupTable_fmt0_validate, gxv_LookupTable_fmt2_validate,
+ gxv_LookupTable_fmt4_validate, gxv_LookupTable_fmt6_validate,
+ gxv_LookupTable_fmt8_validate, gxv_LookupTable_validate): Improve
+ trace messages.
+ (gxv_StateArray_validate, gxv_XStateArray_validate): s/class/clazz/.
+ (GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE,
+ GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Move to
+ gxvcommn.h.
+
+ * src/gxvalid/gxvcommn.h: Add prototypes for
+ gxv_StateTable_subtable_setup, gxv_XStateTable_subtable_setup,
+ gxv_XStateTable_validate, gxv_array_getlimits_byte,
+ gxv_array_getlimits_ushort, gxv_set_length_by_ushort_offset,
+ gxv_set_length_by_ulong_offset, gxv_odtect_add_range,
+ gxv_odtect_validate.
+ (GXV_STATETABLE_HEADER_SIZE, GXV_STATEHEADER_SIZE,
+ GXV_XSTATETABLE_HEADER_SIZE, GXV_XSTATEHEADER_SIZE): Moved from
+ gxvcommn.c.
+
+ * src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
+ gxv_bsln_parts_fmt1_validate): Improve trace messages.
+
+ * src/gxvalid/gxvfeat.c: Split off predefined registry stuff to...
+ * src/gxvalid/gxvfeat.h: New file.
+
+ * src/gxvalid/gxvjust.c (gxv_just_wdc_entry_validate): Improve trace
+ message.
+
+ * src/gxvalid/gxvkern.c (GXV_kern_Dialect): Add KERN_DIALECT_UNKNOWN.
+ (gxv_kern_subtable_fmt1_valueTable_load,
+ gxv_kern_subtable_fmt1_subtable_setup,
+ gxv_kern_subtable_fmt1_entry_validate): Fix C++ compiler errors.
+ (gxv_kern_coverage_validate): Use KERN_DIALECT_UNKWOWN.
+ Improve trace message.
+ (gxv_kern_validate_generic): Fix C++ compiler error.
+ Improve trace message.
+ (gxv_kern_validate_classic): Fix C++ compiler error.
+
+ * src/gxvalid/gxvmort0.c (gxv_mort_subtable_type0_validate): Declare
+ with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmort1.c
+ (gxv_mort_subtable_type1_substitutionTable_load,
+ gxv_mort_subtable_type1_subtable_setup): Fix C++ compiler errors.
+ (gxv_mort_subtable_type1_substTable_validate): Improve trace
+ message.
+ (gxv_mort_subtable_type1_validate): Declare with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmort2.c (gxv_mort_subtable_type2_opttable_load,
+ gxv_mort_subtable_type2_subtable_setup,
+ gxv_mort_subtable_type2_ligActionOffset_validate,
+ gxv_mort_subtable_type2_ligatureTable_validate): Fix C++ compiler
+ errors.
+ (gxv_mort_subtable_type2_validate): Declare with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmort4.c (gxv_mort_subtable_type4_validate): Declare
+ with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup,
+ gxv_mort_subtable_type5_InsertList_validate): Fix C++ compiler
+ errors.
+ (gxv_mort_subtable_type5_validate): Declare with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmort.c: Include gxvfeat.h.
+ (gxv_mort_featurearray_validate, gxv_mort_coverage_validate):
+ Declare with FT_LOCAL_DEF.
+ (gxv_mort_subtables_validate, gxv_mort_validate): Improve trace
+ messages.
+
+ * src/gxvalid/gxvmort.h (gxv_mort_feature_validate): Remove.
+
+ * src/gxvalid/gxvmorx0.c (gxv_morx_subtable_type0_validate): Declare
+ with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmorx1.c
+ (gxv_morx_subtable_type1_substitutionTable_load,
+ gxv_morx_subtable_type1_subtable_setup,
+ gxv_morx_subtable_type1_entry_validate,
+ gxv_morx_subtable_type1_substitutionTable_validate): Fix C++
+ compiler errors.
+ (gxv_morx_subtable_type1_validate): Declare with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmorx2.c (gxv_morx_subtable_type2_opttable_load,
+ gxv_morx_subtable_type2_subtable_setup,
+ gxv_morx_subtable_type2_ligActionIndex_validate,
+ gxv_morx_subtable_type2_ligatureTable_validate): Fix C++ compiler
+ errors.
+ (gxv_morx_subtable_type2_validate): Declare with FT_LOCAL_DEF.
+ Fix typo.
+
+ * src/gxvalid/gxvmorx4.c (gxv_morx_subtable_type4_validate): Declare
+ with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_insertionGlyph_load,
+ gxv_morx_subtable_type5_subtable_setup): Fix C++ compiler error.
+ (gxv_morx_subtable_type5_validate): Declare with FT_LOCAL_DEF.
+
+ * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate,
+ gxv_morx_validate): Improve trace message.
+
+ * src/gxvalid/gxvopbd.c (gxv_opbd_LookupFmt4_transit): Fix compiler
+ warnings.
+ (gxv_opbd_validate): Improve trace message.
+
+ * src/gxvalid/gxvprop.c: Decorate constants with `U' and `L' where
+ appropriate.
+ (gxv_prop_zero_advance_validate, gxv_prop_validate): Improve trace
+ message.
+
+ * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate): Remove unused
+ parameter. Update all callers.
+ (gxv_trak_validate): Improve trace message.
+
+ * rules.mk (GXV_DRV_H): Add gxvfeat.h.
+
+2005-09-01 Werner Lemberg <wl@gnu.org>
+
+ * 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
+ typo.
+
+ * src/gxvalid/gxvmorx0.c, src/gxvalid/gxvmorx1.c,
+ src/gxvalid/gxvmorx2.c, src/gxvalid/gxvmorx4.c,
+ src/gxvalid/gxvmorx5.c, src/gxvalid/gxvmort.c: Improve trace
+ messages.
+ Decorate constants with `U' and `L' where appropriate.
+ Fix compiler warnings.
+
+2005-08-31 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix typo.
+
+ * src/gxvalid/gxvbsln.c (gxv_bsln_validate): Fix trace message.
+
+ * src/gxvalid/gxvcommn.c (gxv_odtect_add_range): Use `const'.
+
+ * src/gxvalid/gxvfeat.c, src/gxvalid/gxvjust.c,
+ src/gxvalid/gxvkern.c, src/gxvalid/gxvlcar.c, src/gxvalid/gxvmod.c,
+ src/gxvalid/gxvmort0.c, src/gxvalid/gxvmort1.c,
+ src/gxvalid/gxvmort2.c, src/gxvalid/gxvmort4.c,
+ src/gxvalid/gxvmort5.c, src/gxvalid/gxvmort.c: Improve trace
+ messages.
+ Decorate constants with `U' and `L' where appropriate.
+ Fix compiler warnings.
+
+2005-08-30 Werner Lemberg <wl@gnu.org>
+
+ * src/gxvalid/README: Revised.
+ * src/gxvalid/gxvbsln.c: Fix compiler warnings.
+ * src/gxvalid/gxvcommn.c: Fix compiler warnings.
+ (gxv_XEntryTable_validate, gxv_compare_ranges): Remove unused
+ parameter. Update all callers.
+ Improve trace messages.
+ Some formatting.
+
+2005-08-29 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h, include/freetype/ftchapters.h: Add
+ a preliminary section with some explanations about user allocation.
+
+ * src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter):
+ Don't abort if there are no data types, functions, etc., in a
+ section.
+ Print synopsis only if we have a data type, function, etc.
+
+ * docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE,
+ docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX,
+ docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
+
+2005-08-28 George Williams <gww@silcom.com>
+
+ * src/truetype/ttgload.c [TT_MAX_COMPOSITE_RECURSE]: Removed.
+ (load_truetype_glyph): Limit recursion depth by `maxComponentDepth'.
+
+2005-08-25 J. Ali Harlow <ali@avrc.city.ac.uk>
+
+ * builds/unix/freetype2.in (CFlags): Add missing directory.
+
+2005-08-24 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Mention gxvalid module.
+
+2005-08-23 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale): Initialize
+ render mode properly. Reported by chris@dokein.co.uk.
+
+2005-08-23 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Add gxvalid module to validate TrueType GX/AAT tables.
+
+ Modifications on existing files:
+
+ * Jamfile: Register gxvalid module.
+ * src/base/Jamfile: Register ftgxval.c.
+ * src/base/rule.mk: Register ftgxval.c.
+ * docs/INSTALL.ANY: Register gxvalid/gxvalid.c.
+
+ * include/freetype/config/ftheader.h (FT_GX_VALIDATE_H): New macro
+ to include gxvalid header file.
+ * include/freetype/config/ftmodule.h: Register gxv_module_class.
+
+ * include/freetype/ftchapters.h: Add comment about gx_validation.
+ * include/freetype/ftotval.h: Change keyword FT_VALIDATE_XXX
+ to FT_VALIDATE_OTXXX to co-exist with gxvalid.
+ * include/freetype/tttags.h: Add tags for TrueType GX/AAT tables.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_GX_VALIDATE_H): New
+ macro for gxvalid service.
+ * include/freetype/internal/fttrace.h: Add trace facilities for
+ gxvalid.
+
+ New files on existing directories:
+
+ * include/freetype/internal/services/svgxval.h: Registration of
+ validation service for TrueType GX/AAT and classic kern table.
+ * include/freetype/ftgxval.h: Public API definition to use gxvalid.
+ * src/base/ftgxval.c: Public API of gxvalid.
+
+ New files under src/gxvalid/:
+
+ * src/gxvalid/Jamfile src/gxvalid/README src/gxvalid/module.mk
+ src/gxvalid/rules.mk 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/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: New files, gxvalid body.
+
+2005-08-21 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Only translate outline
+ to (0,0) if bit 1 of the `head' table isn't set. This improves
+ rendering of buggy fonts.
+
+2005-08-20 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/truetype/ttdriver.c (Load_Glyph): Don't check the validity of
+ ttmetrics here. TrueType fonts with only sbits always have
+ ttmetrics.valid set to false.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Check that ttmetrics is
+ valid before loading outline glyph.
+
+ * src/cache/ftcimage.c (FTC_INode_New): Fix a memory leak.
+
+2005-08-20 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (tt_face_load_metrics_header): Ignore missing
+ `hhea' table for SFNT Mac fonts. Change based on a patch by
+ mpsuzuki@hiroshima-u.ac.jp.
+
+2005-08-20 Masatake YAMATO <jet@gyve.org>
+
+ * src/otvalid/otvmod.c (otv_validate): Use ft_validator_run instead
+ of ft_setjmp.
+
+2005-08-19 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix compiler
+ warnings.
+
+2005-08-16 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/truetype/ttinterp.c, src/truetype/ttinterp.h: Update copyright
+ messages.
+
+2005-08-16 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/truetype/ttinterp.c, src/truetype/ttinterp.h: Remove original
+ TT_Done_Context and rename TT_Destroy_Context to TT_Done_Context
+ with slight changes.
+ Update all callers.
+ (TT_New_Context): Now takes TT_Driver argument directly.
+ Update all callers.
+
+ * src/truetype/ttobjs.h (tt_slot_init): New function.
+ * src/truetype/ttobjs.c (tt_driver_init): Initialize execution
+ context here.
+ (tt_slot_init): New function to create extra points for the internal
+ glyph loader. We then use it directly, instead of face's glyph
+ loader, when loading glyph.
+
+ * src/truetype/ttdriver.c (tt_driver_class): Use tt_slot_init for
+ glyph slot initialization.
+ (Load_Glyph): Load flag dependencies are handled here. Return error
+ if size is NULL.
+
+ * src/truetype/ttgload.c: Heavy cleanup and refactoring.
+ (org_to_cur): Removed.
+ (TT_Load_Simple_Glyph): Call FT_GlyphLoader_CheckPoints.
+ (TT_Hint_Glyph): New function to hint a zone, prepared by caller.
+ (TT_Process_Simple_Glyph): s/load/loader/.
+ Use loader->pp values instead of recalculation.
+ Use TT_Hint_Glyph.
+ No need to save/restore loader->stream before and after
+ TT_Vary_Get_Glyph_Deltas now.
+ (TT_LOADER_SET_PP): New macro to calculate and set the four phantom
+ points.
+ (load_truetype_glyph): Never set exec->glyphSize to 0. This closes
+ Savannah bug #13107.
+ Forget glyph frame before calling TT_Process_Simple_Glyph.
+ Use TT_LOADER_SET_PP.
+ Scale all four phantom points.
+ Split off some functionality to ...
+ (TT_Process_Composite_Component, TT_Process_Composite_Glyph): These
+ new functions.
+ (TT_Load_Glyph): Set various fields of `glyph' here, not in
+ load_truetype_glyph and compute_glyph_metrics.
+ Split off some functionality to ...
+ (load_sbit_image, tt_loader_init): These new functions.
+ (compute_glyph_metrics): Call FT_Outline_Get_CBox.
+
+2005-08-08 Werner Lemberg <wl@gnu.org>
+
+ * docs/INSTALL.ANY: Updated.
+
+2005-08-05 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_builder_close_contour),
+ src/psaux/psobjs.c (t1_builder_close_contour): Protect against
+ zero `outline' pointer.
+
+ * src/base/ftgloadr.c (FT_GlyphLoader_Add): Protect against zero
+ `loader' address.
+
+2005-08-03 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfdriver.c (sfnt_interface) [FT_OPTIMIZE_MEMORY]:
+ Reactivate pointers to tt_find_sbit_image and tt_load_sbit_metrics
+ to make X work again.
+
+2005-08-02 Werner Lemberg <wl@gnu.org>
+
+ * src/otvalid/otvcommn.h: Remove dead code.
+
+2005-07-31 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/truetype/ttobjs.h (tt_size_run_fpgm, tt_size_run_prep): New
+ functions.
+
+ * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): New
+ functions.
+ (tt_size_init): Add 4, instead of 2, (phantom) points to twilight
+ zone.
+ Move code that runs fpgm to tt_size_run_fpgm.
+ (Reset_Outline_Size): Move code that runs prep to tt_size_run_prep.
+ (tt_glyphzone_new): Allocate right size of arrays.
+ Set max_points and max_contours properly.
+
+2005-07-26 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/truetype/ttdriver.c (Set_Char_Sizes): Avoid unnecessary
+ computations and clean up.
+
+ * src/truetype/ttobjs.h (struct TT_SizeRec_): Comment on the
+ internal copy of metrics.
+
+2005-07-12 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftoutln.h (FT_Outline_Embolden): Fix prototype.
+ Reported by Xerxes.
+
+2005-07-04 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftmemory.h (FT_REALLOC_ARRAY): Fix typo.
+ Reported by Brett Hutley.
+
+2005-06-30 David Turner <david@freetype.org>
+
+ * src/sfnt/ftbitmap.c, src/truetype/ttgload.c, src/sfnt/ttcmap.c:
+ Removing compiler warnings (Visual C++ /W4).
+
+
+ Implement a work-around for broken C preprocessor in Visual C++ (it
+ has been confirmed by the MS developers that it is indeed a bug
+ which won't be fixed in the very near future).
+
+ * Jamfile (FT2_COMPONENTS): Include otvalid (again).
+
+ * src/otvalid/otvcommn.h (OTV_NAME, OTV_FUNC): New macros.
+ (OTV_NEST1, OTV_NEST2, OTV_NEST3): Use OTV_NAME and OTV_FUNC to
+ avoid argument expansion by argument prescan.
+ Append `Func' to all affected macros and change them to take just a
+ single argument. Example: `AttachList' is renamed to
+ `AttachListFunc'.
+
+ * src/otvalid/otvgdef.c, src/otvalid/otvgpos.c,
+ src/otvalid/otvgsub.c, src/otvjstf.c: Append `Func' to macros
+ affected by the changes to OTV_NESTx and modify them to take just a
+ single argument.
+
+2005-06-20 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * include/freetype/internal/ftobjs.h, src/base/ftobjs.c: New function
+ ft_glyphslot_grid_fit_metrics.
+
+ * src/truetype/ttgload.c (compute_glyph_metrics): Use
+ ft_glyphslot_grid_fit_metrics.
+
+ * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
+ (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Use
+ ft_glyphslot_grid_fit_metrics.
+ FT_Outline_Get_CBox is called twice.
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Modify metrics to more
+ reasonable values when emboldening outline glyphs. The theoretic
+ ones are unrealistic.
+
+2005-06-16 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/base/ftoutln.c (FT_Outline_Embolden): Strength should be
+ halved.
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Change the default
+ strength.
+ Don't increase slot->advance.y.
+
+2005-06-16 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 2.
+ (FREETYPE_PATCH): Set to 0.
+
+ * builds/unix/configure.ac (version_info): Set to 9:9:3.
+ Currently, we are still binary compatible.
+
+ * builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj: s/219/2110/, s/2.1.9/2.1.10/.
+
+ * builds/freetype.mk (refdoc), README, Jamfile (RefDoc):
+ s/2.1.9/2.1.10/.
+
+ * docs/CHANGES, docs/VERSION.DLL: Updated.
+
+ * ChangeLog: Split off older entries into...
+ * ChangeLog.20, ChangeLog.21: These new files.
+
+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.
+
+ * include/freetype/ftimage.h (FT_Outline_MoveToFunc,
+ FT_Outline_LineToFunc, FT_Outline_ConicToFunc,
+ FT_Outline_CubicToFunc, FT_SpanFunc, FT_Raster_RenderFunc),
+ include/freetype/ftrender.h (FT_Glyph_TransformFunc,
+ FT_Renderer_RenderFunc, FT_Renderer_TransformFunc): Decorate
+ parameters with `const' where appropriate.
+
+2005-06-15 Chia I Wu <b90201047@ntu.edu.tw>
+
+ * src/sfnt/ttsbit.c (tt_face_load_sbit_image): Compute vertBearingY
+ to make glyphs centered vertically.
+
+ * src/truetype/ttgload.c (compute_glyph_metrics): Compute
+ vertBearingY to make glyphs centered vertically.
+ Fix some bugs in vertical metrics:
+
+ . loader->pp3.y and loader->pp4.y are in 26.6 format, not in font
+ units.
+ . As we use the glyph's cbox to calculate the top bearing now
+ there is no need to adjust `top'.
+
+2005-06-15 Werner Lemberg <wl@gnu.org>
+
+ * src/otvalid/otvcommn.h (OTV_OPTIONAL_TABLE): Use FT_UShort to be
+ in sync with OTV_OPTIONAL_OFFSET. Reported by YAMATO Masatake.
+
+2005-06-13 Werner Lemberg <wl@gnu.org>
+
+ * docs/release: Update.
+
+----------------------------------------------------------------------------
+
+Copyright 2005, 2006, 2007, 2008 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/3party/freetype/ChangeLog.23 b/3party/freetype/ChangeLog.23
new file mode 100644
index 0000000000..bc46c84a04
--- /dev/null
+++ b/3party/freetype/ChangeLog.23
@@ -0,0 +1,7948 @@
+2010-02-13 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.3.12 released.
+ ==========================
+
+
+ Tag sources with `VER-2-3-12'.
+
+ * docs/CHANGES: Updated.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.3.12.
+
+ * README, Jamfile (RefDoc),
+ builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html,
+ builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj,
+ builds/win32/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.3.11/2.3.12/, s/2311/2312/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 12.
+
+ * builds/unix/configure.raw (version_info): Set to 10:0:4.
+
+2010-02-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Improve autotool version checking to work with beta releases.
+
+ * autogen.sh (check_tool_version): Improve the extraction of version
+ number from "tool --version" output. Some beta releases of
+ autotools have extra strings before version number.
+
+2010-02-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix overallocating bug in FT_Outline_New_Internal().
+
+ * src/base/ftoutln.c (FT_Outline_New_Internal): The length of
+ FT_Outline->points[] should be numPoints, not 2 * numPoints.
+ Found by Paul Messmer, see
+ http://lists.gnu.org/archive/html/freetype-devel/2010-02/msg00003.html
+
+2010-02-10 Ken Sharp <ken.sharp@artifex.com>
+
+ Really fix Savannah bug #28678 (part 2).
+
+ Since we consider `sbw' for the horizontal direction only, we still have
+ to synthesize vertical metrics if the user wants to use the vertical
+ writing direction.
+
+ * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
+ (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph):
+ Synthesize vertical metrics (only) if FT_LOAD_VERTICAL_LAYOUT is
+ set.
+
+2010-02-10 Ken Sharp <ken.sharp@artifex.com>
+
+ Really fix Savannah bug #28678 (part 1).
+
+ After long discussion, we now consider the character width vector
+ (wx,wy) returned by the `sbw' Type 1 operator as being part of *one*
+ direction only. For example, if you are using the horizontal
+ writing direction, you get the horizontal and vertical components of
+ the advance width for this direction. Note that OpenType and CFF fonts
+ don't have such a vertical component; instead, the GPOS table can be
+ used to generate two-dimensional advance widths (but this isn't
+ handled by FreeType).
+
+ * include/freetype/ftincrem.h (FT_Incremental_MetricsRec): Add
+ `advance_v' field to hold the vertical component of the advance
+ value.
+
+ * src/truetype/ttgload.c (tt_get_metrics), src/cff/cffgload.c
+ (cff_slot_load), src/type1/t1gload.c
+ (T1_Parse_Glyph_And_Get_Char_String), src/cid/cidgload.c
+ (cid_load_glyph): Use it.
+
+2010-02-08 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h [FT_CONFIG_OPTION_PIC]: Define.
+
+2010-02-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Prevent NULL pointer dereference passed to FT_Module_Requester.
+
+ * src/sfnt/sfdriver.c (sfnt_get_interface): Don't use `module'.
+ * src/psnames/psmodule.c (psnames_get_interface): Ditto.
+
+ * src/cff/cffdrivr.c (cff_get_interface): Check NULL `driver'.
+ * src/truetype/ttdriver.c (tt_get_interface): Ditto.
+
+2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix memory leaks in previous patch.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Don't overwrite the strings
+ allocated for face->root.family_name and style_name.
+
+2010-01-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ New parameters for FT_Open_Face() to ignore preferred family names.
+
+ Preferred family names should be used for legacy systems that
+ can hold only a few faces (<= 4) for a family name. Suggested by
+ Andreas Heinrich.
+ http://lists.gnu.org/archive/html/freetype/2010-01/msg00001.html
+
+ * include/freetype/ftsnames.h (FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY,
+ FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY): Define.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Check the arguments and
+ ignore preferred family and subfamily names if requested.
+
+2010-01-27 Ken Sharp <ken.sharp@artifex.com>
+
+ Fix Savannah bug #28678.
+
+ * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c
+ (cid_load_glyph): Handle vertical metrics correctly.
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Handle
+ vertical metrics correctly.
+ (T1_Load_Glyph): Don't synthesize vertical metrics.
+
+2010-01-14 Werner Lemberg <wl@gnu.org>
+
+ Make FT_Set_Transform work if no renderer is available.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Apply `standard' transformation
+ if no renderer is compiled into the library.
+
+2010-01-14 Werner Lemberg <wl@gnu.org>
+
+ Fix compilation warning.
+
+ * src/base/ftbase.h: s/LOCAL_DEF/LOCAL/.
+ * src/base/ftobjc.s: Include ftbase.h conditionally.
+
+2010-01-11 Kwang Yul Seo <skyul@company100.net>
+
+ Provide inline assembly code for RVCT compiler.
+ This is Savannah patch #7059.
+
+ * include/freetype/config/ftconfig.h (FT_MULFIX_ASSEMBLER,
+ FT_MulFix_arm) [__CC_ARM || __ARM_CC]: Define.
+
+2010-01-08 Ken Sharp <ken.sharp@artifex.com>
+
+ Fix Savannah bug #28521.
+
+ Issue #28226 involved a work-around for a font which used the
+ `setcurrentpoint' operator in an invalid way; this operator is only
+ supposed to be used with the result of OtherSubrs, and the font used
+ it directly. The supplied patch removed the block of code which
+ checked this usage entirely.
+
+ This turns out to be a Bad Thing. If `setcurrentpoint' is being
+ used correctly it should reset the flex flag in the decoder. If we
+ don't do this then the flag never gets reset and we omit any further
+ contours from the glyph (at least until we close the path or
+ similar).
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_setcurrentpoint>: Handle `flex_state' correctly.
+
+2010-01-05 Werner Lemberg <wl@gnu.org>
+
+ Apply reports from clang static analyzer.
+
+ * src/lzw/ftlzw.c (ft_lzw_file_init), src/base/ftstroke.c
+ (FT_Stroker_ParseOutline), src/base/ftsynth.c
+ (FT_GlyphSlot_Embolden): Remove dead code.
+
+ * src/base/ftpatent.c (_tt_check_patents_in_table): Initialize
+ `offset_i' and `length_i'.
+
+2010-01-05 Ralph Giles <giles@ghostscript.com>
+
+ Enable the incremental font interface by default.
+
+ Ghostscript requires the incremental font interface for handling
+ some Postscript documents. It is moving to using FreeType as its
+ primary renderer; supporting this in the default build makes it
+ Ghostscript to be linked against the system FreeType when one is
+ available.
+
+ * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_INCREMENTAL):
+ Uncomment.
+
+2010-01-05 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #28395.
+
+ * src/truetype/ttdriver.c (Load_Glyph), src/type1/t1gload.c
+ (T1_Loada_Glyph): Don't check `num_glyphs' if incremental interface
+ is used.
+
+2010-01-05 Ken Sharp <ken.sharp@artifex.com>
+
+ Make Type 1 `seac' operator work with incremental interface.
+ This fixes Savannah bug #28480.
+
+ * src/psaux/t1decode.c (t1operator_seac): Don't check `glyph_names'
+ if incremental interface is used.
+
+2010-01-04 Ken Sharp <ken.sharp@artifex.com>
+
+ Make incremental interface work with TrueType fonts.
+ This fixes Savannah bug #28478.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Don't check
+ `glyf_offset' if incremental interface is used.
+
+2009-12-31 Lars Abrahamsson <wonko@opera.com>
+
+ Make compilation with FT_CONFIG_OPTION_PIC work again.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]:
+ Declare `library' for FT_BITMAP_GLYPH_CLASS_GET.
+
+ * src/base/ftinit.c (ft_destroy_default_module_classes,
+ ft_create_default_module_classes): Use proper casts (needed for C++
+ compilation).
+
+ * src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP.
+
+2009-12-22 Marc Kleine-Budde <mkl@pengutronix.de>
+
+ Make freetype-config aware of $SYSROOT.
+ This is Savannah patch #7040.
+
+ * builds/unix/freetype-config.in: Decorate with ${SYSROOT} where
+ appropriate.
+
+2009-12-20 Werner Lemberg <wl@gnu.org>
+
+ Fix compiler warning.
+ Reported by Sean.
+
+ * src/base/ftdbgmem.c [!FT_DEBUG_MEMORY]: ANSI C doesn't like empty
+ source files; however, some compilers warn about an unused variable
+ declaration. This is now replaced with a typedef.
+
+2009-12-18 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #28320.
+
+ There exist corrupt, subsetted fonts (embedded in PDF files) which
+ contain a private dict that ends with an unterminated floating point
+ number (no operator following). We now ignore this error (as
+ acrobat does).
+
+ * src/cff/cffparse.c (cff_parser_run): Don't emit a syntax error for
+ unterminated floating point numbers.
+
+2009-12-16 Werner Lemberg <wl@gnu.org>
+
+ Really fix compiler warnings.
+ Reported by Sean.
+
+ * src/truetype/ttgxvar.c (GX_PT_POINTS_ARE_WORDS,
+ GX_PT_POINT_RUN_COUNT_MASK): Convert enum values to macros.
+
+2009-12-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Improve configure.raw to copy some options from CFLAGS to LDFLAGS.
+ The linker of Mac OS X 10.6 is sensitive to the architecture. If
+ the architectures are specified explicitly for the C compiler, the
+ linker requires the architecture specifications too.
+
+ * builds/unix/configure.raw: Replace `-isysroot' option parser by
+ more generic argument parser.
+
+2009-12-15 Werner Lemberg <wl@gnu.org>
+
+ Fix compiler warnings.
+ Reported by Sean.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackeddeltas): Fix counter data
+ type.
+
+2009-12-14 Ken Sharp <ken.sharp@artifex.com>
+
+ Ignore invalid `setcurrentpoint' operations in Type 1 fonts.
+ This fixes Savannah bug #28226.
+
+ At least two wild PostScript files of unknown provenance contain
+ Type 1 fonts, apparently converted from TrueType fonts in earlier
+ PDF versions of the files, which use the `setcurrentpoint' operator
+ inappropriately.
+
+ FreeType currently throws an error in this case, but Ghostscript and
+ Adobe Distiller both accept the fonts and ignore the problem. This
+ commit #ifdefs out the check so PostScript interpreters using
+ FreeType can render these files.
+
+ The specification says `setcurrentpoint' should only be used to set
+ the point after a `Subr' call, but these fonts use it to set the
+ initial point to (0,0). Unnecessarily so, as they correctly use an
+ `hsbw' operation which implicitly sets the initial point.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_setcurrentpoint>: Comment out code.
+
+2009-12-14 Bram Tassyns <bramt@enfocus.be>
+
+ Fix parsing of /CIDFontVersion.
+ This fixes Savannah bug #28287.
+
+ * src/cid/cidtoken.h: `cid_version' in CID_FaceInfoRec (in
+ t1tables.h) is of type FT_Fixed.
+
+2009-12-14 Werner Lemberg <wl@gnu.org>
+
+ Trace glyph index in CID module.
+ Suggested in Savannah patch #7023.
+
+ * src/cid/cidgload.c (cid_load_glyph): Add tracing message.
+
+2009-12-03 Werner Lemberg <wl@gnu.org>
+
+ Fix compiler warnings.
+
+ * src/truetype/ttgload.c (tt_get_metrics): Put `Exit' label into the
+ proper preprocessor conditional.
+ * src/pfr/pfrobjs.c (pfr_slot_load): Pacify gcc.
+
+2009-11-25 John Tytgat <John.Tytgat@esko.com>
+
+ Better handling of start of `eexec' section.
+ This fixes Savannah bug #28090.
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Skip all whitespace
+ characters before start of `eexec' section.
+
+2009-11-20 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #27742.
+
+ * src/base/ftstroke.c (ft_stroker_outside): Avoid silent division by
+ zero, using a threshold for `theta'.
+
+2009-11-20 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #28036.
+
+ * src/type1/t1afm.c (t1_get_index): Fix comparison.
+
+2009-11-16 Werner Lemberg <wl@gnu.org>
+
+ Fix compiler warnings.
+ Reported by Kevin Blenkinsopp <arqon@promode.org>.
+
+ * src/sfnt/ttload.c (check_table_dir): Use proper data type.
+
+2009-11-15 Werner Lemberg <wl@gnu.org>
+
+ Really fix FreeDesktop bug #21197.
+ This also fixes Savannah bug #28021.
+
+ * src/autofit/aflatin.c (af_latin_metrics_check_digits),
+ src/autofit/aflatin2.c (af_latin2_metrics_check_digits): Fix loop.
+
+2009-11-15 Werner Lemberg <wl@gnu.org>
+
+ Add tracing messages for advance values.
+
+ * src/base/ftobjs.c (FT_Load_Glyph), src/truetype/ttgload.c
+ (TT_Get_HMetrics, TT_Get_VMetrics): Do it.
+
+2009-11-08 Werner Lemberg <wl@gnu.org>
+
+ Fix compiler warning.
+ Reported by Jeremy Manson <jeremy.manson@gmail.com>.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Initialize `error'.
+
+2009-11-04 Werner Lemberg <wl@gnu.org>
+
+ Remove compiler warning.
+ Reported by Sean McBride <sean@rogue-research.com>.
+
+ * src/tools/apinames.c (read_header_file)<STATE_TYPE>: Use a cast to
+ `int', as specified in the printf(3) man page.
+
+2009-11-04 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #27921.
+
+ * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c
+ (cid_face_init), src/type1/t1afm.c (T1_Read_Metrics),
+ src/type1/t1objs.c (T1_Face_Init): Don't use unsigned constant
+ values for rounding if the argument can be negative.
+
+2009-11-03 Bram Tassyns <bramt@enfocus.be>
+
+ Add basic support for Type1 charstrings in CFF.
+ This fixes Savannah bug #27922.
+
+ * src/cff/cffgload.c (CFF_Operator, cff_argument_counts): Handle
+ `seac', `sbw', and `setcurrentpoint' opcodes.
+ (cff_compute_bias): Add parameter to indicate the charstring type.
+ Update all callers.
+ (cff_operator_seac): Add parameter for side bearing.
+ (cff_decoder_parse_charstrings): Updated for more Type1 support.
+
+2009-11-03 Werner Lemberg <wl@gnu.org>
+
+ Return correct `linearHoriAdvance' value for embedded TT bitmaps too.
+ Reported by Jeremy Manson <jeremy.manson@gmail.com>.
+
+ src/truetype/ttgload.c (load_truetype_glyph): Add parameter to
+ quickly load the glyph header only.
+ Update all callers.
+ (tt_loader_init): Add parameter to quickly load the `glyf' table
+ only.
+ Update all callers.
+ (TT_Load_Glyph): Compute linear advance values for embedded bitmap
+ glyphs too.
+
+2009-11-03 Werner Lemberg <wl@gnu.org>
+
+ Improve code readability.
+
+ * src/ttgload.c (load_truetype_glyph): Move metrics calculation
+ to...
+ (tt_get_metrics): This new function.
+
+2009-10-26 Bram Tassyns <bramt@enfocus.be>
+
+ Fix Savannah bug #27811.
+
+ * src/truetype/ttxgvar.c (ft_var_readpackeddeltas): Fix
+ signed/unsigned mismatch.
+
+2009-10-19 Ning Dong <flintning@163.com>
+
+ Fix handling of `get' and `put' CFF instructions.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_get,
+ cff_op_put>: Appendix B of Adobe Technote #5177 limits the number of
+ elements for the `get' and `put' operators to 32.
+ * src/cff/cffgload.h (CFF_MAX_TRANS_ELEMENTS): Define.
+ (CFF_Decoder): Use it for `buildchar' and remove `len_buildchar'.
+
+2009-10-18 Werner Lemberg <wl@gnu.org>
+
+ Fix handling of `dup' CFF instruction.
+ Problem and solution reported by Ning Dong <flintning@163.com>.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_dup>:
+ Increase `args' by 2, not 1.
+
+2009-10-10 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.3.11 released.
+ ==========================
+
+
+ Tag sources with `VER-2-3-11'.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.3.11.
+
+ * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj: s/2.3.10/2.3.11/, s/2310/2311/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 11.
+
+ * builds/unix/configure.raw (version_info): Set to 9:22:3.
+
+2009-10-10 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES, docs/release: Updated.
+
+2009-10-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/pcf/pcfread.c (pcf_get_properties): Fix a bug in the nprops
+ truncation. Reported by Martin von Gagern and Peter Volkov.
+ https://bugs.gentoo.org/288357 and https://bugs.gentoo.org/288256
+
+2009-10-06 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.3.10 released.
+ ==========================
+
+
+ Tag sources with `VER-2-3-10'.
+
+ * builds/toplevel.mk (major, minor, patch): Fix regexp to allow more
+ than a single digit.
+ (dist): We now use git.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.3.10.
+
+ * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj: s/2.3.9/2.3.10/, s/239/2310/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 10.
+
+ * builds/unix/configure.raw (version_info): Set to 9:21:3.
+
+2009-10-06 Werner Lemberg <wl@gnu.org>
+
+ Fix `make multi'.
+
+ * src/cache/ftccache.c, src/cache/ftcsbits.c (FT_COMPONENT): Define.
+
+ * src/sfnt/sfdriver.c: Include FT_INTERNAL_DEBUG_H.
+
+2009-09-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Fix Savannah bug #27441, clean up Redhat bugzilla #513582.
+ Tricky casts in FTC_{CACHE,GCACHE,MRULIST}_LOOKUP_CMP() are removed.
+ Now these functions should be called with FTC_Node or FTC_MruNode
+ variable, and the caller should cast them to appropriate pointers to
+ concrete data. These tricky casts can GCC-4.4 optimizer (-O2)
+ confused and the crashing binaries are generated.
+
+ * src/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Drop tricky cast.
+ Now the 4th argument `node' of this function should be typed as
+ FTC_MruNode.
+
+ * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): For inline
+ implementation, new temporal variable FTC_MruNode `_mrunode' to take
+ the pointer from FTC_MRULIST_LOOKUP_CMP(). For non-inline
+ implementation, tricky cast is dropped.
+
+ * src/cache/ftcmanag.c (FTC_SIZE_NODE): New macro casting
+ to FTC_SizeNode.
+ (FTC_Manager_LookupSize): Replace FTC_SizeNode `node' by FTC_MruNode
+ `mrunode', and FTC_SIZE_NODE() is inserted.
+ (FTC_FACE_NODE): New macro casting to FTC_FaceNode.
+ (FTC_Manager_LookupFace) Replace FTC_FaceNode `node' by FTC_MruNode
+ `mrunode', and FTC_FACE_NODE() is inserted.
+
+ * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Change the type of
+ `node' from FTC_INode to FTC_Node. Extra casting macro FTC_NODE()
+ is dropped.
+ (FTC_ImageCache_LookupScaler): Ditto.
+ (FTC_SBitCache_Lookup): Change the type of `node' from FTC_SNode to
+ FTC_Node. Extra casting macro FTC_NODE() is dropped. FTC_SNODE()
+ is inserted.
+ (FTC_SBitCache_LookupScaler): Ditto.
+
+ * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the type of
+ `node' from FTC_CMapNode to FTC_Node. Extra casting macro
+ FTC_NODE() is dropped, FTC_CMAP_NODE() is inserted.
+
+2009-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache, psaux, type1] Fix for multi build.
+ In multi build, some cpp functions are left as unresolved symbols.
+
+ * src/cache/ftcbasic.c: Include FT_INTERNAL_DEBUG_H for FT_TRACE1().
+
+ * src/psaux/t1decode.c: Include FT_INTERNAL_CALC_H for
+ FIXED_TO_INT().
+ * src/type1/t1gload.c: Ditto.
+ * src/type1/t1objs.c: Ditto.
+
+2009-09-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [autofit] Fix for multi build.
+
+ * src/autofit/afmodule.h: Include FT_INTERNAL_OBJECTS_H to use
+ FT_DECLARE_MODULE() macro in multi build.
+
+ * src/autofit/aflatin.c: Include <ft2build.h> to handle
+ FT_ADVANCES_H correctly in multi build.
+
+2009-09-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [cache] Check the face filled by FTC_Manager_LookupFace().
+
+ * src/cache/ftcbasic.c (ftc_basic_family_get_count): Return
+ immediately if FTC_Manager_LookupFace() fills face by NULL. Such
+ case can occur when the code is optimized by GCC-4.2.x.
+
+2009-09-23 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2009-09-12 Werner Lemberg <wl@gnu.org>
+
+ [raster] Fix 5-levels grayscale output.
+ This was broken since version 2.3.0.
+
+ * src/raster/ftraster.c (count_table): Use pre-2.3.0 values (which
+ were then computed dynamically).
+ (Vertical_Gray_Sweep_Step): Updated.
+
+ (ft_black_render): Initialize `worker->gray_lines' (problem found by
+ valgrind).
+
+ (FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just
+ comment out.
+
+2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Improve configure.raw for cross build.
+
+ * builds/unix/configure.raw: Remove temporal files created by the
+ suffix checking for CC_BUILD. Set XX_ANSIFLAGS and XX_CFLAGS when
+ cross compiler is GCC. AC_PROG_CC checks whether the cross compiler
+ is GCC, its result is stored in GCC.
+
+2009-09-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [BDF] Modify hash API to take size_t value instead of void *.
+
+ The hash API in BDF driver is designed to be generic, it takes
+ void * typed data. But BDF driver always gives an unsigned long
+ integer (the index to a property). To reduce non-essential
+ casts from unsigned long to void* and from void* to unsigned
+ long, the hash API is changed to take size_t integer.
+ The issue of incompatible cast between unsigned long and void*
+ on LLP64 platform is reported by NightStrike from MinGW-Win64
+ project. See
+ http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
+
+ * src/bdf/bdf.h: The type of hashnode->data is changed from
+ void* to size_t.
+
+ * src/bdf/bdflib.c (hash_insert): Get size_t data, instead of
+ void* data.
+ (bdf_create_property): Get the name length of new property by
+ size_t variable, with a cut-off at FT_ULONG_MAX.
+ (_bdf_set_default_spacing): Get the name length of the face by
+ size_t variable, with a cut-off at 256.
+ (bdf_get_property): Get the property id by size_t variable to
+ reduce the casts between 32-bit prop ID & hashnode->data during
+ simple copying.
+ (_bdf_add_property): Ditto.
+ (_bdf_parse_start): Calculate the index to the property array
+ by size_t variable.
+ (bdf_get_font_property): Drop a cast to unsigned long.
+
+2009-09-10 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [Win64] Improve the computation of random seed from stack address.
+
+ On LLP64 platform, the conversion from pointer to FT_Fixed need
+ to drop higher 32-bit. Explict casts are required. Reported by
+ NightStrike from MinGW-w64 project. See
+ http://lists.gnu.org/archive/html/freetype/2009-09/msg00000.html
+
+ * src/cff/cffgload.c: Convert the pointers to FT_Fixed explicitly.
+
+ * src/psaux/t1decode.c: Ditto.
+
+
+2009-09-03 Werner Lemberg <wl@gnu.org>
+
+ [raster] Improvements for stand-alone mode.
+
+ * 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,
+ FT_Realloc_Func): Copy declarations from ftsystem.h.
+
+2009-09-02 Bram Tassyns <bramt@enfocus.be>
+
+ Improve vertical metrics calculation (Savannah bug #27364).
+
+ The calculation of `vertBearingX' is not defined in the OTF font
+ spec so FreeType does a `best effort' attempt. However, this value
+ is defined in the PDF and PostScript specs, and that algorithm is
+ better than the one FreeType currently uses:
+
+ FreeType: Use the middle of the bounding box as the X coordinate
+ of the vertical origin.
+
+ Adobe PDF spec: Use the middle of the horizontal advance vector as
+ the X coordinate of the vertical origin.
+
+ FreeType's algorithm goes wrong if you have a really small glyph
+ (like the full-width, circle-like dot at the end of the sentence, as
+ used in CJK scripts) with large bearings. With the FreeType
+ algorithm this dot gets centered on the baseline; with the PDF
+ algorithm it gets the correct location (in the top right). Note
+ that this is a serious issue, it's like printing the dot at the end
+ of a Roman sentence at the center of the textline instead of on the
+ baseline like it should. So i believe the PDF spec's algorithm
+ should be used in FreeType as well.
+
+ The `vertBearingY' value for such small glyphs is also very strange
+ if no `vmtx' information is present, since the height of the bbox is
+ not representable for the height of the glyph visually (the
+ whitespace up to the baseline is part of the glyph). The fix also
+ includes some code for a better estimate of `vertBearingY'.
+
+ * src/base/ftobjs.c (ft_synthesize_vertical_metrics): `vertBearingX'
+ is now calculated as described by the Adobe PDF Spec. Estimate for
+ `vertBearingY' now works better for small glyphs completely above or
+ below the baseline into account.
+
+ * src/cff/cffgload.c (cff_slot_load): `vertBearingX' is now
+ calculated as described by the Adobe PDF Spec. Vertical metrics
+ information was always ignored when FT_CONFIG_OPTION_OLD_INTERNALS
+ was not defined.
+
+ * src/truetype/ttgload.c (compute_glyph_metrics): `vertBearingX' is
+ now calculated as described by the Adobe PDF Spec.
+
+2009-09-01 John Tytgat <John.Tytgat@esko.com>
+
+ Fix custom cmap for empty Type 1 font (Savannah bug #27294).
+
+ * include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update
+ comment to reflect revised code_last meaning.
+ * src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c
+ (T42_Open_Face): Assign max_char as highest character code + 1 and
+ use this for T1_EncodingRecRec_::code_last.
+ * src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised
+ T1_EncodingRecRec_::code_last meaning.
+
+2009-08-25 Werner Lemberg <wl@gnu.org>
+
+ Fix rendering of horizontally compressed CFFs.
+ Bug reported by Ivan Nincic <inincic@pdftron.com>.
+
+ * src/cff/cffgload.c (cff_slot_load): Thinko: Check `xx' element of
+ `font_matrix' also.
+
+ * docs/CHANGES: Updated.
+
+2009-08-03 suyu0925@gmail.com
+
+ Don't call `ft_fseek' every time when executing `ft_fread'.
+
+ * src/base/ftstream.c (FT_Stream_Seek), src/base/ftsystem.c
+ (ft_ansi_stream_io): Implement it.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Cast a charcode to 32-bit in cmap format 14 parser.
+
+ * src/sfnt/ttcmap.c (tt_cmap14_char_var_index,
+ tt_cmap14_char_var_isdefault, tt_cmap14_char_variants,
+ tt_cmap14_variant_chars): Correct mismatches from
+ FT_CMap_CharVarIndexFunc prototype, FT_ULong arguments
+ are replaced by FT_UInt32 arguments.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Cast a charcode to 32-bit in cmap format 12 parser.
+
+ * src/sfnt/ttcmap.c (tt_cmap12_char_next):
+ Insert explicit cast from FT_UFast to FT_UInt32
+ for return value.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ psaux: Fix a few casts to FT_Int32 value.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
+ Fix a few casts setting `value' from FT_Long to FT_Int32,
+ because `value' is typed as FT_Int32 since 2009-06-22.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Fix a data type mismatching with its source.
+
+ * src/sfnt/ttcmap.c (tt_cmap13_char_next): Fix the
+ type of `gindex' from FT_ULong to FT_UInt because
+ it is set by FT_UInt tt_cmap13_char_map_binary() or
+ TT_CMap13->cur_gindex.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Extend a few local variables to load 32-bit values.
+
+ * src/sfnt/ttkern.c (tt_face_load_kern): Extend `count'
+ and `kern' to load 32-bit values.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ pfr: Extend `num_aux' to take 32-bit value.
+
+ * src/pfr/pfrload.c (pfr_phy_font_load): Extend
+ `num_aux' to load 32-bit value.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ pcf: Truncate FT_ULong `nprops' to fit to int PCF_Face->nprops.
+
+ * src/pcf/pcfread.c (pcf_get_properties): Load `nprops'
+ as FT_ULong value from PCF file, but truncate it as
+ int to fit PCF_Face->nprops. The number of truncated
+ properties is shown in the trace message.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gxvalid: Extend a few local variables to reduce the casts.
+
+ * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
+ Extend `type' and `rest' to take FT_ULong values.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gxvalid: Extend `settingTable' to take 32-bit offset.
+
+ * src/gxvalid/gxvfeat.c (gxv_feat_name_validate):
+ Extend `settingTable' to take 32-bit offset.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ autofit: Cast FT_Long glyph_count to compare with FT_UInt GID.
+
+ * src/autofit/afglobal.c (af_face_globals_is_digit,
+ af_face_globals_compute_script_coverage): Cast FT_Long
+ globals->glyph_count to FT_ULong, to compare with FT_UInt
+ gindex.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ smooth: Exclude 16-bit system in invalid pitch/height check.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic):
+ pitch and height are typed as FT_UInt but checked to fit
+ 16-bit range, to avoid the overflows. On 16-bit system,
+ this checking inserts a conditional that never occurs.
+
+2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cff: Type large constants > 0x7FFF as long for 16-bit systems.
+
+ * src/cff/cffload.c (cff_charset_load): Type large
+ constants > 0x7FFF as long, because normal constants
+ are typed signed integer that is less than 0x8000 on
+ 16-bit systems.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ base: Remove an unused variable.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Remove an
+ unused variable `library'. glyph->library is used.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cache: Check higher bits in flags for non ILP32 systems.
+
+ 4 public functions ought to take FT_ULong flags, but take
+ FT_UInt flags. To keep binary compatibility, we drop higher
+ bits on non ILP32 platforms,
+ ILP64 systems: No drop occurs.
+ LP64 systems: Higher bits are not used.
+ 16-bit systems: Drop can occur.
+ See
+ http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00065.html
+ These functions will be refined to take FT_ULong flags in
+ next bump with incompatible API change.
+
+ * src/cache/ftcbasic.c (FTC_ImageCache_Lookup):
+ Check `flags' in `type', the 2nd argument.
+ (FTC_SBitCache_Lookup): Ditto.
+ (FTC_ImageCache_LookupScaler): Check `load_flags',
+ the 3rd argument.
+ (FTC_SBitCache_LookupScaler): Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Ignore invalid GIDs in glyph name lookup.
+
+ * include/freetype/internal/fttrace.h:
+ New trace module for sfdriver.c is added.
+
+ * src/sfnt/sfdriver.c (sfnt_get_name_index):
+ Restrict glyph name lookup to FT_UInt GID.
+ Genuine TrueType can hold 16-bit glyphs.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ pcf: Fix a comparison between FT_Long and FT_ULong.
+
+ * src/pcf/pcfread.c (pcf_get_bitmaps): Return an error
+ if PCF_Face->nemetrics is negative.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gxvalid: Guarantee `nFeatureFlags' size up to 32-bit.
+
+ * src/gxvalid/gxvmort.c (gxv_mort_featurearray_validate):
+ Extend the 3rd argument `nFeatureFlags' to FT_ULong.
+ * src/gxvalid/gxvmort.h: Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Insert explicit cast for LP64 system.
+
+ * src/sfnt/ttkern.c (tt_face_load_kern): Insert
+ cast from unsigned long to FT_UInt32.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gxvalid: Guarantee `just' table size upto 32-bit.
+
+ * src/gxvalid/gxvjust.c (gxv_just_validate):
+ The type of `offset' is changed from FT_UInt to
+ FT_Offset, for 16-bit platforms.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gxvalid: Guarantee `trak' table size upto 32-bit.
+
+ * src/gxvalid/gxvtrak.c (gxv_trak_validate):
+ The type of `offset' is changed from FT_UInt to
+ FT_Offset, for 16-bit platforms.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ 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.
+
+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_KernItem->offset
+ is extended from FT_UInt32 to FT_Offset, because it is
+ calculated with the pointer difference, in
+ pfr_extra_item_load_kerning_pairs().
+
+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
+ is extended from FT_UInt32 to FT_Offset, because it is
+ calculated with the pointer difference in pfr_phy_font_load().
+
+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_PhyFont->bct_offset
+ is extended from FT_UInt32 to FT_Long, because it is
+ loaded by FT_STREAM_POS() in pfr_phy_font_load().
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ smooth: Improve the format in debug message.
+
+ * src/smooth/ftgrays.c (gray_dump_cells): Improve the
+ format specifications to dump variables.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Fix a data type mismatching with its source.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): The type of
+ local `flags' is matched with FT_Face->face_flags.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ 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.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Extend TrueType GX packed deltas to FT_Offset.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackeddeltas):
+ The type of 2nd argument `delta_cnt' is changed from
+ FT_Int to FT_Offset, because its source can be cvt
+ table size calculated from stream position.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Extend mmvar_len to hold size_t values.
+
+ * src/truetype/ttgxvar.h: The type of
+ GX_BlendRec.mmvar_len is changed from FT_Int to
+ FT_Offset, because TT_Get_MM_Var() calculates it
+ by sizeof() results.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Check invalid function number in IDEF instruction.
+
+ * src/truetype/ttinterp.c (Ins_IDEF): Check
+ if the operand fits to 8-bit opcode limitation.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Check invalid function number in FDEF instruction.
+
+ * src/truetype/ttinterp.c (Ins_FDEF): Check
+ if the operand fits 16-bit function number.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Truncate the deltas of composite glyph at 16-bit values.
+
+ * src/truetype/ttgload.c (load_truetype_glyph):
+ Insert cast from FT_Long (deltas[i].{x,y}) to
+ FT_Int16 in the summation of deltas[] for composite
+ glyphs. Because deltas[i] is typed as FT_Pos,
+ its component x, y are typed as FT_Long, but
+ their sources are always FT_Int16 when they are
+ loaded by ft_var_readpackeddeltas(). However,
+ the limitation about the summed deltas is unclear.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Truncate the instructions upto 16-bit per a glyph.
+
+ * src/truetype/ttgload.c (TT_Hint_Glyph): Truncate
+ the instructions upto 16-bit length per a glyph.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Cast the numerical operands to 32-bit for LP64 systems.
+
+ * src/truetype/ttinterp.c (Ins_SPHIX, INS_MIAP,
+ Ins_MIRP): Insert cast from long (args[], the
+ operands passed to TrueType operator) to FT_Int32
+ (the argument of TT_MulFix14()).
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Cast the project vector to 32-bit for LP64 system.
+
+ * src/truetype/ttinterp.c (Project, DualProject):
+ Insert casts from FT_Pos (the arguments `dx', `dy')
+ to FT_UInt32 (the argument to TT_DotFix14()).
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Cast the scaling params to 32-bit for LP64 system.
+
+ * src/truetype/ttgload.c (TT_Process_Composite_Component):
+ Insert casts from long (return value of FT_MulFix()) to
+ FT_Int32 (the argument to FT_SqrtFixed()).
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Cast a character code to FT_UInt32 for LP64 system.
+
+ * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary,
+ tt_cmap14_variants, tt_cmap14_char_variants,
+ tt_cmap14_def_char_count, tt_cmap14_get_def_chars,
+ tt_cmap14_get_nondef_chars, tt_cmap14_variant_chars)
+ Insert casts when FT_UInt32 variable is loaded by
+ TT_NEXT_{UINT24|ULONG}. Because most of them are
+ compared with FT_UInt32 values in public API, replacing
+ FT_UFast is not recommended.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Cast a character code to FT_UInt32 for LP64 system.
+
+ * src/sfnt/ttcmap.c (tt_cmap4_init, tt_cmap4_next):
+ Insert the casts from unsigned long constant to
+ FT_UInt32.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Extend TT_BDF->strings_size to FT_ULong for huge BDF.
+
+ * include/freetype/internal/tttypes.h: The type
+ of TT_BDF->string_size is extended from FT_UInt32
+ to FT_ULong, because BDF specification does not
+ restrict the length of string.
+ * src/sfnt/ttbdf.c: The scratch variable `strings'
+ to load TT_BDF->string_size is matched with
+ TT_BDF->string_size.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ psaux: Handle the string length by FT_Offset variables.
+
+ * src/psaux/afmparse.c (afm_parser_next_key,
+ afm_tokenize, afm_parse_track_kern,
+ afm_parse_kern_pairs, afm_parse_kern_data,
+ afm_parser_skip_section, afm_parser_parse):
+ The length of key is handled by FT_Offset,
+ instead of FT_UInt. Although the length of
+ PostScript strings or name object is 16-bit,
+ AFM_STREAM_KEY_LEN() calculates the length
+ from the pointer difference.
+
+ * src/psaux/afmparse.h (afm_parser_next_key):
+ Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ pcf: Fix some data types mismatching with their sources.
+
+ * src/pcf/pcfread.c (pcf_get_bitmaps): The types
+ of `nbitmaps', `i', `sizebitmaps' are matched with
+ the type of area FT_Bitmap.pitch * FT_Bitmap.rows.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ pcf: Handle the string length by size_t variables.
+
+ * src/pcf/pcfread.c (pcf_interpret_style): The types
+ of nn, len, lengths[4] are changed to size_t, because
+ they are loaded by (or compared with) ft_strlen().
+
+ * src/pcf/pcfutil.c (BitOrderInvert, TwoByteSwap,
+ FourByteSwap): The type of the 2nd argument `nbytes'
+ is changed to size_t, for similarity with ANSI C
+ string functions.
+
+ * src/pcf/pcfdrivr.c (PCF_Glyph_Load): The type of
+ `bytes' is changed to FT_Offset, because it is passed
+ to FT_ALLOC(), via ft_glyphslot_alloc_bitmap(). At
+ least, using unsigned type is better.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ pcf: Fix some data types mismatching with their sources.
+
+ * src/pcf/pcfread.c (pcf_seek_to_table_type,
+ pcf_has_table_type): The type of 3rd argument
+ `ntables' is matched with PCF_Toc->count.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ otvalid: Truncate the glyph index to 16-bit.
+
+ * src/otvalid/otvalid.c (otv_validate): Checks
+ face->num_glyphs does not exceed 16-bit limit,
+ pass FT_UInt num_glyphs to backend functions
+ otv_{GPOS|GSUB|GDEF|JSTF|MATH}_validate().
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cache: Insert explict casts for LP64 systems.
+
+ * src/cache/ftcbasic.c (FTC_ImageCache_Lookup,
+ FTC_SBitCache_Lookup): The type of FTC_ImageType->width
+ is FT_Int, so the cast to unsigned larger type FT_ULong
+ is introduced for the comparisons with 0x10000L for
+ LP64 platform.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cache: Fix some data types mismatching with their sources.
+
+ * src/cache/ftccache.h: The type of return value
+ by FTC_Node_WeightFunc function is changed to
+ FT_Offset. The type of FTC_CacheClass->cache_size
+ is changed to FT_Offset, too.
+
+ * src/cache/ftccback.h (ft_inode_weight,
+ ftc_snode_weight): Ditto.
+
+ * src/cache/ftccmap.c (ftc_cmap_node_weight): Ditto.
+
+ * src/cache/ftcimage.c (ftc_inode_weight,
+ FTC_INode_Weight): Ditto.
+
+ * src/cache/ftcsbits.c (ftc_snode_weight,
+ FTC_SNode_Weight): Ditto.
+
+ * src/cache/ftcmru.h: The type of
+ FTC_MruListClass->node_size is changed to FT_Offset,
+ because it is passed to FT_ALLOC() to specify the
+ size of buffer.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ XXX_cmap_encoding_char_next() return FT_UInt32 values.
+
+ * include/freetype/internal/services/svpscmap.h:
+ The size of the charcode value returned by
+ the function typed PS_Unicodes_CharNextFunc is
+ matched with its input charcode value.
+
+ * src/cff/cffmap.c (cff_cmap_encoding_char_next,
+ cff_cmap_unicode_char_next): Ditto.
+
+ * src/pfr/pfrmap.c (pfr_cmap_encoding_char_next):
+ Ditto.
+
+ * src/psaux/t1cmap.c (t1_cmap_std_char_next,
+ t1_cmap_custom_char_next, t1_cmap_unicode_char_next):
+ Ditto.
+
+ * src/psnames/psmodule.c (ps_unicodes_char_next):
+ Ditto.
+
+ * src/winfonts/winfnt.c (fnt_cmap_char_next):
+ Ditto.
+
+ * src/sfnt/ttcmap.c (tt_cmap0_char_next,
+ tt_cmap2_char_next, tt_cmap4_char_next,
+ tt_cmap6_char_next, tt_cmap10_char_next,
+ tt_cmap12_char_next, tt_cmap13_char_next): Ditto.
+ (tt_cmap14_char_variants): Handle base unicode
+ codepoint by FT_UInt32 variable to avoid overflow
+ on 16-bit platforms.
+ (tt_cmap14_ensure): The type of `num_results' is
+ extend to FT_UInt32, to cover unsigned 32-bit
+ `numVarSelectorRecords' in cmap14 table header.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ truetype: Extend TT_Face->num_locations for broken TTFs.
+
+ * include/freetype/internal/tttypes.h:
+ TT_Face->num_locations are extended from FT_UInt
+ to FT_ULong, to stand with broken huge loca table.
+ Some people insists there are broken TTF including
+ the glyphs over 16-bit limitation, in PRC market.
+ * src/truetype/ttpload.c (tt_face_load_loca):
+ Remove unrequired 16-bit truncation for FT_UInt
+ TT_Face->num_locations.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ smooth: Fix some data types mismatching with their sources.
+
+ * src/smooth/ftgrays.c: The type of `TCoord' is
+ matched to `TPos', because they are mixed in
+ gray_set_cell(). The type of TCell->x is extended
+ to `TPos', because gray_find_cell() sets it by
+ TWorker.ex. The type of TCell->cover is extended
+ to `TCoord', because gray_render_scanline() adds
+ TCoord value to it. The type of TWork.cover is matched
+ with TCell->cover. The types of
+ TWork.{max_cells,num_cells} are changed to FT_PtrDist,
+ because they are calculated from the memory addresses.
+ The type of TWork.ycount is changed to TPos, because
+ it is calculated from TPos variables.
+ (gray_find_cell): The type of `x' is matched with
+ its initial value ras.ex.
+ (gray_render_scanline): The types of `mod', `lift'
+ and `rem' are changed to TCoord, because their values
+ are set with explicit casts to TCoord. When ras.area
+ is updated by the differential values including
+ `delta', they are explicitly cast to TArea, because
+ the type of `delta' is not TArea but TCoord.
+ (gray_render_line): The type of `mod' is extended
+ from int to TCoord, because (TCoord)dy is added to mod.
+ (gray_hline): The argument `acount' is extended to
+ TCoord, to match with the parameters in the callers.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cff: Fix some data types mismatching with their sources.
+
+ * src/cff/cffobjs.c (cff_face_init): The type of
+ `scaling' is matched with the scaling parameter
+ in FT_Matrix_Multiply_Scaled() and
+ FT_Vector_Transform_Scaled().
+
+ * src/cff/cffparse.c (cff_parse_real): The type of
+ `power_ten', `scaling', `exponent_add',
+ `integer_length', `fraction_length',
+ `new_fraction_length' and `shift' are matched with
+ the type of `exponent' to avoid unexpected truncation.
+ (cff_parse_fixed_scaled): The type of `scaling' is
+ matched with the `scaling' argument to
+ cff_parse_real().
+ (cff_parse_fixed_dynamic): Ditto.
+ (cff_parse_font_matrix): The type of `scaling' is
+ matched with the `scaling' argument to
+ cff_parse_dynamic().
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ autofit: Fix some data types mismatching with their sources.
+
+ * src/autofit/afglobal.c: Correct the type of
+ AF_FaceGlobalsRec.glyph_count to match with
+ FT_Face->num_glyphs.
+ (af_face_globals_compute_script_coverage):
+ Insert explicit cast to compare
+ FT_Long AF_FaceGlobalsRec.glyph_count versus
+ FT_UInt gindex. The type of `nn' is changed
+ to scan glyph index upto AF_FaceGlobalsRec.glyph_count.
+ (af_face_globals_get_metrics): The type of `script_max'
+ is changed to cover size_t value. Insert explicit cast
+ to compare FT_Long AF_FaceGlobalsRec.glyph_count versus
+ FT_UInt gindex.
+
+ * src/autofit/afhints.c (af_axis_hints_new_segment):
+ Insert explicit cast to calculate `big_max' from
+ integer and size_t values.
+ (af_axis_hints_new_edge): Ditto.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues):
+ The type of `best_y' is matched to FT_Vector.y.
+ (af_latin_compute_stem_width): The type of `delta' is
+ matched to `dist' and `org_dist'.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ autofit: Count the size of the memory object by ptrdiff_t.
+
+ * src/autofit/afcjk.c (af_cjk_hint_edges): The
+ number of edges `n_edges' should be counted by
+ FT_PtrDist variable instead of FT_Int.
+
+ * src/autofit/aflatin.c (af_latin_hint_edges):
+ Ditto.
+
+ * src/autofit/aftypes.h: In AF_ScriptClassRec,
+ the size of metric `script_metrics_size' should
+ be counted by FT_Offset variable instead of FT_UInt.
+
+ * src/autofit/afhints.c
+ (af_glyph_hints_align_strong_points): The cursors
+ for the edges `min', `max', `mid' in the memory
+ buffer should be typed FT_PtrDist.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ autofit: Fix for unused variable `first'.
+
+ * src/autofit/afhints.c (af_glyph_hints_reload): Insert
+ FT_UNUSED() to hide the unused variable warning.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Improve bitmap size or pixel variables for 16-bit systems.
+
+ * include/freetype/config/ftstdlib.h: Introduce
+ FT_INT_MIN, to use in signed integer overflow in
+ 16-bit and 64-bit platforms.
+
+ * include/freetype/internal/fttrace.h: Add a tracer
+ to ftsynth.c.
+
+ * src/base/ftbitmap.c (FT_Bitmap_Embolden): Check
+ invalid strength causing integer overflow on 16-bit
+ platform.
+
+ * src/base/ftcalc.c (ft_corner_orientation): Change
+ the internal calculation from FT_Int to FT_Long, to
+ avoid an overflow on 16-bit platforms. The caller of
+ this function should use only the sign of result,
+ so the cast to FT_Int is acceptable.
+
+ * src/base/ftsynth.c: Introduce a tracer for synth module.
+ (FT_GlyphSlot_Embolden): Check invalid strength causing
+ integer overflow on 16-bit platform.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): The glyph index
+ in FT2 API is typed as FT_UInt, although BDF driver
+ can handle unsigned long glyph index internally. To
+ avoid integer overflow on 16-bit platform, too large
+ glyph index should be excluded.
+ (BDF_Glyph_Load): The glyph pitch in FT2 is typed as
+ FT_UInt, although BDF driver can handle unsigned long
+ glyph pitch internally. To avoid integer overflow on
+ 16-bit platform, too large glyph pitch should not be
+ returned.
+
+ * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): The glyph
+ pitch in FT2 is typed as FT_UInt, although PFR font
+ format can include huge bitmap glyph with 24-bit pitch
+ (however, a glyph spends 16.7 pixel, it's not realistic).
+ To avoid integer overflow on 16-bit platform, huge
+ bitmap glyph should be excluded.
+
+ * src/smooth/ftgrays.c (gray_hline): As FT_Span.x is
+ truncated to fit its type (16-bit short), FT_Span.y
+ should be truncated to fit its type (FT_Int).
+
+ * src/cff/cffdrivr.c (cff_get_ros): CFF specification
+ defines the supplement in ROS as a real number.
+ Truncate it to fit public FT2 API.
+
+ * src/cff/cffparse.c (cff_parse_cid_ros): Warn the
+ supplement if it is truncated or rounded in cff_get_ros().
+
+ * src/cff/cfftypes.h: Change the type of internal variable
+ `supplement' from FT_Long to FT_ULong to fit the signedness
+ to the type in public API.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ psaux: Prevent invalid arguments to afm_parser_read_vals().
+
+ * src/psaux/afmparse.c (afm_parser_read_vals): Change
+ the type of `n' to prevent negative number how many
+ arguments should be parsed.
+
+ * src/psaux/afmparse.h (afm_parser_read_vals): Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ base: Prevent some overflows on LP64 systems.
+
+ * src/base/ftadvance.c (FT_Get_Advances): Cast the
+ unsigned long constant FT_LOAD_ADVANCE_ONLY to FT_UInt32
+ for LP64 platforms.
+
+ * src/base/ftcalc.c (FT_Sqrt32): All internal variables
+ are changed to FT_UInt32 from FT_ULong.
+ (FT_MulDiv): Insert casts to FT_Int32 for LP64 platforms.
+ This function is designed for 32-bit integer, although
+ their arguments and return value are FT_Long.
+
+ * src/base/ftobjs.c (FT_Get_Char_Index): Check `charcode'
+ is within unsigned 32-bit integer for LP64 platforms.
+ (FT_Face_GetCharVariantIndex): Check `charcode' and
+ `variantSelector' are within 32-bit integer for LP64
+ platforms.
+ (FT_Face_GetCharsOfVariant): Check `variantSelector' is
+ within unsigned 32-bit integer for LP64 platforms.
+
+ * src/base/fttrigon.c (ft_trig_downscale): The FT_Fixed
+ variable `val' and unsigned long constant FT_TRIG_SCALE
+ are cast to FT_UInt32, when calculates FT_UInt32.
+ (FT_Vector_Rotate): The long constant 1L is cast to
+ FT_Int32 to calculate FT_Int32 `half'.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cff: Cast the long variables to 32-bit for LP64 systems.
+
+ * src/cff/cffdrivr.c (cff_get_advances): Insert
+ explicit cast to modify a 32-bit flag by unsigned
+ long constant.
+
+ * src/cff/cffobjs.c (cff_face_init): Ditto.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings):
+ Replace the casts to FT_Long by the casts to FT_Int32
+ for LP64 platforms.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ pcf: Improve PCF_PropertyRec.value names on LP64 platforms.
+
+ * src/pcf/pcf.h: In PCF_PropertyRec.value, the member
+ `integer' is replaced by `l', `cardinal' is replaced
+ by `ul', to fix the difference between the name and
+ the types on LP64 platforms.
+
+ * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Reflect
+ PCF_PropertyRec.value change, with appropriate casts
+ to FT_Int32/FT_UInt32. Their destinations
+ BDF_PropertyRec.{integer|cardinal} are public and
+ explicitly defined as FT_Int32/FT_UInt32.
+
+ * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font):
+ Reflect PCF_PropertyRec.value change.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ pcf: Fix some data types mismatching with their sources.
+
+ * src/pcf/pcfdrivr.c (pcf_cmap_char_index): The type of
+ `code' is matched to PCF_Encoding->enc.
+ (pcf_cmap_char_next): The type of `charcode' is matched
+ to PCF_Encoding->enc. When *acharcode is set by charcode,
+ an overflow is checked and cast to unsigned 32-bit
+ integer.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ bdf: Improve bdf_property_t.value names for LP64 platforms.
+
+ * src/bdf/bdf.h: In bdf_property_t.value, the member
+ `int32' is replaced by `l', `card32' is replaced by
+ `ul', to fix the difference between the name and the
+ types on LP64 platforms.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Reflect
+ bdf_property_t.value change.
+ (bdf_get_bdf_property): Reflect bdf_property_t.value
+ change, with appropriate casts to FT_Int32/FT_UInt32.
+ Their destinations BDF_PropertyRec.{integer|cardinal}
+ are public and explicitly defined as FT_Int32/FT_UInt32.
+
+ * src/bdf/bdflib.c (_bdf_add_property): Reflect
+ bdf_property_t.value change.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ bdf: Fix some data types mismatching with their sources.
+
+ * src/bdf/bdrdrivr.c (bdf_cmap_char_index): The type
+ of `code' is matched with BDF_encoding_el->enc.
+ (bdf_cmap_char_next): The type of `charcode' is
+ matched with BDF_encoding_el->enc. When *acharcode
+ is set by charcode, an overflow is checked and
+ cast to unsigned 32-bit integer.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ autofit: Improve Unicode range definitions.
+
+ * src/autofit/aftypes.h (AF_UNIRANGE_REC): New macro
+ to declare a range by two unsigned 32-bit integer,
+ to avoid 64-bit range definition on LP64 platforms.
+
+ * src/autofit/aflatin.c (af_latin_uniranges): Ditto.
+
+ * src/autofit/aflatin2.c (af_latin2_uniranges): Ditto.
+
+ * src/autofit/afindic.c (af_indic_uniranges): Ditto.
+
+ * src/autofit/afcjk.c (af_cjk_uniranges): Declare
+ the ranges by AF_UNIRANGE_REC.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ smooth: Fix a data type mismatching with its source.
+
+ * src/smooth/ftgrays.c (gray_sweep): The type of
+ `area' is matched with the 3rd argument `area'
+ of gray_hline().
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ smooth: Fix a data type mismatching with its source.
+
+ * src/smooth/ftgrays.c (gray_render_line): The type
+ of `area' is matched with TWorker.area.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cache: Disable the legacy compatibility if 16-bit system.
+
+ * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): Exclude
+ the legacy behaviour from 16-bit platform, because the
+ current hack cannot detect the caller uses this function
+ via legacy convension.
+ (FTC_SBitCache_Lookup): Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cache: Check 32-bit glyph index on 16-bit systems.
+
+ * src/cache/ftcbasic.c (ftc_basic_family_get_count):
+ Check overflow caused by the face including large
+ number of glyphs > 64k.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cache: Fix some data types mismatching with their sources.
+
+ * src/cache/ftccache.c (ftc_cache_resize): The types of
+ `p', `mask', `count' are matched with FTC_Cache->{p,mask}.
+ (FTC_Cache_Clear): The type of `old_index' is matched to
+ FTC_Cache->{p,mask}.
+
+ * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): The type
+ of `_idx' is matched with FTC_Cache->{p,mask}.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cache: Fix some data types mismatching with their sources.
+
+ * src/cache/ftcsbits.c (ftc_snode_load): The types
+ of `xadvance' and `yadvance' are matched with
+ FT_GlyphSlot->advance.{x|y}.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cache: Cast NULL to a required function type explicitly.
+
+ * src/cache/ftcmanag.c (FTC_Manager_RemoveFaceID):
+ Insert explicit cast from NULL to function type.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ fttypes.h: Cast FT_MAKE_TAG output to FT_Tag exlicitly.
+
+ * include/freetype/fttypes.h (FT_MAKE_TAG):
+ Cast the result to FT_Tag.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ psnames: Handle Unicode codepoints by FT_UInt32 variables.
+
+ * src/psnames/psmodule.c (BASE_GLYPH): Cast the result
+ to unsigned 32-bit integer for LP64 platform.
+ (ps_unicode_value): Return the value by unsigned 32-bit
+ integer instead of unsigned long.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ psaux: Use size_t variable to pass the buffer size.
+
+ * src/psaux/psaux.h (to_bytes): The type of `max_bytes'
+ (the argument to pass the buffer size) is changed to
+ size_t, to match with ANSI C string functions.
+
+ * src/psaux/psconv.h (PS_Conv_StringDecode,
+ PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
+
+ * src/psaux/psconv.c (PS_Conv_StringDecode,
+ PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Ditto.
+
+ * src/psaux/psobjs.h (ps_parser_to_bytes): Ditto.
+
+ * src/psaux/psobjs.c (ps_parser_to_bytes): Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ type1: Use size_t variable to pass the string length.
+
+ * psaux.h: The type of `len' (the argument to pass
+ the buffer size to the function in AFM_ParserRec)
+ is changed to size_t, to match with ANSI C string
+ functions.
+
+ * t1afm.c (t1_get_index): Ditto.
+
+ * test_afm.c (dummy_get_index): Ditto.
+
+ * afmparse.c (afm_parser_read_vals): To call
+ AFM_ParserRec.get_index, the length of token
+ `len' is cast to size_t.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cid: Fix some data types mismatching with their sources.
+
+ * src/cid/cidparse.c (cid_parser_new): The types of
+ `read_len' and `stream_len' are matched to
+ FT_Stream->size. Unrequired cast is removed.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cff: Fix for unused variable `rest'.
+
+ * src/cff/cffparse.c (cff_parse_real): Insert
+ FT_UNUSED() to hide the unused variable warning.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ cff: Fix some data types mismatching with their sources.
+
+ * src/cff/cffgload.c (cff_slot_load): The types of
+ `top_upm' and `sub_upm' are matched with
+ CFF_FontRecDict->units_per_em.
+
+ * src/cff/cffobjs.c (cff_size_select): Ditto.
+ (cff_size_request): Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ bdf: Fix some data types mismatching with their sources.
+
+ * bdflib.c (_bdf_list_ensure): The type of `num_items'
+ is matched with _bdf_list_t.used. Also the types of
+ `oldsize', `newsize', `bigsize' are matched too.
+ (_bdf_readstream): `cursor' is used as an offset to
+ the pointer, it should be typed as FT_Offset. Also
+ the types of `bytes', `start', `end', `avail' are matched.
+
+ * bdfdrivr.c: The type of BDF_CMap->num_encodings is
+ matched with FT_CMap->clazz->size.
+ (bdf_cmap_char_index): The types of `min', `max', `mid'
+ are matched with BDF_CMap->num_encodings. The type of
+ `result' is matched with encoding->glyph.
+ (bdf_cmap_char_next): Ditto, the type of `code' is
+ matched with BDF_encoding_el.enc.
+ (bdf_interpret_style): The type of `lengths' is changed
+ to size_t, to take the value by ft_strlen(). Also the
+ types of `len', `nn', `mm' are matched.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ sfnt: Count the size of the memory object by ptrdiff_t.
+
+ * src/sfnt/ttbdf.c (tt_face_find_bdf_prop): The type of
+ `peroperty_len' is changed from FT_UInt to FT_Offset,
+ to match with size_t, which is appropriate type for the
+ object in the memory buffer.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ lzw: Count the size of the memory object by ptrdiff_t.
+
+ * src/lzw/ftzopen.h: The types of FT_LzwState->{buf_total,
+ stack_size} are changed from FT_UInt to FT_Offset, to match
+ with size_t, which is appropriate type for the object in
+ the memory buffer.
+
+ * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): The types of
+ `old_size' and `new_size' are changed from FT_UInt to
+ FT_Offset, to match with size_t, which is appropriate type
+ for the object in the memory buffer.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ otvalid: Count the table size on memory by ptrdiff_t.
+
+ * src/otvalid/otvgpos.c (otv_ValueRecord_validate):
+ Change the type of table size from FT_UInt to
+ FT_PtrDist because it is calculated by the memory
+ addresses.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ otvalid: Prevent an overflow by GPOS/GSUB 32b-bit offset.
+
+ * src/otvalid/otvgpos.c (otv_ExtensionPos_validate):
+ Extend ExtensionOffset from FT_UInt to FT_ULong, to
+ cover 32-bit offset on 16-bit platform.
+
+ * src/otvalid/otvgsub.c (otv_ExtensionSubst_validate):
+ Ditto.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ ftobjs.c: Prevent an overflow in glyph index handling.
+
+ * src/base/ftobjs.c (FT_Face_GetCharsOfVariant):
+ Improve the cast in comparison to avoid the truncation.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Improve the variable types in raccess_make_file_name().
+
+ * src/base/ftrfork.c (raccess_make_file_name):
+ Change the type of cursor variable `tmp' to const char*,
+ to prevent the unexpected modification of original pathname.
+ (raccess_make_file_name): Change the type of new_length
+ to size_t.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ ftpatent.c: Fix for unused variable `error'.
+
+ * src/base/ftpatent.c (_tt_check_patents_in_range):
+ Fix warning for unused variable `error'.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ type1: Check invalid string longer than PostScript limit.
+
+ * src/type1/t1afm.c (t1_get_index): Check invalid string
+ which exceeds the limit of PostScript string/name objects.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gzip: Use FT2 zcalloc() & zfree() in ftgzip.c by default.
+
+ * src/gzip/ftgzip.c (zcalloc, zcfree): Disable all
+ zcalloc() & zfree() by zlib in zutil.c, those in
+ ftgzip.c by FT2 are enabled by default. To use
+ zlib zcalloc() & zfree(), define USE_ZLIB_ZCALLOC.
+ See discussion:
+ http://lists.gnu.org/archive/html/freetype-devel/2009-02/msg00000.html
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gzip: Distinguish PureC from TurboC on MSDOS.
+
+ * src/gzip/zutil.c (zcalloc, zcfree): Enable only for
+ MSDOS platform.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gxvalid: Insert PureC pragma to allow unevaluated variables.
+
+ * builds/atari/ATARI.H: Insert PureC pragma not to
+ warn against set-but-unevaluated variable in gxvalid
+ module.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ gxvalid: Pass the union by the pointer instead of the value.
+
+ * src/gxvalid/gxvcommn.h:
+ - Declare new type `GXV_LookupValueCPtr'.
+ - Update the type of the 2nd argument to pass GXV_LookupValueDesc
+ data to the function prototyped as GXV_Lookup_Value_Validate_Func,
+ from GXV_LookupValueDesc to GXV_LookupValueCPtr.
+ - Likewise for the function prototyped as
+ GXV_Lookup_Fmt4_Transit_Func.
+
+ - Declare new type `GXV_StateTable_GlyphOffsetCPtr'.
+ - Update the type of the 3rd argument to pass
+ GXV_StateTable_GlyphOffsetDesc data to the function prototyped
+ as GXV_StateTable_Entry_Validate_Func, from
+ GXV_StateTable_GlyphOffsetDesc to GXV_StateTable_GlyphOffsetCPtr.
+
+ - Declare new type `GXV_XStateTable_GlyphOffsetCPtr'.
+ - Update the type of the 3rd argument to pass
+ GXV_XStateTable_GlyphOffsetDesc data to the function prototyped
+ as GXV_XStateTable_Entry_Validate_Func,
+ from GXV_XStateTable_GlyphOffsetDesc
+ to GXV_XStateTable_GlyphOffsetCPtr.
+
+ * src/gxvalid/gxvcommn.c (gxv_LookupTable_fmt0_validate,
+ gxv_XClassTable_lookupval_validate,
+ gxv_XClassTable_lookupfmt4_transit):
+ Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
+
+ * src/gxvalid/gxvbsln.c (gxv_bsln_LookupValue_validate,
+ gxv_bsln_LookupFmt4_transit): Ditto.
+
+ * src/gxvalid/gxvjust.c
+ (gxv_just_pcTable_LookupValue_entry_validate,
+ gxv_just_classTable_entry_validate,
+ gxv_just_wdcTable_LookupValue_validate): Ditto.
+
+ * src/gxvalid/gxvkern.c
+ (gxv_kern_subtable_fmt1_entry_validate): Ditto.
+
+ * src/gxvalid/gxvlcar.c (gxv_lcar_LookupValue_validate,
+ gxv_lcar_LookupFmt4_transit): Ditto.
+
+ * src/gxvalid/gxvopbd.c (gxv_opbd_LookupValue_validate,
+ gxv_opbd_LookupFmt4_transit): Ditto.
+
+ * src/gxvalid/gxvprop.c (gxv_prop_LookupValue_validate,
+ gxv_prop_LookupFmt4_transit): Ditto.
+
+ * src/gxvalid/gxvmort4.c
+ (gxv_mort_subtable_type4_lookupval_validate): Ditto.
+
+ * src/gxvalid/gxvmort0.c
+ (gxv_mort_subtable_type0_entry_validate): Update
+ from GXV_StateTable_GlyphOffsetDesc
+ to GXV_StateTable_GlyphOffsetCPtr.
+
+ * src/gxvalid/gxvmort1.c
+ (gxv_mort_subtable_type1_entry_validate): Ditto.
+
+ * src/gxvalid/gxvmort2.c
+ (gxv_mort_subtable_type2_entry_validate): Ditto.
+
+ * src/gxvalid/gxvmort5.c
+ (gxv_mort_subtable_type5_entry_validate): Ditto.
+
+ * src/gxvalid/gxvmorx2.c
+ (gxv_morx_subtable_type2_entry_validate): Ditto.
+
+ * src/gxvalid/gxvmorx5.c
+ (gxv_morx_subtable_type5_entry_validate): Ditto.
+
+ * src/gxvalid/gxvmorx1.c
+ (gxv_morx_subtable_type1_entry_validate): Ditto.
+ (gxv_morx_subtable_type1_LookupValue_validate,
+ gxv_morx_subtable_type1_LookupFmt4_transit):
+ Update from GXV_LookupValueDesc to GXV_LookupValueCPtr.
+
+ * src/gxvalid/gxvmorx0.c
+ (gxv_morx_subtable_type0_entry_validate): Update
+ from GXV_XStateTable_GlyphOffsetDesc
+ to GXV_XStateTable_GlyphOffsetCPtr.
+
+2009-07-29 Fabrice Bellet <fabrice@bellet.info>
+
+ Fix Redhat bugzilla #513582 and Savannah bug #26849.
+
+ * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) <FTC_INLINE>: Fix
+ aliasing bug.
+
+2009-07-19 Werner Lemberg <wl@gnu.org>
+
+ Document recent library changes.
+
+ * docs/CHANGES: Do it.
+
+2009-07-17 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #23786.
+
+ * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't reset x_ppem
+ and y_ppem. Otherwise the `*_CVT_Stretched' functions in ttinterp.c
+ get never called.
+ An anonymous guy suggested this change on Savannah, and it seems to
+ be the right solution.
+
+2009-07-15 Werner Lemberg <wl@gnu.org>
+
+ * docs/release: Updated.
+
+2009-07-15 Werner Lemberg <wl@gnu.org>
+
+ README.CVS -> README.git
+
+ * README.CVS: Renamed to...
+ * README.git: This.
+ Updated.
+
+2009-07-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Borland C++ compiler patch proposed by Mirco Babin.
+ http://lists.gnu.org/archive/html/freetype/2009-07/msg00016.html.
+
+ * builds/exports.mk: Delete unused flags, CCexe_{CFLAGS,LDFLAGS}.
+ Fix APINAMES_C and APINAMES_EXE pathnames to reflect the platform
+ specific pathname syntax.
+ * builds/compiler/bcc.mk: Remove unused flag, CCexe_LDFLAGS.
+ Define TE = `-e' separately (bcc32 cannot specify the pathname of
+ binary executable by T = `-o').
+ Extend the large page size in linking freetype.lib.
+ Add extra CLEAN target to delete bcc specific temporary files.
+ * builds/compiler/bcc-dev.mk: Ditto.
+
+2009-07-14 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #27026.
+
+ * builds/win32/vc2005/freetype.sln: Use correct version number.
+
+2009-07-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Add a script to check the undefined and unused trace macros.
+
+ * src/tools/chktrcmp.py: A script to check trace_XXXX macros
+ that are used in C source but undefined in fttrace.h, or
+ defined in fttrace.h but unused in C sources. See
+ http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html.
+ * docs/DEBUG: Mention on chktrcmp.py.
+ * docs/release: Ditto.
+
+2009-07-09 Werner Lemberg <wl@gnu.org>
+
+ [ftraster] Make it compile again with -D_STANDALONE_.
+
+ * src/raster/ftraster.c [_STANDALONE_]: Define
+ FT_CONFIG_STANDARD_LIBRARY_H.
+ Include `string.h'.
+ Don't include `rastpic.h'.
+ Define FT_DEFINE_RASTER_FUNCS.
+
+2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ smooth: Check glyph size by width/height, instead of pitch/height.
+ Suggested by der Mouse <mouse@Rodents-Montreal.ORG>.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Improve
+ the check for too large glyph. Replace the pair of `pitch' and
+ `height' by the pair of `width' and `height'. `pitch' cannot
+ be greater than `height'. The required is checking the product
+ `pitch' * `height' <= FT_ULONG_MAX, but we use cheap checks for
+ the realistic case only.
+
+2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Register 2 missing trace components, t1afm and ttbdf.
+
+ * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( t1afm )
+ and FT_TRACE_DEF( ttbdf ). See
+ http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00013.html
+
+2009-07-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Register a trace component for ftgloadr.c.
+
+ * include/freetype/internal/fttrace.h: Add FT_TRACE_DEF( gloader ).
+ The macro `trace_gloader' was already used in the initial version
+ on 2002-02-24.
+
+2009-07-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Prevent the overflows by a glyph with too many points or contours.
+ The bug is reported by Boris Letocha <b.letocha@gmc.net>. See
+ http://lists.gnu.org/archive/html/freetype-devel/2009-06/msg00031.html
+ http://lists.gnu.org/archive/html/freetype-devel/2009-07/msg00002.html
+
+ * include/freetype/ftimage.h (FT_OUTLINE_CONTOURS_MAX,
+ FT_OUTLINE_POINTS_MAX): New macros to declare the maximum
+ values of FT_Outline.{n_contours,n_points}.
+ * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Check the
+ total numbers of points and contours cause no overflows in
+ FT_Outline.{n_contours,n_points}.
+
+ * include/freetype/internal/ftgloadr.h (FT_GLYPHLOADER_CHECK_P,
+ FT_GLYPHLOADER_CHECK_C): Compare the numbers of points and
+ contours as unsigned long number, instead of signed int, to
+ prevent the overflows on 16-bit systems.
+
+2009-07-05 Bram Tassyns <bramt@enfocus.be>
+
+ Improve compatibility to Acroread.
+ This fixes Savannah bug #26944.
+
+ * src/cff/cffload.c (cff_charset_compute_cids): For multiple GID to
+ single CID mappings, make the lowest value win.
+
+2009-06-28 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ ftpatent: Fix a bug by wrong usage of service->table_info().
+ http://lists.gnu.org/archive/html/freetype-devel/2008-12/msg00039.html
+
+ * include/freetype/internal/services/svsfnt.h: Extend
+ FT_SFNT_TableInfoFunc() to take new argument to obtain the offset
+ to the specified table.
+ * src/sfnt/sfdriver.c (sfnt_table_info): Extend to return the
+ table-offset to the caller function.
+ * src/base/ftpatent.c (_tt_check_patents_in_table): Use new
+ service->table_info().
+ * src/base/ftobjs.c (FT_Sfnt_Table_Info): Synchronize to new
+ service->table_info().
+
+2009-06-28 Werner Lemberg <wl@gnu.org>
+
+ [psaux, cff] Protect against nested `seac' calls.
+
+ * include/freetype/internal/psaux.h (T1_Decoder), src/cff/cffgload.h
+ (CFF_Decoder): Add `seac' boolean variable.
+
+ * src/cff/cffgload.c (cff_operator_seac), src/psaux/t1decode.c
+ (t1operator_seac): Use it.
+
+2009-06-28 Werner Lemberg <wl@gnu.org>
+
+ Thinko.
+
+ * src/psaux/t1decode.c (t1operator_seac)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Test for existence of incremental
+ interface.
+
+2009-06-28 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h [FT_CONFIG_OPTION_INCREMENTAL]: Define.
+
+2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Add tools to preprocess the source files for AtariST PureC.
+
+ * builds/atari/deflinejoiner.awk: New file to filter C source files
+ for broken C preprocessor of PureC compiler.
+
+ * builds/atari/gen-purec-patch.sh: New file to generate a patch set
+ for PureC, by using deflinejoiner.awk.
+
+2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Keep existing modules.cfg in the building tree.
+
+ * configure: If `configure' is executed outside of the source tree,
+ an existing `modules.cfg' file in the build directory should be
+ kept, not overwritten by the version in the source tree.
+
+2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Filter --srcdir= option before invoking builds/unix/configure.
+
+ * configure: If builds/unix/configure is invoked with --srcdir
+ option, the option should take `builds/unix' directory instead of
+ the top source directory. Thus the configure script in the top
+ directory should modify the --srcdir= option if
+ `builds/unix/configure' is invoked.
+
+2009-06-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Improve configure.raw for cross-building on exe-suffixed systems.
+
+ * builds/unix/configure.raw: Fix a bug in sed script to extract
+ native suffix for binary executables, patch by Peter Breitenlohner.
+ http://lists.gnu.org/archive/html/freetype-devel/2009-04/msg00036.html
+
+2009-06-26 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Remove TT_SubGlyphRec.
+
+ * src/truetype/ttobjs.h (TT_SubGlyphRec): Removed, unused.
+
+2009-06-26 Werner Lemberg <wl@gnu.org>
+
+ * */*: For warning messages, replace FT_ERROR with FT_TRACE0.
+
+ FT_ERROR is now used only if a function produces a non-zero `error'
+ value.
+
+ Formatting, improving and harmonizing debug strings.
+
+2009-06-25 Werner Lemberg <wl@gnu.org>
+
+ Provide version information better.
+
+ * src/base/ftinit.c (FT_Init_FreeType): Don't set version here
+ but...
+ * src/base/ftobjs.c (FT_New_Library): Here.
+
+2009-06-22 Werner Lemberg <wl@gnu.org>
+
+ Use 16.16 format while parsing Type 1 charstrings.
+ This fixes Savannah bug #26867.
+
+ Previously, only integers have been used which can lead to serious
+ rounding errors.
+
+ However, fractional values are only used internally; after the
+ charstrings (of either Type 1 or 2) have been processed, the
+ resulting coordinates get rounded to integers currently -- before
+ applying scaling. This should be fixed; at the same time a new load
+ flag should be introduced, to be used in combination with
+ FT_LOAD_NO_SCALE, which indicates that font units are returned in
+ 16.16 format. Similarly, the incremental interface should be
+ extended to allow fractional values for metrics.
+
+ * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `shift'
+ field.
+ * include/freetype/internal/pshints.h (T1_Hints_SetStemFunc,
+ T1_Hints_SetStem3Func): Use FT_Fixed for coordinates.
+
+ * src/psaux/psobjs.c: Include FT_INTERNAL_CALC_H.
+ (t1_build_add_point): Always convert fixed to integer.
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings):
+ Use 16.16 format everywhere (except for large integers followed by a
+ `div').
+ [CAN_HANDLE_NON_INTEGRAL_T1_OPERANDS]: Remove #ifdef and activate
+ code uncoditionally.
+ Add support for random numbers and update remaining code
+ accordingly; this should work now.
+ (t1_operator_seac): Updated.
+ * src/psaux/pshrec.c: Include FT_INTERNAL_CALC_H.
+ (ps_hints_t1stem3, t1_hints_stem): Updated.
+
+ * src/cid/cidgload.c: Include FT_INTERNAL_CALC_H.
+ (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL],
+ (cid_face_compute_max_advance, cid_slot_load_glyph): Updated.
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
+ [FT_CONFIG_OPTION_INCREMENTAL], (T1_Get_Advances, T1_Load_Glyph):
+ Updated.
+ * src/type1/t1load.c: Include FT_INTERNAL_CALC_H.
+ * src/type1/t1objs.c (T1_Face_Init): Updated.
+
+2009-06-21 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshrec.c: Use PSH_Err_Ok.
+
+2009-06-21 Werner Lemberg <wl@gnu.org>
+
+ Code beautification.
+
+ * src/type1/t1load.c (FT_INT_TO_FIXED): Removed.
+ Replace everywhere with INT_TO_FIXED.
+ (FT_FIXED_TO_INT): Move to ...
+ * include/freetype/internal/ftcalc.h (FIXED_TO_INT): Here.
+ Update all users.
+
+2009-06-20 Werner Lemberg <wl@gnu.org>
+
+ Remove unused variables.
+
+ * include/freetype/internal/psaux.h (T1_BuilderRec),
+ src/cff/cffgload.h (CFF_Builder): Remove `last'.
+ Update all users.
+
+2009-06-20 Werner Lemberg <wl@gnu.org>
+
+ [psaux] Check large integers while parsing charstrings.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Large
+ integers must be followed by a `div' operator.
+
+2009-06-20 Werner Lemberg <wl@gnu.org>
+
+ [cff] Revert last change.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Do it.
+ Next time, don't confuse Type 2 charstring opcodes with TOP DICT
+ values...
+
+2009-06-20 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_metrics_check_digits): Fix
+ compiler warning.
+
+2009-06-20 Werner Lemberg <wl@gnu.org>
+
+ * builds/compiler/gcc.mk (CFLAGS): Use -O3, not -O6.
+
+2009-06-19 Werner Lemberg <wl@gnu.org>
+
+ [cff] Fix handling of reserved byte 0xFF.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Abort if byte
+ 0xFF is encountered.
+
+2009-06-19 Werner Lemberg <wl@gnu.org>
+
+ Improve debug messages for Type1 charstrings.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Emit newlines
+ after instructions.
+ Prettify output.
+
+2009-06-19 Werner Lemberg <wl@gnu.org>
+
+ More ftgray fixes for FT_STATIC_RASTER.
+ Problems reported by suyu@cooee.cn.
+
+ * src/smooth/ftgrays.c (gray_move_to, gray_raster_render): Use
+ RAS_VAR.
+
+2009-06-18 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2009-06-18 Werner Lemberg <wl@gnu.org>
+
+ Fix B/W rasterization of subglyphs with different drop-out modes.
+
+ Normally, the SCANMODE instruction (if present) to set the drop-out
+ mode in a TrueType font is located in the `prep' table only and thus
+ valid for all glyphs. However, there are fonts like `pala.ttf'
+ which additionally contain this instruction in the hinting code of
+ some glyphs (but not all). As a result it can happen that a
+ composite glyph needs multiple drop-out modes for its subglyphs
+ since the rendering state gets reset for each subglyph.
+
+ FreeType collects the hinted outlines from all subglyphs, then it
+ sends the data to the rasterizer. It also sends the drop-out mode
+ -- after hinting has been applied -- and here is the error: It sends
+ the drop-out mode of the last subglyph only; drop-out modes of all
+ other subglyphs are lost.
+
+ This patch fixes the problem; it adds a second, alternative
+ mechanism to pass the drop-out mode: For each contour, the
+ rasterizer now checks the first `tags' array element. If bit 2 is
+ set, bits 5-7 contain the contour's drop-out mode, overriding the
+ global drop-out mode.
+
+ * include/freetype/ftimage.h (FT_CURVE_TAG_HAS_SCANMODE): New macro.
+
+ * src/truetype/ttgload.c (TT_Hint_Glyph): Store drop-out mode in
+ `tags[0]'.
+
+ * src/raster/ftraster.c (Flow_Up, Overshoot_Top, Overshoot_Bottom):
+ Use bits 3-5 instead of 0-2.
+ (New_Profile): Set the drop-out mode in the profile's `flags' field.
+ (Decompose_Curve): Check `tags[0]' and set `dropOutControl' if
+ necessary.
+ (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
+ Horizontal_Gray_Sweep_Drop, Draw_Sweep): Use the profile's drop-out
+ mode.
+
+2009-06-16 Werner Lemberg <wl@gnu.org>
+
+ Improve scan conversion rules 4 and 6.
+
+ Two new constraints are introduced to better identify a `stub' -- a
+ concept which is only vaguely described in the OpenType
+ specification. The old code was too rigorous and suppressed more
+ pixel than it should.
+
+ . The intersection of the two profiles with the scanline is less
+ than a half pixel. Code related to this was already present in
+ the sources but has been commented out.
+
+ . The endpoint of the original contour forming a profile has a
+ distance (`overshoot') less than half a pixel to the scanline.
+
+ Note that the two additional conditions fix almost all differences
+ to the Windows rasterizer, but some problematic cases remain.
+
+ * src/raster/ftraster.c (Overshoot_Top, Overshoot_Bottom): New
+ macros for the `flags' field in the `TProfile' structure.
+ (IS_BOTTOM_OVERSHOOT, IS_TOP_OVERSHOOT): New macros.
+ (New_Profile, End_Profile): Pass overshoot flag as an argument and
+ set it accordingly.
+ Update callers.
+ (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement the two new
+ constraints.
+
+2009-06-11 Werner Lemberg <wl@gnu.org>
+
+ Increase precision for B/W rasterizer.
+
+ * src/raster/ftraster.c (Set_High_Precision): Add two more bits to
+ the precision. This corrects rendering of some small glyphs, for
+ example, glyph `xi' in verdana.ttf at 13 ppem. Testing with ftbench
+ on my GNU/Linux box I don't see a performance degradation.
+
+2009-06-08 Michael Zucchi <notzed@gmail.com>
+
+ Handle FT_STROKER_LINECAP_BUTT.
+ This fixes Savannah bug #26757.
+
+ * src/base/ftstroke.c (ft_stroker_cap): Implement it.
+
+2009-06-07 Harald Fernengel <harry@kdevelop.org>
+
+ Fix some potential out-of-memory crashes.
+
+ * src/base/ftobjs.c (ft_glyphslot_done): Check `slot->internal'.
+ * src/base/ftstream.c (FT_Stream_ReleaseFrame): Check `stream'.
+ * src/truetype/ttinterp.c (TT_New_Context): Avoid double-free of
+ `exec' in case of failure.
+
+2009-06-07 Werner Lemberg <wl@gnu.org>
+
+ Simplify math.
+ Suggested by Alexei Podtelezhnikov <apodtele@gmail.com>.
+
+ * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
+ Horizontal_Gray_Sweep_Drop): Do it.
+
+2009-06-04 Werner Lemberg <wl@gnu.org>
+
+ Preparation for fixing scan conversion rules 4 and 6.
+
+ * src/raster/ftraster.c (TFlow): Replace enumeration with...
+ (Flow_Up): This macro.
+ (TProfile): Replace `flow' member with `flags' bit field.
+ Update all affected code.
+
+2009-05-29 James Cloos <cloos@jhcloos.com>
+
+ Enable autohinting for glyphs rotated by multiples of 90°.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Alter check for permitted
+ matrices to allow rotations by multiples of 90°, not only unrotated,
+ possibly slanted matrices.
+
+2009-05-28 Werner Lemberg <wl@gnu.org>
+
+ Remove compiler warning.
+ Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
+
+ * src/autofit/aflatin2.c (af_latin2_hint_edges): Move declaration of
+ `n_edges' into `#if' block.
+
+2009-05-28 Werner Lemberg <wl@gnu.org>
+
+ Make compilation work with FT_CONFIG_OPTION_USE_ZLIB not defined.
+ Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
+
+ * src/pcf/pcfdrivr.c (PCF_Face_Init) [!FT_CONFIG_OPTION_USE_ZLIB]:
+ Make it work.
+ Simplify #ifdef logic.
+
+2009-05-22 Werner Lemberg <wl@gnu.org>
+
+ Improve b/w rasterizer.
+ Problem reported by Krzysztof Kotlenga <pocek@users.sf.net>.
+
+ * src/raster/raster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
+ Horizontal_Gray_Sweep_Drop): For smart drop-out mode, if
+ intersections are equally distant relative to next pixel center,
+ select the left pixel, not the right one.
+
+2009-05-19 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #26600.
+
+ * src/type42/t42parse.c (t42_load_keyword): Handle
+ T1_FIELD_LOCATION_FONT_EXTRA.
+
+2009-04-30 Werner Lemberg <wl@gnu.org>
+
+ Document recent changes to ftview.
+
+ * docs/CHANGES: Do it.
+
+2009-04-27 Werner Lemberg <wl@gnu.org>
+
+ autohinter: Don't change digit widths if all widths are the same.
+ This fixes FreeDesktop bug #21197.
+
+ * src/autofit/afglobal.c (AF_DIGIT): New macro.
+ (af_face_globals_compute_script_coverage): Mark ASCII digits in
+ `glyph_scripts' array.
+ (af_face_globals_get_metrics): Updated.
+ (af_face_globals_is_digit): New function.
+ * src/autofit/afglobal.h: Updated.
+ (AF_ScriptMetricsRec): Add `digits_have_same_width' flag.
+
+ * src/autofit/aflatin.c: Include FT_ADVANCES_H.
+ (af_latin_metrics_check_digits): New function.
+ (af_latin_metrics_init): Use it.
+ * src/autofit/aflatin.h: Updated.
+ * src/autofit/afcjk.c (af_cjk_metrics_init): Updated.
+
+ * src/autofit/aflatin2.c: Similar changes as with aflatin.c.
+
+ * src/autofit/afloader.c (af_loader_load_g): Test digit width.
+
+ * docs/CHANGES: Document it.
+
+2009-04-26 Werner Lemberg <wl@gnu.org>
+
+ Make ftgrays compile with _STANDALONE_ and FT_STATIC_RASTER again.
+ Problems reported by suyu@cooee.cn.
+
+ * src/smooth/ftgrays.c (FT_DEFINE_OUTLINE_FUNCS,
+ FT_DEFINE_RASTER_FUNCS) [_STANDALONE_]: Define.
+ [!_STANDALONE_]: Include ftspic.h only here.
+ (ras): Define/declare after definition of `TWorker'.
+ Use `RAS_VAR_' where necessary.
+
+2009-04-21 Karl Berry <karl@gnu.org>
+
+ Fix AC_CHECK_FT2.
+
+ * builds/unix/freetype2.m4: Only check PATH for freetype-config if
+ we did not already find it from a prefix option.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Add #error to modules and files that do not support PIC yet.
+
+ When FT_CONFIG_OPTION_PIC is defined the following files will
+ create #error:
+ * src/bdf/bdfdrivr.h
+ * src/cache/ftcmanag.c
+ * src/cid/cidriver.h
+ * src/gxvalid/gxvmod.h
+ * src/gzip/ftgzip.c
+ * src/lzw/ftlzw.c
+ * src/otvalid/otvmod.h
+ * src/pcf/pcfdrivr.h
+ * src/pfr/pfrdrivr.h
+ * src/psaux/psauxmod.h
+ * src/type1/t1driver.h
+ * src/type42/t42drivr.h
+ * src/winfonts/winfnt.h
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Position Independent Code (PIC) support in autofit module.
+
+ * include/freetype/internal/autohint.h add macros to init
+ instances of FT_AutoHinter_ServiceRec.
+
+ * src/autofit/afmodule.h declare autofit_module_class
+ using macros from ftmodapi.h,
+ when FT_CONFIG_OPTION_PIC is defined create and destroy
+ functions will be declared.
+ * src/autofit/afmodule.c when FT_CONFIG_OPTION_PIC is defined
+ af_autofitter_service and autofit_module_class structs
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+ And macros will be used from afpic.h in order to access them.
+
+ * src/autofit/aftypes.h add macros to init and declare
+ instances of AF_ScriptClassRec.
+
+ * src/autofit/afcjk.h declare af_cjk_script_class
+ using macros from aftypes.h,
+ when FT_CONFIG_OPTION_PIC is defined init function will be declared.
+ * src/autofit/afcjk.c when FT_CONFIG_OPTION_PIC is defined
+ af_cjk_script_class struct will have function to init it instead of
+ being allocated in the global scope.
+
+ * src/autofit/afdummy.h declare af_dummy_script_class
+ using macros from aftypes.h,
+ when FT_CONFIG_OPTION_PIC is defined init function will be declared.
+ * src/autofit/afdummy.c when FT_CONFIG_OPTION_PIC is defined
+ af_dummy_script_class struct will have function to init it instead of
+ being allocated in the global scope.
+
+ * src/autofit/afindic.h declare af_indic_script_class
+ using macros from aftypes.h,
+ when FT_CONFIG_OPTION_PIC is defined init function will be declared.
+ * src/autofit/afindic.c when FT_CONFIG_OPTION_PIC is defined
+ af_indic_script_class struct will have function to init it instead of
+ being allocated in the global scope.
+
+ * src/autofit/aflatin.h declare af_latin_script_class
+ using macros from aftypes.h,
+ when FT_CONFIG_OPTION_PIC is defined init function will be declared.
+ * src/autofit/aflatin.c when FT_CONFIG_OPTION_PIC is defined
+ af_latin_script_class struct will have function to init it instead of
+ being allocated in the global scope.
+ Change af_latin_blue_chars to be PIC-compatible by being a two
+ dimentional array rather than array of pointers.
+
+
+ * src/autofit/aflatin2.h declare af_latin2_script_class
+ using macros from aftypes.h,
+ when FT_CONFIG_OPTION_PIC is defined init function will be declared.
+ * src/autofit/aflatin2.c when FT_CONFIG_OPTION_PIC is defined
+ af_latin2_script_class struct will have function to init it instead of
+ being allocated in the global scope.
+ Change af_latin2_blue_chars to be PIC-compatible by being a two
+ dimentional array rather than array of pointers.
+
+ * src/autofit/afglobal.c when FT_CONFIG_OPTION_PIC is defined
+ af_script_classes array initialization was moved to afpic.c and
+ is later refered using macros defeined in afpic.h.
+
+ New Files:
+ * src/autofit/afpic.h declare struct to hold PIC globals for autofit
+ module and macros to access them.
+ * src/autofit/afpic.c implement functions to allocate, destroy and
+ initialize PIC globals for autofit module.
+
+ * src/autofit/autofit.c add new file to build: afpic.c.
+ * src/autofit/jamfile add new files to FT2_MULTI build: afpic.c.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Position Independent Code (PIC) support in pshinter module.
+
+ * include/freetype/internal/pshints.h add macros to init
+ instances of PSHinter_Interface.
+
+ * src/pshinter/pshmod.h declare pshinter_module_class
+ using macros from ftmodapi.h,
+ when FT_CONFIG_OPTION_PIC is defined create and destroy
+ functions will be declared.
+ * src/pshinter/pshmod.c when FT_CONFIG_OPTION_PIC is defined
+ pshinter_interface and pshinter_module_class structs
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+ And macros will be used from pshpic.h in order to access them.
+
+ New Files:
+ * src/pshinter/pshpic.h declare struct to hold PIC globals for pshinter
+ module and macros to access them.
+ * src/pshinter/pshpic.c implement functions to allocate, destroy and
+ initialize PIC globals for pshinter module.
+
+ * src/pshinter/pshinter.c add new file to build: pshpic.c.
+ * src/pshinter/jamfile add new files to FT2_MULTI build: pshpic.c.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Position Independent Code (PIC) support in psnames module.
+
+ * include/freetype/internal/services/svpscmap.h add macros to init
+ instances of FT_Service_PsCMapsRec.
+
+ * src/psnames/psmodule.h declare psnames_module_class
+ using macros from ftmodapi.h,
+ when FT_CONFIG_OPTION_PIC is defined create and destroy
+ functions will be declared.
+ * src/psnames/psmodule.c when FT_CONFIG_OPTION_PIC is defined
+ pscmaps_interface and pscmaps_services structs
+ and psnames_module_class array
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+ And macros will be used from pspic.h in order to access them.
+
+ New Files:
+ * src/psnames/pspic.h declare struct to hold PIC globals for psnames
+ module and macros to access them.
+ * src/psnames/pspic.c implement functions to allocate, destroy and
+ initialize PIC globals for psnames module.
+
+ * src/psnames/psnames.c add new file to build: pspic.c.
+ * src/psnames/jamfile add new files to FT2_MULTI build: pspic.c.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Position Independent Code (PIC) support in raster renderer.
+
+ * src/raster/ftrend1.h declare ft_raster1_renderer_class
+ and ft_raster5_renderer_class
+ using macros from ftrender.h,
+ when FT_CONFIG_OPTION_PIC is defined create and destroy
+ functions will be declared.
+ * src/smooth/ftrend1.c when FT_CONFIG_OPTION_PIC is defined
+ ft_raster1_renderer_class and ft_raster5_renderer_class structs
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+ Macros will be used from rastpic.h in order to access
+ ft_standard_raster from the pic_container (allocated in ftraster.c).
+ In ft_raster1_render when PIC is enabled, the last letter of
+ module_name is used to verfy the renderer class rather than the
+ class pointer.
+
+ * src/raster/ftraster.c when FT_CONFIG_OPTION_PIC is defined
+ ft_standard_raster struct will have function to init it
+ instead of being allocated in the global scope.
+
+ New Files:
+ * src/raster/rastpic.h declare struct to hold PIC globals for raster
+ renderer and macros to access them.
+ * src/raster/rastpic.c implement functions to allocate, destroy and
+ initialize PIC globals for raster renderer.
+
+ * src/raster/raster.c add new file to build: rastpic.c.
+ * src/raster/jamfile add new files to FT2_MULTI build: rastpic.c.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ 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
+ 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
+ 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
+ ft_grays_raster from the pic_container (allocated in ftgrays.c).
+
+ * src/smooth/ftgrays.h include FT_CONFIG_CONFIG_H
+ * src/smooth/ftgrays.c when FT_CONFIG_OPTION_PIC is NOT defined
+ func_interface was moved from gray_convert_glyph_inner function
+ to the global scope.
+ When FT_CONFIG_OPTION_PIC is defined
+ func_interface and ft_grays_raster structs
+ will have functions to init them
+ instead of being allocated in the global scope.
+ And func_interface will be allocated on the stack of
+ gray_convert_glyph_inner.
+
+ New Files:
+ * src/smooth/ftspic.h declare struct to hold PIC globals for smooth
+ renderer and macros to access them.
+ * src/smooth/ftspic.c implement functions to allocate, destroy and
+ initialize PIC globals for smooth renderer.
+
+ * src/smooth/smooth.c add new file to build: ftspic.c.
+ * src/smooth/jamfile add new files to FT2_MULTI build: ftspic.c.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Position Independent Code (PIC) support in cff driver.
+
+ * include/freetype/internal/services/svcid.h add macros to init
+ instances of FT_Service_CIDRec.
+ * include/freetype/internal/services/svpsinfo.h add macros to init
+ instances of FT_Service_PsInfoRec.
+
+ * src/cff/cffcmap.h declare cff_cmap_encoding_class_rec
+ and cff_cmap_unicode_class_rec using macros from
+ ftobjs.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
+ functions will be declared.
+ * src/cff/cffcmap.c when FT_CONFIG_OPTION_PIC is defined
+ the following structs:
+ cff_cmap_encoding_class_rec and cff_cmap_unicode_class_rec
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+
+ * src/cff/cffdrivr.h declare cff_driver_class using macros from
+ ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
+ functions will be declared.
+ * src/cff/cffdrivr.c when FT_CONFIG_OPTION_PIC is defined
+ the following structs:
+ cff_service_glyph_dict, cff_service_ps_info, cff_service_ps_name
+ cff_service_get_cmap_info, cff_service_cid_info, cff_driver_class,
+ and cff_services array
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+ And macros will be used from cffpic.h in order to access them
+ from the pic_container.
+ Use macros from cffpic.h in order to access the
+ structs allocated in cffcmap.c
+
+ * src/cff/cffobjs.c Use macros from cffpic.h in order to access the
+ structs allocated in cffcmap.c
+
+ * src/cff/parser.c when FT_CONFIG_OPTION_PIC is defined
+ implement functions to create and destroy cff_field_handlers array
+ instead of being allocated in the global scope.
+ And macros will be used from cffpic.h in order to access it
+ from the pic_container.
+
+ New Files:
+ * src/cff/cffpic.h declare struct to hold PIC globals for cff
+ driver and macros to access them.
+ * src/cff/cffpic.c implement functions to allocate, destroy and
+ initialize PIC globals for cff driver.
+
+ * src/cff/cff.c add new file to build: cffpic.c.
+ * src/cff/jamfile add new files to FT2_MULTI build: cffpic.c.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Position Independent Code (PIC) support in sfnt driver.
+
+ * include/freetype/internal/services/svbdf.h add macros to init
+ instances of FT_Service_BDFRec.
+ * include/freetype/internal/services/svgldict.h add macros to init
+ instances of FT_Service_GlyphDictRec.
+ * include/freetype/internal/services/svpostnm.h add macros to init
+ instances of FT_Service_PsFontNameRec.
+ * include/freetype/internal/services/svsfnt.h add macros to init
+ instances of FT_Service_SFNT_TableRec.
+ * include/freetype/internal/services/svttcmap.h add macros to init
+ instances of FT_Service_TTCMapsRec.
+ * include/freetype/internal/sfnt.h add macros to init
+ instances of SFNT_Interface.
+
+ * src/sfnt/sfdriver.h declare sfnt_module_class using macros from
+ ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
+ functions will be declared.
+ * src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined
+ the following structs:
+ sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name
+ tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface,
+ sfnt_module_class, and sfnt_services array
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+ And macros will be used from sfntpic.h in order to access them
+ from the pic_container.
+
+ * src/sfnt/ttcmap.h add macros to init
+ instances of TT_CMap_ClassRec.
+ * src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined
+ the following structs:
+ tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec
+ tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec,
+ tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes array
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+ And macros will be used from sfntpic.h in order to access them
+ from the pic_container.
+ The content of tt_cmap_classes is now described in the
+ new file 'ttcmapc.h'.
+
+ New Files:
+ * src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt
+ driver and macros to access them.
+ * src/sfnt/sfntpic.c implement functions to allocate, destroy and
+ initialize PIC globals for sfnt driver.
+ * src/sfnt/ttcmapc.h describing the content of
+ tt_cmap_classes allocated in ttcmap.c
+
+ * src/sfnt/sfnt.c add new file to build: sfntpic.c.
+ * src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Position Independent Code (PIC) support in truetype driver.
+
+ * include/freetype/internal/services/svmm.h add macros to init
+ instances of FT_Service_MultiMastersRec.
+ * include/freetype/internal/services/svttglyf.h add macros to init
+ instances of FT_Service_TTGlyfRec.
+
+ * src/truetype/ttdriver.h declare tt_driver_class using macros from
+ ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
+ functions will be declared.
+ * src/truetype/ttdriver.c when FT_CONFIG_OPTION_PIC is defined
+ the following structs:
+ tt_service_gx_multi_masters, tt_service_truetype_glyf, tt_driver_class
+ and tt_services array,
+ will have functions to init or create and destroy them
+ instead of being allocated in the global scope.
+ And macros will be used from ttpic.h in order to access them
+ from the pic_container.
+ * src/truetype/ttobjs.c change trick_names array to be
+ PIC-compatible by being a two dimentional array rather than array
+ of pointers.
+
+ New Files:
+ * src/truetype/ttpic.h declare struct to hold PIC globals for truetype
+ driver and macros to access them.
+ * src/truetype/ttpic.c implement functions to allocate, destroy and
+ initialize PIC globals for truetype driver.
+
+ * src/truetype/truetype.c add new file to build: ttpic.c.
+ * src/truetype/jamfile add new files to FT2_MULTI build: ttpic.c.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Position Independent Code (PIC) support and infrastructure in base.
+
+ * include/freetype/config/ftoption.h add FT_CONFIG_OPTION_PIC
+ * include/freetype/internal/ftobjs.h Add pic_container member to
+ FT_LibraryRec.
+ Add macros to declare and init instances of FT_CMap_ClassRec.
+ Add macros to init instances of FT_Outline_Funcs and FT_Raster_Funcs.
+ Add macros to declare, allocate and initialize modules
+ (FT_Module_Class).
+ Add macros to declare, allocate and initialize renderers
+ (FT_Renderer_Class).
+ Add macro to init instances of FT_Glyph_Class.
+ Add macros to declare, allocate and initialize drivers
+ (FT_Driver_ClassRec).
+ * include/freetype/internal/ftpic.h new file to declare the
+ FT_PIC_Container struct and the functions to allocate and detroy it.
+ * include/freetype/internal/ftserv.h add macros to allocate and
+ destory arrays of FT_ServiceDescRec.
+ * include/freetype/internal/internal.h define macro to include
+ ftpic.h.
+
+ New Files:
+ * src/base/ftpic.c implement functions to allocate and destory the
+ global pic_container.
+ * src/base/basepic.h declare struct to hold PIC globals for base and
+ macros to access them.
+ * src/base/basepic.c implement functions to allocate, destroy and
+ initialize PIC globals for base.
+
+ * src/base/ftinit.c when FT_CONFIG_OPTION_PIC is defined implement
+ functions that allocate and destroy ft_default_modules according to
+ FT_CONFIG_MODULES_H in the pic_container instead of the global scope
+ and use macro from basepic.h to access it.
+ * src/base/ftobjs.c add calls to the functions that allocate and
+ destroy the global pic_container when the library is created and
+ destroyed.
+
+ * src/base/jamfile add new files to FT2_MULTI build:
+ ftpic.c and basepic.c.
+ * src/base/ftbase.c add new files to build:
+ ftpic.c and basepic.c.
+
+ * src/base/ftglyph.c when FT_CONFIG_OPTION_PIC is defined
+ ft_bitmap_glyph_class and ft_outline_glyph_class will be allocated
+ in the pic_container instead of the global scope and use macros from
+ basepic.h to access them.
+ * src/base/ftbbox.c allocate bbox_interface stract on the stack
+ instead of the global scope when FT_CONFIG_OPTION_PIC is defined.
+ * src/base/ftstroke.c access ft_outline_glyph_class allocated in
+ ftglyph.c via macros from basepic.h
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Preparing changes in cff parser later needed for PIC version.
+
+ * src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
+ src/cff/cffparse.c, src/cff/cffparse.h: Add library pointer to
+ 'CFF_ParserRec' set by `cff_parser_init'.
+ Route library pointer from 'cff_face_init' to 'cff_subfont_load'
+ for `cff_parser_init'.
+
+ * src/cff/cffparse.c (CFF_Field_Handler): Move it to...
+ * src/cff/cffparse.h: This file, to be used by other C files.
+
+2009-04-05 Oran Agra <oran@monfort.co.il>
+
+ Minor change in ftstroke.c.
+
+ * src/base/ftstroke.c (FT_StrokerRec): Replace `memory' member with
+ `library' needed for PIC version.
+ Update all callers.
+
+2009-04-04 Werner Lemberg <wl@gnu.org>
+
+ ftnames.c -> ftsnames.c
+
+ * src/base/ftnames.c: Rename to...
+ * src/base/ftsnames.c: This.
+ * src/base/Jamfile, src/base/rules.mk, src/base/ftbase.c: Updated.
+
+2009-04-04 Werner Lemberg <wl@gnu.org>
+
+ Add support for cmap type 13.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (TT_CONFIG_CMAP_FORMAT_13): New macro.
+
+ * src/sfnt/ttcmap.c (TT_CMap13Rec, tt_cmap13_init,
+ tt_cmap13_validate, tt_cmap13_char_index, tt_cmap13_char_next,
+ tt_cmap13_get_info, tt_cmap13_char_map_def_binary,
+ tt_cmap14_class_rec): New functions and structures for cmap 13
+ support.
+ (tt_cmap_classes): Register tt_cmap13_class_rec.
+
+ * docs/CHANGES: Mention cmap 13 support.
+
+2009-04-01 Werner Lemberg <wl@gnu.org>
+
+ Ignore empty contours in CFF glyphs.
+
+ Problem reported by Albert Astals Cid <aacid@kde.org>.
+
+ * src/cff/cffgload.c (cff_builder_close_contour): Synchronize with
+ t1_builder_close_contour.
+
+2009-03-21 Werner Lemberg <wl@gnu.org>
+
+ Another redundant header inclusion.
+
+ * src/truetype/ttgxvar.c: Fix Ghostscript Coverity issue #4041.
+
+2009-03-21 Werner Lemberg <wl@gnu.org>
+
+ Remove redundant header inclusions.
+
+ This covers many Ghostscript Coverity issues.
+
+ * src/*: Do it.
+
+2009-03-21 Werner Lemberg <wl@gnu.org>
+
+ Fix Ghostscript Coverity issue #3904.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against
+ invalid values of `runcnt'.
+
+2009-03-20 Werner Lemberg <wl@gnu.org>
+
+ Fix `make multi' run.
+
+ * src/smooth/ftsmooth.h: Include FT_INTERNAL_DEBUG_H.
+
+2009-03-20 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #25923.
+
+ * src/cache/ftccmap.c (FTC_CMAP_HASH): Fix typo.
+
+2009-03-20 Werner Lemberg <wl@gnu.org>
+
+ Protect against too large glyphs.
+
+ Problem reported by Tavis Ormandy <taviso@google.com>.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Don't allow
+ `pitch' or `height' to be larger than 0xFFFF.
+
+2009-03-20 Werner Lemberg <wl@gnu.org>
+ Tavis Ormandy <taviso@google.com>
+
+ Fix validation for various cmap table formats.
+
+ * src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
+ tt_cmap12_validate): Check `length' correctly.
+ (tt_cmap_14_validate): Check `length' and `numMappings' correctly.
+
+2009-03-20 Werner Lemberg <wl@gnu.org>
+
+ Protect against malformed compressed data.
+
+ * src/lzw/ftzopen.c (ft_lzwstate_io): Test whether `state->prefix' is
+ zero.
+
+2009-03-20 Werner Lemberg <wl@gnu.org>
+
+ Protect against invalid SID values in CFFs.
+
+ Problem reported by Tavis Ormandy <taviso@google.com>.
+
+ * src/cff/cffload.c (cff_charset_load): Reject SID values larger
+ than 64999.
+
+2009-03-19 Vincent Richomme <richom.v@free.fr>
+
+ Update WinCE Visual C project files.
+
+ * builds/wince/vc2005-ce/freetype.vcproj,
+ builds/wince/vc2008-ce/freetype.vcproj: Add missing base extension
+ files.
+
+2009-03-19 Werner Lemberg <wl@gnu.org>
+
+ Remove unused Win32 code.
+
+ * builds/wince/ftdebug.c: Remove code guarded with `!_WIN32_WCE'.
+ Since Win32 is handled separately this is no longer needed.
+
+2009-03-19 Vincent Richomme <richom.v@free.fr>
+
+ Make `gzip' module compile on WinCE.
+
+ * src/gzip/zconf.h [_WIN32_WCE]: Define NO_ERRNO_H.
+
+2009-03-19 Werner Lemberg <wl@gnu.org>
+
+ Remove unused WinCE code.
+
+ * builds/win32/ftdebug.c: Remove code guarded with `_WIN32_WCE'.
+ Since WinCE is handled separately this is no longer needed.
+
+2009-03-16 Werner Lemberg <wl@gnu.org>
+
+ docmaker: Don't ignore single-line code blocks.
+
+ * src/tools/docmaker/content.py (DocBlock::_init__): Fix change from
+ 2009-01-31.
+
+2009-03-15 Steve Langasek <steve.langasek@canonical.com>
+
+ Use __asm__ for declaring assembly instead of asm.
+
+ * builds/unix/ftconfig.in (FT_MulFix_arm): Use __asm__ instead of
+ asm on arm, fixing a build failure on armel with -pedantic.
+
+2009-03-14 Werner Lemberg <wl@gnu.org>
+
+ Fix valgrind warning.
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_bit_aligned): Don't read
+ past the end of the frame.
+
+2009-03-12 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.3.9 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-9'.
+
+2009-03-12 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype2.in: Move @FT2_EXTRA_LIBS@ to `Libs.private'.
+
+2009-03-12 Werner Lemberg <wl@gnu.org>
+
+ Fix some FreeType Coverity issues as reported for Ghostscript.
+
+ * src/base/ftobjs.c (FT_New_Face, FT_New_Memory_Face): Initialize
+ `args.stream' (#3874, #3875).
+ (open_face_PS_from_sfnt_stream): Improve error management (#3786).
+ * src/base/ftmm.c (ft_face_get_mm_service): Fix check of `aservice'
+ (#3870).
+ * src/base/ftstroke.c (ft_stroke_border_get_counts): Remove dead
+ code (#3790).
+ * src/base/ftrfork.c (raccess_guess_apple_generic): Check error
+ value of `FT_Stream_Skip' (#3784).
+
+ * src/type1/t1gload.c (T1_Load_Glyph): Check `size' before accessing
+ it (#3872)
+
+ * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Check `face' before accessing
+ it (#3871).
+ * src/pcf/pcfread.c (pcf_get_metrics): Handle return value of
+ `pcf_get_metric' (#3789, #3782).
+ (pcf_get_properties): Use FT_STREAM_SKIP (#3783).
+
+ * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Fix check of
+ `acache' (#3797)
+
+ * src/cff/cffdrivr.c (cff_ps_get_font_info): Fix check of `cff'
+ (#3796).
+ * src/cff/cffgload.c (cff_decoder_prepare): Check `size' (#3795).
+ * src/cff/cffload.c (cff_index_get_pointers): Add comment (#3794).
+
+ * src/bdf/bdflib.c (_bdf_add_property): Check `fp->value.atom'
+ (#3793).
+ (_bdf_parse_start): Add comment (#3792).
+
+ * src/raster/ftraster.c (Finalize_Profile_Table): Check
+ `ras.fProfile' (#3791).
+
+ * src/sfnt/ttsbit.c (Load_SBit_Image): Use FT_STREAM_SKIP (#3785).
+
+ * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Properly ignore
+ seek error (#3781).
+
+2009-03-11 Michael Toftdal <toftdal@gmail.com>
+
+ Extend CID service functions to handle CID-keyed CFFs as CID fonts.
+
+ * include/freetype/ftcid.h (FT_Get_CID_Is_Internally_CID_keyed,
+ FT_Get_CID_From_Glyph_Index): New functions.
+
+ * include/freetype/internal/services/svcid.h
+ (FT_CID_GetIsInternallyCIDKeyedFunc,
+ FT_CID_GetCIDFromGlyphIndexFunc): New function typedefs.
+ (CID Service): Use them.
+
+ * src/base/ftcid.c: Include FT_CID_H.
+ (FT_Get_CID_Is_Internally_CID_keyed, FT_Get_CID_From_Glyph_Index):
+ New functions.
+
+ * src/cff/cffdrivr.c (cff_get_is_cid, cff_get_cid_from_glyph_index):
+ New functions.
+ (cff_service_cid_info): Add them.
+ * src/cff/cffload.c (cff_font_load): Don't free `font->charset.sids'
+ -- it is needed for access as a CID-keyed font. It gets deleted
+ later on.
+
+ * src/cid/cidriver.c (cid_get_is_cid, cid_get_cid_from_glyph_index):
+ New functions.
+ (cid_service_cid_info): Add them.
+
+ * docs/CHANGES: Updated.
+
+2009-03-11 Bram Tassyns <bramt@enfocus.be>
+
+ Fix Savannah bug #25597.
+
+ * src/cff/cffparse.c (cff_parse_real): Don't allow fraction_length
+ to become larger than 9.
+
+2009-03-11 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #25814.
+
+ * builds/unix/freetype2.in: As suggested in the bug report, move
+ @LIBZ@ to `Libs.private'.
+
+2009-03-11 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #25781.
+ We now simply check for a valid `offset', no longer handling `delta
+ = 1' specially.
+
+ * src/sfnt/ttcmap.c (tt_cmap4_validate): Don't check `delta' for
+ last segment.
+ (tt_cmap4_set_range, tt_cmap4_char_map_linear,
+ tt_cmap4_char_map_binary): Check offset.
+
+2009-03-11 Werner Lemberg <wl@gnu.org>
+
+ * src/base/Jamfile: Fix handling of ftadvanc.c.
+ Reported by Oran Agra <oran@monfort.co.il>.
+
+2009-03-10 Vincent Richomme <richom.v@free.fr>
+
+ Restructure Win32 and Wince compiler support.
+
+ * src/builds/win32: Remove files for WinCE.
+ Move VC 2005 support to a separate directory.
+ Add directory for VC 2008 support.
+
+ * src/builds/wince: New directory hierarchy for WinCE compilers
+ (VC 2005 and VC 2008).
+
+2009-03-09 Werner Lemberg <wl@gnu.org>
+
+ More preparations for 2.3.9 release.
+
+ * docs/CHANGES: Updated.
+
+ * Jamfile, README: s/2.3.8/2.3.9/, s/238/239/.
+
+2009-03-09 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/rules.mk (SFNT_DRV_H): Add ttsbit0.c.
+
+2009-03-09 Alexey Kryukov <anagnost@yandex.ru>
+
+ Fix handling of EBDT formats 8 and 9 (part 2).
+
+ This patch fixes the following problems in ttsbit0.c:
+
+ . Bitmaps for compound glyphs were never allocated.
+
+ . `SBitDecoder' refused to load metrics if some other metrics have
+ already been loaded. This condition certainly makes no sense for
+ recursive calls, so I've just disabled it. Another possibility
+ would be resetting `decoder->metrics_loaded' to false before
+ loading each composite component. However, we must restore the
+ original metrics after finishing the recursion; otherwise we can
+ get a misaligned glyph.
+
+ . `tt_sbit_decoder_load_bit_aligned' incorrectly handled `x_pos',
+ causing some glyph components to be shifted too far to the right
+ (especially noticeable for small sizes).
+
+ Note that support for grayscale bitmaps (not necessarily compound) is
+ completely broken in ttsbit0.c.
+
+ * src/sfnt/tt_sbit_decoder_load_metrics: Always load metrics.
+ (tt_sbit_decoder_load_bit_aligned): Handle `x_pos' correctly in case
+ of `h == height'.
+ (tt_sbit_decoder_load_compound): Reset metrics after loading
+ components.
+ Allocate bitmap.
+
+2009-03-09 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.raw (version_info): Set to 9:20:3.
+
+2009-03-03 David Turner <david@freetype.org>
+
+ Protect SFNT kerning table parser against malformed tables.
+
+ This closes Savannah BUG #25750.
+
+ * src/sfnt/ttkern.c (tt_face_load_kern, tt_face_get_kerning): Fix a
+ bug where a malformed table would be successfully loaded but later
+ crash the engine during parsing.
+
+2009-03-03 David Turner <david@freetype.org>
+
+ Update documentation and bump version number to 2.3.9.
+
+ * include/freetype/freetype.h: Bump patch version to 9.
+ * docs/CHANGES: Document the ABI break in 2.3.8.
+ * docs/VERSION.DLL: Update version numbers table for 2.3.9.
+
+2009-03-03 David Turner <david@freetype.org>
+
+ Remove ABI-breaking field in public PS_InfoFontRec definition.
+
+ Instead, we define a new internal PS_FontExtraRec structure to
+ hold the additional field, then place it in various internal
+ positions of the corresponding FT_Face derived objects.
+
+ * include/freetype/t1tables.h (PS_FontInfoRec): Remove the
+ `fs_type' field from the public structure.
+ * include/freetype/internal/psaux.h (T1_FieldLocation): New
+ enumeration `T1_FIELD_LOCATION_FONT_EXTRA'.
+ * include/freetype/internal/t1types.h (PS_FontExtraRec): New
+ structure.
+ (T1_FontRec, CID_FaceRec): Add it.
+
+ * src/cid/cidload.c (cid_load_keyword): Handle
+ T1_FIELD_LOCATION_FONT_EXTRA.
+ * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c:
+ Adjust FT_STRUCTURE and T1CODE properly to handle `FSType'.
+ * src/type1/t1load.c (t1_load_keyword): Handle
+ T1_FIELD_LOCATION_FONT_EXTRA.
+
+ * include/freetype/internal/services/svpsinfo.h (PsInfo service):
+ Add `PS_GetFontExtraFunc' function typedef.
+
+ * src/base/ftfstype.c: Include FT_INTERNAL_SERVICE_H and
+ FT_SERVICE_POSTSCRIPT_INFO_H.
+ (FT_Get_FSType_Flags): Use POSTSCRIPT_INFO service.
+
+ * src/cff/cffdrivr.c (cff_service_ps_info): Updated.
+ * src/cid/cidriver.c (cid_ps_get_font_extra): New function.
+ (cid_service_ps_info): Updated.
+ * src/type1/t1driver.c (t1_ps_get_font_extra): New function.
+ (t1_service_ps_info): Updated.
+ * src/type42/t42drivr.c (t42_ps_get_font_extra): New function.
+ (t42_service_ps_info): Updated.
+
+2009-03-02 Alexey Kryukov <anagnost@yandex.ru>
+
+ Fix handling of EBDT formats 8 and 9.
+
+ The main cycle in `blit_sbit' makes too many iterations: it actually
+ needs the count of lines in the source bitmap rather than in the
+ target image.
+
+ * src/sfnt/ttsbit.c (blit_sbit) [FT_CONFIG_OPTION_OLD_INTERNALS]:
+ Add parameter `source_height' and use it for main loop.
+ (Load_SBit_Single) [FT_CONFIG_OPTION_OLD_INTERNALS]: Updated.
+
+2009-02-23 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #25669.
+
+ * src/base/ftadvanc.h (FT_Get_Advances): Fix serious typo.
+
+ * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Fix
+ scaling factor for non-scalable fonts.
+
+ * src/cff/cffdrivr.c (cff_get_advances): Use correct advance width
+ value to prevent incorrect scaling.
+
+ * docs/CHANGES: Document it.
+
+2009-02-15 Matt Godbolt <matt@godbolt.org>
+
+ Fix Savannah bug #25588.
+
+ * builds/unix/ftconfig.in (FT_MulFix_arm): Use correct syntax for
+ `orr' instruction.
+
+2009-02-11 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttobjs.c (tt_check_trickyness): Add `DFKaiShu'.
+ Reported by David Bevan <dbevan@emtex.com>.
+
+2009-02-09 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #25495.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Test for bitmap strikes before
+ setting metrics and bbox values. This ensures that the check for a
+ font with neither a `glyf' table nor bitmap strikes can be performed
+ early enough to set metrics and bbox values too.
+
+2009-02-04 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #25480.
+
+ * builds/unix/freetype-config.in: For --ftversion, don't use $prefix
+ but $includedir.
+
+2009-01-31 Werner Lemberg <wl@gnu.org>
+
+ Minor docmaker improvements.
+
+ * src/tools/docmaker/content.py (DocBlock::__init__): Ignore empty
+ code blocks.
+
+2009-01-25 Werner Lemberg <wl@gnu.org>
+
+ Fix SCANCTRL handling in TTFs.
+ Problem reported by Alexey Kryukov <anagnost@yandex.ru>.
+
+ * src/truetype/ttinterp.c (Ins_SCANCTRL): Fix threshold handling.
+
+2009-01-23 Werner Lemberg <wl@gnu.org>
+
+ Move FT_Get_FSType_Flags to a separate file.
+ Problem reported by Mickey Gabel <mickey@monfort.co.il>.
+
+ * src/base/ftobjs.c (FT_Get_FSType_Flags): Move to...
+ * src/base/ftfstype.c: This new file.
+
+ * modules.cfg (BASE_EXTENSION): Add ftfstype.c.
+
+ * docs/INSTALL.ANY: Updated.
+
+ * builds/mac/*.txt, builds/amiga/*makefile*,
+ builds/win32/{visualc,visualce}/freetype.*, builds/symbian/*:
+ Updated.
+
+2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Fix 2 error
+ messages ending without "\n".
+
+2009-01-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #25347.
+
+ * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Rewind
+ the stream to the original position passed to this function,
+ when ft_lookup_PS_in_sfnt_stream() failed.
+ (Mac_Read_sfnt_Resource): Rewind the stream to the head of
+ sfnt resource body, when open_face_PS_from_sfnt_stream()
+ failed.
+
+2009-01-19 Michael Lotz <mmlr@mlotz.ch>
+
+ Fix Savannah bug #25355.
+
+ * include/freetype/config/ftconfig.h (FT_MulFix_i386): Make
+ assembler code work with gcc 2.95.3 (as used by the Haiku project).
+ Add `cc' register to the clobber list.
+
+2009-01-18 Werner Lemberg <wl@gnu.org>
+
+ Protect FT_Get_Next_Char.
+
+ * src/sfnt/ttcmap.c (tt_cmap4_set_range): Apply fix similar to
+ change from 2008-07-22.
+
+ Patch from Ronen Ghoshal <rghoshal@emtex.com>.
+
+2009-01-18 Werner Lemberg <wl@gnu.org>
+
+ Implement FT_Get_Name_Index for SFNT driver.
+
+ * src/sfnt/sfdriver.c (sfnt_get_name_index): New function.
+ (sfnt_service_glyph_dict): Use it.
+
+ Problem reported by Truc Truong <tructv@necsv.com>.
+
+2009-01-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftstroke.h (FT_Outline_GetInsideBorder): Fix
+ documentation. Problem reported by Truc Truong <tructv@necsv.com>.
+
+ * docs/CHANGES: Updated.
+
+2009-01-14 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.3.8 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-8'.
+
+ * docs/VERSION.DLL: Update documentation and bump version number to
+ 2.3.8.
+
+ * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj: s/2.3.7/2.3.8/, s/237/238/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
+
+ * builds/unix/configure.raw (version_info): Set to 9:19:3.
+
+ * docs/release: Updated.
+
+2009-01-14 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (dist): Compress better.
+
+2009-01-13 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Get_FSType_Flags): Cast for compilation
+ with C++.
+
+2009-01-13 Werner Lemberg <wl@gnu.org>
+
+ Don't use stdlib.h and friends directly.
+ Reported by Mickey Gabel <mickey@monfort.co.il>.
+
+ * src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
+
+ * src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h:
+ s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/.
+
+ * src/autofit/aftypes.h, src/autofit/afhints.c,
+ src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/
+
+ * src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.
+
+2009-01-12 Werner Lemberg <wl@gnu.org>
+
+ Avoid compiler warnings.
+
+ * */*: s/do ; while ( 0 )/do { } while ( 0 )/.
+ Reported by Sean McBride <sean@rogue-research.com>.
+
+2009-01-12 Werner Lemberg <wl@gnu.org>
+
+ Fix stdlib dependencies.
+
+ Problem reported by Mickey Gabel <mickey@monfort.co.il>.
+
+ * include/freetype/config/ftstdlib.h (ft_exit): Removed. Unused.
+
+ * src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c:
+ s/memcpy/ft_memcpy/.
+ * src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/.
+
+2009-01-11 Werner Lemberg <wl@gnu.org>
+
+ * docs/formats.txt: Add link to PCF specification.
+
+ * include/freetype/ftbdf.h (FT_Get_BDF_Property): Improve
+ documentation.
+
+2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance,
+ FT_Get_Advances): Change the type of load_flags from FT_UInt32 to
+ FT_Int32, to match with the flags for FT_Load_Glyph().
+ * src/cff/cffdrivr.c (cff_get_advances): Ditto.
+ * src/truetype/ttdriver.c (tt_get_advances): Ditto.
+ * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances):
+ Ditto.
+ * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
+ Ditto.
+
+2009-01-09 Daniel Zimmermann <netzimme@aol.com>
+
+ * src/gxvalid/gxvmort.c (gxv_mort_feature_validate): Fix wrong
+ length check. From Savannah patch #6682.
+
+2009-01-09 Werner Lemberg <wl@gnu.org>
+
+ Fix problem with T1_FIELD_{NUM,FIXED}_TABLE2.
+
+ * src/psaux/psobjs.c (ps_parser_load_field_table): Don't handle
+ `count_offset' if it is zero (i.e., unused). Otherwise, the first
+ element of the structure which holds the data is erroneously
+ modified. Problem reported by Chi Nguyen <chint@necsv.com>.
+
+2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance,
+ FT_Get_Advances): Extend the type of load_flags from FT_UInt to
+ FT_UInt32, to pass 32-bit flags on 16bit platforms.
+ * src/cff/cffdrivr.c (cff_get_advances): Ditto.
+ * src/truetype/ttdriver.c (tt_get_advances): Ditto.
+ * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances):
+ Ditto.
+ * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
+ Ditto.
+
+2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c (FT_Done_Library): Issue an error message when
+ FT_Done_Face() cannot free all faces. If the list of the opened
+ faces includes broken face which FT_Done_Face() cannot free,
+ FT_Done_Library() retries FT_Done_Face() and it can fall into
+ an endless loop. See the discussion:
+ http://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html
+ http://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html
+
+2009-01-07 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Document new key `a' in ftdiff.
+
+2009-01-06 Werner Lemberg <wl@gnu.org>
+
+ * autogen.sh: Don't use GNUisms while calling sed. Problem reported
+ by Sean McBride.
+
+2009-01-06 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
+ and FT_PIXEL_MODE_LCD_V. Problem reported by Chi Nguyen
+ <chint@necsv.com>.
+
+2009-01-06 Diego Pettenò <flameeyes@gmail.com>
+
+ * builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and
+ AC_CANONICAL_TARGET and use $host_os only. A nice explanation for
+ this change can be found at
+ http://blog.flameeyes.eu/s/canonical-target.
+
+ From Savannah patch #6712.
+
+2009-01-06 Sean McBride <sean@rogue-research.com>
+
+ * src/base/ftdbgmem.c (_debug_mem_dummy): Make it static.
+
+ * src/base/ftmac.c: Remove some #undefs.
+
+2008-12-26 Werner Lemberg <wl@gnu.org>
+
+ Set `face_index' field in FT_Face for all font formats.
+
+ * cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init),
+ sfnt/sfobjs.c (sfnt_init_face): Do it.
+
+ * docs/CHANGES: Document it.
+
+2008-12-22 Steve Grubb
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files.
+ Patch from Savannah bug #25151.
+
+2008-12-21 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,
+ src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c:
+ s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for
+ errors in the bytecode interpreter only.
+
+2008-12-21 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftpfr.c (FT_Get_PFR_Metrics): Protect against NULL
+ arguments.
+ Fix return value for non-PFR fonts. Both problems reported by Chi
+ Nguyen <chint@necsv.com>.
+
+2008-12-21 anonymous
+
+ FT_USE_MODULE declares things as:
+
+ extern const FT_Module_Class
+
+ (or similar for C++). However, the actual types of the variables
+ being declared are often different, e.g., FT_Driver_ClassRec or
+ FT_Renderer_Class. (Some are, indeed, FT_Module_Class.)
+
+ This works with most C compilers (since those structs begin with an
+ FT_Module_Class struct), but technically it's undefined behavior.
+
+ To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
+ paragraph 2:
+
+ All declarations that refer to the same object or function shall
+ have compatible type; otherwise, the behavior is undefined.
+
+ (And they are not compatible types.)
+
+ Most C compilers don't reject (or even detect!) code which has this
+ issue, but the GCC LTO development branch compiler does. (It
+ outputs the types of the objects while generating .o files, along
+ with a bunch of other information, then compares them when doing the
+ final link-time code generation pass.)
+
+ Patch from Savannah bug #25133.
+
+ * src/base/ftinit.c (FT_USE_MODULE): Include variable type.
+
+ * builds/amiga/include/freetype/config/ftmodule.h,
+ include/freetype/config/ftmodule.h, */module.mk: Updated to declare
+ pass correct types to FT_USE_MODULE.
+
+2008-12-21 Hongbo Ni <hongbo@njstar.com>
+
+ * src/autofit/aflatin.c (af_latin_hint_edges),
+ src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c
+ (af_cjk_hint_edges): Protect against division by zero. This fixes
+ Savannah bug #25124.
+
+2008-12-18 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2008-12-18 Bevan, David <dbevan@emtex.com>
+
+ Provide API for accessing embedding and subsetting restriction
+ information.
+
+ * include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING,
+ FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING,
+ FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING,
+ FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New
+ macros.
+ (FT_Get_FSType_Flags): New function declaration.
+
+ * src/base/ftobjs.c (FT_Get_FSType_Flags): New function.
+
+ * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c
+ (t42_keywords): Handle `FSType'.
+
+ * include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field.
+
+2008-12-17 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Don't use internal
+ macros so that copying the source code into an application works
+ out of the box.
+
+2008-12-17 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftsynth.h, src/base/ftsynth.c: Move
+ FT_GlyphSlot_Own_Bitmap to...
+ * include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files.
+
+ * docs/CHANGES: Document it.
+
+2008-12-10 Werner Lemberg <wl@gnu.org>
+
+ Generalize the concept of `tricky' fonts by introducing
+ FT_FACE_FLAG_TRICKY to indicate that the font format's hinting
+ engine is necessary for correct rendering.
+
+ At the same time, slightly modify the behaviour of tricky fonts:
+ FT_LOAD_NO_HINTING is now ignored. To really force raw loading
+ of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and
+ FT_LOAD_NO_AUTOHINT must be used.
+
+ Finally, tricky TrueType fonts always use the bytecode interpreter
+ even if the patented code is used.
+
+ * include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY):
+ New macros.
+
+ * src/truetype/ttdriver.c (Load_Glyph): Handle new load flags
+ semantics as described above.
+
+ * src/truetype/ttobjs.c (tt_check_trickyness): New function, using
+ code of ...
+ (tt_face_init): This function, now simplified and updated to new
+ semantics.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky
+ fonts.
+
+ * docs/CHANGES: Document it.
+
+2008-12-09 Werner Lemberg <wl@gnu.org>
+
+ Really fix Savannah bug #25010: An SFNT font with neither outlines
+ nor bitmaps can be considered as containing space `glyphs' only.
+
+ * src/truetype/ttpload.c (tt_face_load_loca): Handle the case where
+ a `glyf' table is missing.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no
+ `glyf' table but a non-zero `loca' entry.
+ (tt_loader_init): Handle missing `glyf' table.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines
+ nor bitmaps is scalable.
+
+2008-12-05 Werner Lemberg <wl@nu.org>
+
+ * src/autofit/aflatin.c (af_latin_uniranges): Add more ranges. This
+ fixes Savannah bug #21190 which also provides a basic patch.
+
+2008-12-05 Werner Lemberg <wl@nu.org>
+
+ * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value
+ 0x100 instead of 0x10000; the latter value is already occupied by
+ FT_LOAD_TARGET_LIGHT. Bug reported by James Cloos.
+
+
+ Handle SFNT with neither outlines nor bitmaps. This fixes Savannah
+ bug #25010.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Reject fonts with neither
+ outlines nor bitmaps.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Don't return an error if there
+ is no table with glyphs.
+
+
+ * src/sfnt/ttload.c (tt_face_lookup_table): Improve debugging
+ message.
+
+2008-12-01 Werner Lemberg <wl@gnu.org>
+
+ GDEF tables need `glyph_count' too for validation. Problem reported
+ by Chi Nguyen <chint@necsv.com>.
+
+ * src/otvalid/otvgdef.c (otv_GDEF_validate), src/otvalid/otvalid.h
+ (otv_GDEF_validate), src/otvalid/otvmod.c (otv_validate): Pass
+ `glyph_count'.
+
+2008-11-29 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c,
+ src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c,
+ src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c,
+ src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c,
+ src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings
+ (Atari PureC).
+
+2008-11-29 James Cloos <cloos@jhcloos.com>
+
+ * src/type/t1load.c (mm_axis_unmap): Revert previous patch and fix
+ it correctly by using FT_INT_TO_FIXED (FreeType expects 16.16 values
+ in the /BlendDesignMap space).
+
+2008-11-29 James Cloos <cloos@jhcloos.com>
+
+ * src/type1/t1load.c (mm_axis_unmap): `blend_points' is FT_Fixed*,
+ whereas `design_points' is FT_Long*. Therefore, return blend rather
+ than design points.
+
+2008-11-27 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffparse.c (cff_parse_real): Handle more than nine
+ significant digits correctly. This fixes Savannah bug #24953.
+
+2008-11-25 Daniel Zimmermann <netzimme@aol.com>
+
+ * src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream
+ before the NULL check. From Savannah patch #6681.
+
+2008-11-24 Werner Lemberg <wl@gnu.org>
+
+ Fixes from the gnuwin32 port.
+
+ * src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/.
+
+ * src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H.
+
+ * src/psaux/psobjs.c (ps_table_add): Check `length'.
+
+2008-11-15 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (tt_default_graphics_state): The default
+ value for `scan_type' is zero, as confirmed by Greg Hitchcock from
+ Microsoft. Problem reported by Michal Nowakowski
+ <miszka@limes.com.pl>.
+
+2008-11-12 Tor Andersson <tor.andersson@gmail.com>
+
+ * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
+ This fixes Savannah bug #24819.
+
+2008-11-08 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards
+ since OpenType version 1.5 has been released.
+
+ * include/ttnameid.h (TT_NAME_ID_WWS_FAMILY,
+ TT_NAME_ID_WWS_SUBFAMILY): New macros for OpenType 1.5.
+ (TT_URC_COPTIC, TT_URC_VAI, TT_URC_NKO, TT_URC_BALINESE,
+ TT_URC_PHAGSPA, TT_URC_NON_PLANE_0, TT_URC_PHOENICIAN,
+ TT_URC_TAI_LE, TT_URC_NEW_TAI_LUE, TT_URC_BUGINESE,
+ TT_URC_GLAGOLITIC, TT_URC_YIJING, TT_URC_SYLOTI_NAGRI,
+ TT_URC_LINEAR_B, TT_URC_ANCIENT_GREEK_NUMBERS, TT_URC_UGARITIC,
+ TT_URC_OLD_PERSIAN, TT_URC_SHAVIAN, TT_URC_OSMANYA,
+ TT_URC_CYPRIOT_SYLLABARY, TT_URC_KHAROSHTHI, TT_URC_TAI_XUAN_JING,
+ TT_URC_CUNEIFORM, TT_URC_COUNTING_ROD_NUMERALS, TT_URC_SUNDANESE,
+ TT_URC_LEPCHA, TT_URC_OL_CHIKI, TT_URC_SAURASHTRA, TT_URC_KAYAH_LI,
+ TT_URC_REJANG, TT_URC_CHAM, TT_URC_ANCIENT_SYMBOLS,
+ TT_URC_PHAISTOS_DISC, TT_URC_OLD_ANATOLIAN, TT_URC_GAME_TILES): New
+ macros for OpenType 1.5.
+
+2008-11-08 Wenlin Institute <wenlin@wenlin.com>
+
+ * src/base/ftobjs.c (ft_glyphslot_free_bitmap): Protect against
+ slot->internal == NULL. Reported by Graham Asher.
+
+2008-11-08 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): Modified to return an error
+ code so that memory allocation problems can be distinguished from
+ missing table entries. Reported by Graham Asher.
+ (GET_NAME): New macro.
+ (sfnt_load_face): Use it.
+
+2008-11-05 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine
+ TT_CONFIG_OPTION_UNPATENTED_HINTING. This fixes the return value of
+ `FT_Get_TrueType_Engine_Type' (and makes it work as documented).
+ Reported in bug #441638 of bugzilla.novell.com.
+
+ * docs/CHANGES: Document it.
+
+2008-11-03 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs): Use an endless loop. There are
+ fonts (like HELVI.PFB version 003.001, used on OS/2) which define
+ some `subrs' elements more than once. Problem reported by Peter
+ Weilbacher <mozilla@weilbacher.org>.
+
+2008-10-15 Graham Asher <graham.asher@btinternet.com>
+
+ * src/sfnt/ttpost.c (tt_post_default_names): Add `const'.
+
+2008-10-15 David Turner <david@freetype.org>
+
+ * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Disambiguate for
+ meddlesome compilers' warning against `for ( ...; ...; ...) ;'.
+
+2008-10-14 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Remove compiler warning.
+ Suggested by Bram Tassyns in Savannah patch #6651.
+
+2008-10-12 Graham Asher <graham.asher@btinternet.com>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Fix computation of
+ `underline_position'.
+
+2008-10-12 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2008-10-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix Savannah bug #24468.
+
+ According to include/freetype/internal/ftobjs.h, the appropriate
+ type to interchange single character codepoint is FT_UInt32. It
+ should be distinguished from FT_UInt which can be 16bit integer.
+
+ * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Change the type
+ of the second argument `pcharcode' from FT_UInt* to FT_UInt32*.
+ (tt_cmap4_char_map_binary): Ditto.
+ (tt_cmap14_get_nondef_chars): Change the type of return value
+ from FT_UInt* to FT_UInt32*.
+
+2008-10-08 John Tytgat <John.Tytgat@esko.com>
+
+ Fix Savannah bug #24485.
+
+ * src/type1/t1load.c (parse_charstrings): Assure that we always have
+ a .notdef glyph.
+
+2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c: Include FT_TRUETYPE_TAGS_H for multi build.
+ * builds/mac/ftmac.c: Ditto.
+
+2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/tttags.h (TTAG_TYP1, TTAG_typ1): Fix definitions.
+ * src/base/ftobjs.c: Include FT_TRUETYPE_TAGS_H.
+
+2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/sfnt/sfobjs.c (sfnt_open_font): Allow `typ1' version tag in
+ the beginning of sfnt container.
+ * src/sfnt/ttload.c (check_table_dir): Return
+ `SFNT_Err_Table_Missing' when sfnt table directory structure is
+ correct but essential tables for TrueType fonts (`head', `bhed' or
+ `SING') are missing. Other errors are returned by
+ SFNT_Err_Unknown_File_Format.
+
+ * src/base/ftobjs.c (FT_Open_Face): When TrueType driver returns
+ `FT_Err_Table_Missing', try `open_face_PS_from_sfnt_stream'. It is
+ enabled only when old mac font support is configured.
+
+2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/tttags.h (TTAG_CID, TTAG_FOND, TTAG_LWFN,
+ TTAG_POST, TTAG_sfnt, TTAG_TYP1, TTAG_typ1): New tags to simplify
+ the repeated calculations of these values in ftobjs.c and ftmac.c.
+ * src/base/ftobjs.c: Replace all FT_MAKE_TAG by new tags.
+ * src/base/ftmac.c: Ditto.
+ * builds/mac/ftmac.c: Ditto.
+
+2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c (ft_lookup_PS_in_sfnt_stream): Remove wrong
+ initialization of *is_sfnt_cid.
+
+2008-10-04 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Remove compiler
+ warnings.
+
+2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Replaced by...
+ (ft_lookup_PS_in_sfnt_stream): This.
+ (open_face_PS_from_sfnt_stream): New function. It checks whether
+ the stream is sfnt-wrapped Type1 PS font or sfnt-wrapped CID-keyed
+ font, then try to open a face for given face_index.
+ (Mac_Read_sfnt_Resource): Replace the combination of
+ `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' by
+ `open_face_PS_from_sfnt_stream'.
+ * src/base/ftmac.c (FT_New_Face_From_SFNT): Ditto.
+ * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto.
+ * src/base/ftbase.h: Remove `ft_lookup_PS_in_sfnt' and add
+ `open_face_PS_from_sfnt_stream'.
+
+2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Set *is_sfnt_cid to
+ FALSE if neither `CID ' nor `TYP1' is found in the sfnt container.
+
+2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/config/ftconfig.h: Define FT_MACINTOSH when SC or
+ MrC compiler of MPW is used. These compilers do not define the
+ macro __APPLE__ by themselves.
+ * builds/unix/ftconfig.in: Ditto.
+ * builds/vms/ftconfig.h: Ditto.
+ * src/base/ftbase.c: Use FT_MACINTOSH instead of __APPLE__, to
+ include ftmac.c if FreeType 2 is built by MPW.
+ * src/base/ftobjs.c: Use FT_MACINTOSH instead of __APPLE__, to
+ enable shared functions for ftmac.c if FreeType 2 is built by MPW.
+
+ * builds/mac/ftmac.c: Include ftbase.h.
+ (memory_stream_close): Removed.
+ (new_memory_stream): Ditto.
+ (open_face_from_buffer): Removed. Use the implementation in
+ ftobjs.c.
+ (ft_lookup_PS_in_sfnt): Ditto.
+
+ * builds/mac/FreeType.m68k_far.make.txt: Build ftmac.c as an
+ included part of ftbase.c, to share the functions in ftobjs.c. The
+ rule compiling ftmac.c separately is removed and the rule copying
+ ftbase.c from src/base/ftbase.c to builds/mac/ftbase.c is added.
+ * builds/mac/FreeType.m68k_cfm.make.txt: Ditto.
+ * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
+ * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
+
+2008-10-02 Bram Tassyns <bramt@enfocus.be>
+
+ * src/cff/cffgload.c (cff_slot_load): Map CID 0 to GID 0. This
+ fixes Savannah bug #24430.
+
+2008-10-02 Werner Lemberg <wl@gnu.org>
+
+ * builds/freetype.mk (BASE_H): Rename to...
+ (INTERNAL_H): This.
+ (FREETYPE_H): Updated.
+ * src/base/rules.mk: (BASE_OBJ_S, OBJ_DIR/%.$O): Add BASE_H.
+ * src/bdf/rules.mk (BDF_DRV_H): Add bdferror.h.
+ * src/cache/rules.mk (CACHE_DRV_H): Add ftccache.h and ftcsbits.h.
+ * src/pcf/rules.mk (PCF_DRV_H): Add pcfread.h.
+ * src/raster/rules.mk (RASTER_DRV_H): Add ftmisc.h.
+ * src/type42/rules.mk (T42_DRV_H): Add t42types.h.
+
+2008-10-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftbase.h: New file to declare the private utility
+ functions shared by the sources of base modules. Currently,
+ `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' are declared to
+ share between ftobjs.c and ftmac.c.
+
+ * src/base/rule.mk: Add ftbase.h.
+
+ * src/base/ftobjs.c: Include ftbase.h.
+ (memory_stream_close): Build on any platform when old MacOS font
+ support is enabled.
+ (new_memory_stream): Ditto.
+ (open_face_from_buffer): Build on any platform when old MacOS font
+ support is enabled. The counting of the face in a font file is
+ slightly different between Carbon-dependent parser and Carbon-free
+ parser. They are merged with the platform-specific conditional.
+ (ft_lookup_PS_in_sfnt): Ditto.
+
+ * src/base/ftmac.c: Include ftbase.h.
+ (memory_stream_close): Removed.
+ (new_memory_stream): Ditto.
+ (open_face_from_buffer): Removed. Use the implementation in
+ ftobjs.c.
+ (ft_lookup_PS_in_sfnt): Ditto.
+
+2008-10-02 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): `psnames_error' is only needed
+ if TT_CONFIG_OPTION_POSTSCRIPT_NAMES is defined.
+
+2008-10-01 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c
+ (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done),
+ src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c
+ (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done),
+ src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0.
+ Reported by Graham Asher.
+
+2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/rules.mk: Add conditional source to BASE_SRC, for `make
+ multi' on Mac OS X. If the macro $(ftmac_c) is defined,
+ $(BASE_DIR)/$(ftmac_c) is added to BASE_SRC. In a normal build, the
+ lack of ftmac.c in BASE_SRC is not serious because ftbase.c includes
+ ftmac.c.
+ * builds/unix/unix-def.in: Add a macro definition of $(ftmac_c).
+ * builds/unix/configure.raw: Add procedure to set up appropriate
+ value of $(ftmac_c) with the consideration of the availability of
+ Carbon framework.
+
+2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/Jamfile: Add target for multi build by jam on Mac OS X.
+ * src/base/ftobjs.c (FT_New_Face): Fix the condition to include this
+ function for MPW building. It is synchronized the condition to
+ include ftmac.c source into ftbase.c.
+
+2008-09-22 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (CFF_Operator, cff_argument_counts,
+ cff_decoder_parse_charstrings): Handle (invalid)
+ `callothersubr' and `pop' instructions.
+
+2008-09-22 John Tytgat <John.Tytgat@esko.com>
+
+ Fix Savannah bug #24307.
+
+ * include/freetype/internal/t1types.h (CID_FaceRec),
+ src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'.
+
+2008-09-21 Werner Lemberg <wl@gnu.org>
+
+ * src/smooth/ftgrays.c (gray_raster_render): Don't dereference
+ `target_map' if FT_RASTER_FLAG_DIRECT is set. Problem reported by
+ Stephan T. Lavavej <stl@nuwen.net>.
+
+2008-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/otvalid/Jamfile: Add missing target `otvmath' for multi build
+ by jam.
+ * src/sfnt/Jamfile: Add missing target `ttmtx' for multi build by
+ jam.
+
+2008-09-20 Werner Lemberg <wl@gnu.org>
+
+ * src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values
+ passed to this function are already `normalized'. Problem reported
+ by Stephan T. Lavavej <stl@nuwen.net>.
+
+ * docs/CHANGES: Document it.
+
+2008-09-20 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H.
+ (FT_Outline_Decompose): Decorate with tracing messages.
+
+ * src/smooth/ftgrays.c [DEBUG_GRAYS]: Replace with
+ FT_DEBUG_LEVEL_TRACE.
+ [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Include stdio.h and
+ stdarg.h.
+
+ (FT_TRACE) [_STANDALONE_]: Remove.
+ (FT_Message) [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: New function.
+ (FT_TRACE5, FT_TRACE7) [_STANDALONE_]: New macros.
+ (FT_ERROR) [_STANDALONE_]: Updated.
+
+ (gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition.
+ Use FT_TRACE7.
+ (gray_dump_cells): Make it `static void'.
+ (gray_convert_glyph): Use FT_TRACE7.
+
+ (FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in
+ ftoutln.c.
+
+ * src/base/ftadvanc.c (FT_Get_Advance, FT_Get_Advances): Use
+ FT_ERROR_BASE.
+
+ * docs/formats.txt: Updated.
+
+2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c: Import sfnt-wrapped Type1 and sfnt-wrapped
+ CID-keyed font support.
+ * builds/mac/ftmac.c: Ditto.
+
+2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Fix double free bug in
+ sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font support code.
+ `open_face_from_buffer' frees the passed buffer if it cannot open a
+ face from the buffer, so the caller must not free it.
+
+2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add initial support
+ for sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font.
+ (ft_lookup_PS_in_sfnt): New function to look up `TYP1' or `CID '
+ table in sfnt table directory. It is used before loading TrueType
+ font driver.
+
+ * docs/CHANGES: Add note about the current status of sfnt-wrapped
+ Type1 and sfnt-wrapped CID-keyed font support.
+
+2008-09-18 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftsystem.c (FT_Done_Memory): Use ft_sfree directly for
+ orthogonality (ft_free and ft_sfree could belong to different memory
+ pools). This fixes Savannah bug #24297.
+
+2008-09-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/cff/cffobjs.c (cff_face_init): Use TTAG_OTTO defined
+ in ttags.h instead of numerical value 0x4F54544FL.
+
+2008-09-16 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.h, src/cff/cffgload.c
+ (cff_decoder_set_width_only): Eliminate function call.
+
+2008-09-15 George Williams <gww@silcom.com>
+
+ Fix Savannah bug #24179, reported by Bram Tassyns.
+
+ * src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation
+ of default values.
+
+2008-09-15 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index'
+ and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to
+ prevent unconditional definition. This fixes Savannah bug #24241.
+
+ * src/psnames/pstables.h: Regenerated.
+
+2008-09-13 Werner Lemberg <wl@gnu.org>
+
+ * autogen.sh, builds/unix/configure.raw,
+ include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: Minor
+ beautifying.
+
+ * include/freetype/ftadvanc.h, include/freetype/ftgasp.h,
+ include/freetype/ftlcdfil.h: Protect against FreeType 1.
+ Some other minor fixes.
+
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
+2008-09-11 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbase.c: Include ftadvanc.c.
+
+2008-09-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/ftconfig.in: Duplicate the cpp computation of
+ FT_SIZEOF_{INT|LONG} from include/freetype/config/ftconfig.h.
+ (FT_USE_AUTOCONF_SIZEOF_TYPES): New macro. If defined, the cpp
+ computation is disabled and the statically configured sizes are
+ used. This fixes Savannah bug #21250.
+
+ * builds/unix/configure.raw: Add the checks to compare the cpp
+ computation results of the bit length of int and long versus the
+ sizes detected by running `configure'. If the results are
+ different, FT_USE_AUTOCONF_SIZEOF_TYPES is defined to prioritize the
+ results.
+ New option --{enable|disable}-biarch-config is added to define or
+ undefine FT_USE_AUTOCONF_SIZEOF_TYPES manually.
+
+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
+ used in building of FreeType2, it is written in `freetype2.pc' and
+ `freetype-config'.
+
+2008-09-01 david turner <david@freetype.org>
+
+ * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Accept a negative cmap
+ index to mean `use default cached FT_Face's charmap'. This fixes
+ Savannah bug #22625.
+ * include/freetype/ftcache.h: Document it.
+
+
+ Make FT_MulFix an inlined function. This is done to speed up
+ FreeType a little (on x86 3% when loading+hinting, 10% when
+ rendering, ARM savings are more important though). Disable this by
+ undefining FT_CONFIG_OPTION_INLINE_MULFIX.
+
+ Use of assembler code can now be controlled with
+ FT_CONFIG_OPTION_NO_ASSEMBLER.
+
+ * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in
+ [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_arm): New assembler
+ implementation.
+ [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_i386): Assembler
+ implementation taken from `ftcalc.c'.
+ [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MULFIX_ASSEMBLER): New macro
+ which is defined to the platform-specific assembler implementation
+ of FT_MulFix.
+ [FT_CONFIG_OPTION_INLINE_MULFIX && FT_MULFIX_ASSEMBLER]
+ (FT_MULFIX_INLINED): New macro.
+
+ * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_NO_ASSEMBLER,
+ FT_CONFIG_OPTION_INLINE_MULFIX): New macros.
+
+ * include/freetype/freetype.h: Updated to handle FT_MULFIX_INLINED.
+
+ * src/base/ftcalc.c: Updated to use FT_MULFIX_ASSEMBLER and
+ FT_MULFIX_INLINED.
+
+
+ Add a new header named FT_ADVANCES_H declaring some new APIs to
+ extract the advances of one or more glyphs without necessarily
+ loading their outlines. Also provide `fast loaders' for the
+ TrueType, Type1, and CFF font drivers (more to come later).
+
+ * src/base/ftadvanc.c, include/freetype/ftadvanc.h: New files.
+
+ * include/freetype/config/ftheader.h (FT_ADVANCES_H): New macro.
+ * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): New macro.
+
+ * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc):
+ `flags' and `advances' are now of type `FT_UInt' and `FT_Fixed',
+ respectively.
+
+ * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC): Add
+ ftadvanc.c.
+
+ * src/cff/cffdrivr.c (cff_get_advances): New function.
+ (cff_driver_class): Register it.
+
+ * src/cff/cffgload.c (cff_decoder_set_width_only): New function.
+ (cff_decoder_parse_charstrings): Handle `width_only'.
+ (cff_slot_load): Handle FT_LOAD_ADVANCE_ONLY.
+
+ * src/cff/cffgload.h (cff_decoder): New element `width_only'.
+ (cff_decoder_set_width_only): New declaration.
+
+ * src/truetype/ttdriver.c (tt_get_advances): New function.
+ (tt_driver_class): Register it.
+
+ * src/truetype/ttgload.c (Get_HMetrics, Get_VMetrics): Renamed to...
+ (TT_Get_HMetrics, TT_Get_VMetrics): This.
+ Update callers.
+ * src/truetype/ttgload.h: Declare them.
+
+ * src/type1/t1gload.h, src/type1/t1gload.c (T1_Get_Advances): New
+ function.
+ * src/type1/t1driver.c (t1_driver_class): Register T1_Get_Advances.
+
+
+ Add checks for minimum version of the `autotools' stuff.
+
+ * autogen.sh: Implement it.
+ (get_major_version, get_minor_version, get_patch_version,
+ compare_to_minimum_version, check_tool_version): New auxiliary
+ functions.
+
+ * README.CVS: Document it.
+
+2008-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/sfnt/sfobjs.c (sfnt_open_font): Use TTAG_OTTO defined in
+ ttags.h instead of FT_MAKE_TAG( 'O', 'T', 'T', 'O' ).
+
+2008-08-28 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_encoding): Protect against infinite
+ loop. This fixes Savannah bug #24150 (where a patch has been posted
+ too).
+
+2008-08-23 Werner Lemberg <wl@gnu.org>
+
+ * src/type/t1afm.c (compare_kern_pairs), src/pxaux/afmparse.c
+ (afm_compare_kern_pairs): Fix comparison. This fixes Savannah bug
+ #24119.
+
+2008-08-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c (FT_Stream_New): Initialize *astream always,
+ even if passed library or arguments are invalid. This fixes a bug
+ that an uninitialized stream is freed when an invalid library handle
+ is passed. Originally proposed by Mike Fabian, 2008/08/18 on
+ freetype-devel.
+ (FT_Open_Face): Ditto (stream).
+ (load_face_in_embedded_rfork): Ditto (stream2).
+
+2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c: Add a fallback to guess the availability of the
+ `ResourceIndex' type. It is used when built without configure
+ (e.g., a build with Jam).
+ * builds/mac/ftmac.c: Ditto.
+ * builds/unix/configure.raw: Set HAVE_TYPE_RESOURCE_INDEX to 1 or 0
+ explicitly, even if `ResourceIndex' is unavailable.
+
+2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: In checking of Mac OS X features,
+ all-in-one header file `Carbon.h' is replaced by the minimum
+ header file `CoreServices.h', similar to current src/base/ftmac.c.
+
+2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/sfnt/ttcmap.c (tt_cmap2_validate): Skip the validation of
+ sub-header when its code_count is 0. Many Japanese Dynalab fonts
+ include such an empty sub-header (code_count == 0, first_code == 0
+ delta == 0, but offset != 0) as the second sub-header in SJIS cmap.
+
+2008-08-04 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes
+ Savannah bug #23995.
+
+ * src/cid/cidload.c (parse_expansion_factor): New callback function.
+ (cid_field_records): Use it for `ExpansionFactor'.
+ * src/cod/cidtoken.h: Handle `ForceBold' keyword.
+ Don't handle `ExpansionFactor'.
+
+2008-08-04 Bram Tassyns <bramt@enfocus.be>
+
+ * src/cff/cffparse.c (cff_parse_fixed_scaled): Fix thinko which
+ resulted in incorrect scaling. This fixes Savannah bug #23973.
+
+2008-08-04 Werner Lemberg <wl@gnu.org>
+
+ Be more tolerant w.r.t. invalid entries in SFNT table directory.
+
+ * src/sfnt/ttload.c (check_table_dir): Ignore invalid entries and
+ adjust table count.
+ Add more trace messages.
+ (tt_face_load_font_dir): Updated.
+
+2008-07-30 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): No longer
+ assume that the first argument on the stack is the bottom-most
+ element. Two reasons:
+
+ o According to people from Adobe it is missing in the Type 2
+ specification that pushing of additional, superfluous arguments
+ on the stack is prohibited.
+
+ o Acroread in general handles fonts differently, namely by popping
+ the number of arguments needed for a particular operand (as a PS
+ interpreter would do). In case of buggy fonts this causes a
+ different interpretation which of the elements on the stack are
+ superfluous and which not.
+
+ Since there are CFF subfonts (embedded in PDFs) which rely on
+ Acroread's behaviour, FreeType now does the same.
+
+2008-07-27 Werner Lemberg <wl@gnu.org>
+
+ Add extra mappings for `Tcommaaccent' and `tcommaaccent'. This
+ fixes Savannah bug #23940.
+
+ * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): Rename to...
+ (EXTRA_GLYPH_LIST_SIZE): This.
+ Increase by 2.
+ (ft_wgl_extra_unicodes): Rename to...
+ (ft_extra_glyph_unicodes): This.
+ Add two code values.
+ (ft_wgl_extra_glyph_names): Rename to...
+ (ft_extra_glyph_names): This.
+ Add two glyphs.
+ (ft_wgl_extra_glyph_name_offsets): Rename to...
+ (ft_extra_glyph_name_offsets): This.
+ Add two offsets.
+
+ (ps_check_wgl_name, ps_check_wgl_unicode): Rename to...
+ (ps_check_extra_glyph_name, ps_check_extra_glyph_unicode): This.
+ Updated.
+ (ps_unicodes_init): Updated.
+
+2008-07-26 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_decoder_prepare,
+ cff_decoder_parse_charstrings): Improve debug output.
+
+2008-07-22 Martin McBride <mmcbride@emtex.com>
+
+ * src/sfnt/ttcmap.c (tt_cmap4_validate, tt_cmap4_char_map_linear,
+ tt_cmap4_char_map_binary): Handle fonts which treat the last segment
+ specially. According to the specification, such fonts would be
+ invalid but acroread accepts them.
+
+2008-07-16 Jon Foster <Jon.Foster@cabot.co.uk>
+
+ * src/pfr/pfrdrivr.c (pfr_get_advance): Fix off-by-one error.
+
+ * src/base/ftcalc.c (FT_MulFix): Fix portability issue.
+
+ * src/sfnt/ttpost.c (MAC_NAME) [!FT_CONFIG_OPTION_POSTSCRIPT_NAMES]:
+ Fix compiler warning.
+
+2008-07-16 Werner Lemberg <wl@gnu.org>
+
+ Handle CID-keyed fonts wrapped in an SFNT (with cmaps) correctly.
+
+ * src/cff/cffload.c (cff_font_load): Pass `pure_cff'.
+ Invert sids table only if `pure_cff' is set.
+ * src/cff/cffload.h: Udpated.
+
+ * src/cff/cffobjs.c (cff_face_init): Updated.
+ Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.
+
+ * docs/CHANGES: Updated.
+
+2008-07-09 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_load_loca): Handle buggy fonts
+ where num_locations < num_glyphs. Problem reported by Ding Li.
+
+2008-07-05 Werner Lemberg <wl@gnu.org>
+
+ Since FreeType uses `$(value ...)', we now need GNU make 3.80 or
+ newer. This fixes Savannah bug #23648.
+
+ * configure: zsh doesn't like ${1+"$@"}.
+ Update needed GNU make version.
+ * builds/toplevel.mk: Check for `$(eval ...)'.
+ * docs/INSTALL.GNU, docs/INSTALL.CROSS, docs/INSTALL.UNIX: Document
+ it.
+
+2008-07-04 Werner Lemberg <wl@gnu.org>
+
+ * src/raster/ftraster.c (Draw_Sweep): If span is smaller than one
+ pixel, only check for dropouts if neither start nor end point lies
+ on a pixel center. This fixes Savannah bug #23762.
+
+2008-06-29 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.3.7 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-7'.
+
+ * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
+ version number to 2.3.7.
+
+ * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj: s/2.3.6/2.3.7/, s/236/237/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
+
+ * builds/unix/configure.raw (version_info): Set to 9:18:3.
+
+ * docs/release: Updated.
+
+2008-06-28 Werner Lemberg <wl@gnu.org>
+
+ * src/ftglyph.c (FT_Matrix_Multiply, FT_Matrix_Invert): Move to...
+ * src/ftcalc.c: Here. This fixes Savannah bug #23729.
+
+2008-06-27 Werner Lemberg <wl@gnu.org>
+
+ * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
+ Horizontal_Gray_Sweep_Drop): Test for intersections which
+ degenerate to a single point can be ignored; this has been confirmed
+ by Greg Hitchcock from Microsoft. (This was commented out code.)
+
+2008-06-26 Werner Lemberg <wl@gnu.org>
+
+ Improve navigation in API reference.
+
+ * src/tools/docmaker/tohtml.py (html_header_3): Renamed to...
+ (html_header_6): This.
+ (html_header_3, html_header_3i, html_header_4, html_header_5,
+ html_header_5t): New strings.
+ (toc_footer_start, toc_footer_end): New strings.
+ (HtmlFormatter::html_header): Updated.
+ (HtmlFormatter::html_index_header, HtmlFormatter::html_toc_header):
+ New strings.
+ (HtmlFormatter::index_enter): Use `html_index_header'.
+ (HtmlFormatter::index_exit): Print `html_footer'.
+ (HtmlFormatter::toc_enter): Use `html_toc_header'.
+ (HtmlFormatter::toc_exit): Print proper footer.
+
+ Convert ~ to non-breakable space.
+
+ * src/tools/docmaker/tohtml.py (make_html_para): Implement it.
+ Update header files accordingly.
+
+2008-06-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: Check type `ResourceIndex' explicitly
+ and define HAVE_TYPE_RESOURCE_INDEX if it is defined. Mac OS X 10.5
+ bundles 10.4u SDK with MAC_OS_X_VERSION_10_5 macro but without
+ ResourceIndex type definition. The macro does not inform the type
+ availability.
+ * src/base/ftmac.c: More parentheses are inserted to clarify the
+ conditionals to disable legacy APIs in `10.5 and later' cases. If
+ HAVE_TYPE_RESOURCE_INDEX is not defined, ResourceIndex is defined.
+
+2008-06-24 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (Ins_SCANTYPE): Don't check rendering
+ mode.
+
+ * src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph,
+ Draw_Sweep): No-dropout mode is value 2, not value 0.
+ (Draw_Sweep): Really skip dropout handling for no-dropout mode.
+
+2008-06-24 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psobjs.c (t1_builder_close_contour): Don't add contour
+ if it consists of one point only. Based on a patch from Savannah
+ bug #23683 (from John Tytgat).
+
+2008-06-22 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (TT_Load_Glyph): Protect bytecode stuff
+ with IS_HINTED.
+
+ * docs/CHANGES: Updated.
+
+2008-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: If CFLAGS has `-isysroot XXX' option
+ but LDFLAGS does not, import it to LDFLAGS. The option is used to
+ specify non-default SDK on Mac OS X (e.g., universal binary SDK for
+ Mac OS X 10.4 on PowerPC platform). Although Apple TechNote 2137
+ recommends to add the option only to CFLAGS, LDFLAGS should include
+ it because libfreetype.la is built with -no-undefined. This fixes a
+ bug reported by Ryan Schmidt in MacPorts,
+ http://trac.macports.org/ticket/15331.
+
+2008-06-21 Werner Lemberg <wl@gnu.org>
+
+ Enable access to the various dropout rules of the B&W rasterizer.
+ Pass dropout rules from the TT bytecode interpreter to the
+ rasterizer.
+
+ * include/freetype/ftimage.h (FT_OUTLINE_SMART_DROPOUTS,
+ FT_OUTLINE_EXCLUDE_STUBS): New flags for FT_Outline.
+
+ * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
+ Horizontal_Gray_Sweep_Drop): Use same mode numbers as given in the
+ OpenType specification.
+ Fix mode 4 computation.
+ (Render_Glyph, Render_Gray_Glyph): Handle new outline flags.
+
+ * src/truetype/ttgload.c (TT_Load_Glyph) Convert scan conversion
+ mode to FT_OUTLINE_XXX flags.
+
+ * src/truetype/ttinterp.c (Ins_SCANCTRL): Enable ppem check.
+
+2008-06-19 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Compute final
+ `dict->units_per_em' value before assigning it to
+ `cffface->units_per_EM'. Otherwise, CFFs without subfonts are
+ scaled incorrectly if the font matrix is non-standard. This fixes
+ Savannah bug #23630.
+
+ * docs/CHANGES: Updated.
+
+2008-06-19 Werner Lemberg <wl@gnu.org>
+
+ * src/type/t1objs.c (T1_Face_Init): Slightly improve algorithm fix
+ from 2008-06-19.
+
+2008-06-18 Werner Lemberg <wl@gnu.org>
+
+ * src/type/t1objs.c (T1_Face_Init): Fix change from 2008-03-21.
+ Reported by Peter Weilbacher <mozilla@weilbacher.org>.
+
+ * docs/CHANGES: Updated.
+
+2008-06-15 George Williams <gww@silcom.com>
+
+ * src/otvalid/otvgpos.c (otv_MarkBasePos_validate): Set
+ `valid->extra2' to 1. This is undocumented in the OpenType 1.5
+ specification.
+
+2008-06-15 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c (FT_MulFix) <asm>: Protect registers correctly
+ from clobbering. Patch from Savannah bug report #23556.
+
+ * docs/CHANGES: Document it.
+
+2008-06-10 Werner Lemberg <wl@gnu.org>
+
+ * autogen.sh: Add option `--install' to libtoolize.
+
+2008-06-10 Werner Lemberg <wl@gnu.org>
+
+ * Version 2.3.6 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-6'.
+
+ * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
+ version number to 2.3.6.
+
+ * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj: s/2.3.5/2.3.6/, s/235/236/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
+
+ * builds/unix/configure.raw (version_info): Set to 9:17:3.
+
+
+ * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `scale_x'
+ and `scale_y'.
+ * src/cff/cffgload.h (CFF_Builder): Remove `scale_x' and `scale_y'.
+
+
+ * src/cff/cffparse.c: Include FT_INTERNAL_DEBUG_H.
+ * src/cff/cffobjs.h: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
+
+2008-06-10 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (open_face): Check `clazz->init_face' and
+ `clazz->done_face'.
+
+2008-06-09 VaDiM <s_sliva@rambler.ru>
+
+ Support debugging on WinCE. From Savannah patch #6536; this fixes
+ bug #23497.
+
+ * builds/win32/ftdebug.c (OutputDebugStringEx): New function/macro
+ as a replacement for OutputDebugStringA (which WinCE doesn't have).
+ Update all callers.
+ (ft_debug_init) [_WIN32_CE]: WinCE apparently doesn't have
+ environment variables.
+
+2008-06-09 Werner Lemberg <wl@gnu.org>
+
+ * README.CVS: Updated.
+
+ * builds/unix/configure.raw, builds/unix/freetype-config.in: Updated
+ for newer versions of autoconf and friends.
+
+2008-06-08 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1parse.h (T1_ParserRec): Make `base_len' and
+ `private_len' unsigned.
+
+ * src/type1/t1parse.c (read_pfb_tag): Make `asize' unsigned and read
+ it as such.
+ (T1_New_Parser, T1_Get_Private_Dict): Make `size' unsigned.
+
+
+ * src/base/ftstream.c (FT_Stream_Skip): Reject negative values.
+
+
+ * src/type1/t1load.c (parse_blend_design_positions): Check `n_axis'
+ for sane value.
+ Fix typo.
+
+
+ * src/psaux/psobjs.c (ps_table_add): Check `idx' correctly.
+
+
+ * src/truetype/ttinterp (Ins_SHC): Use BOUNDS() to check
+ `last_point'.
+
+
+ * src/sfnt/ttload.c (tt_face_load_max_profile): Limit
+ `maxTwilightPoints'.
+
+2008-06-06 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (Ins_IP): Handle case `org_dist == 0'
+ correctly. This fixes glyphs `t' and `h' of Arial Narrow at 12ppem.
+
+2008-06-03 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftcache.h (FTC_FaceID): Change type back to
+ FT_Pointer. Reported by Ian Britten <britten@caris.com>.
+
+2008-06-02 Werner Lemberg <wl@gnu.org>
+
+ Emit header info for defined FreeType objects in reference.
+
+ * src/tools/docmaker/content.py (re_header_macro): New regexp.
+ (ContentProcessor::__init__): Initialize new dictionary `headers'.
+ (DocBlock::__init__): Collect macro header definitions.
+
+ * src/tools/docmaker/tohtml.py (header_location_header,
+ header_location_footer): New strings.
+ (HtmlFormatter::__init__): Pass `headers' dictionary.
+ (HtmlFormatter::print_html_field): Don't emit paragraph tags.
+ (HtmlFormatter::print_html_field_list): Emit empty paragraph.
+ (HtmlFormatter::block_enter): Emit header info.
+
+2008-06-01 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftheader.h (FT_UNPATENTED_HINTING_H,
+ FT_INCREMENTAL_H): Added.
+
+2008-05-28 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/docmaker/sources.py (SourceBlock::__init__): While
+ looking for markup tags, return immediately as soon a single one is
+ found.
+
+2008-05-28 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (Ins_MD): The MD instruction also uses
+ original, unscaled input values. Confirmed by Greg Hitchcock from
+ Microsoft.
+
+2008-05-27 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/docmaker/tohtml.py (block_footer_start,
+ block_footer_middle): Beautify output.
+
+2008-05-25 Werner Lemberg <wl@gnu.org>
+
+ * src/raster/ftraster.c (fc_black_render): Return 0 when we are
+ trying to render into a zero-width/height bitmap, not an error code.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Move initialization
+ of the graphics state for subglyphs to...
+ (TT_Hint_Glyph): This function.
+ Hinting instructions for a composite glyph apparently refer to the
+ just hinted subglyphs, not the unhinted, unscaled outline. This
+ seems to fix Savannah bugs #20973 and (at least partially) #23310.
+
+2008-05-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (FT_New_Face_From_Suitcase): Check if valid
+ `aface' is returned by FT_New_Face_From_FOND(). The patch was
+ proposed by an anonymous reporter of Savannah bug #23204.
+
+2008-05-18 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo.c (ps_hints_apply): Reset scale values after
+ correction for pixel boundary. Without this patch, the effect can
+ be cumulative under certain circumstances, making glyphs taller and
+ taller after each call. This fixes Savannah bug #19976.
+
+2008-05-18 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftdebug.c (FT_Message, FT_Panic): Send output to stderr.
+ This fixes Savannah bug #23280.
+
+ * docs/CHANGES: Updated.
+
+2008-05-18 David Turner <david@freetype.org>
+
+ * src/psnames/psmodule.c (ft_wgl_extra_unicodes,
+ ft_wgl_extra_glyph_names, ft_wgl_extra_glyph_name_offsets,
+ ps_check_wgl_name, ps_check_wgl_unicode): Use `static' to make
+ declarations non-global.
+
+ * src/type1/t1load.c: Add missing comment.
+
+2008-05-17 Sam Hocevar <samh>
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle zero-contour
+ glyphs correctly. Patch from Savannah bug #23277.
+
+2008-05-16 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2008-05-16 Sergey Tolstov <stolstov@esri.com>
+
+ Improve support for WGL4 encoded fonts.
+
+ * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): New macro.
+ (ft_wgl_extra_unicodes, ft_wgl_extra_glyph_names,
+ ft_wgl_extra_glyph_name_offsets): New arrays.
+ (ps_check_wgl_name, ps_check_wgl_unicode): New functions.
+ (ps_unicodes_init): Use them to add additional Unicode mappings.
+
+2008-05-15 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_closepath>: `closepath' without a path is a no-op, not an error
+ (cf. the PS reference manual).
+
+ Reported by Martin McBride.
+
+2008-05-15 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (CONFIG_GUESS, CONFIG_SUB): Updated.
+
+2008-05-15 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs): Accept fonts with a subrs array
+ which contains a single but empty entry. This is technically
+ invalid (since it must end with `return'), but...
+
+ Reported by Martin McBride.
+
+2008-05-14 Werner Lemberg <wl@gnu.org>
+
+ Finish fix of scaling bug of CID-keyed CFF subfonts.
+
+ * include/freetype/internal/ftcalc.h, src/base/ftcalc.c
+ (FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled): New
+ functions.
+
+ * src/cff/cffobjs.h (CFF_Internal): New struct. It is used to
+ provide global hinting data for both the top-font and all subfonts
+ (with proper scaling).
+
+ * src/cff/cffobjs.c (cff_make_private_dict): New function, using
+ code from `cff_size_init'.
+ (cff_size_init, cff_size_done, cff_size_select, cff_size_request):
+ Use CFF_Internal and handle subfonts.
+ (cff_face_init): Handle top-dict and subfont matrices correctly;
+ apply some heuristic in case of unlikely matrix concatenation
+ results. This has been discussed with people from Adobe (thanks
+ goes mainly to David Lemon) who confirm that the CFF specs are fuzzy
+ and not correct.
+
+ * src/cff/cffgload.h (cff_decoder_prepare): Add `size' argument.
+
+ * src/cff/cffgload.c (cff_builder_init): Updated.
+ (cff_decoder_prepare): Handle hints globals for subfonts.
+ Update all callers.
+ (cff_slot_load): Handling scaling of subfonts properly.
+
+ * src/cff/cffparse.c (cff_parse_fixed_dynamic): New function.
+ (cff_parse_font_matrix): Use it.
+
+ * src/cff/cfftypes.h (CFF_FontDictRec): Make `units_per_em'
+ FT_ULong.
+
+ * docs/CHANGES: Document it.
+
+2008-05-13 Werner Lemberg <wl@gnu.org>
+
+ * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
+ Handle case `face_index < 0'.
+ * docs/CHANGES: Document it.
+
+2008-05-04 Werner Lemberg <wl@gnu.org>
+
+ First steps to fix the scaling bug of CID-keyed CFF subfonts,
+ reported by Ding Li on 2008/03/28 on freetype-devel.
+
+ * src/base/cff/cffparse.c (power_tens): New array.
+ (cff_parse_real): Rewritten to introduce a fourth parameter which
+ returns the `scaling' of the real number so that we have no
+ precision loss. This is not used yet.
+ Update all callers.
+ (cff_parse_fixed_thousand): Replace with...
+ (cff_parse_fixed_scaled): This function. Update all callers.
+
+2008-05-03 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Call the auto-hinter without
+ transformation since it recursively calls FT_Load_Glyph. This fixes
+ Savannah bug #23143.
+
+2008-04-26 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (T1_BuilderRec): Mark `scale_x'
+ and `scale_y' as obsolete since they aren't used.
+ * src/psaux/psobjs.c (t1_builder_init): Updated.
+
+ * src/cff/cffgload.h (CFF_Builder): Mark `scale_x' and `scale_y' as
+ obsolete since they aren't used.
+ * src/cff/cffgload.c (cff_builder_init): Updated.
+
+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
+ bug #22909.
+
+2008-04-13 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psconv.c (PS_Conv_ToFixed): Increase precision if
+ integer part is zero.
+
+2008-04-01 Werner Lemberg <wl@gnu.org>
+
+ Fix compilation with g++ 4.1 (with both `single' and `multi'
+ targets).
+
+ * src/base/ftobjs.c (FT_Open_Face): Don't define a variable in block
+ which is crossed by a `goto'.
+
+ * src/otvalid/otvalid.h (otv_MATH_validate): Add prototype.
+
+2008-03-31 Werner Lemberg <wl@gnu.org>
+
+ Fix support for subsetted CID-keyed CFFs.
+
+ * include/freetype/freetype.h (FT_FACE_FLAG_CID_KEYED,
+ FT_IS_CID_KEYED): New macros.
+
+ * src/cff/cffobjs.c (cff_face_init): Set number of glyphs to the
+ maximum CID value in CID-keyed CFFs.
+ Handle FT_FACE_FLAG_CID_KEYED flag.
+
+ * docs/CHANGES: Document it.
+
+
+ Fix CFF font matrix calculation and improve precision.
+
+ * src/cff/cffparse.c (cff_parse_real): Increase precision if integer
+ part is zero.
+ (cff_parse_font_matrix): Simplify computation of `units_per_em';
+ this prevents overflow also.
+
+
+ Support FT_Get_CID_Registry_Ordering_Supplement for PS CID fonts.
+
+ * src/cid/cidriver.c: Include FT_SERVICE_CID_H.
+ (cid_get_ros): New function.
+ (cid_service_cid_info): New service structure.
+ (cid_services): Register it.
+
+2008-03-23 Werner Lemberg <wl@gnu.org>
+
+ Adjustments for Visual C++ 8.0, as reported by Rainer Deyke.
+
+ * builds/compiler/visualc.mk (CFLAGS): Remove /W5.
+ (ANSIFLAGS): Add _CRT_SECURE_NO_DEPRECATE.
+
+2008-03-21 Laurence Darby <ldarby>
+
+ * src/type1/t1objs.c (T1_Face_Init): Use `/Weight'. Patch from
+ Savannah bug #22675.
+
+2008-03-13 Derek Clegg <dclegg@apple.com>
+
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix named style loop.
+ Patch from Savannah bug #22541.
+
+2008-03-03 Masatoshi Kimura <VYV03354@nifty.ne.jp>
+
+ * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary,
+ tt_cmap14_find_variant): Return correct value.
+ (tt_cmap14_variant_chars): Fix check for `di'.
+
+2008-02-29 Wermer Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2008-02-29 Wolf
+
+ Add build support for symbian platform. From Savannah bug #22440.
+
+ * builds/symbian/*: New files.
+
+2008-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (parse_fond): Fix a bug of PostScript font name
+ synthesis. For any face of a specified FOND, always the name for
+ the first face was used. Except of a FOND that refers multiple
+ Type1 font files, wrong synthesized font names are not used at all,
+ so this is an invisible bug. A few limit checks are added too.
+
+ * builds/mac/ftmac.c: Ditto.
+
+2008-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: Split compiler option to link Carbon
+ frameworks to one option for CoreServices framework and another
+ option for ApplicationServices framework. The split options can be
+ managed by GNU libtool to avoid unrequired duplication when FreeType
+ is linked with other applications. Suggested by Daniel Macks,
+ Savannah bug #22366.
+
+2008-02-18 Victor Stinner <victor.stinner@haypocalc.com>
+
+ * src/truetype/ttinterp.c (Ins_IUP): Check number of points. Fix
+ from Savannah bug #22356.
+
+2008-02-17 Jonathan Blow <jon@number-none.com>
+
+ * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph):
+ Check for valid callback pointers.
+
+2008-02-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (FT_New_Face_From_SFNT): Check the sfnt resource
+ handle by its value instead of ResError(), fix provided by Deron
+ Kazmaier. According to the Resource Manager Reference,
+ GetResource(), Get1Resource(), GetNamedResource(),
+ Get1NamedResource() and RGetResource() set noErr but return NULL
+ handle when they can not find the requested resource. These
+ functions never return undefined values, so it is sufficient to
+ check if the handle is not NULL.
+
+ * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto.
+
+2008-02-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftbase.c: <ftmac.c> is replaced by "ftmac.c" as other
+ inclusion styles. Now it always includes src/base/ftmac.c;
+ builds/mac/ftmac.c is never included in any configuration.
+
+ * builds/unix/configure.raw: Print warning if configure is executed
+ with options to specify Carbon functionalities explicitly.
+
+ * docs/INSTALL.MAC: Note that legacy builds/mac/ftmac.c is not
+ included automatically and manual replacement is required.
+
+2008-02-11 Werner Lemberg <wl@gnu.org>
+
+ * builds/modules.mk (CLOSE_MODULE, REMOVE_MODULE), builds/detect.mk
+ (dos_setup), builds/freetype.mk (clean_project_dos,
+ distclean_project_dos): Don't use \ but $(SEP). Reported by Duncan
+ Murdoch.
+
+2008-01-18 Sylvain Pasche <sylvain.pasche@gmail.com>
+
+ * src/base/ftlcdfil.c (_ft_lcd_filter_legacy): Updated comment to
+ mention intra-pixel algorithm.
+
+ * include/freetype/freetype.h (FT_Render_Mode): Mention that
+ FT_Library_SetLcdFilter can be used to reduce fringes.
+
+2008-01-16 Werner Lemberg <wl@gnu.org>
+
+ * src/raster/ftraster.c (ft_black_render): Check `outline' before
+ using it. Reported by Allan Yang.
+
+2008-01-12 Werner Lemberg <wl@gnu.org>
+
+ * src/raster/ftraster.c (FT_CONFIG_OPTION_5_GRAY_LEVELS): Remove.
+
+2008-01-12 Allan Yang, Jian Hua - SH <Allan.Yang@fmc.fujitsu.com>
+
+ * src/raster/ftraster.c (ft_black_init)
+ [FT_RASTER_OPTION_ANTI_ALIASING]: Fix compilation.
+
+2008-01-10 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Handle the case
+ where the number of contours in a simple glyph is zero (and which
+ does contain an entry in the `glyf' table). This fixes Savannah bug
+ #21990.
+
+2008-01-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Formatting suggested by Sean McBride.
+
+ * builds/mac/ftmac.c: Formatting (tab expanded).
+ * src/autofit/afindic.c: Ditto.
+ * src/base/ftcid.c: Ditto.
+ * src/base/ftmac.c: Ditto.
+
+2007-12-30 Werner Lemberg <wl@gnu.org>
+
+ * src/smooth/ftgrays.c (gray_raster_render): Check `outline'
+ correctly.
+
+2007-12-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Improvement of POSIX resource-fork accessor to load unsorted
+ references in a resource. In HelveLTMM (resource-fork PostScript
+ Type1 font bundled with Mac OS X since 10.3.x), the appearance order
+ of PFB chunks is not sorted; sorting the chunks by reference IDs is
+ required.
+
+ * include/freetype/internal/ftrfork.h (FT_RFork_Ref): New structure
+ type to store a pair of reference ID and offset to the chunk.
+
+ * src/base/ftrfork.c (ft_raccess_sort_ref_by_id): New function to
+ sort FT_RFork_Ref by their reference IDs.
+
+ (FT_Raccess_Get_DataOffsets): Returns an array of offsets that is
+ sorted by reference ID.
+
+2007-12-14 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffparse.c (cff_parse_real): Don't apply `power_ten'
+ division too early; otherwise the most significant digit(s) of the
+ final result are lost as the value is truncated to an integer. This
+ fixes Savannah bug #21794 (where the patch has been posted too).
+
+2007-12-06 Fix <4d876b82@gmail.com>
+
+ Pass options from one configure script to another as-is (not
+ expanded). This is needed for options like
+ --includedir='${prefix}/include'.
+
+ * builds/unix/detect.mk, configure: Prevent argument expansion in
+ call to the (real) `configure' script.
+
+2007-12-06 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation if
+ TT_USE_BYTECODE_INTERPRETER isn't defined.
+
+2007-12-06 Werner Lemberg <wl@gnu.org>
+
+ There exist CFFs which contain opcodes for the Type 1 operators
+ `hsbw' and `closepath' which are both invalid in Type 2 charstrings.
+ However, it doesn't harm to support them.
+
+ * src/cff/cffgload.c (CFF_Operator): Add `cff_op_hsbw' and
+ `cff_op_closepath.'
+ (cff_argument_counts): Ditto.
+
+ (cff_decoder_parse_charstrings): Handle Type 1 opcodes 9 (closepath)
+ and 13 (hsbw) which are invalid in Type 2 charstrings.
+
+2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftrfork.c (raccess_guess_darwin_newvfs): New function to
+ support new pathname syntax `..namedfork/rsrc' to access a resource
+ fork on Mac OS X. The legacy syntax `/rsrc' does not work on
+ case-sensitive HFS+.
+ (raccess_guess_darwin_hfsplus): Fix a bug in the calculation of
+ buffer size to store a pathname.
+ * include/freetype/internal/ftrfork.h: Increment the number of
+ resource fork guessing rule.
+
+2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: Improve the compile tests to search
+ Carbon functions.
+ * builds/mac/ftmac.c: Import fixes for Carbon incompatibilities
+ proposed by Sean McBride from src/base/ftmac.c (see 2007-11-16).
+
+2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ The documents and comments for Mac OS X are improved by Sean
+ McBride.
+
+ * src/base/ftmac.c: Fix a comment.
+ * include/freetype/ftmac.h: Ditto.
+ * docs/INSTALL.MAC: Improve English and add comment on lowest
+ system version specified by MACOSX_DEPLOYMENT_TARGET.
+
+2007-12-04 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_subfont_load): Don't use logical OR to
+ concatenate error codes.
+ * src/sfnt/ttsbit.c (Load_SBit_Range): Ditto.
+
+2007-12-04 Graham Asher <graham.asher@btinternet.com>
+
+ * src/truetype/ttobjs.c (tt_face_init): Don't use logical OR to
+ concatenate error codes.
+
+2007-12-04 Sean McBride <sean@rogue-research.com>
+
+ * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove compiler
+ warning.
+
+2007-11-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix MacOS legacy font support by Masatake Yamato on Mac OS X. It is
+ not working since 2.3.5. In FT_Open_New(), if FT_New_Stream()
+ cannot mmap() the specified file and cannot seek to head of the
+ specified file, it returns NULL stream and FT_Open_New() returns the
+ error immediately. On MacOS, most legacy MacOS fonts fall into such
+ a scenario because their data forks are zero-sized and cannot be
+ sought. To proceed to guessing of resource fork fonts, the
+ functions for legacy MacOS font must properly handle the NULL stream
+ returned by FT_New_Stream().
+
+ * src/base/ftobjs.c (IsMacBinary): Return error
+ FT_Err_Invalid_Stream_Operation immediately when NULL stream is
+ passed.
+ (FT_Open_Face): Even when FT_New_Stream() returns an error, proceed
+ to fallback. Originally, legacy MacOS font is tested in the cases
+ of FT_Err_Invalid_Stream_Operation (occurs when data fork is empty)
+ or FT_Err_Unknown_File_Format (occurs when AppleSingle header or
+ .dfont header is combined). Now the case of
+ FT_Err_Cannot_Open_Stream is included.
+
+ * src/base/ftrfork.c (FT_Raccess_Guess): When passed stream is NULL,
+ skip FT_Stream_Seek(), which seeks to the head of stream, and
+ proceed to unit testing of raccess_guess_XXX(). FT_Stream_Seek()
+ for a NULL stream causes a Bus error on Mac OS X.
+ (raccess_guess_apple_double): Return FT_Err_Cannot_Open_Stream
+ immediately if passed stream is NULL.
+ (raccess_guess_apple_single): Ditto.
+
+2007-11-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Fix for Carbon incompatibilities since Mac OS X 10.5,
+ proposed by Sean McBride.
+
+ * doc/INSTALL.MAC: Comment on MACOSX_DEPLOYMENT_TARGET.
+
+ * include/freetype/ftmac.h: Deprecate FT_New_Face_From_FOND and
+ FT_GetFilePath_From_Mac_ATS_Name. Since Mac OS X 10.5, calling
+ Carbon functions from a forked process is classified as unsafe
+ by Apple. All Carbon-dependent functions should be deprecated.
+
+ * src/base/ftmac.c: Use essential header files
+ <CoreServices/CoreServices.h> and
+ <ApplicationServices/ApplicationServices.h> instead of
+ all-in-one header file <Carbon/Carbon.h>.
+
+ Include <sys/syslimits.h> and replace HFS_MAXPATHLEN by Apple
+ genuine macro PATH_MAX.
+
+ Add fallback macro for kATSOptionFlagsUnRestrictedScope which
+ is not found in Mac OS X 10.0.
+
+ Multi-character constants ('POST', 'sfnt' etc) are replaced by
+ 64bit constants calculated by FT_MAKE_TAG() macro.
+
+ For the index in the segment of resource fork, new portable
+ type ResourceIndex is introduced for better compatibility.
+ This type is since Mac OS X 10.5, so it is defined as short
+ when built on older platforms.
+
+ (FT_ATSFontGetFileReference): If build target is only the systems
+ 10.5 and newer, it calls Apple genuine ATSFontGetFileReference().
+
+ (FT_GetFile_From_Mac_ATS_Name): Return an error if system is 10.5
+ and newer or 64bit platform, because legacy type FSSpec type is
+ removed completely.
+
+ (FT_New_Face_From_FSSpec): Ditto.
+
+2007-11-01 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_done_face): Check `sfnt' everywhere. This
+ fixes Savannah bug #21485.
+
+2007-10-29 Daniel Svoboda <dasvo@planeta@cz>
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driver
+ can handle the font at all, then check `face_index'. Otherwise, the
+ driver might return the wrong error code. This fixes Savannah bug
+ #21468.
+
+2007-10-21 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Support bit 9 and prepare
+ support for bit 8 of the `fsSelection' field in the `OS/2' table.
+ MS is already using this; hopefully, this becomes part of OpenType
+ 1.5.
+ Prepare also support for `name' IDs 21 (WWS_FAMILY) and 22
+ (WWS_SUBFAMILY).
+
+2007-10-20 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/docmaker/tohtml.py (html_header_2): Fix typo.
+ Add `td.left' element to CSS.
+ (toc_section_enter): Use it.
+
+2007-10-18 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h, src/base/ftobjs.c: Rename API
+ 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_IsDefault -> FT_Face_GetCharVariantIsDefault
+ FT_Get_Variant_Selectors -> FT_Face_GetVariantSelectors
+ FT_Get_Variants_Of_Char -> FT_Face_GetVariantsOfChar
+ FT_Get_Chars_Of_Variant -> FT_Face_GetCharsOfVariant
+
+ Update documentation accordingly.
+
+ * src/sfnt/ttcmap.c: Stronger cmap 14 validation.
+ Make the code a little more consistent with FreeType coding
+ conventions and modify the cmap14 functions that returned a newly
+ allocated array to use a persistent vector from the TT_CMap14 object
+ instead.
+
+ (TT_CMap14Rec): Provide array and auxiliary data for result.
+ (tt_cmap14_done, tt_cmap14_ensure): New functions.
+
+ (tt_cmap14_init, tt_cmap14_validate, tt_cmap14_char_map_def_binary,
+ tt_cmap14_char_map_nondef_binary, tt_cmap14_find_variant,
+ tt_cmap14_char_var_index, tt_cmap14_variants,
+ tt_cmap14_char_variants, tt_cmap14_def_char_count,
+ tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
+ tt_cmap14_variant_chars, tt_cmap14_class_rec): Updated and improved.
+
+2007-10-15 George Williams <gww@silcom.com>
+
+ Add support for cmap type 14.
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h
+ (TT_CONFIG_CMAP_FORMAT_14): New macro.
+
+ * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc,
+ FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc,
+ FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New
+ support function prototypes.
+ (FT_CMap_ClassRec): Add them.
+ Update all users.
+
+ * include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New
+ macro.
+
+ * include/freetype/freetype.h (FT_Get_Char_Variant_Index,
+ FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors,
+ FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API
+ functions.
+
+ * src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary
+ function.
+ (FT_Set_Charmap): Disallow cmaps of type 14.
+ (FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault,
+ FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char,
+ FT_Get_Chars_Of_Variant): New API functions.
+
+ * src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros.
+
+ (TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate,
+ tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info,
+ tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary,
+ tt_cmap14_find_variant, tt_cmap14_char_var_index,
+ tt_cmap14_char_var_isdefault, tt_cmap14_variants,
+ tt_cmap14_char_variants, tt_cmap14_def_char_count,
+ tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars,
+ tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and
+ structures for cmap 14 support.
+ (tt_cmap_classes): Register tt_cmap14_class_rec.
+ (tt_face_build_cmaps): One more error message.
+
+ * docs/CHANGES: Mention cmap 14 support.
+
+2007-10-01 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (find_unicode_charmap): If search for a UCS-4
+ charmap fails, do the loop again while searching a UCS-2 charmap.
+ This favours MS charmaps over Apple ones.
+
+2007-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c: Introduction of abstract `short' data types,
+ ResFileRefNum and ResID. These types were introduced for Copland,
+ then backported to MPW. The variables exchanged with FileManager
+ QuickDraw frameworks are redefined by these data types. Patch was
+ proposed by Sean McBride.
+ * builds/mac/ftmac.c: Ditto.
+
+2007-08-18 Werner Lemberg <wl@gnu.org>
+
+ * src/otvalid/otvcmmn.c (otv_x_y_ux_sy): Skip context glyphs. Found
+ by Imran Yousaf. Fixes Savannah bug #20773.
+
+ (otv_Lookup_validate): Correct handling of LookupType. Found by
+ Imran Yousaf. Fixes Savannah bug #20782.
+
+2007-08-17 George Williams <gww@silcom.com>
+
+ * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix handling of
+ SingleSubstFormat1.
+
+2007-08-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: Fix a bug which sets CC_BUILD by
+ ${build-gcc} (unchecked) instead of by ${build}-gcc (checked).
+ Found by Ryan Hill.
+
+2007-08-11 George Williams <gww@silcom.com>
+
+ * src/otvalid/otvcommn.c, src/otvalid/otvcommn.h
+ (otv_Coverage_validate): Add fourth argument to pass an expected
+ count value. Update all users.
+ Check glyph IDs.
+ (otv_ClassDef_validate): Check `StartGlyph'.
+
+ * src/otvalid/otvgsub.c (otv_SingleSubst_validate): More glyph ID
+ checks.
+
+ * src/otvalid/otvmath.c (otv_MathConstants_validate): There are only
+ 56 constants.
+ (otv_GlyphAssembly_validate, otv_MathGlyphConstruction_validate):
+ Check glyph IDs.
+
+2007-08-08 Werner Lemberg <wl@gnu.org>
+
+ * src/otvalid/otvbase.c, src/otvalid/otvcommn.c,
+ src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c,
+ src/otvalid/otvjstf.c: s/FT_INVALID_DATA/FT_INVALID_FORMAT/ where
+ appropriate. Reported by George.
+
+ * include/freetype/internal/fttrace.h: Define `trace_otvmath'.
+
+ * src/otvalid/rules.mk (OTV_DRV_SRC): Add otvmath.c.
+
+ * docs/CHANGES: Updated.
+
+2007-08-08 George Williams <gww@silcom.com>
+
+ Add `MATH' validating support to otvalid module.
+
+ * include/freetype/tttags.h (TTAG_MATH): New macro.
+ * include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro.
+ (FT_VALIDATE_OT): Updated.
+
+ * src/otvalid/otmath.c: New file.
+
+ * src/otvalid/otvalid.c: Include otvmath.c.
+ * src/otvalid/otvmod.c (otv_validate): Handle `MATH' table.
+
+2007-08-04 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.raw: Add call to AC_LIBTOOL_WIN32_DLL.
+ Fixes Savannah bug #20686.
+
+2007-08-03 Werner Lemberg <wl@gnu.org>
+
+ * src/psnames/psmodule.c: Fix usage of
+ FT_CONFIG_OPTION_POSTSCRIPT_NAMES macro. Reported by Graham Asher.
+
+2007-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (open_face_from_buffer): The argument
+ `driver_name' is typed as `const char*' to match with the
+ callers in FT_New_Face_From_LWFN and FT_New_Face_From_SFNT.
+ This is same with open_face_from_buffer in src/base/ftobjs.c.
+ Found and fixed by Sean McBride.
+
+2007-07-28 Werner Lemberg <wl@gnu.org>
+
+ * src/raster/ftraster.c (count_table): Make it conditional.
+ * src/base/ftobjs.c (FT_New_Library): Check FT_RENDER_POOL_SIZE with
+ a preprocessor statement.
+
+2007-07-27 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_Outline_Translate): Check `outline' before
+ first usage. From Savannah patch #6115.
+
+2007-07-16 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2007-07-16 Derek Clegg <dclegg@apple.com>
+
+ Add new service for getting the ROS from a CID font.
+
+ * include/freetype/config/ftheader.h (FT_CID_H): New macro.
+ * include/freetype/ftcid.h: New file.
+
+ * include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro.
+ * include/freetype/internal/services/svcid.h: New file.
+
+ * src/base/ftcid.c: New file.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_CID_H.
+ (cff_get_ros): New function.
+ (cff_service_cid_info): New service structure.
+ (cff_services): Register it.
+
+ * src/cff/cffload.c (cff_font_done): Free registry and ordering.
+
+ * src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'.
+
+ * modules.cfg (BASE_EXTENSIONS): Add ftcid.c.
+
+2007-07-11 Derek Clegg <dclegg@apple.com>
+
+ Add support for postscript name service to CFF driver.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_NAME_H.
+ (cff_get_ps_name): New function.
+ (cff_service_ps_name): New service structure.
+ (cff_services): Register it.
+
+2007-07-07 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftglyph.c (FT_Glyph_Copy): Fix initialization of
+ `target'. Reported by Sean McBride.
+
+2007-07-06 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/pfrcmap.c: Include pfrerror.h.
+
+ * src/autofit/afindic.c: Add some external declarations to pacify
+ `make multi' compilation.
+
+ * src/cid/cidgload.c (cid_load_glyph): Pacify compiler.
+
+ * src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c
+ (cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP),
+ src/autofit/aflatin.c (af_latin_hints_compute_edges),
+ src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c
+ (tt_face_get_metrics), src/base/ftobjs.c (open_face)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler.
+
+ * docs/release: Mention test compilation targets.
+
+2007-07-04 Werner Lemberg <wl@gnu.org>
+
+ * docs/PROBLEMS: Mention that some PS based fonts can't be
+ handled correctly by FreeType.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Always allow a
+ recursion depth of 1. This was the maximum value in TrueType 1.0,
+ and some older fonts don't set this field correctly.
+
+ * src/gxvalid/gxvmort1.c
+ (gxv_mort_subtable_type1_substTable_validate): Fix tracing message.
+
+2007-07-03 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize
+ `round' to pacify compiler.
+
+2007-07-02 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.3.5 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-5'.
+
+ * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
+ version number to 2.3.5.
+
+ * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj,
+ builds/win32/visualce/index.html,
+ builds/win32/visualce/freetype.dsp,
+ builds/win32/visualce/freetype.vcproj: s/2.3.4/2.3.5/, s/234/235/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
+
+ * builds/unix/configure.raw (version_info): Set to 9:16:3.
+
+2007-07-01 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h, src/base/ftpatent.c
+ (FT_Face_SetUnpatentedHinting): New function to dynamically change
+ the setting after a face is created.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Fix a small bug
+ that created distortions in the bytecode interpreter results.
+
+2007-06-30 David Turner <david@freetype.org>
+
+ * src/truetype/ttinterp.c (Ins_IUP): Add missing variable
+ initialization.
+
+ * src/autofit/aflatin.c (af_latin_metric_init_blues): Get rid of an
+ infinite loop in the case of degenerate fonts.
+
+2007-06-26 Rahul Bhalerao <b.rahul.pm@gmail.com>
+
+ Add autofit module for Indic scripts. This currently just reuses
+ the CJK-specific functions.
+
+ * include/freetype/config/ftoption.h (AF_CONFIG_OPTION_INDIC): New
+ macro.
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
+ * src/autofit/afindic.c, src/autofit/afindic.h: New files.
+
+ * src/autofit/afglobal.c, src/autofit/aftypes.h,
+ src/autofit/autofit.c: Updated.
+
+ * src/autofit/Jamfile (_sources), * src/autofit/rules.mk
+ (AUTOF_DRV_SRC): Updated.
+
+2007-06-23 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c (TT_Load_Simple): Fix change from
+ 2007-06-16 that prevented the TrueType module from loading most
+ glyphs.
+
+2007-06-20 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_slot_load): Fix logic of 2007-05-28
+ change.
+
+2007-06-19 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_encoding): Handle one more error.
+
+2007-06-19 Dmitry Timoshkov <dmitry@codeweavers.com>
+
+ * src/winfonts/winfnt.c (fnt_face_get_dll_font): Return error
+ FNT_Err_Invalid_File_Format if file format was recognized but
+ the file doesn't contain any FNT(NE) or RT_FONT(PE) resources.
+ Add verbose debug logs to make it easier to debug failing load
+ attempts.
+ (FNT_Face_Init): A single FNT font can't contain more than 1 face,
+ so return an error if requested face index is > 0.
+ Do not do further attempt to load fonts if a previous attempt has
+ failed but returned error FNT_Err_Invalid_File_Format, i.e., the
+ file format has been recognized but no fonts found in the file.
+
+2007-07-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c: Apply patches proposed by Sean McBride.
+ (FT_GetFile_From_Mac_Name): Insert FT_UNUSED macros to fix
+ the compiler warnings against unused arguments.
+ (FT_ATSFontGetFileReference): Ditto.
+ (FT_GetFile_From_Mac_ATS_Name): Ditto.
+ (FT_New_Face_From_FSSpec): Ditto.
+ (lookup_lwfn_by_fond): Fix wrong comment.
+ Replace `const StringPtr' by more appropriate type
+ `ConstStr255Param'.
+ FSRefMakePathPath always returns UTF8 POSIX pathname in
+ Mach-O, thus HFS pathname support is dropped.
+ (count_faces): Remove HLock and HUnlock which is not
+ required on Mac OS X anymore.
+ (FT_New_Face_From_SFNT): Ditto.
+ (FT_New_Face_From_FOND): Ditto.
+ * builds/mac/ftmac.c: Synchronize to src/base/ftmac.c,
+ except of HFS pathname support and HLock/HUnlock.
+ They are required on classic CFM environment.
+
+2007-06-18 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psobjs.c (ps_parser_skip_PS_token): Remove incorrect
+ assertion.
+ (ps_parser_to_bytes): Fix error message.
+
+ * src/type42/t42objs.c (T42_Open_Face): Handle one more error.
+ * src/type42/t42parse.c (t42_parse_sfnts): s/alloc/allocated/.
+ Don't allow mixed binary and hex strings.
+ Handle string_size == 0 and string_buf == 0.
+ (t42_parse_encoding): Handle one more error.
+
+2007-06-18 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psobjs.c (ps_tofixedarray, ps_tocoordarray): Fix exit
+ logic.
+ (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>: Skip delimiters
+ correctly.
+ (ps_parser_load_field_table): Use `fields->array_max' instead of
+ T1_MAX_TABLE_ELEMENTS to limit the number of arguments.
+
+ * src/cff/cffgload.c (cff_decoder_prepare): Fix change from
+ 2007-06-06.
+
+2007-06-17 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/ftrandom.c (font_size): New global variable.
+ (TestFace): Use it.
+ (main): Handle new option `--size' to set `font_size'.
+ (Usage): Updated.
+
+ * src/winfonts/winfnt.c (fnt_face_get_dll_font): Exit in case of
+ invalid font.
+ (FNT_Load_Glyph): Protect against invalid bitmap width.
+
+2007-06-16 David Turner <david@freetype.org>
+
+ * src/smooth/ftgrays.c (gray_find_cell, gray_set_cell, gray_hline):
+ Prevent integer overflows when rendering very large outlines.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check the
+ well-formedness of the contours array when loading a glyph.
+
+ * src/truetype/ttinterp.c (TT_Load_Context): Initialize `zp0', `zp1',
+ and `zp2'.
+ (Ins_IP): Check argument ranges to reject bogus operations properly.
+ (IUP_WorkerRec): Add `max_points' member.
+ (_iup_worker_interpolate): Check argument ranges.
+ (Ins_IUP): Ignore empty outlines.
+
+2007-06-16 Dmitry Timoshkov <dmitry@codeweavers.com>
+
+ * src/winfonts/winfnt.h: Add necessary structures for PE resource
+ parsing.
+ (WinPE32_HeaderRec): New structure.
+ (WinPE32_SectionRec): New structure.
+ (WinPE_RsrcDirRec): New structure.
+ (WinPE_RsrcDirEntryRec): New structure.
+ (WinPE_RsrcDataEntryRec): New structure.
+ (FNT_FontRec): Remove unused `size_shift' field.
+
+ * src/winfonts/winfnt.c (fnt_face_get_dll_font): Add support for
+ loading bitmap .fon files in PE format.
+
+2007-06-15 Dmitry Timoshkov <dmitry@codeweavers.com>
+
+ * builds/win32/ftdebug.c: Unify debug level handling with other
+ platforms.
+
+2007-06-14 Dmitry Timoshkov <dmitry@codeweavers.com>
+
+ * builds/win32/ftdebug.c (FT_Message): Send debug output to the
+ console as well as to the debugger.
+
+2007-06-14 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/aflatin.c (af_latin_uniranges): Expand structure to
+ cover all ranges which could possibly be handled by the aflatin
+ module (since the default fallback for unknown ranges is now the
+ afcjk module). It might be necessary to fine-tune this further by
+ splitting off modules for Greek, Cyrillic, or other blocks.
+
+2007-06-11 David Turner <david@freetype.org>
+
+ * src/autofit/aflatin.c (af_latin_hints_link_segments): Fix
+ incorrect segment linking computation. This was the root cause of
+ Savannah bug #19565.
+
+
+ * src/autofit/* [FT_OPTION_AUTOFIT2]: Some very experimental changes
+ to improve the Latin auto-hinter. Note that the new code is
+ disabled by default since it is not stabilized yet.
+
+ * src/autofit/aflatin2.c, src/autofit/aflatin2.h: New files
+ (disabled currently).
+
+ * src/autofit/afhints.c: Remove dead code.
+ (af_axis_hints_new_edge): Add argument to handle segment directions.
+ (af_edge_flags_to_string): New function.
+ (af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Handle
+ option flags.
+ (af_glyph_hints_reload): Add argument to handle inflections.
+ Simplify.
+ (af_direction_compute): Fine tuning.
+ (af_glyph_hints_align_edge_points): Fix logic.
+ (af_glyph_hints_align_strong_points): Do linear search for small
+ edge counts.
+ (af_glyph_hints_align_weak_points): Skip any touched neighbors.
+ (af_iup_shift): Handle zero `delta'.
+
+ * src/autofit/afhints.h: Updated.
+ (AF_SORT_SEGMENTS): New macro (disabled).
+ (AF_AxisHintsRec) [AF_SORT_SEGMENTS]: New member `mid_segments'.
+
+ * src/autofit/afglobal.c (af_face_globals_get_metrics): Add
+ argument to pass option flags for handling scripts.
+ * src/autofit/afglobal.h: Updated.
+
+ * src/autofit/afcjk.c: Updated.
+ * src/autofit/aflatin.c: Updated.
+ (af_latin_metrics_scale_dim): Don't reduce scale by 2%.
+
+ (af_latin_hints_compute_segments) [AF_HINT_METRICS]: Remove dead code.
+ (af_latin_hints_compute_edges) [AF_HINT_METRICS]: Remove dead code.
+ Don't set `edge->dir'
+ (af_latin_hint_edges): Add more logging.
+
+ * src/autofit/afloader.c: Updated.
+
+2007-06-11 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Document FT_Face_CheckTrueTypePatents.
+
+2007-06-10 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Slight speed-up to
+ the TrueType glyph loader.
+
+ * include/freetype/config/ftoption.h: Clarify documentation
+ regarding unpatented hinting.
+
+
+ Add new `FT_Face_CheckTrueTypePatents' API.
+
+ * include/freetype/freetype.h (FT_Face_CheckTrueTypePatents): New
+ declaration.
+
+ * include/freetype/internal/services/svttglyf.h,
+ src/base/ftpatent.c: New files.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_TRUETYPE_GLYF_H):
+ New macro.
+
+ * src/truetype/ttdriver.c: Include FT_SERVICE_TRUETYPE_GLYF_H and
+ `ttpload.h'.
+ (tt_service_truetype_glyf): New service structure.
+ (tt_services): Register it.
+
+ * modules.cfg (BASE_EXTENSIONS), src/base/Jamfile (_sources): Add
+ `ftpatent.c'.
+
+2007-06-08 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Undo change from 2007-04-28.
+ Fonts without a cmap must be handled correctly by FreeType (anything
+ else would be a bug).
+
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ [FT_DEBUG_LEVEL_TRACE]: Improve tracing message.
+
+2007-06-07 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttsbit0.c (tt_sbit_decoder_init,
+ tt_sbit_decoder_load_image): Protect against integer overflows.
+
+
+ * src/pfr/pfrgload.c (pfr_glyph_load_simple): More bounding checks
+ for `x_control' and `y_control'.
+
+2007-06-06 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_Outline_Decompose): Check `last'.
+
+
+ * src/pfr/pfrcmap.c (pfr_cmap_init): Convert assertion into normal
+ FreeType error.
+
+
+ * src/winfonts/winfnt.c (fnt_face_get_dll_font): Do a rough check of
+ `font_count'.
+
+
+ * src/type1/t1load.c (parse_font_matrix): Check `temp_scale'.
+
+
+ * src/cff/cffgload.c (cff_decoder_prepare): Change return type to
+ `FT_Error'.
+ Check `fd_index'.
+ (cff_slot_load): Updated.
+ * src/cff/cffgload.h: Updated.
+
+2007-06-05 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/pfrgload.c (pfr_glyph_done): Comment out unused code.
+ (pfr_glyph_load_simple): Convert assertion into normal FreeType
+ error.
+ Check `idx'.
+ (pfr_glyph_load_compound, pfr_glyph_curve_to, pfr_glyph_line_to):
+ Convert assertion into normal FreeType error.
+
+ * src/pfr/pfrtypes.h (PFR_GlyphRec): Comment out unused code.
+
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Check `family_size'.
+
+
+ * src/psaux/psobjs.c (ps_tocoordarray, ps_tofixedarray): Return -1
+ in case of parsing error.
+ (ps_parser_load_field): Updated.
+
+ * src/type1/t1load.c (parse_font_matrix): Updated.
+
+2007-06-04 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidgload.c (cid_load_glyph): Check `fd_select'.
+
+ * src/tools/ftrandom/Makefile: Depend on `libfreetype.a'.
+
+2007-06-03 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/ftrandom/*: Add the `ftrandom' test program written by
+ George Williams (with some modifications).
+
+2007-06-03 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (destroy_charmaps), src/type1/t1objs.c
+ (T1_Face_Done), src/winfonts/winfnt.c (FNT_Face_Done): Check for
+ face == NULL. Suggested by Graham Asher.
+
+2007-06-03 Ismail Dönmez <ismail@pardus.org.tr>
+
+ * src/base/ftobjs.c (FT_Request_Metrics): Fix compiler warning.
+
+2007-06-02 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/fterrdef.h (FT_Err_Corrupted_Font_Header,
+ FT_Err_Corrupted_Font_Glyphs): New error codes for BDF files.
+
+ * src/bdf/bdflib.c (bdf_load_font): Use them.
+
+ * src/bdf/bdflib.c (_bdf_parse_start): Check `FONT' better.
+
+2007-06-01 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Request_Metrics), src/cache/ftccmap.c
+ (FTC_CMapCache_Lookup): Remove unused code.
+
+2007-06-01 Sean McBride <sean@rogue-research.com>
+
+ * src/truetype/ttinterp.c (Null_Vector, NULL_Vector): Removed,
+ unused.
+
+2007-06-01 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidparse.c (cid_parser_new): Don't continue second search
+ pass for `StartData' if an error has occurred.
+ Exit properly if no `StartData' has been seen at all.
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Don't use ULONG_MAX but
+ LONG_MAX to avoid compiler warning. Suggested by Sean McBride.
+
+2007-05-30 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs, parse_charstrings): Protect
+ against too small binary data strings.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs): Check `STARTCHAR' better.
+
+2007-05-28 David Turner <david@freetype.org>
+
+ * src/cff/cffgload.c (cff_slot_load): Do not apply the identity
+ transformation. This significantly reduces the loading time of CFF
+ glyphs.
+
+ * docs/CHANGES: Updated.
+
+ * src/autofit/afglobal.c (AF_SCRIPT_LIST_DEFAULT): Change default
+ hinting script to CJK, since it works well with more scripts than
+ latin. Thanks to Rahul Bhalerao <b.rahul.pm@gmail.com> for pointing
+ this out!
+
+2007-05-25 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2007-05-24 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttobjs.h (tt_size_ready_bytecode): Move declaration
+ into TT_USE_BYTECODE_INTERPRETER preprocessor block.
+
+2007-05-24 Graham Asher <graham.asher@btinternet.com>
+
+ * src/truetype/ttobjs.c (tt_size_ready_bytecode)
+ [!TT_USE_BYTECODE_INTERPRETER]: Removed. Unused.
+
+2007-05-22 David Turner <david@freetype.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Fix last change to
+ avoid crashes in case the bytecode interpreter is not used.
+
+
+ Avoid heap blowup with very large .Z font files. This fixes
+ Savannah bug #19910.
+
+ * src/lzw/ftzopen.h (FT_LzwStateRec): Remove `in_cursor',
+ `in_limit', `pad', `pad_bits', and `in_buff' members.
+ Add `buf_tab', `buf_offset', `buf_size', `buf_clear', and
+ `buf_total' members.
+
+ * src/lzw/ftzopen.c (ft_lzwstate_get_code): Rewritten. It now takes
+ only one argument.
+ (ft_lzwstate_refill, ft_lzwstate_reset, ft_lzwstate_io): Updated.
+
+2007-05-20 Ismail Dönmez <ismail@pardus.org.tr>
+
+ * src/pshinter/pshrec.c (ps_mask_table_set_bits): Add `const'.
+ (ps_dimension_set_mask_bits): Remove `const'.
+
+2007-05-19 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttmtx.c (tt_face_get_metrics)
+ [!FT_CONFIG_OPTION_OLD_INTERNALS]: Another type-punning fix.
+
+2007-05-19 Derek Clegg <dclegg@apple.com>
+
+ Savannah patch #5929.
+
+ * include/freetype/tttables.h, src/base/ftobjcs.c
+ (FT_Get_CMap_Format): New function.
+
+ * include/freetype/internal/services/svttcmap.c (TT_CMapInfo): Add
+ `format' member.
+ * src/sfnt/ttcmap.c (tt_cmap{0,2,4,6,8,10,12}_get_info): Set
+ cmap_info->format.
+
+2007-05-19 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Save graphics state
+ before handling subglyphs so that it can be reinitialized each time.
+ This fixes Savannah bug #19859.
+
+2007-05-16 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c (ftc_node_mru_link, ftc_node_mru_unlink),
+ src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP), src/cache/ftcglyph.h
+ (FTC_GCACHE_LOOKUP_CMP), src/pshinter/pshmod.c (ps_hinter_init),
+ src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_load_hhea,
+ tt_face_get_metrics): Fix type-punning issues.
+
+2007-05-15 David Turner <david@freetype.org>
+
+ * 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
+ <ctypes.h>.
+
+2007-05-15 Graham Asher <graham.asher@btinternet.com>
+
+ * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Remove unused
+ variable.
+ * src/autofit/afloader.c (af_loader_load_g): Ditto.
+
+ * src/base/ftobjs.c (ft_validator_error): Use `ft_jmp_buf'.
+ (open_face_from_buffer): Initialize `stream'.
+ (FT_Request_Metrics): Remove unused variable.
+ Remove redundant `break' statements.
+ (FT_Get_Track_Kerning): Remove unused variable.
+
+ * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs,
+ afm_parse_kern_data): Remove redundant
+ `break' statements.
+ (afm_parser_parse): Ditto.
+ Don't use uninitialized variables.
+
+ * src/psnames/psmodule.c (VARIANT_BIT): Define as unsigned long.
+ Use `|' operator instead of `^' to set it.
+ Update all users.
+
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Use `ft_jmp_buf'.
+ * src/sfnt/ttkern.c (tt_face_load_kern): Remove unused variable.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove redundant
+ comparison.
+ (TT_Process_Simple_Glyph): Use FT_UInt for `n_points' and `i'.
+ (TT_Load_Glyph): Remove unused variable.
+
+2007-05-13 Derek Clegg <dclegg@apple.com>
+
+ * src/base/ftobjs.c (FT_New_Library): Only allocate rendering pool
+ if FT_RENDER_POOL_SIZE is > 0. From Savannah patch #5928.
+
+2007-05-11 David Turner <david@freetype.org>
+
+ * src/cache/ftbasic.c, include/freetype/ftcache.h
+ (FTC_ImageCache_LookupScaler, FTC_SBit_Cache_LookupScaler): Two new
+ functions that allow us to look up glyphs using an FTC_Scaler object
+ to specify the size, making it possible to use fractional pixel
+ sizes.
+
+ * src/truetype/ttobjs.c (tt_size_ready_bytecode): Set
+ `size->cvt_ready'. Reported by Boris Letocha.
+
+2007-05-09 Graham Asher <graham.asher@btinternet.com>
+
+ * src/truetype/ttinterp.c (Ins_IP), src/autofit/aflatin.c
+ (af_latin_metrics_scale_dim): Fix compiler warnings.
+
+2007-05-06 Werner Lemberg <wl@gnu.org>
+
+ * builds/win32/visualce/freetype.sln: Removed, as requested by
+ Vincent.
+
+2007-05-04 Vincent RICHOMME <richom.v@free.fr>
+
+ * builds/win32/visualce/*: Add Visual C++ project files for Pocket
+ PC targets.
+
+ * docs/CHANGES: Document them.
+
+2007-05-04 <harry@kdevelop.org>
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Handle return value 0 of
+ mmap (which might happen on some RTOS). From Savannah patch #5909.
+
+2007-05-03 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Simplify code.
+ * include/freetype/freetype.h (FT_Set_Char_Size): Update
+ documentation.
+
+2007-04-28 Victor Stinner <victor.stinner@inl.fr>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Check error code after loading
+ `cmap'.
+
+2007-04-27 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Check for negative
+ number of points in contours. Problem reported by Victor Stinner
+ <victor.stinner@haypocalc.com>.
+ (TT_Process_Simple_Glyph): Synchronize variable types.
+
+2007-04-26 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftglyph.c (FT_Glyph_Copy): Always set second argument to
+ zero in case of error. This fixes Savannah bug #19689.
+
+2007-04-25 Boris Letocha <b.letocha@cz.gmc.net>
+
+ * src/truetype/ttobjs.c: Fix a typo that created a speed regression
+ in the TrueType bytecode loader.
+
+2007-04-10 Martin Horak <horakm@centrum.cz>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Ignore `hhea' table. This fixes Savannah bug #19261.
+
+2007-04-09 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.3.4 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-4'.
+
+ * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump
+ version number to 2.3.4.
+
+ * README, Jamfile (RefDoc), builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj: s/2.3.3/2.3.4/, s/233/234/.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
+
+ * builds/unix/configure.raw (version_info): Set to 9:15:3.
+
+2007-04-09 Martin Horak <horakm@centrum.cz>
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Save and restore
+ memory stream to avoid a crash with the incremental memory
+ interface (Savannah bug #19260).
+
+2007-04-06 David Turner <david@freetype.org>
+
+ * src/base/ftbimap.c (ft_bitmap_assure_buffer): Fix buffer-overwrite bug
+ (Savannah bug #19536).
+
+2007-04-04 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.3.3 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-3'.
+
+ * docs/CHANGES: Mention CVE-2007-1351.
+
+2007-04-03 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): As suggested by James Cloos,
+ if one of the resolution values is 0, treat it as if it were the
+ same as the other value.
+
+2007-04-02 David Turner <david@freetype.org>
+
+ Add special code to detect `extra-light' fonts and do not snap their
+ stem widths too much to avoid bizarre hinting effects.
+
+ * src/autofit/aflatin.h (AF_LatinAxisRec): Add `standard_width' and
+ `extra_light' members.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize
+ them.
+ (af_latin_metrics_scale_dim): Set `extra_light'.
+ (af_latin_compute_stem_width): Use `extra_light'.
+
+2007-03-28 David Turner <david@freetype.org>
+
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix zero-ing of the
+ padding.
+
+2007-03-28 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdflib.c (setsbit, sbitset): Handle values >= 128
+ gracefully.
+ (_bdf_set_default_spacing): Increase `name' buffer size to 256 and
+ issue an error for longer names. This fixes CVE-2007-1351.
+ (_bdf_parse_glyphs): Limit allowed number of glyphs in font to the
+ number of code points in Unicode.
+
+ * builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj, README: s/2.3.2/2.3.3/,
+ s/232/233/.
+
+ * docs/CHANGES: Mention ftdiff.
+
+2007-03-26 David Turner <david@freetype.org>
+
+ * src/truetype/ttinterp.c [FIX_BYTECODE]: Remove it and
+ corresponding code.
+ (Ins_MD): Last regression fix.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Fix blues
+ computations in order to ignore single-point contours. These are
+ never rasterized and correspond in certain fonts to mark-attach
+ points that are very far from the glyph's real outline, ruining the
+ computation.
+
+ * src/autofit/afloader.c (af_loader_load_g): In the case of
+ monospaced fonts, always set `rsb_delta' and `lsb_delta' to 0.
+ Otherwise code that uses them will most certainly ruin the fixed
+ advance property.
+
+ * docs/CHANGES, docs/VERSION.DLL, README, Jamfile (RefDoc): Update
+ documentation and bump version number to 2.3.3.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
+
+ * builds/unix/configure.raw (version_info): Set to 9:14:3.
+
+2007-03-26 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/ftconfig.in: Disable Carbon framework dependency on
+ 64bit ABI on Mac OS X 10.4.x (ppc & i386). Found by Sean McBride.
+ * builds/vms/ftconfig.h: Ditto.
+ * include/freetype/config/ftconfig.h: Ditto.
+
+2007-03-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Temporary fix to prevent
+ 32bit unsigned long overflow by 64bit filesize on LP64 platform, as
+ proposed by Sean McBride:
+ http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
+
+2007-03-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/ftconfig.in: Suppress SGI compiler's warning against
+ setjmp, proposed by Sean McBride:
+ http://lists.gnu.org/archive/html/freetype-devel/2007-03/msg00032.html
+
+2007-03-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: Dequote `OS_INLINE' in comment of
+ conftest.c, to avoid unexpected shell evaluation. Possibly it is a
+ bug or undocumented behaviour of autoconf.
+
+2007-03-18 David Turner <david@freetype.org>
+
+ * src/truetype/ttinterp.c (Ins_MDRP): Another bytecode regression
+ fix; testing still needed.
+
+ * src/truetype/ttinterp.c (Ins_MD): Another bytecode regression fix.
+
+2007-03-17 David Turner <david@freetype.org>
+
+ * src/truetype/ttinterp.c (Ins_IP): Fix wrong handling of the
+ (undocumented) twilight zone special case.
+
+2007-03-09 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.3.2 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-2'.
+
+ * builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj, README: s/2.3.1/2.3.2/,
+ s/231/232/.
+
+2007-03-08 David Turner <david@freetype.org>
+
+ * docs/CHANGES, docs/VERSION.DLL: Updated for upcoming release.
+
+ * builds/unix/configure.raw (version_info): Set to 9:13:3.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
+
+ * README, Jamfile (RefDoc): s/2.3.1/2.3.2/.
+
+ * src/base/ftutil.c (ft_mem_strcpyn): Fix a bug that prevented the
+ function to work properly, over-writing user-provided buffers in
+ some cases. Reported by James Cloos <cloos@jhcloos.com>.
+
+
+2007-03-05 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftstdlib.h (ft_strstr): New wrapper
+ macro for `strstr'.
+
+ * src/truetype/ttobjs.c (tt_face_init): Use ft_strstr for scanning
+ `trick_names', as suggested by Ivan Nincic.
+
+2007-03-05 David Turner <david@freetype.org>
+
+ * src/base/ftinit.c (FT_Init_FreeType): Fix a small memory leak in
+ case FT_Init_FreeType fails for some reason. Problem reported by
+ Maximilian Schwerin <maximilian.schwerin@buelowssiege.de>.
+
+ * src/truetype/ttobs.c (tt_size_init_bytecode): Clear the `x_ppem'
+ and `y_ppem' fields of the `TT_Size.metrics' structure, not those of
+ `TT_Size.root.metrics'. Problem reported by Daniel Glöckner
+ <daniel-gl@gmx.net>.
+
+ * src/type1/t1afm.c (T1_Read_PFM): Read kerning values as 16-bit
+ signed values, not unsigned ones. Problem reported by Johannes
+ Walther <joh_walt@yahoo.de>.
+
+2007-02-21 David Turner <david@freetype.org>
+
+ * src/pshinter/pshalgo.c (psh_hint_align): Fix a bug in the hinting
+ of small and ghost stems in the Postscript interpreter.
+
+2007-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Fix memory
+ leak, patch by "Jjgod Jiang" <gzjjgod@gmail.com>.
+ * builds/mac/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Ditto.
+
+2007-02-16 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (Ins_MD): Remove unused variable.
+ * src/autofit/aflatin.c (af_latin_hints_link_segments): Ditto.
+
+2007-02-14 David Turner <david@freetype.org>
+
+ It seems that the following changes fix most of the known
+ interpreter problems with my fonts, but more testing is needed,
+ though.
+
+ * src/truetype/ttinterp.c (FIX_BYTECODE): Activate.
+ (TT_MulFix14): Rewrite.
+ (Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Improved and updated.
+ (Ins_MIRP): Ditto.
+
+2007-02-12 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttinterp.c (Project_x, Project_y): Remove compiler
+ warnings.
+
+ * src/pcf/pcfread.c (pcf_interpret_style), src/bdf/bdfdrivr.c
+ (bdf_interpret_style): Ditto.
+
+2007-02-12 David Turner <david@freetype.org>
+
+ Simplify projection and dual-projection code interface.
+
+ * src/truetype/ttinterp.h (TT_Project_Func): Use `FT_Pos', not
+ FT_Vector' as argument type.
+ * src/truetype/ttinterp.c (CUR_Func_project, CUR_Func_dualproj):
+ Updated.
+ (CUR_fast_project, CUR_fast_dualproj): New macros.
+ (Project, Dual_Project, Project_x, Project_y): Updated.
+ (Ins_GC, Ins_SCFS, Ins_MDAP, Ins_MIAP, Ins_IP): Use new `fast'
+ macros.
+
+
+ * src/autofit/afloader.c (af_loader_load_g): Improve spacing
+ adjustments for the non-light auto-hinted modes. Gets rid of
+ `inter-letter spacing is too wide' problems.
+
+ * src/autofit/aflatin.c (af_latin_hints_link_segments,
+ af_latin_hints_compute_edges): Slight optimization of the segment
+ linker and better handling of serif segments to get rid of broken
+ `9' in Arial at 9pt (96dpi).
+
+
+ Introduce new string functions and the corresponding macros to get
+ rid of various uses of strcpy and other `evil' functions, as well as
+ to simplify a few things.
+
+ * include/freetype/internal/ftmemory.h (ft_mem_strdup, ft_mem_dup,
+ ft_mem_strcpyn): New declarations.
+ (FT_MEM_STRDUP, FT_STRDUP, FT_MEM_DUP, FT_DUP, FT_STRCPYN): New
+ macros.
+ * src/base/ftutil.c (ft_mem_dup, ft_mem_strdup, ft_mem_strcpyn): New
+ functions.
+
+ * src/bfd/bfddrivr.c (bdf_interpret_style, BDF_Face_Init),
+ src/bdf/bdflib.c (_bdf_add_property), src/pcf/pcfread.c
+ (pcf_get_properties, pcf_interpret_style, pcf_load_font),
+ src/cff/cffdrivr.c (cff_get_glyph_name), src/cff/cffload.c
+ (cff_index_get_sid_string), src/cff/cffobjs.c (cff_strcpy),
+ src/sfnt/sfdriver.c (sfnt_get_glyph_name), src/type1/t1driver.c
+ (t1_get_glyph_name), src/type42/t42drivr.c (t42_get_glyph_name,
+ t42_get_name_index): Use new functions and simplify code.
+
+ * builds/mac/ftmac.c (FT_FSPathMakeSpec): Don't use FT_MIN.
+
+2007-02-11 Werner Lemberg <wl@gnu.org>
+
+ * src/autofit/afloader.c (af_loader_load_g): Don't change width for
+ non-spacing glyphs.
+
+2007-02-07 Tom Parker <palfrey@tevp.net>
+
+ * src/cff/cffdrivr.c (cff_get_name_index): Protect against NULL
+ pointer.
+
+2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/ftmac.h (FT_DEPRECATED_ATTRIBUTE):
+ Introduce __attribute((deprecated))__ to warn functions
+ which use non-ANSI data types in its interfaces.
+ (FT_GetFile_From_Mac_Name): Deprecated, using FSSpec.
+ (FT_GetFile_From_Mac_ATS_Name): Deprecated, using FSSpec.
+ (FT_New_Face_From_FSSpec): Deprecated, using FSSpec.
+ (FT_New_Face_From_FSRef): Deprecated, using FSRef.
+
+ * src/base/ftmac.c: Predefine FT_DEPRECATED_ATTRIBUTE as void
+ to avoid warning in building FreeType.
+ * builds/mac/ftmac.c: Ditto.
+
+2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftbase.c: Fix to use builds/mac/ftmac.c, if configured
+ `--with-fsspec' etc. Replace #include "ftmac.c" with
+ #include <ftmac.c>.
+
+2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/ftmac.h (FT_GetFilePath_From_Mac_ATS_Name):
+ Introduced as replacement of FT_GetFile_From_Mac_ATS_Name.
+ * src/base/ftmac.c (FT_GetFilePath_From_Mac_ATS_Name): Ditto.
+ (FT_GetFile_From_Mac_ATS_Name): Rewritten as wrapper of
+ FT_GetFilePath_From_Mac_ATS_Name.
+ * builds/mac/ftmac.c: Ditto.
+
+2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/ftmac.h: Fixed wrong comment: FSSpec of
+ FT_GetFile_From_Mac_Name, FT_GetFile_From_Mac_ATS_Name are
+ for passing to FT_New_Face_From_FSSpec.
+
+2007-02-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw: Check whether Mac OS X system headers
+ can be built under ANSI C mode.
+
+ * src/base/ftmac.c (OS_INLINE): Redefine OS_INLINE by a version
+ compatible to ANSI C in case system headers are ANSI C incompatible.
+ * builds/mac/ftmac.c (OS_INLINE): Ditto.
+
+2007-02-01 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ttnameid.h (TT_MS_LANGID_DZONGHKA_BHUTAN):
+ Explain why applications shouldn't use it. Found by Alexei.
+
+2007-02-01 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ * builds/unix/freetype2.m4 (AC_CHECK_FT2): Fix spelling of warning
+ message.
+
+ * src/gxvalid/gxvmort1.c
+ (gxv_mort_subtable_type1_substTable_validate): Fix debugging
+ message.
+
+2007-01-31 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.3.1 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-1-FINAL'.
+
+ * builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj: s/230/231/.
+ * builds/win32/visualc/index.html: s/221/231/.
+
+ * vms_make.com: Add `ftgasp'.
+
+2007-01-30 David Turner <david@freetype.org>
+
+ Tag sources with VER-2-3-1 to prepare release.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
+
+ * docs/VERSION.DLL, docs/release, README, Jamfile (RefDoc):
+ s/2.3.0/2.3.1/.
+
+ * builds/unix/configure.raw (version_info): Set to 9:12:3.
+
+
+ * src/autofit/aftypes.h (AF_USE_WARPER), src/autofit/afloader.c
+ (af_loader_load_g): Disable the warper (i.e., the light hinting
+ improvements) to make a 2.3.1 bugfix release before introducing a
+ new feature. This should give us more time to tune and improve the
+ warper for the next release.
+
+ * docs/CHANGES: Update accordingly.
+
+2007-01-25 David Turner <david@freetype.org>
+
+ For light auto-hinting, improve glyph advance widths and resurrect
+ normal/full hinting to its normal quality.
+
+ * src/autofit/afhints.h (AF_GlyphHintsRec): New members `xmin_delta'
+ and `xmax_delta'.
+ * src/autofit/afhints.c (af_glyph_hints_reload): Reset `xmin_delta'
+ and `xmax_delta'.
+
+ * src/autofit/afloader.c (af_loader_load_g) <AF_USE_WARPER>: Replace
+ preprocessor conditional with if-clause, handling both light and
+ normal mode.
+
+ * src/autofit/afwarp.c (AF_WarpScore): Fine-tune again.
+ (af_warper_compute): Handle `xmin_delta' and `xmax_delta'.
+
+2007-01-25 Werner Lemberg <wl@gnu.org>
+
+ * docs/release: Updated -- Savannah uses a new uploading scheme.
+
+2007-01-25 David Turner <david@freetype.org>
+
+ * src/cff/cffload.c (cff_index_get_pointers): Improve previous fix.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_callsubr, cff_op_callgsubr>: Fix sanity check for empty
+ functions.
+
+ * docs/CHANGES: Document light auto-hinting improvement.
+
+2007-01-25 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_index_get_pointers): Handle last entry
+ correctly in a sanity check. Since this function is only used to
+ load local and global functions, any charstring that called the last
+ local/global function would fail otherwise. This fixes Savannah bug
+ #18867.
+
+ * docs/CHANGES: Document it.
+
+2007-01-23 David Turner <david@freetype.org>
+
+ * src/truetype/ttobjs.c (tt_size_ready_bytecode): Fix typo that
+ prevented compilation when disabling both the unpatented and the
+ bytecode interpreter in the TrueType font driver.
+
+
+ Fix and enable the warper to improve `light' hinting mode. This is
+ not necessarily a final version, but it seems to work well.
+
+ * src/autofit/aflatin.c (af_latin_hints_init) [AF_USE_WARPER]:
+ Disable code.
+ (af_latin_hints_apply) [AF_USE_WARPER]: Handle FT_RENDER_MODE_LIGHT.
+ * src/autofit/aftypes.h: Activate AF_USE_WARPER.
+
+ * src/autofit/afwarp.c (AF_WarpScore): Tune table.
+ (af_warper_compute_line_best): Fix array size of `scores'.
+ (af_warper_compute): Better handling of border cases.
+ * src/autofit/afwarp.h (AF_WarperRec): Remove unused members `X1'
+ and `X2'.
+
+2007-01-21 Werner Lemberg <wl@gnu.org>
+
+ * ChangeLog: Split off older entries into...
+ * ChangeLog.22: This new file.
+
+2007-01-21 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Document SHZ fix.
+
+2007-01-21 George Williams <gww@silcom.com>
+
+ * src/truetype/ttinterp.c (Ins_SHZ): SHZ doesn't move phantom
+ points.
+
+2007-01-21 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttmtx.c (tt_face_get_metrics)
+ [!FT_CONFIG_OPTION_OLD_INTERNALS]: Fix limit check.
+
+2007-01-17 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.3.0 released.
+ =========================
+
+
+ Tag sources with `VER-2-3-0-FINAL'.
+
+2007-01-17 Werner Lemberg <wl@gnu.org>
+
+ * docs/release: Updated.
+
+2007-01-16 David Turner <david@freetype.org>
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_segments),
+ src/cff/cffdriver.c (cff_ps_get_font_info), src/truetype/ttobjs.c
+ (tt_face_init), src/truetype/ttinterp.c (Ins_SHC): Fix compiler
+ warnings.
+
+2007-01-15 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/makefile, builds/amiga/makefile.os4,
+ builds/amiga/smakefile: Add `ftgasp.c' and `ftlcdfil.c'.
+
+ * builds/amiga/include/freetype/config/ftconfig.h: Synchronize.
+
+2007-01-14 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ Fix various compiler warnings.
+
+ * src/truetype/ttdriver.c (tt_size_select), src/cff/cffobjs.h,
+ src/cff/cffobjs.c (cff_size_request), src/type42/t42objs.h:
+ s/index/strike_index/.
+ * src/base/ftobjs.c (FT_Match_Size): s/index/size_index/.
+
+ * src/gxvalid/gxvmorx5.c
+ (gxv_morx_subtable_type5_InsertList_validate): s/index/table_index/.
+
+ * src/truetype/ttinterp.c (Compute_Point_Displacement),
+ src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly
+ uninitialized variables.
+
+2007-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * docs/CHANGES, docs/INSTALL.MAC: Improvements.
+
+2007-01-13 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1afm.c (T1_Read_Metrics): MS Windows allows PFM
+ versions up to 0x3FF without complaining.
+
+2007-01-13 Derek Clegg <dclegg@apple.com>
+
+ Add FT_Get_PS_Font_Info interface to CFF driver.
+
+ * src/cff/cfftypes.h: Include FT_TYPE1_TABLES_H.
+ (CFF_FontRec): Add `font_info' field.
+
+ * src/cff/cffload.c: Include FT_TYPE1_TABLES_H.
+ (cff_font_done): Free font->font_info if necessary.
+
+ * src/cff/cffdrvr.c (cff_ps_get_font_info): New function.
+ (cff_service_ps_info): Register cff_ps_get_font_info.
+
+2007-01-13 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Fix compilation
+ with C++ compiler.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_segments,
+ af_glyph_hints_dump_edges): Ditto.
+
+ * src/base/rules.mk (BASE_SRC): Remove ftgasp.c (it's already in
+ `modules.cfg').
+
+ * src/sfnt/ttsbit0.h: Remove.
+
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c.
+
+2007-01-12 David Turner <david@freetype.org>
+
+ * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Fix memory stomping
+ bug in the bitmap emboldener if the pitch of the source bitmap is
+ much larger than its width.
+
+ * src/truetype/ttinterp.c (Update_Max): Fix aliasing-related
+ compilation warning.
+
+2007-01-12 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
+ `automake' CVS module from sources.redhat.com.
+
+2007-01-11 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (is_space): Removed.
+ (parse_encoding, parse_charstrings): Use IS_PS_DELIM.
+ (parse_charstrings): Use IS_PS_TOKEN.
+
+
+ * autogen.sh: Avoid bash specific syntax.
+
+2007-01-11 David Turner <david@freetype.org>
+
+ * docs/CHANGES: Small update.
+
+ * builds/unix/configure.raw (version_info): Set to 9:11:3.
+
+ * src/base/ftobjs.c (IsMacResource): Fix a small bug that caused a
+ crash with some Mac OS X .dfont files. Submitted by Masatake
+ Yamato.
+
+ * autogen.sh: Small fix to get it working on Mac OS X properly:
+ The issue is that GNU libtool is called `glibtool' on this platform,
+ and we must call `glibtoolize', since `libtoolize' doesn't exist.
+
+2007-01-10 David Turner <david@freetype.org>
+
+ * all-sources: Tag all sources with VER-2-3-0-RC1 and
+ VER-2-3-0.
+
+ * Jamfile (RefDoc), README, builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj, docs/VERSION.DLL: Update
+ version number to 2.3.0.
+
+ * include/freetype/freetype.h (FREETYPE_MINOR): Set to 3.
+ (FREETYPE_PATCH): Set to 0.
+
+ * include/freetype/ftchapters.h, include/freetype/ftgasp.h,
+ include/freetype/ftlcdfil.h: Update reference documentation with
+ GASP support and LCD filtering sections.
+
+ * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix a typo
+ which created an endless loop with some malformed font files.
+
+2007-01-10 Derek Clegg <dclegg@apple.com>
+
+ * src/type1/t1load.c (T1_Get_MM_Var): Always return fixed point
+ values.
+
+2007-01-08 David Turner <david@freetype.org>
+
+ * docs/CHANGES: Updated.
+
+ * include/freetype/ftgasp.h, src/base/ftgasp.c: New files which add
+ a new API `FT_Get_Gasp' to return entries of the `gasp' table
+ corresponding to a given character pixel size.
+
+ * src/sfnt/ttload.c (tt_face_load_gasp): Add version check for the
+ `gasp' table, in order to avoid potential problems with later
+ versions.
+
+ * include/freetype/config/ftheader.h (FT_GASP_H): New macro for
+ <freetype/ftgasp.h>.
+
+ * src/base/rules.mk (BASE_SRC), src/base/Jamfile (_sources),
+ modules.cfg (BASE_EXTENSIONS), builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.vcproj: Add src/base/ftgasp.c to the
+ default build.
+
+2007-01-07 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidparse.c (cid_parser_new): Improve error message for
+ Type 11 fonts.
+ Scan for `/sfnts' token.
+
+2007-01-07 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidparse.c (cid_parser_new): Reject Type 11 fonts.
+
+2007-01-06 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_index_init): Remove unused variable.
+ (cff_index_read_offset): s/perror/errorp/ to avoid global shadowing.
+
+2007-01-04 David Turner <david@freetype.org>
+
+ * src/pfr/pfrobjs.c (pfr_face_init): Detect non-scalable fonts
+ correctly. This fixes Savannah bug #17876.
+
+
+ Do not allocate interpreter-specific tables in memory if we are not
+ going to load glyphs with the bytecode interpreter anyway.
+
+ * src/truetype/ttgload.c (tt_loader_init): Load execution context
+ only if glyph is hinted.
+ Updated.
+ * src/truetype/ttobjs.h (TT_SizeRec): Add members `bytecode_ready'
+ and `cvs_ready'.
+ Add `tt_size_ready_bytecode' declaration.
+ * src/truetype/ttobjs.c (tt_size_done_bytecode,
+ tt_size_init_bytecode, tt_size_ready_bytecode): New functions.
+ (tt_size_init): Move most code into `tt_size_init_bytecode'.
+ (tt_size_done): Move most code into `tt_size_done_bytecode'.
+ (tt_size_reset): Move some code to `tt_size_ready_bytecode'.
+
+
+ Don't extract the metrics table from the SFNT font file. Instead,
+ reparse it on each glyph load. The runtime difference is not
+ noticeable, and it can save a lot of heap memory when memory-mapped
+ files are not used.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add members
+ `horz_metrics_offset' and `vert_metrics_ofset'.
+ * src/sfnt/ttmtx.c (tt_face_load_hmtx, tt_face_get_metrics):
+ Updated.
+
+
+ * src/sfnt/ttcmap.c (tt_cmap4_validate): Slight optimization.
+
+
+ Do not load the CFF index offsets into memory, since this wastes a
+ *lot* of heap memory with large Asian CFF fonts. There is no
+ significant performance loss.
+
+ * src/cff/cffload.h: Add `cff_charset_cid_to_gindex' declaration.
+ * src/cff/cfftypes.h (CFF_IndexRec): Add fields `start' and
+ `data_size'.
+ (CFF_CharsetRec): Add field `num_glyphs'.
+
+ * src/cff/cffload.c (cff_index_read_offset, cff_index_load_offsets,
+ cff_charset_cid_to_gindex): New functions.
+ (cff_new_index): Renamed to...
+ (cff_index_init): This. Update all callers.
+ Updated -- some code has been moved to `cff_index_load_offsets'.
+ (cff_done_index): Renamed to...
+ (cff_index_done): This. Update all callers.
+ (cff_index_get_pointers, cff_index_access_element): Updated to use
+ stream offsets.
+ (cff_charset_compute_cids): Set `num_glyphs' field.
+ (cff_encoding_load): Updated.
+
+ * src/cff/cffgload.c (cff_slot_load): Updated.
+
+2007-01-04 David Turner <david@freetype.org>
+
+ * docs/INSTALL.UNIX: Simplify some parts, add reference to
+ autogen.sh and pointer to README.CVS.
+
+ * README.CVS: Add common problem description and solution
+ when running autogen.sh.
+
+ * docs/INSTALL: Add reference to MacOS X.
+
+ * docs/MAKEPP, docs/INSTALL.MAC: New documentation files.
+
+ * docs/TODO: Remove obsolete items.
+
+ * src/raster/ftraster.c: (TRaster_Instance): Replace it with...
+ (TWorker): This.
+ Remove `count_table' and `memory'.
+ Make `grays' a pointer.
+ (TRaster): New structure.
+ (count_table): New static array.
+ (RAS_ARGS, RAS_ARG, RAS_VARS, RAS_VAR, FT_UNUSED_RASTER, cur_ras,
+ Vertical_Gray_Sweep_Step, ft_black_new, ft_black_done,
+ ft_black_set_mode, ft_black_render): Updated.
+ (ft_black_init): Don't initialize `count_table'.
+ (ft_black_reset): Use the render pool. This saves about 6KB of
+ heap space for each FT_Library instance.
+
+ * src/smooth/ftgrays.c (TRaster): Replaced with...
+ (TWorker): This.
+ Remove `memory'.
+ (TRaster): New structure.
+
+ (RAS_ARG_, RAS_ARG, RAS_VAR_, RAS_VAR, ras, gray_render_line,
+ gray_move_to, gray_line_to, gray_conic_to, gray_cubic_to,
+ gray_render_span, gray_raster_render): Updated.
+ (gray_raster_reset): Use the render pool. This saves about 6KB of
+ heap space for each FT_Library instance.
+
+ * src/sfnt/sfobjs.c, src/sfnt/ttkern.c, src/sfnt/ttkern.h,
+ src/sfnt/ttmtx.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
+ src/truetype/ttpload.c, include/freetype/config/ftoption.h: Remove
+ FT_OPTIMIZE_MEMORY macro (and code for !FT_OPTIMIZE_MEMORY) since
+ the optimization is no longer experimental.
+
+ * src/pshinter/pshalgo.c (psh_glyph_interpolate_normal_points):
+ Remove a typo that results in no hinting and a memory leak with some
+ large Asian CFF fonts.
+
+ * src/base/ftobjs.c (FT_Done_Library): Remove a subtle memory leak
+ which happens when FT_Done_Library is called with still opened
+ CFF_Faces in it. We need to close all faces before destroying the
+ modules, or else some bad things (memory leaks) may happen.
+
+2007-01-02 Werner Lemberg <wl@gnu.org>
+
+ * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate):
+ Remove compiler warning.
+
+2007-01-02 David Turner <david@freetype.org>
+
+ * src/sfnt/sfobjs.c: Add documentation comment.
+
+2006-12-31 Masatake YAMATO <jet@gyve.org>
+
+ * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate): New
+ function.
+ Check uniqueness of the gid pairs.
+ (gxv_kern_subtable_fmt0_validate): Move some code to
+ `gxv_kern_subtable_fmt0_pairs_validate'.
+
+2006-12-22 David Turner <david@freetype.org>
+
+ * src/autofit/aflatin.c, src/truetype/ttgload.c: Remove compiler
+ warnings.
+
+ * builds/win32/visualc/freetype.vcproj: Add _CRT_SECURE_NO_DEPRECATE
+ to avoid deprecation warnings with Visual C++ 8.
+
+2006-12-16 Anders Kaseorg <anders@kaseorg.com>
+
+ * src/base/ftlcdfil.c (FT_Library_SetLcdFilter)
+ [FT_FORCE_LIGHT_LCD_FILTER]: Fix typo.
+
+2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * include/freetype/internal/services/svotval.h: Add `volatile' to
+ sync with the modification by Jens Claudius on 2006-08-22; cf.
+ http://cvs.savannah.gnu.org/viewcvs/freetype/freetype2/src/otvalid/otvmod.c?r1=1.4&r2=1.5
+
+2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c: Specialized for Mac OS X only.
+ * builds/unix/ftconfig.in: Fixed for ppc64 missing Carbon framework.
+ * builds/unix/configure.raw: Ditto. When explicit switches for
+ FSSpec/FSRef/QuickDraw/ATS availability are given to configure,
+ builds/mac/ftmac.c is used instead of default src/base/ftmac.c.
+
+2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/mac/ftmac.c: Copied src/base/ftmac.c for legacy system.
+ * builds/mac/FreeType.m68k_cfm.make.txt: Fix to use builds/mac/ftmac.c
+ instead of src/base/ftmac.c
+ * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
+ * builds/mac/FreeType.ppc_classic.make.txt: Ditto.
+ * builds/mac/FreeType.m68k_far.make.txt: Ditto, and exclude gxvalid.c
+ that cannot be built at present.
+
+2006-12-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftobjs.c: Improvement of resource fork handler for
+ POSIX, cf.
+ http://lists.gnu.org/archive/html/freetype-devel/2006-10/msg00025.html
+ (Mac_Read_sfnt_Resource): Count only `sfnt' resource of suitcase font
+ format or .dfont, to simulate the face index number counted by ftmac.c.
+ (IsMacResource): Return the number of scalable faces correctly.
+
+2006-12-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (version): Protect against `distclean' target.
+
+2006-12-09 Werner Lemberg <wl@gnu.org>
+
+ * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat'
+ or `type'.
+
+ * builds/freetype.mk (version): Extracted from freetype.h, using
+ GNU make's built-in string functions.
+ (refdoc): Use $(version) instead of static version number.
+
+2006-12-08 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (dist): Extract version number from freetype.h.
+
+2006-12-08 Vladimir Volovich <vvv@vsu.ru>
+
+ * src/tools/apinames.c (State): Remove final comma in structure --
+ xlc v5 under AIX 4.3 doesn't like this.
+
+2006-12-07 David Turner <david@freetype.org>
+
+ * src/autofit/afloader.c (af_loader_load_g): Small adjustment
+ to the spacing of auto-fitted glyphs. This only impacts rare
+ cases (e.g., Arial Bold at rather small character sizes).
+
+2006-12-03 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Add ttsbit0.c.
+
+2006-12-01 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): All Unicode strings are
+ encoded in UTF-16BE. Patch from Rajeev Pahuja <rpahuja@esri.com>.
+ (tt_name_entry_ascii_from_ucs4): Removed.
+
+
+ * include/freetype/ftxf86.h: Fix and extend comment so that it
+ appears in the documentation.
+
+ * include/freetype/ftchapters.h: Add `font_format' section.
+
+
+ * src/tools/docmaker/tohtml.py (HtmlFormatter::index_exit): Add link
+ to TOC in index page.
+
+2006-11-28 David Turner <david@freetype.org>
+
+ * src/smooth/ftgrays.c (gray_raster_render): Return 0 when we are
+ trying to render into a zero-width/height bitmap, not an error code.
+
+ * src/truetype/ttobjs.c (tt_face_init): Fix typo in previous patch.
+
+ * src/smooth/ftgrays.c: Remove hard-coded error values; use FreeType
+ ones instead.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_segments): Remove unused
+ variable.
+
+2006-11-26 Pierre Hanser <hanser@club-internet.fr>
+
+ * src/truetype/ttobjs.c (tt_face_init): Protect against NULL pointer.
+
+2006-11-25 David Turner <david@freetype.org>
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_points,
+ af_glyph_hints_dump_segments, af_glyph_hints_dumpedges) [!AF_DEBUG]:
+ Add stubs to link the `ftgrid' test program when debugging is
+ disabled in the auto-hinter.
+
+2006-11-23 David Turner <david@freetype.org>
+
+ * src/autofit/afhints.c, src/autofit/afhints.h, src/autofit/aflatin.c,
+ src/autofit/aftypes.h: Miscellaneous auto-hinter improvements.
+
+ * src/autofit/afhints.c (af_glyph_hints_dump_segments) [AF_DEBUG]:
+ Emit more sensible information.
+
+ * src/autofit/afhints.h (AF_SegmentRec): Add `height' member.
+
+ * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Improve
+ rounding of blue values.
+ (af_latin_hints_compute_segments): Hint segment heights.
+ (af_latin_hints_link_segments): Reduce `len_score' value.
+ (af_latin_hints_compute_edges): Increase `segment_length_threshold'
+ value and use `height' member for comparisons.
+ (af_latin_hint_edges): Extend logging message.
+ Improve handling of remaining edges.
+
+2006-11-22 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #15553.
+
+ * src/truetype/ttgload.c (tt_loader_init): Re-execute the CVT
+ program after a change from mono to grayscaling (and vice versa).
+ Use correct constant for comparison to get `exec->grayscale'.
+
+2006-11-18 Werner Lemberg <wl@gnu.org>
+
+ Because FT_Load_Glyph expects CID values for CID-keyed fonts, the
+ test for a valid glyph index must be deferred to the font drivers.
+ This patch fixes Savannah bug #18301.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Don't check `glyph_index'.
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/cff/cffgload.c
+ (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph),
+ src/pcf/pcfdrivr.c (PCF_Glyph_Load), src/pfr/pfrobjs.c
+ (pfr_slot_load), src/truetype/ttdriver.c (Load_Glyph),
+ src/type1/t1gload.c (T1_Load_Glyph), src/winfonts/winfnt.c
+ (FNT_Load_Glyph): Check validity of `glyph_index'.
+
+2006-11-13 David Turner <david@freetype.org>
+
+ * src/truetype/ttinterp.c (FIX_BYTECODE): Undefine. The interpreter
+ `enhancements' are still too buggy for general use.
+
+ * src/base/ftlcdfil.c: Add support for FT_FORCE_LIGHT_LCD_FILTER and
+ FT_FORCE_LEGACY_LCD_FILTER at compile time. Define these macros
+ when building the library to change the default LCD filter to be
+ used. This is only useful for experimentation.
+
+ * include/freetype/ftlcdfil.h: Update documentation.
+
+2006-11-10 David Turner <david@freetype.org>
+
+ * src/smooth/ftsmooth.c: API change for the LCD
+ filter. The FT_LcdFilter value is an enumeration describing which
+ filter to apply, with new values FT_LCD_FILTER_LIGHT and
+ FT_LCD_FILTER_LEGACY (the latter implements the LibXft original
+ algorithm which produces strong color fringes for everything
+ except very-well hinted text).
+
+ * include/freetype/ftlcdfil.h (FT_Library_SetLcdFilter): Change
+ second parameter to an enum type.
+
+ * src/base/ftlcdfil.c (USE_LEGACY): Define.
+ (_ft_lcd_filter): Rename to...
+ (_ft_lcd_filter_fir): This.
+ Update parameters.
+ (_ft_lcd_filter_legacy) [USE_LEGACY]: New filter function.
+ (FT_Library_Set_LcdFilter): Update parameters.
+ Handle new filter modes.
+
+ * include/internal/ftobjs.h: Include FT_LCD_FILTER_H.
+ (FT_Bitmap_LcdFilterFunc): Change third argument to `FT_Library'.
+ (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add filtering
+ callback and update other fields.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic)
+ [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Update.
+ Other minor improvements.
+
+ * src/autofit/aflatin.c: Various tiny improvements that drastically
+ improve the handling of serif fonts and of LCD/LCD_V hinting modes.
+ (af_latin_hints_compute_edges): Fix typo.
+ (af_latin_compute_stem_width): Take better care of diagonal stems.
+
+2006-11-09 David Turner <david@freetype.org>
+
+ * src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix
+ typo which created a variable-used-before-initialized bug.
+
+2006-11-07 Zhe Su <james.su@gmail.com>
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle vertical layout
+ also.
+
+2006-11-03 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c: Don't use `long long' but `FT_Int64'.
+
+2006-11-02 David Turner <david@freetype.org>
+
+ Add a few tweaks to better handle serif fonts.
+ Add more debugging messages.
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_edges): Ignore
+ segments that are less than 1.5 pixels high. This gets rid of
+ *many* corner cases with serifs.
+ (af_latin_align_linked_edge): Add logging message.
+ (af_latin_hint_edges): Use AF_HINTS_DO_BLUES.
+ Add logging messages.
+ Handle AF_EDGE_FLAG flag specially.
+
+ * src/autofit/afmodule.c [AF_DEBUG]: Add _af_debug,
+ _af_debug_disable_blue_hints, and _af_debug_hints variables.
+
+ * src/autofit/aftypes.h (AF_LOG) [AF_DEBUG]: Use _af_debug.
+ Update external declarations.
+ (af_corner_orientation, af_corner_is_flat): Replaced by...
+
+ * include/freetype/internal/ftcalc.h (ft_corner_orientation,
+ ft_corner_is_flat): These declarations.
+
+ * src/autofit/afangles.c (af_corner_orientation, af_corner_is_flat):
+ Comment out. Replaced by...
+
+ * src/base/ftcalc.h (ft_corner_orientation, ft_corner_is_flat):
+ These functions. Update all callers.
+ (FT_Add64) [!FT_LONG64]: Simplify.
+
+ * src/autofit/afhints.c: Include FT_INTERNAL_CALC_H.
+ (af_direction_compute): Add a missing FT_ABS call. This bug caused
+ production of garbage by missing lots of segments.
+
+ * src/autofit/afhints.h (AF_HINTS_DO_BLUES): New macro.
+
+ * src/autofit/afloader.c (af_loader_init, af_loader_done)
+ [AF_DEBUG]: Set _af_debug_hints.
+
+
+ * src/pshinter/pshalgo.c: Include FT_INTERNAL_CALC_H.
+ (psh_corner_is_flat, psh_corner_orientation): Use ft_corner_is_flat
+ and ft_corner_orientation.
+
+
+ * src/gzip/inftrees.c (huft_build): Remove compiler warning.
+
+2006-10-24 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_encoding_load): Remove unused variable.
+
+ * src/base/ftobjs.c (FT_Select_Charmap): Disallow FT_ENCODING_NONE
+ as argument.
+
+2006-10-23 Zhe Su <zsu@novell.com>
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Re-implement to
+ better deal with broken Asian fonts with strange glyphs, having
+ self-intersections and other peculiarities. The used algorithm is
+ based on the nonzero winding rule.
+
+2006-10-23 David Turner <david@freetype.org>
+
+ Speed up the CFF font loader. With some large CFF fonts,
+ FT_Open_Face is now more than three times faster.
+
+ * src/cff/cffload.c (cff_get_offset): Removed.
+ (cff_new_index): Inline functionality of `cff_get_offset'.
+ (cff_charset_compute_cids, cff_charset_free_cids): New functions.
+ (cff_charset_done): Call `cff_charset_free_cids'.
+ (cff_charset_load): Call `cff_charset_compute_cids'.
+ (cff_encoding_load) <Populate>: Ditto, to replace inefficient loop.
+
+ * src/sfnt/ttmtx.c (tt_face_load_hmtx): Replace calls to FT_GET_XXX
+ with FT_NEXT_XXX.
+
+
+ Speed up the Postscript hinter, with more than 100% speed increase
+ on my machine.
+
+ * src/pshinter/pshalgo.c (psh_corner_is_flat,
+ psh_corner_orientation): New functions.
+ (psh_glyph_compute_inflections): Merge loops for efficiency.
+ Use `psh_corner_orientation'.
+ (psh_glyph_init): Use `psh_corner_is_flat'.
+ (psh_hint_table_find_strong_point): Renamed to...
+ (psh_hint_table_find_strong_points): This.
+ Rewrite, adding argument to handle all points at once.
+ Update all callers.
+ (PSH_MAX_STRONG_INTERNAL): New macro.
+ (psh_glyph_interpolate_normal_points): Rewrite for efficiency.
+
+2006-10-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (FT_New_Face_From_FOND): Initialize variable
+ `error' with FT_Err_Ok.
+
+2006-10-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * docs/INSTALL.CROSS: New document file for cross-building.
+
+ * builds/unix/configure.raw: Preliminary cross-building support.
+ Find native C compiler and pass it by CC_BUILD, and
+ find suffix for native executable and pass it by EXEEXT_BUILD.
+ Also suffix for target executable is passed by EXEEXT.
+
+ * builds/unix/unix-cc.in (CCraw_build, E_BUILD): New variables to
+ build `apinames' which runs on building system. They are set by
+ CC_BUILD and EXEEXT_BUILD.
+
+ * builds/exports.mk (APINAMES_EXE): Change the extension for
+ apinames from the suffix for target (E) to that for building host
+ (E_BUILD).
+
+2006-10-12 Werner Lemberg <wl@gnu.org>
+
+ * docs/INSTALL.UNX, docs/UPGRADE.UNX: Renamed to...
+ * docs/INSTALL.UNIX, docs/UPGRADE.UNIX: This. Update all documents
+ which reference those files.
+
+2006-10-12 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * builds/unix/configure.raw (FT2_EXTRA_LIBS): New variable. It is
+ embedded in freetype2.pc and freetype-config. Use it to record
+ Carbon dependency of MacOSX.
+
+ * builds/unix/freetype2.in: Embed FT2_EXTRA_LIBS.
+
+ * builds/unix/freetype-config.in: Ditto.
+
+2006-10-11 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): Define for
+ development.
+
+2006-10-03 Jens Claudius <jens.claudius@yahoo.com>
+
+ * include/freetype/config/ftstdlib.h: Cast away volatileness from
+ argument to ft_setjmp.
+
+ * include/freetype/internal/ftvalid.h: Add comment that
+ ft_validator_run must not be used.
+
+2006-10-01 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftbase.c: Undo change from 2006-09-30.
+
+ * src/base/rules.mk (BASE_SRC): Remove `ftlcdfil.c'.
+
+2006-09-30 David Turner <david@freetype.org>
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec):
+ s/unpatented_hinting/ignore_unpatented_hinter/.
+ Update all callers.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Refine the algorithm whether
+ auto-hinting shall be used or not.
+
+ * src/truetype/ttobjs.c (tt_face_init): Ditto.
+
+2006-09-30 Werner Lemberg <wl@gnu.org>
+
+ * src/base/rules.mk (BASE_SRC): Remove `ftapi.c' (which is no longer
+ in use).
+
+ * src/base/ftbase.c: Include `ftlcdfil.c'.
+
+2006-09-29 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Fix algorithm for
+ overlapping segments. Bug reported by Stefan Koch.
+
+2006-09-28 David Turner <david@freetype.org>
+
+ Fix a bug in the automatic unpatented hinting support which prevents
+ normal bytecode hinting to work properly.
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec):
+ s/force_autohint/unpatented_hinting/. Update all callers.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Updated code.
+
+ * src/autofit/aftypes.h (AF_DEBUG): Undefine to get rid of traces.
+
+2006-09-27 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h (FT_FREETYPE_PATCH): Set to 2.
+
+
+ Add a new API to support color filtering of subpixel glyph bitmaps.
+ In a default build, the function `FT_Library_SetLcdFilter' returns
+ `FT_Err_Unimplemented_Feature'; you need to #define
+ FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h to compile the
+ real implementation.
+
+ * include/freetype/ftlcdfil.h, src/base/ftlcdfil.c: New files.
+
+ * include/freetype/internal/ftobjs.h (FT_Bitmap_LcdFilterFunc): New
+ typedef.
+ (FT_LibraryRec) [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: New members
+ `lcd_filter_weights' and `lcd_filter'.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove arguments
+ `hmul' and `vmul'.
+
+ Handle subpixel rendering.
+ Simplify function.
+ (ft_smooth_render_lcd): Use `FT_RENDER_MODE_LCD'.
+ (ft_smooth_render_lcd_v): Use `FT_RENDER_MODE_LCD_V'.
+
+ * include/freetype/config/ftheader.h (FT_LCD_FILTER_H): New macro,
+ pointing to <freetype/ftlcdfil.h>.
+
+ * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC),
+ vms_make.com: Add `ftlcdfil.c' to the list of compiled source files.
+
+ * modules.cfg (BASE_EXTENSIONS): Add ftlcdfil.c.
+
+2006-09-26 David Bustin
+
+ * src/pfr/pfrobjs.c (pfr_face_get_kerning): Skip adjustment bytes
+ correctly. Reported as Savannah bug #17843.
+
+2006-09-26 David Turner <david@freetype.org>
+
+ * src/autofit/afhints.h (AF_HINTS_DO_HORIZONTAL,
+ AF_HINTS_DO_VERTICAL, AF_HINTS_DO_ADVANCE): New macros to disable
+ horizontal and vertical hinting for the purpose of debugging the
+ auto-fitter.
+
+ * src/autofit/afmodule.c (_af_debug_disable_horz_hints,
+ _af_debug_disable_vert_hints) [AF_DEBUG]: New global variables.
+
+ * src/autofit/aftypes.h [AF_DEBUG]: Declare above variables.
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (FT_CONFIG_OPTION_SUBPIXEL_RENDERING): New macro to control whether
+ we want to compile LCD-optimized rendering code (à la ClearType) or
+ not. The macro *must* be disabled in default builds of the library
+ for patent reasons.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Disable
+ LCD-specific rendering when FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ isn't defined at compile time. This only changes the content of the
+ rendered glyph to match the one of normal gray-level rendering,
+ hence clients should not need to be modified.
+
+ * docs/CHANGES: Updated.
+
+2006-09-18 Garrick Meeker <garrick@digitalanarchy.com>
+
+ * src/base/ftmac.c (FT_New_Face_From_FOND): Fall back to SFNT if
+ LWFN fails and both are available.
+
+2006-09-11 David Turner <david@freetype.org>
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): Support some fonts which
+ report their English names through an Apple Roman
+ (platform,encoding) pair, with language_id != English.
+
+ If the font uses another name entry with language_id == English, it
+ will be selected correctly, though.
+
+ * src/truetype/ttobjs.c (tt_face_init): Add unpatented hinting
+ selection for `mingli.ttf'.
+
+2006-09-05 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttpload.c (tt_face_load_hdmx): Handle `record_size'
+ values which have the upper two bytes set to 0xFF instead of 0x00
+ (as it happens in at least two CJKV fonts, `HAN NOM A.ttf' and
+ `HAN NOM B.ttf').
+
+ * src/smooth/ftgrays.c [GRAYS_USE_GAMMA]: Really remove all code.
+
+2006-09-05 David Turner <david@freetype.org>
+
+ Minor source cleanups and optimizations.
+
+ * src/smooth/ftgrays.c (GRAYS_COMPACT): Removed.
+ (TRaster): Remove `count_ex' and `count_ey'.
+ (gray_find_cell): Remove 2nd and 3rd argument.
+ (gray_alloc_cell): Merged with `gray_find_cell'.
+ (gray_record_cell): Simplify.
+ (gray_set_cell): Rewrite.
+ (gray_start_cell): Apply offsets to `ras.ex' and `ras.ey'.
+ (gray_render_span): Don't use FT_MEM_SET for small values.
+ (gray_dump_cells) [DEBUG_GRAYS]: New function.
+ (gray_sweep): Avoid buffer overwrites when to drawing the end of a
+ bitmap scanline.
+ (gray_convert_glyph): Fix speed-up.
+
+2006-09-04 David Turner <david@freetype.org>
+
+ * src/smooth/ftgrays.c (gray_convert_glyphs): Make it work with
+ 64bit processors.
+
+2006-09-03 Werner Lemberg <wl@gnu.org>
+
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
+ * src/smooth/ftgrays.c (gray_record_cell): Remove shadowing
+ variable declaration.
+ (gray_convert_glyph): Fix compiler warnings.
+
+2006-09-01 David Turner <david@freetype.org>
+
+ * src/truetype/ttobjs.c (tt_face_init): Update the TrueType loader
+ to recognize a few fonts that require the automatic unpatented
+ loader.
+
+ * src/smooth/ftgrays.c: Optmize the performance of the anti-aliased
+ rasterizer. The speed improvement is between 15% and 25%, depending
+ on the font data.
+
+ (GRAYS_USE_GAMMA, GRAYS_COMPACT): Removed, and all associated code.
+ (TCell): Redefine.
+ (TRaster): New members `buffer', `buffer_size', `ycells', `ycount'.
+ (gray_init_cells): Updated.
+ (gray_find_cell, gray_alloc_cell): New functions.
+ (gray_record_cell): Rewritten to use `gray_find_cell' and
+ `gray_alloc_cell'.
+ (PACK, LESS_THAN, SWAP_CELLS, DEBUG_SORT, QUICK_SORT, SHELL_SORT,
+ QSORT_THRESHOLD):
+ Removed.
+ (gray_shell_sort, gray_quick_sort, gray_check_sort,
+ gray_dump_cells): Removed.
+ (gray_sweep): Rewritten.
+ (gray_convert_glyph): Rewrite code which used one of the sorting
+ functions.
+ (gray_raster_render): Updated.
+
+2006-08-29 Dr. Werner Fink <werner@suse.de>
+
+ * configure: Make it possible to handle configure options which
+ have strings containing spaces.
+
+2006-08-27 David Turner <david@freetype.org>
+
+ * include/freetype/config/ftoption.h (TT_USE_BYTECODE_INTERPRETER):
+ New macro, defined if either TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ or TT_CONFIG_OPTION_UNPATENTED_HINTING is defined.
+
+ * include/freetype/internal/ftcalc.h, src/base/ftcalc.c,
+ src/truetype/truetype.c, src/truetype/ttdriver.c,
+ src/truetype/ttgload.c, src/truetype/ttgload.h,
+ src/truetype/ttinterp.c, src/truetype/ttobjs.c,
+ src/truetype/ttobjs.h, src/truetype/ttpload.c, src/type42/t42drivr.c:
+ s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
+ member `force_autohint'.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Use `force_autohint'.
+
+ * src/truetype/ttobjs.c (tt_face_init): Prepare code for testing
+ against a list of font names which need the bytecode interpreter.
+
+2006-08-27 Jens Claudius <jens.claudius@yahoo.com>
+
+ Fix miscellaneous compiler warnings.
+
+ * include/freetype/internal/ftobjs.h: Close comment with `*/' to
+ avoid `/* in comment' compiler warning.
+
+ * src/base/ftdbgmem.c (ft_mem_table_get_source): Turn cast
+ `(FT_UInt32)(void*)' into `(FT_UInt32)(FT_PtrDist)(void*)' since on
+ 64-bit platforms void* is larger than FT_UInt32.
+
+ * src/base/ftobjs.c (t_validator_error): Cast away
+ volatileness of argument to ft_longjmp. Spotted by Werner
+ `Putzfrau' Lemberg.
+
+ * src/bdf/bdflib.c (bdf_load_font): Initialize local
+ variable `lineno'.
+
+ * src/gxvalid/gxvmod.c (classic_kern_validate): Mark local variable
+ `error' as volatile.
+
+2006-08-27 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ftconfig.in: Synchronize with main ftconfig.h.
+ Reported by Jens.
+
+2006-08-22 Jens Claudius <jens.claudius@yahoo.com>
+
+ Fix for previous commit, which caused many compiler warnings/errors
+ about addresses of volatile objects passed as function arguments as
+ non-volatile pointers.
+
+ * include/freetype/internal/ftvalid.h: Make FT_Validator typedef a
+ pointer to a volatile object.
+
+ * src/gxvalid/gxvmod.c (gxv_load_table): Make function argument
+ `table' a pointer to a volatile object.
+
+ * src/otvalid/otvmod.c (otv_load_table): Make function argument
+ `table' a pointer to a volatile object.
+
+2006-08-18 Jens Claudius <jens.claudius@yahoo.com>
+
+ * src/gxvalid/gxvmod.c (GXV_TABLE_DECL): Mark local variable `_sfnt'
+ as volatile since it must keep its value across a call to ft_setjmp.
+ (gxv_validate): Same for local variables `memory' and `valid'.
+ (classic_kern_validate): Same for local variables `memory',
+ `ckern', and `valid'.
+
+ * src/otvalid/otvmod.c (otv_validate): Same for function parameter
+ `face' and local variables `base', `gdef', `gpos', `gsub', `jstf',
+ and 'valid'.
+
+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for local variable
+ `cmap'.
+
+2006-08-16 David Turner <david@freetype.org>
+
+ * src/cid/cidgload.c (cid_slot_load_glyph): Remove compiler
+ warnings.
+
+ * src/base/ftobjs.c (ft_validator_run): Disable function; it is
+ buggy by design. Always return -1.
+
+
+ Improvements to native TrueType hinting. This is a first try,
+ controlled by the FIX_BYTECODE macro in src/truetype/ttinterp.c.
+
+ * include/freetype/internal/ftgloadr.h (FT_GlyphLoadRec): Add member
+ `extra_points2'.
+
+ * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add member
+ `orus'.
+
+ * src/base/ftgloadr.c (FT_GlyphLoader_Reset,
+ FT_GlyphLoader_Adjust_Points, FT_GlyphLoader_CreateExtra,
+ FT_GlyphLoader_CheckPoints, FT_GlyphLoader_CopyPoints): Updated to
+ handle `extra_points2'.
+
+ * src/truetype/ttgload.c (tt_prepare_zone): Handle `orus'.
+ Remove compiler warning.
+ (cur_to_arg): Remove macro.
+ (TT_Hint_Glyph): Updated.
+ (TT_Process_Simple_Glyph): Handle `orus'.
+
+ * src/truetype/ttinterp.c (FIX_BYTECODE): New macro.
+ (Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Handle `orus'.
+ (LOC_Ins_IUP): Renamed to...
+ (IUP_WorkerRec): This.
+ Add `orus' member.
+ (Shift): Renamed to...
+ (_iup_worker_shift): This.
+ Updated.
+ (Interp): Renamed to...
+ (_iup_worker_interpolate): This.
+ Updated to handle `orus'.
+ (Ins_IUP): Updated.
+
+ * src/truetype/ttobjs.c (tt_glyphzone_done, tt_glyphzone_new):
+ Handle `orus'.
+
+2006-08-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * modules.cfg (BASE_EXTENSIONS): Compile in ftgxval.c by default to
+ build ftvalid in ft2demos. This has been inadvertedly changed
+ 2006-08-13.
+
+2006-08-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ `ft_validator_run' wrapping `setjmp' can cause a crash, as found by
+ Jens:
+ http://lists.gnu.org/archive/html/freetype-devel/2006-08/msg00004.htm.
+
+ * src/otvalid/otvmod.c: Replace `ft_validator_run' by `ft_setjmp'.
+ It reverts the change introduced on 2005-08-20.
+
+ * src/gxvalid/gxvmod.c: Ditto.
+
+2006-08-13 Jens Claudius <jens.claudius@yahoo.com>
+
+ * finclude/freetype/internal/psaux.h: (T1_TokenType): Add
+ T1_TOKEN_TYPE_KEY.
+ (T1_FieldRec): Add `dict'.
+ (T1_FIELD_DICT_FONTDICT, T1_FIELD_DICT_PRIVATE): New macros.
+ (T1_NEW_XXX, T1_FIELD_XXX): Update to take the dictionary where a PS
+ keyword is expected as an additional argument.
+
+ * src/cid/cidload.c: (cid_field_records): Adjust invocations of
+ T1_FIELD_XXX.
+
+ * src/cid/cidtoken.h: Adjust invocations of T1_FIELD_XXX.
+
+ * src/psaux/psobjs.c: Add macro FT_COMPONENT for tracing.
+ (ps_parser_to_token): Report a PostScript key as T1_TOKEN_TYPE_KEY,
+ not T1_TOKEN_TYPE_ANY.
+ (ps_parser_load_field): Make sure a token that should be a string or
+ name is really a string or name.
+ Avoid memory leak if a keyword has been already encountered and its
+ value is overwritten.
+ * src/type1/t1load.c: (t1_keywords): Adjust invocations of
+ T1_FIELD_XXX.
+ (parse_dict): Ignore keywords that occur in the wrong dictionary
+ (e.g., in `Private' instead of `FontDict').
+
+ * src/type1/t1tokens.h: Adjust invocations of T1_FIELD_XXX.
+
+ * src/type42/t42parse.c: (t42_keywords): Adjust invocations of
+ T1_FIELD_XXX.
+
+2006-07-18 Jens Claudius <jens.claudius@yahoo.com>
+
+ Move creation of field `buildchar' of T1_DecoderRec out of
+ `t1_decoder_init' and let the caller of `t1_decoder_init' take care
+ of it.
+
+ Call the finisher for T1_Decoder in `cid_face_compute_max_advance'
+ and `T1_Compute_Max_Advance'.
+
+ * include/freetype/internal/psaux.h (T1_DecoderRec): Remove field
+ `face', add `len_buildchar'.
+
+ * include/freetype/internal/t1types.h (T1_FaceRec): Add field
+ `buildchar'.
+
+ * src/cid/cidgload.c (cid_face_compute_max_advance): Call finisher
+ for T1_Decoder.
+ (cid_slot_load_glyph): Do not ignore failure when initializing the
+ T1_Decoder.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Updated.
+ (t1_decoder_init): Remove initialization of fields `buildchar' and
+ `len_buildchar'.
+ (t1_decoder_done): Remove deallocation of field `buildchar'.
+
+ * freetype/src/type1/t1gload.c (T1_Compute_Max_Advance): Initialize
+ T1_Decoder's `buildchar' and `len_buildchar'; call finisher for
+ T1_Decoder.
+ (T1_Load_Glyph): Initialize T1_Decoder's `buildchar' and
+ `len_buildchar'; make sure to call finisher for T1_Decoder even in
+ case of error.
+
+ * src/type1/t1load.c (T1_Open_Face): Allocate new field `buildchar'
+ of T1_FaceRec.
+
+ * src/type1/t1objs.c (T1_Face_Done): Free new field `buildchar' of
+ T1_FaceRec.
+
+2006-07-14 Jens Claudius <jens.claudius@yahoo.com>
+
+ * include/freetype/internal/psaux.h: New macros IS_PS_NEWLINE,
+ IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT,
+ and IS_PS_BASE85 (from src/psaux/psconv.h).
+ (T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER,
+ T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND.
+ (T1_DecoderRec): New fields `buildchar' and `face'.
+ (IS_PS_TOKEN): New macro.
+
+ * include/freetype/internal/t1types.h (T1_FaceRec): New fields
+ `ndv_idx', `cdv_idx', and `len_buildchar'.
+
+ * include/freetype/t1tables.h (PS_BlendRec): New fields
+ `default_design_vector' and `num_default_design_vector'.
+
+ * src/psaux/psconv.h: Move macros IS_PS_NEWLINE, IS_PS_SPACE,
+ IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and
+ IS_PS_BASE85 to include/freetype/internal/psaux.h.
+
+ * src/psaux/psobjs.c (ps_parser_to_token_array): Allow `token'
+ argument to be NULL if we want only to count the number of tokens.
+ (ps_tocoordarray): Allow `coords' argument to be NULL if we just
+ want to skip the array.
+ (ps_tofixedarray): Allow `values' argument to be NULL if we just
+ want to skip the array.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add support
+ for (partially commented out) othersubrs 19-25, 27, and 28.
+ (t1_decoder_init): Initialize new fields `face' and `buildchar'.
+ (t1_decoder_done): Release new field `buildchar'.
+
+ * src/type1/t1load.c (parse_buildchar, parse_private): New
+ functions.
+ (t1_keywords): Register them.
+ (t1_allocate_blend): Updated.
+ (t1_load_keyword): Handle field types T1_FIELD_LOCATION_LOADER,
+ T1_FIELD_LOCATION_FACE and T1_FIELD_LOCATION_BLEND.
+ (parse_dict): Remove `keyword_flags' argument.
+ Use new macro IS_PS_TOKEN.
+ Changed function so that later PostScript definitions override
+ earlier ones.
+ (t1_init_loader): Initialize new field `keywords_encountered'.
+ (T1_Open_Face): Initialize new fields `ndv_idx', `cdv_idx', and
+ `len_buildchar'.
+ Remove `keywords_flags'.
+
+ * src/type1/t1load.h (T1_LoaderRect): New field
+ `keywords_encountered'.
+ (T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros.
+
+ * src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: New
+ entries for parsing /NDV, /CDV, and /DesignVector.
+
+2006-07-07 Werner Lemberg <wl@gnu.org>
+
+ Add many checks to protect against malformed PCF files.
+
+ * src/pcf/pcfdrivr.c (PCF_Face_Done): Protect against NULL pointers.
+ (PCF_Face_Init): Add calls to PCF_Face_Done in case of errors.
+
+ * src/pcf/pcfread.c (pcf_read_TOC): Protect against malformed table
+ data and check that tables don't overlap (using a simple
+ bubblesort).
+ (PCF_METRIC_SIZE, PCF_COMPRESSED_METRIC_SIZE, PCF_PROPERTY_SIZE):
+ New macros which give the size of data structures in the data
+ stream.
+ (pcf_get_properties): Use rough estimates to get array size limits.
+ Assign `face->nprops' and `face->properties' earlier so that a call
+ to PCF_Face_Done can do the clean-up in case of error.
+ Protect against invalid string offsets.
+ (pcf_get_metrics): Clean up code.
+ Adjust tracing message levels.
+ Use rough estimate to get array size limit.
+ (pcf_get_bitmaps): Clean up code.
+ Adjust tracing message levels.
+ Use rough estimates to get offset limits.
+ (pcf_get_encodings): Adjust tracing message level.
+ (pcf_get_accel): Clean up code.
+
+2006-06-26 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Handle fonts correctly which
+ don't have a POINT_SIZE property. This fixes Savannah bug #16914.
+
+2006-06-26 Jens Claudius <jens.claudius@yahoo.com>
+
+ * src/psaux/t1decode.c (T1_Operator, t1_args_count): Add opcode 15.
+ (t1_decoder_parse_charstrings): Operator with
+ opcode 15 pops its two arguments.
+ Handle the case where the pops of an othersubr may be part of a
+ subroutine.
+ Handle unknown othersubrs gracefully: count their operands and let
+ the following pop operators push the operands as the results onto
+ the Type1 stack.
+ Improve handling of setcurrentpoint opcode.
+
+2006-06-25 Jens Claudius <jens.claudius@yahoo.com>
+
+ The Type 1 parser now skips over top-level procedures as required
+ for a `Simplified Parser'. This makes the parser more robust as it
+ doesn't poke around in PostScript code. Additionally, it makes the
+ FontDirectory hackery in src/type1/t1load.c unnecessary.
+
+ * src/psaux/psobjs.c (IS_OCTAL_DIGIT): New macro.
+ (skip_literal_string): Add FT_Error as return value.
+ Handle escapes better.
+ (skip_string): Add FT_Error as return value.
+ Don't set `parser->error' but return error code directly.
+ (skip_procedure): New function.
+ (ps_parser_skip_PS_token): Handle procedures.
+ Update code.
+ (ps_parser_to_token): Update code.
+ (ps_parser_load_field_table): Handle bbox entries also.
+
+ * src/type1/t1load.c (parse_dict): Remove FontDirectory hackery.
+ Add commented-out code for synthetic fonts.
+
+2006-06-24 Eugeniy Meshcheryakov <eugen@univ.kiev.ua>
+
+ Fix two hinting bugs as reported in
+ http://lists.gnu.org/archive/html/freetype-devel/2006-06/msg00057.html.
+
+ * include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add
+ `first_point' member.
+
+ * src/truetype/ttgload.c (tt_prepare_zone): Initialize
+ `first_point'.
+ (TT_Process_Composite_Glyph): Always untouch points.
+
+ * src/truetype/ttinterp.c (Ins_SHC): Fix computation of
+ `first_point' and `last_point' in case of composite glyphs.
+ (Ins_IUP): Fix computation of `end_point'.
+
+2006-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Insert EndianS16_BtoN and EndianS32_BtoN as workaround for Intel
+ Mac. The original patch was written by David Sachitano and Lawrence
+ Coopet, and modified by Sean McBride for MPW compatibility. Only
+ required data are converted; unused data are left in big endian.
+
+ * src/base/ftmac.c: Include <Endian.h> for byteorder macros for non
+ Mac OS X platforms.
+ (OS_INLINE): Undefine before definition.
+ (count_faces_sfnt): Insert EndianS16_BtoN to parse the header of
+ FontAssociation table in FOND resource.
+ (count_faces_scalable): Insert EndianS16_BtoN to parse the header
+ and fontSize at each entry of FontAssociation table in FOND
+ resource.
+ (parse_fond): Insert EndianS16_BtoN and EndianS32_BtoN to parse
+ ffStylOff of FamilyRecord header of FOND resource, the header,
+ fontSize, fontID at each entry of FontAssociation table, and
+ StyleMapping table.
+ (count_faces): Call `HUnlock' after all FOND utilization.
+
+2006-06-08 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Public API of TrueTypeGX, OpenType, and classic kern table validator
+ should return `FT_Err_Unimplemented_Feature' if validation service
+ is unavailable (disabled in `modules.cfg'). It is originally
+ suggested by David Turner, cf.
+ http://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00078.html
+
+ * src/base/ftgxval.c (FT_TrueTypeGX_Validate): Return
+ FT_Err_Unimplemented_Feature if TrueTypeGX validation service is
+ unavailable.
+ (FT_ClassicKern_Validate): Return FT_Err_Unimplemented_Feature if
+ classic kern table validation service is unavailable.
+
+ * src/base/ftotval.c (FT_OpenType_Validate): Return
+ FT_Err_Unimplemented_Feature if OpenType validation service is
+ unavailable.
+
+2006-06-08 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdflib.c (bdf_load_font): Fix memory leaks in case of
+ errors.
+
+2006-06-07 David Turner <david@freetype.org>
+
+ * src/type1/t1afm.c (KERN_INDEX): Make it more robust.
+ (T1_Read_Metrics): Fix memory leak which happened when the metrics
+ file doesn't have kerning pairs. This fixes Savannah bug #16768.
+
+2006-06-06 David Turner <david@freetype.org>
+
+ Fix memory leak described in Savannah bug #16759.
+
+ We change `ps_unicodes_init' so that it also takes a
+ `free_glyph_name' callback to release the glyph names returned by
+ `get_glyph_name'
+
+ * include/freetype/internal/services/svpscmap.h (PS_Glyph_NameFunc):
+ Renamed to ...
+ (PS_GetGlyphNameFunc): This.
+ (PS_FreeGlyphNameFunc): New typedef.
+ (PS_Unicodes_InitFunc): Add variable for PS_FreeGlyphNameFunc.
+
+ * src/cff/cffcmap.c (cff_sid_to_glyph_name): Use `TT_Face' for first
+ argument.
+ (cff_sid_free_glyph_name): New function.
+ (cff_cmap_unicode_init): Updated.
+
+ * src/psaux/t1cmap.c (t1_cmap_unicode_init): Updated.
+
+ * src/psnames/psmodule.c (ps_unicodes_init): Add variable for
+ PS_FreeGlyphNameFunc and use it.
+
+
+2006-06-04 David Turner <david@freetype.org>
+
+ * src/base/ftutil.c (ft_mem_qrealloc): Fix the function to accept
+ `item_size == 0' as well -- though this sounds weird, it can
+ theoretically happen. This fixes Savannah bug #16669.
+
+ * src/pfr/pfrobjs.c (pfr_face_init): Fix the computation
+ of `face->num_glyphs' which missed the last glyph, due to
+ the offset-by-1 computation, since the PFR format doesn't
+ guarantee that glyph index 0 corresponds to the `missing
+ glyph. This fixes Savannah bug #16668.
+
+2006-05-25 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/unix-cc.in (LINK_LIBRARY): Don't comment out
+ `-no-undefined'. Reported by Christian Biesinger.
+
+2006-05-19 Brian Weed <bw@imaginengine.com>
+
+ * builds/win32/visualc/freetype.dsp: Release libraries no longer
+ have debug information, and debug libraries use `C7 compatible'
+ debug info.
+
+2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ Apply patch by Derek Clegg to fix two memory leaks in the MacOS
+ resource fork handler. This fixes Savannah bug #16631.
+
+ * src/base/ftobjs.c (load_face_in_embedded_rfork): Replace
+ `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak.
+
+ * src/base/ftrfrk.c (raccess_guess_linux_double_from_file_name):
+ Replace `FT_Stream_Close' by `FT_Stream_Free' to fix memory leak.
+
+2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * build/unix/configure.raw: Add a fallback to disable Carbon
+ dependency, if configured with no options on Mac OS X.
+
+2006-05-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (open_face_from_buffer): Deallocate stream when
+ its content cannot be parsed as supported font. This fixes
+ the second part of Savannah bug #16590.
+
+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.
+
+2006-05-17 David Turner <david@freetype.org>
+
+ This is a major patch used to drastically improve the performance of
+ loading glyphs. This both speeds up loading the glyph vectors
+ themselves and the auto-fitter module.
+
+ We now use inline assembler code with GCC to implement `FT_MulFix',
+ which is probably the most important function related to the
+ engine's performance.
+
+ The resulting speed-up is about 25%.
+
+
+ * include/freetype/internal/tttypes.h (TT_LoaderRec): Add fields
+ `cursor' and `limit'.
+
+ * src/autofit/afangles.c (af_corner_is_flat, af_corner_orientation):
+ New functions.
+ (AF_ATAN_BITS, af_arctan, af_angle_atan): Comment out.
+ [TEST]: Remove.
+
+ * src/autofit/afcjk.c (AF_Script_UniRangeRec): Comment out test
+ code.
+
+ * src/autofit/afhints.c (af_axis_hints_new_segment): Don't call
+ `FT_ZERO'
+ (af_direction_compute, af_glyph_hints_compute_inflections): Rewritten.
+ (af_glyph_hints_reload: Rewrite recognition of weak points.
+
+ * src/autofit/aflatin.c (af_latin_hints_compute_segments): Move
+ constant values out of the loops.
+
+ * src/autofit/aftypes.h: Updated.
+
+ * src/base/ftcalc.c (FT_MulFix): Use inline assembler code.
+
+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use vector
+ product to get orientation.
+
+ * src/gzip/ftgzip.c (ft_get_uncompressed_size): New function.
+ (FT_Stream_OpenGzip): Use it to handle small files directly in
+ memory.
+
+ * src/psaux/psconv.c (PS_Conv_ASCIIHexDecode, PS_ConvEexecDecode):
+ Improve performance.
+
+ * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Set `cursor' and
+ `limit'.
+
+ (TT_Load_Glyph_Header, TT_Load_Simple_Glyph,
+ TT_Load_Composite_Glyph): Updated. Add threshold to protect against
+ exceedingly large values of number of contours. Speed up by
+ reducing the number of loops.
+
+ * src/type1/t1gload.c (T1_Load_Glyph): Don't apply unit matrix.
+
+
+ * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Change the threshold
+ used to detect rogue clients from 4 to 16. This is to prevent some
+ segmentation faults with fonts like `KozMinProVI-Regular.otf' which
+ comes from the Japanese Adobe Reader Asian Font pack.
+
+2007-05-17 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_font_done): Deallocate subfont array. This
+ fixes the first part of Savannah bug #16590.
+
+2006-05-16 Werner Lemberg <wl@gnu.org>
+
+ * docs/PROBLEMS: Updated icl issues.
+
+----------------------------------------------------------------------------
+
+Copyright 2006, 2007, 2008, 2009, 2010 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used, 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/3party/freetype/Jamfile b/3party/freetype/Jamfile
index 76ee0f46e6..94d77f9035 100644
--- a/3party/freetype/Jamfile
+++ b/3party/freetype/Jamfile
@@ -1,6 +1,6 @@
-# FreeType 2 src Jamfile
+# FreeType 2 top Jamfile.
#
-# Copyright 2001, 2002 by
+# Copyright 2001-2011 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -9,17 +9,196 @@
# indicate that you have read the license and understand and accept it
# fully.
-SubDir FT2_TOP $(FT2_SRC_DIR) ;
-# The file <freetype/internal/internal.h> is used to define macros that are
+# The HDRMACRO is already defined in FTJam and is used to add
+# the content of certain macros to the list of included header
+# files.
+#
+# We can compile FreeType 2 with classic Jam however thanks to
+# the following code
+#
+if ! $(JAM_TOOLSET)
+{
+ rule HDRMACRO
+ {
+ # nothing
+ }
+}
+
+
+# We need to invoke a SubDir rule if the FT2 source directory top is not the
+# current directory. This allows us to build FreeType 2 as part of a larger
+# project easily.
+#
+if $(FT2_TOP) != $(DOT)
+{
+ SubDir FT2_TOP ;
+}
+
+
+# The following macros define the include directory, the source directory,
+# and the final library name (without library extensions). They can be
+# replaced by other definitions when the library is compiled as part of
+# a larger project.
+#
+
+# Name of FreeType include directory during compilation.
+# This is relative to FT2_TOP.
+#
+FT2_INCLUDE_DIR ?= include ;
+
+# Name of FreeType source directory during compilation.
+# This is relative to FT2_TOP.
+#
+FT2_SRC_DIR ?= src ;
+
+# Name of final library, without extension.
+#
+FT2_LIB ?= $(LIBPREFIX)freetype ;
+
+
+# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
+# This is prepended to FT2_INCLUDE_DIR. It can be used to specify
+# the location of a custom <ft2build.h> which will point to custom
+# versions of `ftmodule.h' and `ftoption.h', for example.
+#
+FT2_BUILD_INCLUDE ?= ;
+
+# The list of modules to compile on any given build of the library.
+# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
+#
+# IMPORTANT: You'll need to change the content of `ftmodule.h' as well
+# if you modify this list or provide your own.
+#
+FT2_COMPONENTS ?= autofit # auto-fitter
+ base # base component (public APIs)
+ bdf # BDF font driver
+ cache # cache sub-system
+ cff # CFF/CEF font driver
+ cid # PostScript CID-keyed font driver
+ pcf # PCF font driver
+ bzip2 # support for bzip2-compressed PCF font
+ gzip # support for gzip-compressed PCF font
+ lzw # support for LZW-compressed PCF font
+ pfr # PFR/TrueDoc font driver
+ psaux # common PostScript routines module
+ pshinter # PostScript hinter module
+ psnames # PostScript names handling
+ raster # monochrome rasterizer
+ smooth # anti-aliased rasterizer
+ sfnt # SFNT-based format support routines
+ truetype # TrueType font driver
+ type1 # PostScript Type 1 font driver
+ type42 # PostScript Type 42 (embedded TrueType) driver
+ winfonts # Windows FON/FNT font driver
+ ;
+
+
+# Don't touch.
+#
+FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
+ [ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
+
+FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
+
+# Location of API Reference Documentation
+#
+if $(DOC_DIR)
+{
+ DOC_DIR = $(DOCDIR:T) ;
+}
+else
+{
+ DOC_DIR = docs/reference ;
+}
+
+
+# Only used by FreeType developers.
+#
+if $(DEBUG_HINTER)
+{
+ CCFLAGS += -DDEBUG_HINTER ;
+}
+
+
+# We need `freetype2/include' in the current include path in order to
+# compile any part of FreeType 2.
+#: updating documentation for upcoming release
+
+HDRS += $(FT2_INCLUDE) ;
+
+
+# We need to #define FT2_BUILD_LIBRARY so that our sources find the
+# internal headers
+#
+DEFINES += FT2_BUILD_LIBRARY ;
+
+# Uncomment the following line if you want to build individual source files
+# for each FreeType 2 module. This is only useful during development, and
+# is better defined as an environment variable anyway!
+#
+# FT2_MULTI = true ;
+
+
+# The file <freetype/config/ftheader.h> is used to define macros that are
# later used in #include statements. It needs to be parsed in order to
# record these definitions.
#
-HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) internal internal.h ] ;
+HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
+HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
+
+
+# Now include the Jamfile in `freetype2/src', used to drive the compilation
+# of each FreeType 2 component and/or module.
+#
+SubInclude FT2_TOP $(FT2_SRC_DIR) ;
+
+# Handle the generation of the `ftexport.sym' file which contain the list
+# of exported symbols. This can be used on Unix by libtool.
+#
+SubInclude FT2_TOP $(FT2_SRC_DIR) tools ;
+
+rule GenExportSymbols
+{
+ local apinames = apinames$(SUFEXE) ;
+ local headers = [ Glob $(2) : *.h ] ;
+
+ LOCATE on $(1) = $(ALL_LOCATE_TARGET) ;
+
+ APINAMES on $(1) = apinames$(SUFEXE) ;
+
+ Depends $(1) : $(apinames) $(headers) ;
+ GenExportSymbols1 $(1) : $(headers) ;
+ Clean clean : $(1) ;
+}
+
+actions GenExportSymbols1 bind APINAMES
+{
+ $(APINAMES) $(2) > $(1)
+}
+
+GenExportSymbols ftexport.sym : include/freetype include/freetype/cache ;
+
+# Test files (hinter debugging). Only used by FreeType developers.
+#
+if $(DEBUG_HINTER)
+{
+ SubInclude FT2_TOP tests ;
+}
-for xx in $(FT2_COMPONENTS)
+rule RefDoc
{
- SubInclude FT2_TOP $(FT2_SRC_DIR) $(xx) ;
+ Depends $1 : all ;
+ NotFile $1 ;
+ Always $1 ;
}
-# end of src Jamfile
+actions RefDoc
+{
+ python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.4.5 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h
+}
+
+RefDoc refdoc ;
+
+
+# end of top Jamfile
diff --git a/3party/freetype/Jamrules b/3party/freetype/Jamrules
new file mode 100644
index 0000000000..d8d1c7e617
--- /dev/null
+++ b/3party/freetype/Jamrules
@@ -0,0 +1,71 @@
+# FreeType 2 JamRules.
+#
+# Copyright 2001, 2002, 2003 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+# This file contains the Jam rules needed to build the FreeType 2 library.
+# It is shared by all Jamfiles and is included only once in the build
+# process.
+#
+
+
+# Call SubDirHdrs on a list of directories.
+#
+rule AddSubDirHdrs
+{
+ local x ;
+
+ for x in $(<)
+ {
+ SubDirHdrs $(x) ;
+ }
+}
+
+
+# Determine prefix of library file. We must use "libxxxxx" on Unix systems,
+# while all other simply use the real name.
+#
+if $(UNIX)
+{
+ LIBPREFIX ?= lib ;
+}
+else
+{
+ LIBPREFIX ?= "" ;
+}
+
+# FT2_TOP contains the location of the FreeType source directory. You can
+# set it to a specific value if you want to compile the library as part of a
+# larger project.
+#
+FT2_TOP ?= $(DOT) ;
+
+# Define a new rule used to declare a sub directory of the Nirvana source
+# tree.
+#
+rule FT2_SubDir
+{
+ if $(FT2_TOP) = $(DOT)
+ {
+ return [ FDirName $(<) ] ;
+ }
+ else
+ {
+ return [ FDirName $(FT2_TOP) $(<) ] ;
+ }
+}
+
+# We also set ALL_LOCATE_TARGET in order to place all object and library
+# files in "objs".
+#
+ALL_LOCATE_TARGET ?= [ FT2_SubDir objs ] ;
+
+
+# end of Jamrules
diff --git a/3party/freetype/README b/3party/freetype/README
new file mode 100644
index 0000000000..f9eb9bd6b9
--- /dev/null
+++ b/3party/freetype/README
@@ -0,0 +1,64 @@
+ Special notes to Unix users
+ ===========================
+
+ Please read the file `docs/UPGRADE.UNIX'. It contains important
+ information regarding the installation of FreeType on Unix systems,
+ especially GNU based operating systems like GNU/Linux.
+
+ FreeType 2's library is called `libfreetype', FreeType 1's library
+ is called `libttf'. They are *not* compatible!
+
+
+ FreeType 2.4.5
+ ==============
+
+ Please read the docs/CHANGES file, it contains IMPORTANT
+ INFORMATION.
+
+ Read the files `docs/INSTALL' for installation instructions.
+
+ The FreeType 2 API reference is located in `docs/reference'; use the
+ file `ft2-doc.html' as the top entry point. Additional
+ documentation is available as a separate package from our sites. Go
+ to
+
+ http://download.savannah.gnu.org/releases/freetype/
+
+ and download one of the following files.
+
+ freetype-doc-2.4.5.tar.bz2
+ freetype-doc-2.4.5.tar.gz
+ ftdoc245.zip
+
+
+ Bugs
+ ====
+
+ Please report bugs by e-mail to `freetype-devel@nongnu.org'. Don't
+ forget to send a detailed explanation of the problem -- there is
+ nothing worse than receiving a terse message that only says `it
+ doesn't work'.
+
+ Alternatively, you may submit a bug report at
+
+ https://savannah.nongnu.org/bugs/?group=freetype
+
+
+ Enjoy!
+
+
+ The FreeType Team
+
+----------------------------------------------------------------------
+
+Copyright 2006-2011 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.
+
+
+--- end of README ---
diff --git a/3party/freetype/README.git b/3party/freetype/README.git
new file mode 100644
index 0000000000..47cb2423f1
--- /dev/null
+++ b/3party/freetype/README.git
@@ -0,0 +1,46 @@
+The git archive doesn't contain pre-built configuration scripts for
+UNIXish platforms. To generate them say
+
+ sh autogen.sh
+
+which in turn depends on the following packages:
+
+ automake (1.10.1)
+ libtool (2.2.4)
+ autoconf (2.62)
+
+The versions given in parentheses are known to work. Newer versions
+should work too, of course. Note that autogen.sh also sets up proper
+file permissions for the `configure' and auxiliary scripts.
+
+The autogen.sh script now checks the version of above three packages
+whether they match the numbers above. Otherwise it will complain and
+suggest either upgrading or using an environment variable to point to
+a more recent version of the required tool(s).
+
+Note that `aclocal' is provided by the `automake' package on Linux,
+and that `libtoolize' is called `glibtoolize' on Darwin (OS X).
+
+
+For static builds which don't use platform specific optimizations, no
+configure script is necessary at all; saying
+
+ make setup ansi
+ make
+
+should work on all platforms which have GNU make (or makepp).
+
+
+----------------------------------------------------------------------
+
+Copyright 2005, 2006, 2007, 2008, 2009, 2010 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used,
+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.
+
+
+--- end of README.git ---
diff --git a/3party/freetype/autofit/afcjk.h b/3party/freetype/autofit/afcjk.h
deleted file mode 100644
index 0b20d4ae35..0000000000
--- a/3party/freetype/autofit/afcjk.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/***************************************************************************/
-/* */
-/* afcjk.h */
-/* */
-/* Auto-fitter hinting routines for CJK script (specification). */
-/* */
-/* Copyright 2006, 2007 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 __AFCJK_H__
-#define __AFCJK_H__
-
-#include "afhints.h"
-
-
-FT_BEGIN_HEADER
-
-
- /* the CJK-specific script class */
-
- AF_DECLARE_SCRIPT_CLASS(af_cjk_script_class)
-
-
- FT_LOCAL( FT_Error )
- af_cjk_metrics_init( AF_LatinMetrics metrics,
- FT_Face face );
-
- FT_LOCAL( void )
- af_cjk_metrics_scale( AF_LatinMetrics metrics,
- AF_Scaler scaler );
-
- FT_LOCAL( FT_Error )
- af_cjk_hints_init( AF_GlyphHints hints,
- AF_LatinMetrics metrics );
-
- FT_LOCAL( FT_Error )
- af_cjk_hints_apply( AF_GlyphHints hints,
- FT_Outline* outline,
- AF_LatinMetrics metrics );
-
-/* */
-
-FT_END_HEADER
-
-#endif /* __AFCJK_H__ */
-
-
-/* END */
diff --git a/3party/freetype/autogen.sh b/3party/freetype/autogen.sh
new file mode 100644
index 0000000000..9f2fb6a3e8
--- /dev/null
+++ b/3party/freetype/autogen.sh
@@ -0,0 +1,166 @@
+#!/bin/sh
+
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, 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.
+
+run ()
+{
+ echo "running \`$*'"
+ eval $*
+
+ if test $? != 0 ; then
+ echo "error while running \`$*'"
+ exit 1
+ fi
+}
+
+get_major_version ()
+{
+ echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/g'
+}
+
+get_minor_version ()
+{
+ echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'
+}
+
+get_patch_version ()
+{
+ # tricky: some version numbers don't include a patch
+ # separated with a point, but something like 1.4-p6
+ patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/g'`
+ if test "$patch" = "$1"; then
+ patch=`echo $1 | sed -e 's/[0-9][0-9]*\.[0-9][0-9]*\-p\([0-9][0-9]*\).*/\1/g'`
+ # if there isn't any patch number, default to 0
+ if test "$patch" = "$1"; then
+ patch=0
+ fi
+ fi
+ echo $patch
+}
+
+# $1: version to check
+# $2: minimum version
+
+compare_to_minimum_version ()
+{
+ MAJOR1=`get_major_version $1`
+ MAJOR2=`get_major_version $2`
+ if test $MAJOR1 -lt $MAJOR2; then
+ echo 0
+ return
+ else
+ if test $MAJOR1 -gt $MAJOR2; then
+ echo 1
+ return
+ fi
+ fi
+
+ MINOR1=`get_minor_version $1`
+ MINOR2=`get_minor_version $2`
+ if test $MINOR1 -lt $MINOR2; then
+ echo 0
+ return
+ else
+ if test $MINOR1 -gt $MINOR2; then
+ echo 1
+ return
+ fi
+ fi
+
+ PATCH1=`get_patch_version $1`
+ PATCH2=`get_patch_version $2`
+ if test $PATCH1 -lt $PATCH2; then
+ echo 0
+ else
+ echo 1
+ fi
+}
+
+# check the version of a given tool against a minimum version number
+#
+# $1: tool path
+# $2: tool usual name (e.g. `aclocal')
+# $3: tool variable (e.g. `ACLOCAL')
+# $4: minimum version to check against
+# $5: option field index used to extract the tool version from the
+# output of --version
+
+check_tool_version ()
+{
+ field=$5
+ # assume the output of "[TOOL] --version" is "toolname (GNU toolname foo bar) version"
+ if test "$field"x = x; then
+ field=3 # default to 3 for all GNU autotools, after filtering enclosed string
+ fi
+ version=`$1 --version | head -1 | sed 's/([^)]*)/()/g' | cut -d ' ' -f $field`
+ version_check=`compare_to_minimum_version $version $4`
+ if test "$version_check"x = 0x; then
+ echo "ERROR: Your version of the \`$2' tool is too old."
+ echo " Minimum version $4 is required (yours is version $version)."
+ echo " Please upgrade or use the $3 variable to point to a more recent one."
+ echo ""
+ exit 1
+ fi
+}
+
+if test ! -f ./builds/unix/configure.raw; then
+ echo "You must be in the same directory as \`autogen.sh'."
+ echo "Bootstrapping doesn't work if srcdir != builddir."
+ exit 1
+fi
+
+# On MacOS X, the GNU libtool is named `glibtool'.
+HOSTOS=`uname`
+if test "$LIBTOOLIZE"x != x; then
+ :
+elif test "$HOSTOS"x = Darwinx; then
+ LIBTOOLIZE=glibtoolize
+else
+ LIBTOOLIZE=libtoolize
+fi
+
+if test "$ACLOCAL"x = x; then
+ ACLOCAL=aclocal
+fi
+
+if test "$AUTOCONF"x = x; then
+ AUTOCONF=autoconf
+fi
+
+check_tool_version $ACLOCAL aclocal ACLOCAL 1.10.1
+check_tool_version $LIBTOOLIZE libtoolize LIBTOOLIZE 2.2.4
+check_tool_version $AUTOCONF autoconf AUTOCONF 2.62
+
+# This sets freetype_major, freetype_minor, and freetype_patch.
+eval `sed -nf version.sed include/freetype/freetype.h`
+
+# We set freetype-patch to an empty value if it is zero.
+if test "$freetype_patch" = ".0"; then
+ freetype_patch=
+fi
+
+cd builds/unix
+
+echo "generating \`configure.ac'"
+sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
+ < configure.raw > configure.ac
+
+run aclocal -I . --force
+run $LIBTOOLIZE --force --copy --install
+run autoconf --force
+
+chmod +x mkinstalldirs
+chmod +x install-sh
+
+cd ../..
+
+chmod +x ./configure
+
+# EOF
diff --git a/3party/freetype/builds/amiga/README b/3party/freetype/builds/amiga/README
new file mode 100644
index 0000000000..2b8f8e87db
--- /dev/null
+++ b/3party/freetype/builds/amiga/README
@@ -0,0 +1,110 @@
+
+README for the builds/amiga subdirectory.
+
+Copyright 2005 by
+Werner Lemberg and Detlef Würkner.
+
+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.
+
+
+The makefile.os4 is for the AmigaOS4 SDK. To use it, type
+"make -f makefile.os4", it produces a link library libft2_ppc.a.
+
+The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted on
+68k-Amiga producing MorphOS-PPC-binaries from http://www.morphos.de).
+To use it, type "make assign", then "make"; it produces a link library
+libft2_ppc.a.
+
+The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available,
+latest sold version was 6.50, updates can be found in Aminet). It is
+based on the version found in the sourcecode of ttf.library 0.83b for
+FreeType 1.3.1 from Richard Griffith (ragriffi@sprynet.com,
+http://ragriffi.home.sprynet.com).
+
+You will also need the latest include files and amiga.lib from the
+Amiga web site (http://www.amiga.com/3.9/download/NDK3.9.lha) for
+AmigaOS 3.9; the generated code should work under AmigaOS 2.04 and up.
+
+To use it, call "smake assign" and then "smake" from the builds/amiga
+directory. The results are:
+
+- A link library "ft2_680x0.lib" (where x depends on the setting of
+ the CPU entry in the smakefile) containing all FreeType2 parts
+ except of the init code, debugging code, and the system interface
+ code.
+
+- ftsystem.o, an object module containing the standard version of the
+ system interface code which uses fopen() fclose() fread() fseek()
+ ftell() malloc() realloc() and free() from lib:sc.lib (not pure).
+
+- ftsystempure.o, an object module containing the pure version of the
+ system interface code which uses Open() Close() Read() Seek()
+ ExamineFH() AsmAllocPooled() AsmFreePooled() etc. This version can
+ be used in both normal programs and in Amiga run-time shared system
+ librarys (can be linked with lib:libinit.o, no copying of DATA and
+ BSS hunks for each OpenLibrary() necessary). Source code is in
+ src/base/ftsystem.c.
+
+- ftdebug.o, an object module containing the standard version of the
+ debugging code which uses vprintf() and exit() (not pure).
+ Debugging can be turned on in FT:include/freetype/config/ftoption.h
+ and with FT_SetTraceLevel().
+
+- ftdebugpure.o, an object module containing the pure version of the
+ debugging code which uses KVPrintf() from lib:debug.lib and no
+ exit(). For debugging of Amiga run-time shared system libraries.
+ Source code is in src/base/ftdebug.c.
+
+- NO ftinit.o. Because linking with a link library should result in
+ linking only the needed object modules in it, but standard
+ ftsystem.o would force ALL FreeType2 modules to be linked to your
+ program, I decided to use a different scheme: You must #include
+ FT:src/base/ftinit.c in your sourcecode and specify with #define
+ statements which modules you need. See
+ include/freetype/config/ftmodule.h.
+
+
+To use in your own programs:
+
+- Insert the #define and #include statements from top of
+ include/freetype/config/ftmodule.h in your source code and uncomment
+ the #define statements for the FreeType2 modules you need.
+
+- You can use either PARAMETERS=REGISTER or PARAMETERS=STACK for
+ calling the FreeType2 functions, because the link library and the
+ object files are compiled with PARAMETERS=BOTH.
+
+- "smake assign" (assign "FT:" to the FreeType2 main directory).
+
+- Compile your program.
+
+- Link with either ftsystem.o or ftsystempure.o, if debugging enabled
+ with either ftdebug.o or (ftdebugpure.o and lib:debug.lib), and with
+ ft2_680x0.lib as link library.
+
+
+To adapt to other compilers:
+
+- The standard ANSI C maximum length of 31 significant characters in
+ identifiers is not enough for FreeType2. Check if your compiler has
+ a minimum length of 40 significant characters or can be switched to
+ it. "idlen=40" is the option for SAS/C. Setting #define
+ HAVE_LIMIT_ON_IDENTS in an include file may also work (not tested).
+
+- Make sure that the include directory in builds/amiga is searched
+ before the normal FreeType2 include directory, so you are able to
+ replace problematic include files with your own version (same may be
+ useful for the src directory).
+
+- An example of how to replace/workaround a problematic include file
+ is include/config/ftconfig.h; it changes a #define that would
+ prevent SAS/C from generating XDEF's where it should do that and
+ then includes the standard FreeType2 include file.
+
+Local Variables:
+coding: latin-1
+End:
diff --git a/3party/freetype/builds/amiga/include/freetype/config/ftconfig.h b/3party/freetype/builds/amiga/include/freetype/config/ftconfig.h
new file mode 100644
index 0000000000..c2c2ac8dbb
--- /dev/null
+++ b/3party/freetype/builds/amiga/include/freetype/config/ftconfig.h
@@ -0,0 +1,55 @@
+/***************************************************************************/
+/* */
+/* ftconfig.h */
+/* */
+/* Amiga-specific configuration file (specification only). */
+/* */
+/* Copyright 2005, 2006, 2007 by */
+/* Werner Lemberg and Detlef Würkner. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+/*
+ * This is an example how to override the default FreeType2 header files
+ * with Amiga-specific changes. When the compiler searches this directory
+ * before the default directory, we can do some modifications.
+ *
+ * Here we must change FT_EXPORT_DEF so that SAS/C does
+ * generate the needed XDEFs.
+ */
+
+#if 0
+#define FT_EXPORT_DEF( x ) extern x
+#endif
+
+#undef FT_EXPORT_DEF
+#define FT_EXPORT_DEF( x ) x
+
+/* Now include the original file */
+#ifndef __MORPHOS__
+#ifdef __SASC
+#include "FT:include/freetype/config/ftconfig.h"
+#else
+#include "/FT/include/freetype/config/ftconfig.h"
+#endif
+#else
+/* We must define that, it seems that
+ * lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in
+ * ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf
+ * binaries from http://www.morphos.de)
+ */
+#define _LIBC_LIMITS_H_
+#include "/FT/include/freetype/config/ftconfig.h"
+#endif
+
+/*
+Local Variables:
+coding: latin-1
+End:
+*/
diff --git a/3party/freetype/builds/amiga/include/freetype/config/ftmodule.h b/3party/freetype/builds/amiga/include/freetype/config/ftmodule.h
new file mode 100644
index 0000000000..5873bab74f
--- /dev/null
+++ b/3party/freetype/builds/amiga/include/freetype/config/ftmodule.h
@@ -0,0 +1,160 @@
+/***************************************************************************/
+/* */
+/* ftmodule.h */
+/* */
+/* Amiga-specific FreeType module selection. */
+/* */
+/* Copyright 2005 by */
+/* Werner Lemberg and Detlef Würkner. */
+/* */
+/* 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. */
+/* */
+/***************************************************************************/
+
+/*
+ * To avoid that all your programs include all FreeType modules,
+ * you copy the following piece of source code into your own
+ * source file and specify which modules you really need in your
+ * application by uncommenting the appropriate lines.
+ */
+/*
+//#define FT_USE_AUTOFIT // autofitter
+//#define FT_USE_RASTER // monochrome rasterizer
+//#define FT_USE_SMOOTH // anti-aliasing rasterizer
+//#define FT_USE_TT // truetype font driver
+//#define FT_USE_T1 // type1 font driver
+//#define FT_USE_T42 // type42 font driver
+//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support
+//#define FT_USE_CFF // opentype font driver
+//#define FT_USE_BDF // bdf bitmap font driver
+//#define FT_USE_PCF // pcf bitmap font driver
+//#define FT_USE_PFR // pfr font driver
+//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
+//#define FT_USE_OTV // opentype validator
+//#define FT_USE_GXV // truetype gx validator
+#include "FT:src/base/ftinit.c"
+*/
+
+/* Make sure that the needed support modules are built in.
+ * Dependencies can be found by searching for FT_Get_Module.
+ */
+
+#ifdef FT_USE_T42
+#define FT_USE_TT
+#endif
+
+#ifdef FT_USE_TT
+#define FT_USE_SFNT
+#endif
+
+#ifdef FT_USE_CFF
+#define FT_USE_SFNT
+#define FT_USE_PSHINT
+#define FT_USE_PSNAMES
+#endif
+
+#ifdef FT_USE_T1
+#define FT_USE_PSAUX
+#define FT_USE_PSHINT
+#define FT_USE_PSNAMES
+#endif
+
+#ifdef FT_USE_T1CID
+#define FT_USE_PSAUX
+#define FT_USE_PSHINT
+#define FT_USE_PSNAMES
+#endif
+
+#ifdef FT_USE_PSAUX
+#define FT_USE_PSNAMES
+#endif
+
+#ifdef FT_USE_SFNT
+#define FT_USE_PSNAMES
+#endif
+
+/* Now include the modules */
+
+#ifdef FT_USE_AUTOFIT
+FT_USE_MODULE( FT_Module_Class, autofit_module_class )
+#endif
+
+#ifdef FT_USE_TT
+FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
+#endif
+
+#ifdef FT_USE_T1
+FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
+#endif
+
+#ifdef FT_USE_CFF
+FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
+#endif
+
+#ifdef FT_USE_T1CID
+FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
+#endif
+
+#ifdef FT_USE_PFR
+FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
+#endif
+
+#ifdef FT_USE_T42
+FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
+#endif
+
+#ifdef FT_USE_WINFNT
+FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
+#endif
+
+#ifdef FT_USE_PCF
+FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
+#endif
+
+#ifdef FT_USE_PSAUX
+FT_USE_MODULE( FT_Module_Class, psaux_module_class )
+#endif
+
+#ifdef FT_USE_PSNAMES
+FT_USE_MODULE( FT_Module_Class, psnames_module_class )
+#endif
+
+#ifdef FT_USE_PSHINT
+FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
+#endif
+
+#ifdef FT_USE_RASTER
+FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
+#endif
+
+#ifdef FT_USE_SFNT
+FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
+#endif
+
+#ifdef FT_USE_SMOOTH
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
+#endif
+
+#ifdef FT_USE_OTV
+FT_USE_MODULE( FT_Module_Class, otv_module_class )
+#endif
+
+#ifdef FT_USE_BDF
+FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
+#endif
+
+#ifdef FT_USE_GXV
+FT_USE_MODULE( FT_Module_Class, gxv_module_class )
+#endif
+
+/*
+Local Variables:
+coding: latin-1
+End:
+*/
diff --git a/3party/freetype/builds/amiga/makefile b/3party/freetype/builds/amiga/makefile
new file mode 100644
index 0000000000..379883deec
--- /dev/null
+++ b/3party/freetype/builds/amiga/makefile
@@ -0,0 +1,299 @@
+#
+# Makefile for FreeType2 link library using ppc-morphos-gcc-2.95.3-bin.tgz
+# (gcc 2.95.3 hosted on 68k-Amiga producing MorphOS-PPC-binaries from
+# http://www.morphos.de)
+#
+
+
+# Copyright 2005, 2006, 2007, 2009 by
+# Werner Lemberg and Detlef Würkner.
+#
+# 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.
+
+
+#
+# to build from the builds/amiga directory call
+#
+# make assign
+# make
+#
+# Your programs source code should start with this
+# (uncomment the parts you do not need to keep the program small):
+# ---8<---
+#define FT_USE_AUTOFIT // autofitter
+#define FT_USE_RASTER // monochrome rasterizer
+#define FT_USE_SMOOTH // anti-aliasing rasterizer
+#define FT_USE_TT // truetype font driver
+#define FT_USE_T1 // type1 font driver
+#define FT_USE_T42 // type42 font driver
+#define FT_USE_T1CID // cid-keyed type1 font driver
+#define FT_USE_CFF // opentype font driver
+#define FT_USE_BDF // bdf bitmap font driver
+#define FT_USE_PCF // pcf bitmap font driver
+#define FT_USE_PFR // pfr font driver
+#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
+#define FT_USE_OTV // opentype validator
+#define FT_USE_GXV // truetype gx validator
+#include "FT:src/base/ftinit.c"
+# ---8<---
+#
+# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
+# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
+# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
+
+all: libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
+
+assign:
+ assign FT: //
+
+FTSRC = /FT/src
+
+CC = ppc-morphos-gcc
+AR = ppc-morphos-ar rc
+RANLIB = ppc-morphos-ranlib
+LD = ppc-morphos-ld
+CFLAGS = -DFT2_BUILD_LIBRARY -O2 -I/emu/emulinclude/includegcc -I/emu/include -Iinclude -I$(FTSRC) -I/FT/include
+
+#
+# FreeType2 library base
+#
+ftbase.ppc.o: $(FTSRC)/base/ftbase.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftinit.ppc.o: $(FTSRC)/base/ftinit.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftsystem.ppc.o: $(FTSRC)/base/ftsystem.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+# pure version for use in run-time library etc
+ftsystempure.ppc.o: src/base/ftsystem.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftdebug.ppc.o: $(FTSRC)/base/ftdebug.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+# pure version for use in run-time library etc
+ftdebugpure.ppc.o: src/base/ftdebug.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library base extensions
+#
+ftbbox.ppc.o: $(FTSRC)/base/ftbbox.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftbdf.ppc.o: $(FTSRC)/base/ftbdf.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftbitmap.ppc.o: $(FTSRC)/base/ftbitmap.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftcid.ppc.o: $(FTSRC)/base/ftcid.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftfstype.ppc.o: $(FTSRC)/base/ftfstype.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftgasp.ppc.o: $(FTSRC)/base/ftgasp.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftglyph.ppc.o: $(FTSRC)/base/ftglyph.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftgxval.ppc.o: $(FTSRC)/base/ftgxval.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftlcdfil.ppc.o: $(FTSRC)/base/ftlcdfil.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftmm.ppc.o: $(FTSRC)/base/ftmm.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftotval.ppc.o: $(FTSRC)/base/ftotval.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftpatent.ppc.o: $(FTSRC)/base/ftpatent.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftpfr.ppc.o: $(FTSRC)/base/ftpfr.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftstroke.ppc.o: $(FTSRC)/base/ftstroke.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftsynth.ppc.o: $(FTSRC)/base/ftsynth.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+fttype1.ppc.o: $(FTSRC)/base/fttype1.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftwinfnt.ppc.o: $(FTSRC)/base/ftwinfnt.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+ftxf86.ppc.o: $(FTSRC)/base/ftxf86.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library autofitting module
+#
+autofit.ppc.o: $(FTSRC)/autofit/autofit.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library postscript hinting module
+#
+pshinter.ppc.o: $(FTSRC)/pshinter/pshinter.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library PS support module
+#
+psaux.ppc.o: $(FTSRC)/psaux/psaux.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library PS glyph names module
+#
+psnames.ppc.o: $(FTSRC)/psnames/psnames.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library monochrome raster module
+#
+raster.ppc.o: $(FTSRC)/raster/raster.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library anti-aliasing raster module
+#
+smooth.ppc.o: $(FTSRC)/smooth/smooth.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library 'sfnt' module
+#
+sfnt.ppc.o: $(FTSRC)/sfnt/sfnt.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library glyph and image caching system
+#
+ftcache.ppc.o: $(FTSRC)/cache/ftcache.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library OpenType font driver
+#
+cff.ppc.o: $(FTSRC)/cff/cff.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library TrueType font driver
+#
+truetype.ppc.o: $(FTSRC)/truetype/truetype.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library Type1 font driver
+#
+type1.ppc.o: $(FTSRC)/type1/type1.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library Type42 font driver
+#
+type42.ppc.o: $(FTSRC)/type42/type42.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library CID-keyed Type1 font driver
+#
+type1cid.ppc.o: $(FTSRC)/cid/type1cid.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library BDF bitmap font driver
+#
+bdf.ppc.o: $(FTSRC)/bdf/bdf.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library PCF bitmap font driver
+#
+pcf.ppc.o: $(FTSRC)/pcf/pcf.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library gzip support for compressed PCF bitmap fonts
+#
+gzip.ppc.o: $(FTSRC)/gzip/ftgzip.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+# FreeType2 library bzip2 support for compressed PCF bitmap fonts
+#
+bzip2.ppc.o: $(FTSRC)/bzip2/ftbzip2.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library compress support for compressed PCF bitmap fonts
+#
+lzw.ppc.o: $(FTSRC)/lzw/ftlzw.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library PFR font driver
+#
+pfr.ppc.o: $(FTSRC)/pfr/pfr.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library Windows FNT/FON bitmap font driver
+#
+winfnt.ppc.o: $(FTSRC)/winfonts/winfnt.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library TrueTypeGX Validator
+#
+gxvalid.ppc.o: $(FTSRC)/gxvalid/gxvalid.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+#
+# FreeType2 library OpenType validator
+#
+otvalid.ppc.o: $(FTSRC)/otvalid/otvalid.c
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+BASEPPC = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
+ ftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o ftgxval.ppc.o \
+ ftlcdfil.ppc.o ftmm.ppc.o ftotval.ppc.o ftpatent.ppc.o ftpfr.ppc.o \
+ ftstroke.ppc.o ftsynth.ppc.o fttype1.ppc.o ftwinfnt.ppc.o \
+ ftxf86.ppc.o
+
+DEBUGPPC = ftdebug.ppc.o ftdebugpure.ppc.o
+
+AFITPPC = autofit.ppc.o
+
+GXVPPC = gxvalid.ppc.o
+
+OTVPPC = otvalid.ppc.o
+
+PSPPC = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
+
+RASTERPPC = raster.ppc.o smooth.ppc.o
+
+FONTDPPC = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
+ bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
+
+libft2_ppc.a: $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o bzip2.ppc.o lzw.ppc.o
+ $(AR) $@ $(BASEPPC) $(AFITPPC) $(GXVPPC) $(OTVPPC) $(PSPPC) $(RASTERPPC) sfnt.ppc.o ftcache.ppc.o $(FONTDPPC) gzip.ppc.o bzip2.ppc.o lzw.ppc.o
+ -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
+
+#Local Variables:
+#coding: latin-1
+#End:
diff --git a/3party/freetype/builds/amiga/makefile.os4 b/3party/freetype/builds/amiga/makefile.os4
new file mode 100644
index 0000000000..13758bcebf
--- /dev/null
+++ b/3party/freetype/builds/amiga/makefile.os4
@@ -0,0 +1,303 @@
+#
+# Makefile for FreeType2 link library using gcc 4.0.3 from the
+# AmigaOS4 SDK
+#
+
+
+# Copyright 2005, 2006, 2007, 2009 by
+# Werner Lemberg and Detlef Würkner.
+#
+# 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.
+
+
+# to build from the builds/amiga directory call
+#
+# make -f makefile.os4
+#
+# Your programs source code should start with this
+# (uncomment the parts you do not need to keep the program small):
+# ---8<---
+#define FT_USE_AUTOFIT // autofitter
+#define FT_USE_RASTER // monochrome rasterizer
+#define FT_USE_SMOOTH // anti-aliasing rasterizer
+#define FT_USE_TT // truetype font driver
+#define FT_USE_T1 // type1 font driver
+#define FT_USE_T42 // type42 font driver
+#define FT_USE_T1CID // cid-keyed type1 font driver
+#define FT_USE_CFF // opentype font driver
+#define FT_USE_BDF // bdf bitmap font driver
+#define FT_USE_PCF // pcf bitmap font driver
+#define FT_USE_PFR // pfr font driver
+#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
+#define FT_USE_OTV // opentype validator
+#define FT_USE_GXV // truetype gx validator
+#include "FT:src/base/ftinit.c"
+# ---8<---
+#
+# link your programs with libft2_ppc.a and either ftsystem.ppc.o or ftsystempure.ppc.o
+# (and either ftdebug.ppc.o or ftdebugpure.ppc.o if you enabled FT_DEBUG_LEVEL_ERROR or
+# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
+
+all: assign libft2_ppc.a ftsystem.ppc.o ftsystempure.ppc.o
+
+assign:
+ assign FT: //
+
+CC = ppc-amigaos-gcc
+AR = ppc-amigaos-ar
+RANLIB = ppc-amigaos-ranlib
+
+DIRFLAGS = -Iinclude -I/FT/src -I/FT/include -I/SDK/include
+
+WARNINGS = -Wall -W -Wundef -Wpointer-arith -Wbad-function-cast \
+ -Waggregate-return -Wwrite-strings -Wshadow
+
+OPTIONS = -DFT2_BUILD_LIBRARY -DNDEBUG -fno-builtin
+OPTIMIZE = -O2 -fomit-frame-pointer -fstrength-reduce -finline-functions
+
+CFLAGS = -mcrt=clib2 $(DIRFLAGS) $(WARNINGS) $(FT2FLAGS) $(OPTIONS) $(OPTIMIZE)
+
+#
+# FreeType2 library base
+#
+ftbase.ppc.o: FT:src/base/ftbase.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbase.c
+
+ftinit.ppc.o: FT:src/base/ftinit.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftinit.c
+
+ftsystem.ppc.o: FT:src/base/ftsystem.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftsystem.c
+
+# pure version for use in run-time library etc
+ftsystempure.ppc.o: src/base/ftsystem.c
+ $(CC) -c $(CFLAGS) -o $@ src/base/ftsystem.c
+
+#
+# FreeType2 library base extensions
+#
+ftbbox.ppc.o: FT:src/base/ftbbox.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbbox.c
+
+ftbdf.ppc.o: FT:src/base/ftbdf.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbdf.c
+
+ftbitmap.ppc.o: FT:src/base/ftbitmap.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftbitmap.c
+
+ftcid.ppc.o: FT:src/base/ftcid.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftcid.c
+
+ftdebug.ppc.o: FT:src/base/ftdebug.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftdebug.c
+
+# pure version for use in run-time library etc
+ftdebugpure.ppc.o: src/base/ftdebug.c
+ $(CC) -c $(CFLAGS) -o $@ src/base/ftdebug.c
+
+ftfstype.ppc.o: FT:src/base/ftfstype.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftfstype.c
+
+ftgasp.ppc.o: FT:src/base/ftgasp.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftgasp.c
+
+ftglyph.ppc.o: FT:src/base/ftglyph.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftglyph.c
+
+ftgxval.ppc.o: FT:src/base/ftgxval.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftgxval.c
+
+ftlcdfil.ppc.o: FT:src/base/ftlcdfil.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftlcdfil.c
+
+ftmm.ppc.o: FT:src/base/ftmm.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftmm.c
+
+ftotval.ppc.o: FT:src/base/ftotval.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftotval.c
+
+ftpatent.ppc.o: FT:src/base/ftpatent.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftpatent.c
+
+ftpfr.ppc.o: FT:src/base/ftpfr.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftpfr.c
+
+ftstroke.ppc.o: FT:src/base/ftstroke.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftstroke.c
+
+ftsynth.ppc.o: FT:src/base/ftsynth.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftsynth.c
+
+fttype1.ppc.o: FT:src/base/fttype1.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/fttype1.c
+
+ftwinfnt.ppc.o: FT:src/base/ftwinfnt.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftwinfnt.c
+
+ftxf86.ppc.o: FT:src/base/ftxf86.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/base/ftxf86.c
+
+#
+# FreeType2 library autofitting module
+#
+autofit.ppc.o: FT:src/autofit/autofit.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/autofit/autofit.c
+
+#
+# FreeType2 library postscript hinting module
+#
+pshinter.ppc.o: FT:src/pshinter/pshinter.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/pshinter/pshinter.c
+
+#
+# FreeType2 library PS support module
+#
+psaux.ppc.o: FT:src/psaux/psaux.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/psaux/psaux.c
+
+#
+# FreeType2 library PS glyph names module
+#
+psnames.ppc.o: FT:src/psnames/psnames.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/psnames/psnames.c
+
+#
+# FreeType2 library monochrome raster module
+#
+raster.ppc.o: FT:src/raster/raster.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/raster/raster.c
+
+#
+# FreeType2 library anti-aliasing raster module
+#
+smooth.ppc.o: FT:src/smooth/smooth.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/smooth/smooth.c
+
+#
+# FreeType2 library 'sfnt' module
+#
+sfnt.ppc.o: FT:src/sfnt/sfnt.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/sfnt/sfnt.c
+
+#
+# FreeType2 library glyph and image caching system
+#
+ftcache.ppc.o: FT:src/cache/ftcache.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/cache/ftcache.c
+
+#
+# FreeType2 library OpenType font driver
+#
+cff.ppc.o: FT:src/cff/cff.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/cff/cff.c
+
+#
+# FreeType2 library TrueType font driver
+#
+truetype.ppc.o: FT:src/truetype/truetype.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/truetype/truetype.c
+
+#
+# FreeType2 library Type1 font driver
+#
+type1.ppc.o: FT:src/type1/type1.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/type1/type1.c
+
+#
+# FreeType2 library Type42 font driver
+#
+type42.ppc.o: FT:src/type42/type42.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/type42/type42.c
+
+#
+# FreeType2 library CID-keyed Type1 font driver
+#
+type1cid.ppc.o: FT:src/cid/type1cid.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/cid/type1cid.c
+
+#
+# FreeType2 library BDF bitmap font driver
+#
+bdf.ppc.o: FT:src/bdf/bdf.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/bdf/bdf.c
+
+#
+# FreeType2 library PCF bitmap font driver
+#
+pcf.ppc.o: FT:src/pcf/pcf.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/pcf/pcf.c
+
+#
+# FreeType2 library gzip support for compressed PCF bitmap fonts
+#
+gzip.ppc.o: FT:src/gzip/ftgzip.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/gzip/ftgzip.c
+
+#
+# FreeType2 library bzip2 support for compressed PCF bitmap fonts
+#
+bzip2.ppc.o: FT:src/bzip2/ftbzip2.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/bzip2/ftbzip2.c
+
+#
+# FreeType2 library compress support for compressed PCF bitmap fonts
+#
+lzw.ppc.o: FT:src/lzw/ftlzw.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/lzw/ftlzw.c
+
+#
+# FreeType2 library PFR font driver
+#
+pfr.ppc.o: FT:src/pfr/pfr.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/pfr/pfr.c
+
+#
+# FreeType2 library Windows FNT/FON bitmap font driver
+#
+winfnt.ppc.o: FT:src/winfonts/winfnt.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/winfonts/winfnt.c
+
+#
+# FreeType2 library TrueTypeGX Validator
+#
+gxvalid.ppc.o: FT:src/gxvalid/gxvalid.c
+ $(CC) -c $(CFLAGS) -Wno-aggregate-return -o $@ /FT/src/gxvalid/gxvalid.c
+
+#
+# FreeType2 library OpenType validator
+#
+otvalid.ppc.o: FT:src/otvalid/otvalid.c
+ $(CC) -c $(CFLAGS) -o $@ /FT/src/otvalid/otvalid.c
+
+BASE = ftbase.ppc.o ftbbox.ppc.o ftbdf.ppc.o ftbitmap.ppc.o ftcid.ppc.o \
+ ftfstype.ppc.o ftgasp.ppc.o ftglyph.ppc.o ftgxval.ppc.o \
+ ftlcdfil.ppc.o ftmm.ppc.o ftotval.ppc.o ftpatent.ppc.o ftpfr.ppc.o \
+ ftstroke.ppc.o ftsynth.ppc.o fttype1.ppc.o ftwinfnt.ppc.o \
+ ftxf86.ppc.o
+
+DEBUG = ftdebug.ppc.o ftdebugpure.ppc.o
+
+AFIT = autofit.ppc.o
+
+GXV = gxvalid.ppc.o
+
+OTV = otvalid.ppc.o
+
+PS = psaux.ppc.o psnames.ppc.o pshinter.ppc.o
+
+RASTER = raster.ppc.o smooth.ppc.o
+
+FONTD = cff.ppc.o type1.ppc.o type42.ppc.o type1cid.ppc.o truetype.ppc.o\
+ bdf.ppc.o pcf.ppc.o pfr.ppc.o winfnt.ppc.o
+
+libft2_ppc.a: $(BASE) $(AFIT) $(GXV) $(OTV) $(PS) $(RASTER) sfnt.ppc.o ftcache.ppc.o $(FONTD) gzip.ppc.o lzw.ppc.o
+ $(AR) r $@ $(BASE) $(AFIT) $(GXV) $(OTV) $(PS) $(RASTER) sfnt.ppc.o ftcache.ppc.o $(FONTD) gzip.ppc.o lzw.ppc.o
+ $(RANLIB) $@
+
+#Local Variables:
+#coding: latin-1
+#End:
diff --git a/3party/freetype/builds/amiga/smakefile b/3party/freetype/builds/amiga/smakefile
new file mode 100644
index 0000000000..097aec9b06
--- /dev/null
+++ b/3party/freetype/builds/amiga/smakefile
@@ -0,0 +1,303 @@
+#
+# Makefile for FreeType2 link library using Amiga SAS/C 6.58
+#
+
+
+# Copyright 2005,2006, 2007, 2009 by
+# Werner Lemberg and Detlef Würkner.
+#
+# 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.
+
+
+# to build from the builds/amiga directory call
+#
+# smake assign
+# smake
+#
+# Your programs source code should start with this
+# (uncomment the parts you do not need to keep the program small):
+# ---8<---
+#define FT_USE_AUTOFIT // autofitter
+#define FT_USE_RASTER // monochrome rasterizer
+#define FT_USE_SMOOTH // anti-aliasing rasterizer
+#define FT_USE_TT // truetype font driver
+#define FT_USE_T1 // type1 font driver
+#define FT_USE_T42 // type42 font driver
+#define FT_USE_T1CID // cid-keyed type1 font driver
+#define FT_USE_CFF // opentype font driver
+#define FT_USE_BDF // bdf bitmap font driver
+#define FT_USE_PCF // pcf bitmap font driver
+#define FT_USE_PFR // pfr font driver
+#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
+#define FT_USE_OTV // opentype validator
+#define FT_USE_GXV // truetype gx validator
+#include "FT:src/base/ftinit.c"
+# ---8<---
+#
+# link your programs with ft2_680x0.lib and either ftsystem.o or ftsystempure.o
+# (and either ftdebug.o or ftdebugpure.o if you enabled FT_DEBUG_LEVEL_ERROR or
+# FT_DEBUG_LEVEL_TRACE in include/freetype/config/ftoption.h).
+
+OBJBASE = ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftcid.o ftfstype.o ftgasp.o \
+ ftglyph.o ftgxval.o ftlcdfil.o ftmm.o ftotval.o ftpatent.o ftpfr.o \
+ ftstroke.o ftsynth.o fttype1.o ftwinfnt.o ftxf86.o
+
+OBJSYSTEM = ftsystem.o ftsystempure.o
+
+OBJDEBUG = ftdebug.o ftdebugpure.o
+
+OBJAFIT = autofit.o
+
+OBJGXV = gxvalid.o
+
+OBJOTV = otvalid.o
+
+OBJPS = psaux.o psnames.o pshinter.o
+
+OBJRASTER = raster.o smooth.o
+
+OBJSFNT = sfnt.o
+
+OBJCACHE = ftcache.o
+
+OBJFONTD = cff.o type1.o type42.o type1cid.o\
+ truetype.o winfnt.o bdf.o pcf.o pfr.o
+
+CORE = FT:src/
+
+CPU = 68000
+#CPU = 68020
+#CPU = 68030
+#CPU = 68040
+#CPU = 68060
+
+OPTIMIZER = optinlocal
+
+SCFLAGS = optimize opttime optsched strmerge data=faronly idlen=50 cpu=$(CPU)\
+ idir=include/ idir=$(CORE) idir=FT:include/ nostackcheck nochkabort\
+ noicons ignore=79,85,110,306 parameters=both define=FT2_BUILD_LIBRARY
+
+LIB = ft2_$(CPU).lib
+
+# sample linker options
+OPTS = link lib=$(LIB),lib:sc.lib,lib:amiga.lib,lib:debug.lib\
+ smallcode smalldata noicons utillib
+
+# sample program entry
+#myprog: myprog.c ftsystem.o $(LIB)
+# sc $< programname=$@ ftsystem.o $(SCFLAGS) $(OPTS)
+
+all: $(LIB) $(OBJSYSTEM) $(OBJDEBUG)
+
+assign:
+ assign FT: //
+
+# uses separate object modules in lib to make for easier debugging
+# also, can make smaller programs if entire engine is not used
+ft2_$(CPU).lib: $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o bzip2.o
+ oml $@ r $(OBJBASE) $(OBJAFIT) $(OBJOTV) $(OBJPS) $(OBJRASTER) $(OBJSFNT) $(OBJCACHE) $(OBJFONTD) lzw.o gzip.o bzip2.o
+
+clean:
+ -delete \#?.o
+
+realclean: clean
+ -delete ft2$(CPU).lib
+
+#
+# freetype library base
+#
+ftbase.o: $(CORE)base/ftbase.c
+ sc $(SCFLAGS) objname=$@ $<
+ftinit.o: $(CORE)base/ftinit.c
+ sc $(SCFLAGS) objname=$@ $<
+ftsystem.o: $(CORE)base/ftsystem.c
+ sc $(SCFLAGS) objname=$@ $<
+ftsystempure.o: src/base/ftsystem.c ## pure version for use in run-time library etc
+ sc $(SCFLAGS) objname=$@ $<
+ftdebug.o: $(CORE)base/ftdebug.c
+ sc $(SCFLAGS) objname=$@ $<
+ftdebugpure.o: src/base/ftdebug.c ## pure version for use in run-time library etc
+ sc $(SCFLAGS) objname=$@ $<
+#
+# freetype library base extensions
+#
+ftbbox.o: $(CORE)base/ftbbox.c
+ sc $(SCFLAGS) objname=$@ $<
+ftbdf.o: $(CORE)base/ftbdf.c
+ sc $(SCFLAGS) objname=$@ $<
+ftbitmap.o: $(CORE)base/ftbitmap.c
+ sc $(SCFLAGS) objname=$@ $<
+ftcid.o: $(CORE)base/ftcid.c
+ sc $(SCFLAGS) objname=$@ $<
+ftfstype.o: $(CORE)base/ftfstype.c
+ sc $(SCFLAGS) objname=$@ $<
+ftgasp.o: $(CORE)base/ftgasp.c
+ sc $(SCFLAGS) objname=$@ $<
+ftglyph.o: $(CORE)base/ftglyph.c
+ sc $(SCFLAGS) objname=$@ $<
+ftgxval.o: $(CORE)base/ftgxval.c
+ sc $(SCFLAGS) objname=$@ $<
+ftlcdfil.o: $(CORE)base/ftlcdfil.c
+ sc $(SCFLAGS) objname=$@ $<
+ftmm.o: $(CORE)base/ftmm.c
+ sc $(SCFLAGS) objname=$@ $<
+ftotval.o: $(CORE)base/ftotval.c
+ sc $(SCFLAGS) objname=$@ $<
+ftpatent.o: $(CORE)base/ftpatent.c
+ sc $(SCFLAGS) objname=$@ $<
+ftpfr.o: $(CORE)base/ftpfr.c
+ sc $(SCFLAGS) objname=$@ $<
+ftstroke.o: $(CORE)base/ftstroke.c
+ sc $(SCFLAGS) objname=$@ $<
+ftsynth.o: $(CORE)base/ftsynth.c
+ sc $(SCFLAGS) objname=$@ $<
+fttype1.o: $(CORE)base/fttype1.c
+ sc $(SCFLAGS) objname=$@ $<
+ftwinfnt.o: $(CORE)base/ftwinfnt.c
+ sc $(SCFLAGS) objname=$@ $<
+ftxf86.o: $(CORE)base/ftxf86.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library autofitter module
+#
+autofit.o: $(CORE)autofit/autofit.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library PS hinting module
+#
+pshinter.o: $(CORE)pshinter/pshinter.c
+ sc $(SCFLAGS) objname=$@ $<
+#
+# freetype library PS support module
+#
+psaux.o: $(CORE)psaux/psaux.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library PS glyph names module
+#
+psnames.o: $(CORE)psnames/psnames.c
+ sc $(SCFLAGS) code=far objname=$@ $<
+
+#
+# freetype library monochrome raster module
+#
+raster.o: $(CORE)raster/raster.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library anti-aliasing raster module
+#
+smooth.o: $(CORE)smooth/smooth.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library 'sfnt' module
+#
+sfnt.o: $(CORE)sfnt/sfnt.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library glyph and image caching system (still experimental)
+#
+ftcache.o: $(CORE)cache/ftcache.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library OpenType font driver
+#
+cff.o: $(CORE)cff/cff.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library TrueType font driver
+#
+truetype.o: $(CORE)truetype/truetype.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library Type1 font driver
+#
+type1.o: $(CORE)type1/type1.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# FreeType2 library Type42 font driver
+#
+type42.o: $(CORE)type42/type42.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library CID-keyed Type1 font driver
+#
+type1cid.o: $(CORE)cid/type1cid.c
+ sc $(SCFLAGS) objname=$@ $<
+#
+# freetype library CID-keyed Type1 font driver extensions
+#
+#cidafm.o: $(CORE)cid/cidafm.c
+# sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library BDF bitmap font driver
+#
+bdf.o: $(CORE)bdf/bdf.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library PCF bitmap font driver
+#
+pcf.o: $(CORE)pcf/pcf.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library gzip support for compressed PCF bitmap fonts
+#
+gzip.o: $(CORE)gzip/ftgzip.c
+ sc $(SCFLAGS) define FAR objname=$@ $<
+
+#
+# freetype library bzip2 support for compressed PCF bitmap fonts
+#
+bzip2.o: $(CORE)bzip2/ftbzip2.c
+ sc $(SCFLAGS) define FAR objname=$@ $<
+
+#
+# freetype library compress support for compressed PCF bitmap fonts
+#
+lzw.o: $(CORE)lzw/ftlzw.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library PFR font driver
+#
+pfr.o: $(CORE)pfr/pfr.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library Windows FNT/FON bitmap font driver
+#
+winfnt.o: $(CORE)winfonts/winfnt.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library TrueTypeGX validator
+#
+gxvalid.o: $(CORE)gxvalid/gxvalid.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#
+# freetype library OpenType validator
+#
+otvalid.o: $(CORE)otvalid/otvalid.c
+ sc $(SCFLAGS) objname=$@ $<
+
+#Local Variables:
+#coding: latin-1
+#End:
diff --git a/3party/freetype/builds/amiga/src/base/ftdebug.c b/3party/freetype/builds/amiga/src/base/ftdebug.c
new file mode 100644
index 0000000000..5284e697ae
--- /dev/null
+++ b/3party/freetype/builds/amiga/src/base/ftdebug.c
@@ -0,0 +1,279 @@
+/***************************************************************************/
+/* */
+/* ftdebug.c */
+/* */
+/* Debugging and logging component (body). */
+/* */
+/* Copyright 1996-2001, 2002, 2004, 2005 by */
+/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This component contains various macros and functions used to ease the */
+ /* debugging of the FreeType engine. Its main purpose is in assertion */
+ /* checking, tracing, and error detection. */
+ /* */
+ /* There are now three debugging modes: */
+ /* */
+ /* - trace mode */
+ /* */
+ /* Error and trace messages are sent to the log file (which can be the */
+ /* standard error output). */
+ /* */
+ /* - error mode */
+ /* */
+ /* Only error messages are generated. */
+ /* */
+ /* - release mode: */
+ /* */
+ /* No error message is sent or generated. The code is free from any */
+ /* debugging parts. */
+ /* */
+ /*************************************************************************/
+
+
+/*
+ * Based on the default ftdebug.c,
+ * replaced vprintf() with KVPrintF(),
+ * commented out exit(),
+ * replaced getenv() with GetVar().
+ */
+
+#include <exec/types.h>
+#include <utility/tagitem.h>
+#include <dos/exall.h>
+#include <dos/var.h>
+#define __NOLIBBASE__
+#define __NOLOBALIFACE__
+#define __USE_INLINE__
+#include <proto/dos.h>
+#include <clib/debug_protos.h>
+
+#ifndef __amigaos4__
+extern struct Library *DOSBase;
+#else
+extern struct DOSIFace *IDOS;
+#endif
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_INTERNAL_DEBUG_H
+
+
+#if defined( FT_DEBUG_LEVEL_ERROR )
+
+ /* documentation is in ftdebug.h */
+
+ FT_BASE_DEF( void )
+ FT_Message( const char* fmt, ... )
+ {
+ va_list ap;
+
+
+ va_start( ap, fmt );
+/* vprintf( fmt, ap ); */
+ KVPrintF( fmt, ap );
+ va_end( ap );
+ }
+
+
+ /* documentation is in ftdebug.h */
+
+ FT_BASE_DEF( void )
+ FT_Panic( const char* fmt, ... )
+ {
+ va_list ap;
+
+
+ va_start( ap, fmt );
+/* vprintf( fmt, ap ); */
+ KVPrintF( fmt, ap );
+ va_end( ap );
+
+/* exit( EXIT_FAILURE ); */
+ }
+
+#endif /* FT_DEBUG_LEVEL_ERROR */
+
+
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+ /* array of trace levels, initialized to 0 */
+ int ft_trace_levels[trace_count];
+
+
+ /* define array of trace toggle names */
+#define FT_TRACE_DEF( x ) #x ,
+
+ static const char* ft_trace_toggles[trace_count + 1] =
+ {
+#include FT_INTERNAL_TRACE_H
+ NULL
+ };
+
+#undef FT_TRACE_DEF
+
+
+ /* documentation is in ftdebug.h */
+
+ FT_BASE_DEF( FT_Int )
+ FT_Trace_Get_Count( void )
+ {
+ return trace_count;
+ }
+
+
+ /* documentation is in ftdebug.h */
+
+ FT_BASE_DEF( const char * )
+ FT_Trace_Get_Name( FT_Int idx )
+ {
+ int max = FT_Trace_Get_Count();
+
+
+ if ( idx < max )
+ return ft_trace_toggles[idx];
+ else
+ return NULL;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* Initialize the tracing sub-system. This is done by retrieving the */
+ /* value of the `FT2_DEBUG' environment variable. It must be a list of */
+ /* toggles, separated by spaces, `;', or `,'. Example: */
+ /* */
+ /* export FT2_DEBUG="any:3 memory:7 stream:5" */
+ /* */
+ /* This requests that all levels be set to 3, except the trace level for */
+ /* the memory and stream components which are set to 7 and 5, */
+ /* respectively. */
+ /* */
+ /* See the file <include/freetype/internal/fttrace.h> for details of the */
+ /* available toggle names. */
+ /* */
+ /* The level must be between 0 and 7; 0 means quiet (except for serious */
+ /* runtime errors), and 7 means _very_ verbose. */
+ /* */
+ FT_BASE_DEF( void )
+ ft_debug_init( void )
+ {
+/* const char* ft2_debug = getenv( "FT2_DEBUG" ); */
+ char buf[256];
+ const char* ft2_debug = &buf[0];
+
+
+/* if ( ft2_debug ) */
+ if ( GetVar( "FT2_DEBUG", (STRPTR)ft2_debug, 256, LV_VAR ) > 0 )
+ {
+ const char* p = ft2_debug;
+ const char* q;
+
+
+ for ( ; *p; p++ )
+ {
+ /* skip leading whitespace and separators */
+ if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
+ continue;
+
+ /* read toggle name, followed by ':' */
+ q = p;
+ while ( *p && *p != ':' )
+ p++;
+
+ if ( *p == ':' && p > q )
+ {
+ FT_Int n, i, len = (FT_Int)( p - q );
+ FT_Int level = -1, found = -1;
+
+
+ for ( n = 0; n < trace_count; n++ )
+ {
+ const char* toggle = ft_trace_toggles[n];
+
+
+ for ( i = 0; i < len; i++ )
+ {
+ if ( toggle[i] != q[i] )
+ break;
+ }
+
+ if ( i == len && toggle[i] == 0 )
+ {
+ found = n;
+ break;
+ }
+ }
+
+ /* read level */
+ p++;
+ if ( *p )
+ {
+ level = *p++ - '0';
+ if ( level < 0 || level > 7 )
+ level = -1;
+ }
+
+ if ( found >= 0 && level >= 0 )
+ {
+ if ( found == trace_any )
+ {
+ /* special case for `any' */
+ for ( n = 0; n < trace_count; n++ )
+ ft_trace_levels[n] = level;
+ }
+ else
+ ft_trace_levels[found] = level;
+ }
+ }
+ }
+ }
+ }
+
+
+#else /* !FT_DEBUG_LEVEL_TRACE */
+
+
+ FT_BASE_DEF( void )
+ ft_debug_init( void )
+ {
+ /* nothing */
+ }
+
+
+ FT_BASE_DEF( FT_Int )
+ FT_Trace_Get_Count( void )
+ {
+ return 0;
+ }
+
+
+ FT_BASE_DEF( const char * )
+ FT_Trace_Get_Name( FT_Int idx )
+ {
+ FT_UNUSED( idx );
+
+ return NULL;
+ }
+
+
+#endif /* !FT_DEBUG_LEVEL_TRACE */
+
+/*
+Local Variables:
+coding: latin-1
+End:
+*/
+/* END */
diff --git a/3party/freetype/builds/amiga/src/base/ftsystem.c b/3party/freetype/builds/amiga/src/base/ftsystem.c
new file mode 100644
index 0000000000..6f9eac17fc
--- /dev/null
+++ b/3party/freetype/builds/amiga/src/base/ftsystem.c
@@ -0,0 +1,530 @@
+/***************************************************************************/
+/* */
+/* ftsystem.c */
+/* */
+/* Amiga-specific FreeType low-level system interface (body). */
+/* */
+/* Copyright 1996-2001, 2002, 2005, 2006, 2007, 2010 by */
+/* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* This file contains the Amiga interface used by FreeType to access */
+ /* low-level, i.e. memory management, i/o access as well as thread */
+ /* synchronisation. */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Maintained by Detlef Würkner <TetiSoft@apg.lahn.de> */
+ /* */
+ /* Based on the original ftsystem.c, */
+ /* modified to avoid fopen(), fclose(), fread(), fseek(), ftell(), */
+ /* malloc(), realloc(), and free(). */
+ /* */
+ /* Those C library functions are often not thread-safe or cant be */
+ /* used in a shared Amiga library. If that's not a problem for you, */
+ /* you can of course use the default ftsystem.c with C library calls */
+ /* instead. */
+ /* */
+ /* This implementation needs exec V39+ because it uses AllocPooled() etc */
+ /* */
+ /*************************************************************************/
+
+#define __NOLIBBASE__
+#define __NOGLOBALIFACE__
+#define __USE_INLINE__
+#include <proto/exec.h>
+#include <dos/stdio.h>
+#include <proto/dos.h>
+#ifdef __amigaos4__
+extern struct ExecIFace *IExec;
+extern struct DOSIFace *IDOS;
+#else
+extern struct Library *SysBase;
+extern struct Library *DOSBase;
+#endif
+
+#define IOBUF_SIZE 512
+
+/* structure that helps us to avoid
+ * useless calls of Seek() and Read()
+ */
+struct SysFile
+{
+ BPTR file;
+ ULONG iobuf_start;
+ ULONG iobuf_end;
+ UBYTE iobuf[IOBUF_SIZE];
+};
+
+#ifndef __amigaos4__
+/* C implementation of AllocVecPooled (see autodoc exec/AllocPooled) */
+APTR
+Alloc_VecPooled( APTR poolHeader,
+ ULONG memSize )
+{
+ ULONG newSize = memSize + sizeof ( ULONG );
+ ULONG *mem = AllocPooled( poolHeader, newSize );
+
+ if ( !mem )
+ return NULL;
+ *mem = newSize;
+ return mem + 1;
+}
+
+/* C implementation of FreeVecPooled (see autodoc exec/AllocPooled) */
+void
+Free_VecPooled( APTR poolHeader,
+ APTR memory )
+{
+ ULONG *realmem = (ULONG *)memory - 1;
+
+ FreePooled( poolHeader, realmem, *realmem );
+}
+#endif
+
+#include <ft2build.h>
+#include FT_CONFIG_CONFIG_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_SYSTEM_H
+#include FT_ERRORS_H
+#include FT_TYPES_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+ /*************************************************************************/
+ /* */
+ /* MEMORY MANAGEMENT INTERFACE */
+ /* */
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* It is not necessary to do any error checking for the */
+ /* allocation-related functions. This is done by the higher level */
+ /* routines like ft_mem_alloc() or ft_mem_realloc(). */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_alloc */
+ /* */
+ /* <Description> */
+ /* The memory allocation function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* size :: The requested size in bytes. */
+ /* */
+ /* <Return> */
+ /* The address of newly allocated block. */
+ /* */
+ FT_CALLBACK_DEF( void* )
+ ft_alloc( FT_Memory memory,
+ long size )
+ {
+#ifdef __amigaos4__
+ return AllocVecPooled( memory->user, size );
+#else
+ return Alloc_VecPooled( memory->user, size );
+#endif
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_realloc */
+ /* */
+ /* <Description> */
+ /* The memory reallocation function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* cur_size :: The current size of the allocated memory block. */
+ /* */
+ /* new_size :: The newly requested size in bytes. */
+ /* */
+ /* block :: The current address of the block in memory. */
+ /* */
+ /* <Return> */
+ /* The address of the reallocated memory block. */
+ /* */
+ FT_CALLBACK_DEF( void* )
+ ft_realloc( FT_Memory memory,
+ long cur_size,
+ long new_size,
+ void* block )
+ {
+ void* new_block;
+
+#ifdef __amigaos4__
+ new_block = AllocVecPooled ( memory->user, new_size );
+#else
+ new_block = Alloc_VecPooled ( memory->user, new_size );
+#endif
+ if ( new_block != NULL )
+ {
+ CopyMem ( block, new_block,
+ ( new_size > cur_size ) ? cur_size : new_size );
+#ifdef __amigaos4__
+ FreeVecPooled ( memory->user, block );
+#else
+ Free_VecPooled ( memory->user, block );
+#endif
+ }
+ return new_block;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_free */
+ /* */
+ /* <Description> */
+ /* The memory release function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* block :: The address of block in memory to be freed. */
+ /* */
+ FT_CALLBACK_DEF( void )
+ ft_free( FT_Memory memory,
+ void* block )
+ {
+#ifdef __amigaos4__
+ FreeVecPooled( memory->user, block );
+#else
+ Free_VecPooled( memory->user, block );
+#endif
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* RESOURCE MANAGEMENT INTERFACE */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_io
+
+ /* We use the macro STREAM_FILE for convenience to extract the */
+ /* system-specific stream handle from a given FreeType stream object */
+#define STREAM_FILE( stream ) ( (struct SysFile *)stream->descriptor.pointer )
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_amiga_stream_close */
+ /* */
+ /* <Description> */
+ /* The function to close a stream. */
+ /* */
+ /* <Input> */
+ /* stream :: A pointer to the stream object. */
+ /* */
+ FT_CALLBACK_DEF( void )
+ ft_amiga_stream_close( FT_Stream stream )
+ {
+ struct SysFile* sysfile;
+
+ sysfile = STREAM_FILE( stream );
+ Close ( sysfile->file );
+ FreeMem ( sysfile, sizeof ( struct SysFile ));
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+ stream->base = 0;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_amiga_stream_io */
+ /* */
+ /* <Description> */
+ /* The function to open a stream. */
+ /* */
+ /* <Input> */
+ /* stream :: A pointer to the stream object. */
+ /* */
+ /* offset :: The position in the data stream to start reading. */
+ /* */
+ /* buffer :: The address of buffer to store the read data. */
+ /* */
+ /* count :: The number of bytes to read from the stream. */
+ /* */
+ /* <Return> */
+ /* The number of bytes actually read. */
+ /* */
+ FT_CALLBACK_DEF( unsigned long )
+ ft_amiga_stream_io( FT_Stream stream,
+ unsigned long offset,
+ unsigned char* buffer,
+ unsigned long count )
+ {
+ struct SysFile* sysfile;
+ unsigned long read_bytes;
+
+ if ( count != 0 )
+ {
+ sysfile = STREAM_FILE( stream );
+
+ /* handle the seek */
+ if ( (offset < sysfile->iobuf_start) || (offset + count > sysfile->iobuf_end) )
+ {
+ /* requested offset implies we need a buffer refill */
+ if ( !sysfile->iobuf_end || offset != sysfile->iobuf_end )
+ {
+ /* a physical seek is necessary */
+ Seek( sysfile->file, offset, OFFSET_BEGINNING );
+ }
+ sysfile->iobuf_start = offset;
+ sysfile->iobuf_end = 0; /* trigger a buffer refill */
+ }
+
+ /* handle the read */
+ if ( offset + count <= sysfile->iobuf_end )
+ {
+ /* we have buffer and requested bytes are all inside our buffer */
+ CopyMem( &sysfile->iobuf[offset - sysfile->iobuf_start], buffer, count );
+ read_bytes = count;
+ }
+ else
+ {
+ /* (re)fill buffer */
+ if ( count <= IOBUF_SIZE )
+ {
+ /* requested bytes is a subset of the buffer */
+ read_bytes = Read( sysfile->file, sysfile->iobuf, IOBUF_SIZE );
+ if ( read_bytes == -1UL )
+ {
+ /* error */
+ read_bytes = 0;
+ }
+ else
+ {
+ sysfile->iobuf_end = offset + read_bytes;
+ CopyMem( sysfile->iobuf, buffer, count );
+ if ( read_bytes > count )
+ {
+ read_bytes = count;
+ }
+ }
+ }
+ else
+ {
+ /* we actually need more than our buffer can hold, so we decide
+ ** to do a single big read, and then copy the last IOBUF_SIZE
+ ** bytes of that to our internal buffer for later use */
+ read_bytes = Read( sysfile->file, buffer, count );
+ if ( read_bytes == -1UL )
+ {
+ /* error */
+ read_bytes = 0;
+ }
+ else
+ {
+ ULONG bufsize;
+
+ bufsize = ( read_bytes > IOBUF_SIZE ) ? IOBUF_SIZE : read_bytes;
+ sysfile->iobuf_end = offset + read_bytes;
+ sysfile->iobuf_start = sysfile->iobuf_end - bufsize;
+ CopyMem( &buffer[read_bytes - bufsize] , sysfile->iobuf, bufsize );
+ }
+ }
+ }
+ }
+ else
+ {
+ read_bytes = 0;
+ }
+
+ return read_bytes;
+ }
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( FT_Error )
+ FT_Stream_Open( FT_Stream stream,
+ const char* filepathname )
+ {
+ struct FileInfoBlock* fib;
+ struct SysFile* sysfile;
+
+
+ if ( !stream )
+ return FT_Err_Invalid_Stream_Handle;
+
+#ifdef __amigaos4__
+ sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_SHARED );
+#else
+ sysfile = AllocMem ( sizeof (struct SysFile ), MEMF_PUBLIC );
+#endif
+ if ( !sysfile )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not open `%s'\n", filepathname ));
+
+ return FT_Err_Cannot_Open_Resource;
+ }
+ sysfile->file = Open( (STRPTR)filepathname, MODE_OLDFILE );
+ if ( !sysfile->file )
+ {
+ FreeMem ( sysfile, sizeof ( struct SysFile ));
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not open `%s'\n", filepathname ));
+
+ return FT_Err_Cannot_Open_Resource;
+ }
+
+ fib = AllocDosObject( DOS_FIB, NULL );
+ if ( !fib )
+ {
+ Close ( sysfile->file );
+ FreeMem ( sysfile, sizeof ( struct SysFile ));
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not open `%s'\n", filepathname ));
+
+ return FT_Err_Cannot_Open_Resource;
+ }
+ if ( !( ExamineFH( sysfile->file, fib ) ) )
+ {
+ FreeDosObject( DOS_FIB, fib );
+ Close ( sysfile->file );
+ FreeMem ( sysfile, sizeof ( struct SysFile ));
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not open `%s'\n", filepathname ));
+
+ return FT_Err_Cannot_Open_Resource;
+ }
+ stream->size = fib->fib_Size;
+ FreeDosObject( DOS_FIB, fib );
+
+ stream->descriptor.pointer = (void *)sysfile;
+ stream->pathname.pointer = (char*)filepathname;
+ sysfile->iobuf_start = 0;
+ sysfile->iobuf_end = 0;
+ stream->pos = 0;
+
+ stream->read = ft_amiga_stream_io;
+ stream->close = ft_amiga_stream_close;
+
+ if ( !stream->size )
+ {
+ ft_amiga_stream_close( stream );
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
+ return FT_Err_Cannot_Open_Stream;;
+ }
+
+ FT_TRACE1(( "FT_Stream_Open:" ));
+ FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
+ filepathname, stream->size ));
+
+ return FT_Err_Ok;
+ }
+
+
+#ifdef FT_DEBUG_MEMORY
+
+ extern FT_Int
+ ft_mem_debug_init( FT_Memory memory );
+
+ extern void
+ ft_mem_debug_done( FT_Memory memory );
+
+#endif
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( FT_Memory )
+ FT_New_Memory( void )
+ {
+ FT_Memory memory;
+
+
+#ifdef __amigaos4__
+ memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_SHARED );
+#else
+ memory = (FT_Memory)AllocVec( sizeof ( *memory ), MEMF_PUBLIC );
+#endif
+ if ( memory )
+ {
+#ifdef __amigaos4__
+ memory->user = CreatePool( MEMF_SHARED, 16384, 16384 );
+#else
+ memory->user = CreatePool( MEMF_PUBLIC, 16384, 16384 );
+#endif
+ if ( memory->user == NULL )
+ {
+ FreeVec( memory );
+ memory = NULL;
+ }
+ else
+ {
+ memory->alloc = ft_alloc;
+ memory->realloc = ft_realloc;
+ memory->free = ft_free;
+#ifdef FT_DEBUG_MEMORY
+ ft_mem_debug_init( memory );
+#endif
+ }
+ }
+
+ return memory;
+ }
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( void )
+ FT_Done_Memory( FT_Memory memory )
+ {
+#ifdef FT_DEBUG_MEMORY
+ ft_mem_debug_done( memory );
+#endif
+
+ DeletePool( memory->user );
+ FreeVec( memory );
+ }
+
+/*
+Local Variables:
+coding: latin-1
+End:
+*/
+/* END */
diff --git a/3party/freetype/builds/ansi/ansi-def.mk b/3party/freetype/builds/ansi/ansi-def.mk
new file mode 100644
index 0000000000..2c58572951
--- /dev/null
+++ b/3party/freetype/builds/ansi/ansi-def.mk
@@ -0,0 +1,74 @@
+#
+# FreeType 2 configuration rules for a `normal' ANSI system
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+DELETE := rm -f
+CAT := cat
+SEP := /
+BUILD_DIR := $(TOP_DIR)/builds/ansi
+PLATFORM := ansi
+
+
+# The directory where all library files are placed.
+#
+# By default, this is the same as $(OBJ_DIR); however, this can be changed
+# to suit particular needs.
+#
+LIB_DIR := $(OBJ_DIR)
+
+
+# The name of the final library file. Note that the DOS-specific Makefile
+# uses a shorter (8.3) name.
+#
+LIBRARY := lib$(PROJECT)
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -c
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS :=
+
+
+# EOF
diff --git a/3party/freetype/builds/ansi/ansi.mk b/3party/freetype/builds/ansi/ansi.mk
new file mode 100644
index 0000000000..32b3bac3e3
--- /dev/null
+++ b/3party/freetype/builds/ansi/ansi.mk
@@ -0,0 +1,21 @@
+#
+# FreeType 2 configuration rules for a `normal' pseudo ANSI compiler/system
+#
+
+
+# Copyright 1996-2000 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.
+
+
+include $(TOP_DIR)/builds/ansi/ansi-def.mk
+include $(TOP_DIR)/builds/compiler/ansi-cc.mk
+include $(TOP_DIR)/builds/link_std.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/atari/ATARI.H b/3party/freetype/builds/atari/ATARI.H
new file mode 100644
index 0000000000..9f78c924b8
--- /dev/null
+++ b/3party/freetype/builds/atari/ATARI.H
@@ -0,0 +1,20 @@
+#if defined( __GXVALID_H__ )
+#pragma warn -aus /* too many unevaluated variables in gxvalid */
+#endif
+
+#ifndef ATARI_H
+#define ATARI_H
+
+#pragma warn -stu
+
+/* PureC doesn't like 32bit enumerations */
+
+#ifndef FT_IMAGE_TAG
+#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
+#endif /* FT_IMAGE_TAG */
+
+#ifndef FT_ENC_TAG
+#define FT_ENC_TAG( value, a, b, c, d ) value
+#endif /* FT_ENC_TAG */
+
+#endif /* ATARI_H */
diff --git a/3party/freetype/builds/atari/FNames.SIC b/3party/freetype/builds/atari/FNames.SIC
new file mode 100644
index 0000000000..f3657179d9
--- /dev/null
+++ b/3party/freetype/builds/atari/FNames.SIC
@@ -0,0 +1,37 @@
+/* the following changes file names for PureC projects */
+
+if (argc > 0)
+{
+ ordner = argv[0];
+ if (basename(ordner) == "") /* ist Ordner */
+ {
+ ChangeFilenames(ordner);
+ }
+}
+
+proc ChangeFilenames(folder)
+local i,entries,directory,file;
+{
+ entries = filelist(directory,folder);
+ for (i = 0; i < entries; ++i)
+ {
+ file = directory[i,0];
+ if ((directory[i,3]&16) > 0) /* subdirectory */
+ {
+ ChangeFilenames(folder+file+"\\");
+ }
+ else
+ {
+ if ((stricmp(suffix(file),".h")==0)|(stricmp(suffix(file),".c")==0))
+ ChangeFilename(folder,file);
+ }
+ }
+}
+
+proc ChangeFilename(path,datei)
+local newfile,err;
+{
+ newfile=datei;
+ newfile[0]=(newfile[0] | 32) ^ 32;
+ err=files.rename("-q",path+datei,newfile);
+}
diff --git a/3party/freetype/builds/atari/FREETYPE.PRJ b/3party/freetype/builds/atari/FREETYPE.PRJ
new file mode 100644
index 0000000000..4776a5bc69
--- /dev/null
+++ b/3party/freetype/builds/atari/FREETYPE.PRJ
@@ -0,0 +1,32 @@
+;FreeType project file
+
+FREETYPE.LIB
+
+.C [-K -P -R -A]
+.L [-J -V]
+.S
+
+=
+
+..\..\src\base\ftsystem.c
+..\..\src\base\ftdebug.c
+
+..\..\src\base\ftinit.c
+..\..\src\base\ftglyph.c
+..\..\src\base\ftmm
+..\..\src\base\ftbbox
+
+..\..\src\base\ftbase.c
+..\..\src\autohint\autohint.c
+;..\..\src\cache\ftcache.c
+..\..\src\cff\cff.c
+..\..\src\cid\type1cid.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
diff --git a/3party/freetype/builds/atari/README.TXT b/3party/freetype/builds/atari/README.TXT
new file mode 100644
index 0000000000..04eec63519
--- /dev/null
+++ b/3party/freetype/builds/atari/README.TXT
@@ -0,0 +1,51 @@
+Compiling FreeType 2 with PureC compiler
+========================================
+
+[See below for a German version.]
+
+To compile FreeType 2 as a library the following changes must be applied:
+
+- All *.c files must start with an uppercase letter.
+ (In case GEMSCRIPT is available:
+ Simply drag the whole FreeType 2 directory to the file `FNames.SIC'.)
+
+- You have to change the INCLUDE directory in PureC's compiler options
+ to contain both the `INCLUDE' and `freetype2\include' directory.
+ Example:
+
+ INCLUDE;E:\freetype2\include
+
+- The file `freetype2/include/Ft2build.h' must be patched as follows to
+ include ATARI.H:
+
+ #ifndef __FT2_BUILD_GENERIC_H__
+ #define __FT2_BUILD_GENERIC_H__
+
+ #include "ATARI.H"
+
+
+
+Compilieren von FreeType 2 mit PureC
+====================================
+
+Um FreeType 2 als eine Bibliothek (library) zu compilieren, muss folgendes
+ge„ndert werden:
+
+- Alle *.c-files mssen mit einem GROSSBUCHSTABEN beginnen.
+ (Falls GEMSCRIPT zur Verfgung steht:
+ Den kompletten Ordner freetype2 auf die Datei `FNames.SIC' draggen.)
+
+- In den Compiler-Optionen von PureC muss das INCLUDE directory auf INCLUDE
+ und freetype2\include verweisen. Z.B.:
+
+ INCLUDE;E:\freetype2\include
+
+- In der Datei freetype2/include/Ft2build.h muss zu Beginn
+ ein #include "ATARI.H" wie folgt eingefgt werden:
+
+ #ifndef __FT2_BUILD_GENERIC_H__
+ #define __FT2_BUILD_GENERIC_H__
+
+ #include "ATARI.H"
+
+--- end of README.TXT ---
diff --git a/3party/freetype/builds/atari/deflinejoiner.awk b/3party/freetype/builds/atari/deflinejoiner.awk
new file mode 100644
index 0000000000..c872a70d86
--- /dev/null
+++ b/3party/freetype/builds/atari/deflinejoiner.awk
@@ -0,0 +1,181 @@
+#!/usr/bin/env awk
+
+
+function shift( array, \
+ junk, elm0, l )
+{
+ elm0 = array[0]
+ for ( l = 0; l < asorti( array, junk ) - 1; l++ )
+ array[l] = array[l+1];
+ delete array[l]
+ return elm0
+}
+
+
+function init_cpp_src_line()
+{
+ logical_line = ""
+ delete break_pos
+}
+
+
+function shift_valid_bp( array, \
+ junk, elm )
+{
+ elm = -1
+
+ if ( 0 < asorti( array, junk ) )
+ do {
+ elm = shift( array )
+ } while ( 0 > elm );
+
+ return elm
+}
+
+
+function check_cpp_src_line_break_pos( \
+ i, junk )
+{
+ printf( "break_pos:" )
+ for ( i = 0; i < asorti( break_pos, junk ); i++ )
+ printf( " %d", break_pos[i] );
+ printf( "\n" )
+}
+
+
+function check_cpp_src_line()
+{
+ printf( "logical_line[%s]\n", logical_line )
+ check_cpp_src_line_break_pos()
+}
+
+
+function append_line( phys_line, \
+ filt_line, bp_len )
+{
+ filt_line = phys_line
+ sub( /\\$/, " ", filt_line )
+ logical_line = logical_line filt_line
+ bp_len = asorti( break_pos, junk )
+ break_pos[bp_len] = length( logical_line ) - 1
+}
+
+
+function print_line( \
+ c0, c1, i, junk, part_str )
+{
+ c0 = 0
+
+ while( asorti( break_pos, junk ) > 1 )
+ {
+ if ( ( c1 = shift_valid_bp( break_pos ) ) < 1 )
+ {
+ part_str = substr( logical_line, c0 + 1 )
+ printf( "%s\n", part_str )
+ return
+ }
+
+ part_str = substr( logical_line, c0 + 1, c1 - c0 + 1 )
+ gsub( / $/, "\\", part_str )
+ printf( "%s\n", part_str )
+ c0 = c1 + 1
+ }
+
+ part_str = substr( logical_line, c0 + 1 )
+ printf( "%s\n", part_str )
+}
+
+
+function shrink_spaces( pos, \
+ tail, removed_length, k )
+{
+ tail = substr( logical_line, pos )
+ sub( /^[ \t]+/, " ", tail )
+ removed_length = length( logical_line ) - pos - length( tail ) + 1
+ logical_line = substr( logical_line, 0, pos - 1 ) tail
+
+
+ for ( k = 0; k < asorti( break_pos, junk ); k++ )
+ if ( ( pos + removed_length ) <= break_pos[k] )
+ break_pos[k] = break_pos[k] - removed_length;
+ else if ( pos <= break_pos[k] )
+ break_pos[k] = -1;
+
+ return removed_length
+}
+
+
+function shrink_spaces_to_linebreak( pos, \
+ junk, part_str, removed_length, i )
+{
+ for ( i = 0; i < asorti( break_pos, junk ) && break_pos[i] < pos ; i++ )
+ ;
+
+ if ( break_pos[i] < 1 )
+ return;
+
+ part_str = substr( logical_line, pos, break_pos[i] - pos + 1 )
+ sub( /^[ \t]+/, " ", part_str )
+ removed_length = ( break_pos[i] - pos + 1 ) - length( part_str )
+
+ tail = substr( logical_line, pos + removed_length )
+ logical_line = substr( logical_line, 0, pos - 1 ) tail
+
+ for ( ; i < asorti( break_pos, junk ); i++ )
+ break_pos[i] -= removed_length;
+
+ return removed_length
+}
+
+
+function delete_linebreaks_in_2nd_token( \
+ tail, paren_depth, junk, i, j, k, l )
+{
+ if ( logical_line ~ /^[ \t]*#[ \t]*define[ \t]+[0-9A-Za-z_]+\(/ )
+ {
+ tail = logical_line
+ sub( /^[ \t]*#[ \t]*define[ \t]+[0-9A-Za-z_]+/, "", tail )
+
+ paren_depth = 0
+ l = 0
+ i = length( logical_line ) - length( tail ) + 1 # seek to the 1st op paren
+ j = i
+ do {
+ if ( substr( logical_line, j, 2 ) ~ /[ \t][ \t]/ )
+ l = shrink_spaces( j );
+ else if ( substr( logical_line, j, 1 ) == "(" )
+ paren_depth += 1;
+ else if ( substr( logical_line, j, 1 ) == ")" )
+ paren_depth -= 1;
+ j += 1
+ } while ( j < length( logical_line ) && paren_depth != 0 )
+
+ for ( k = 0; k < asorti( break_pos, junk ); k++ )
+ if ( i <= break_pos[k] && break_pos[k] < j )
+ break_pos[k] = -1;
+
+ if ( l > 0 )
+ shrink_spaces_to_linebreak( j );
+ }
+}
+
+
+BEGIN{
+ init_cpp_src_line()
+}
+{
+ append_line( $0 )
+ if ( $0 !~ /\\$/ )
+ {
+ delete_linebreaks_in_2nd_token()
+ print_line()
+ init_cpp_src_line()
+ }
+}
+END{
+ if ( 0 < length( logical_line ) )
+ {
+ delete_linebreaks_in_2nd_token()
+ print_line()
+ }
+}
diff --git a/3party/freetype/builds/atari/gen-purec-patch.sh b/3party/freetype/builds/atari/gen-purec-patch.sh
new file mode 100755
index 0000000000..1ec050c11f
--- /dev/null
+++ b/3party/freetype/builds/atari/gen-purec-patch.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+TOP_DIR=.
+OBJ_DIR=.
+
+for x in "$@"
+do
+ case x"$x" in
+ x--srcdir=* | x--topdir=* )
+ TOP_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
+ ;;
+ x--builddir=* | x--objdir=* )
+ OBJ_DIR=`echo $x | sed 's/^--[a-z]*dir=//'`
+ ;;
+ esac
+done
+
+mkdir -p ${OBJ_DIR}/builds/atari/tmp/orig
+
+( cd ${TOP_DIR} && find . -name '*.[CHch]' -type f | fgrep -v builds/atari/tmp | cpio -o ) | \
+( cd ${OBJ_DIR}/builds/atari/tmp/orig && cpio -idum )
+cp ${TOP_DIR}/builds/atari/deflinejoiner.awk ${OBJ_DIR}/builds/atari/tmp
+
+pushd ${OBJ_DIR}/builds/atari/tmp
+
+ cp -pr orig purec
+ for f in `cd orig && find . -type f`
+ do
+ echo filter $f
+ env LANG=C awk -f deflinejoiner.awk < orig/$f > purec/$f
+ done
+
+ echo '#define FT2_BUILD_LIBRARY' > purec/include/ft2build.h
+ echo '#include "ATARI.H"' >> purec/include/ft2build.h
+ env LANG=C awk -f deflinejoiner.awk < orig/include/ft2build.h >> purec/include/ft2build.h
+
+ env LANG=C diff -ur orig purec > ../purec.diff
+
+popd
+rm -rf ${OBJ_DIR}/builds/atari/tmp
diff --git a/3party/freetype/builds/beos/beos-def.mk b/3party/freetype/builds/beos/beos-def.mk
new file mode 100644
index 0000000000..4371a30aa3
--- /dev/null
+++ b/3party/freetype/builds/beos/beos-def.mk
@@ -0,0 +1,76 @@
+#
+# FreeType 2 configuration rules for a BeOS system
+#
+# this is similar to the "ansi-def.mk" file, except for BUILD and PLATFORM
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+DELETE := rm -f
+CAT := cat
+SEP := /
+BUILD_DIR := $(TOP_DIR)/builds/beos
+PLATFORM := beos
+
+
+# The directory where all library files are placed.
+#
+# By default, this is the same as $(OBJ_DIR); however, this can be changed
+# to suit particular needs.
+#
+LIB_DIR := $(OBJ_DIR)
+
+
+# The name of the final library file. Note that the DOS-specific Makefile
+# uses a shorter (8.3) name.
+#
+LIBRARY := lib$(PROJECT)
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -c
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS :=
+
+
+# EOF
diff --git a/3party/freetype/builds/beos/beos.mk b/3party/freetype/builds/beos/beos.mk
new file mode 100644
index 0000000000..b5c8bdabe3
--- /dev/null
+++ b/3party/freetype/builds/beos/beos.mk
@@ -0,0 +1,19 @@
+#
+# FreeType 2 configuration rules for a BeOS system
+#
+
+# Copyright 1996-2000, 2002, 2005 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.
+
+include $(TOP_DIR)/builds/beos/beos-def.mk
+include $(TOP_DIR)/builds/compiler/ansi-cc.mk
+include $(TOP_DIR)/builds/link_std.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/beos/detect.mk b/3party/freetype/builds/beos/detect.mk
new file mode 100644
index 0000000000..24a0878862
--- /dev/null
+++ b/3party/freetype/builds/beos/detect.mk
@@ -0,0 +1,41 @@
+#
+# FreeType 2 configuration file to detect an BeOS host platform.
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+.PHONY: setup
+
+
+ifeq ($(PLATFORM),ansi)
+
+ ifdef BE_HOST_CPU
+
+ PLATFORM := beos
+
+ endif # test MACHTYPE beos
+endif
+
+ifeq ($(PLATFORM),beos)
+
+ DELETE := rm -f
+ CAT := cat
+ SEP := /
+ BUILD_DIR := $(TOP_DIR)/builds/beos
+ CONFIG_FILE := beos.mk
+
+ setup: std_setup
+
+endif # test PLATFORM beos
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/ansi-cc.mk b/3party/freetype/builds/compiler/ansi-cc.mk
new file mode 100644
index 0000000000..3b668e2010
--- /dev/null
+++ b/3party/freetype/builds/compiler/ansi-cc.mk
@@ -0,0 +1,80 @@
+#
+# FreeType 2 generic pseudo ANSI compiler
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# Compiler command line name
+#
+CC := cc
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := o
+SO := o
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := a
+SA := a
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -c
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+# we assume the compiler is already strictly ANSI
+#
+ANSIFLAGS :=
+
+
+# Library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+LINK_LIBRARY = $(AR) -r $@ $(subst /,$(COMPILER_SEP),$(OBJECTS_LIST))
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/bcc-dev.mk b/3party/freetype/builds/compiler/bcc-dev.mk
new file mode 100644
index 0000000000..63a46ad168
--- /dev/null
+++ b/3party/freetype/builds/compiler/bcc-dev.mk
@@ -0,0 +1,86 @@
+#
+# FreeType 2 Borland C++-specific with NO OPTIMIZATIONS + DEBUGGING
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# Compiler command line name
+#
+CC := bcc32
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := obj
+SO := obj
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := lib
+SA := lib
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L :=
+
+
+# Target flag -- no trailing space.
+#
+T := -o
+TE := -e
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -q -c -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := -A
+
+
+# Library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+LINK_LIBRARY = tlib /u /P128 $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
+
+
+# Borland C++ specific temporary files
+#
+CLEAN += \
+ $(subst /,$(SEP),$(TOP_DIR)/apinames.$(O)) \
+ $(subst /,$(SEP),$(OBJ_DIR)/apinames.tds)
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/bcc.mk b/3party/freetype/builds/compiler/bcc.mk
new file mode 100644
index 0000000000..855edadf0a
--- /dev/null
+++ b/3party/freetype/builds/compiler/bcc.mk
@@ -0,0 +1,86 @@
+#
+# FreeType 2 Borland C++-specific rules
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# Compiler command line name
+#
+CC := bcc32
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := obj
+SO := obj
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := lib
+SA := lib
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L :=
+
+
+# Target flag -- no trailing space.
+#
+T := -o
+TE := -e
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -c -q -y -d -v -Od -w-par -w-ccc -w-rch -w-pro -w-aus
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := -A
+
+
+# Library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+LINK_LIBRARY = tlib /u /P128 $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
+
+
+# Borland C++ specific temporary files
+#
+CLEAN += \
+ $(subst /,$(SEP),$(TOP_DIR)/apinames.$(O)) \
+ $(subst /,$(SEP),$(OBJ_DIR)/apinames.tds)
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/emx.mk b/3party/freetype/builds/compiler/emx.mk
new file mode 100644
index 0000000000..c237005cb1
--- /dev/null
+++ b/3party/freetype/builds/compiler/emx.mk
@@ -0,0 +1,77 @@
+#
+# FreeType 2 emx-specific definitions
+#
+
+
+# Copyright 2003, 2006 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.
+
+
+# Compiler command line name
+#
+CC := set GCCOPT="-ansi -pedantic"; gcc
+COMPILER_SEP := /
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := o
+SO := o
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := a
+SA := a
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -c -g -O6 -Wall
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS :=
+
+
+# Library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+LINK_LIBRARY = $(foreach m,$(OBJECTS_LIST),$(AR) -r $@ $(m);) echo > nul
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/gcc-dev.mk b/3party/freetype/builds/compiler/gcc-dev.mk
new file mode 100644
index 0000000000..c63e1262eb
--- /dev/null
+++ b/3party/freetype/builds/compiler/gcc-dev.mk
@@ -0,0 +1,95 @@
+#
+# FreeType 2 gcc-specific with NO OPTIMIZATIONS + DEBUGGING
+#
+
+
+# Copyright 1996-2000, 2003, 2004, 2005, 2006 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.
+
+
+# Compiler command line name
+#
+CC := gcc
+COMPILER_SEP := /
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := o
+SO := o
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := a
+SA := a
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+ifndef CFLAGS
+ ifeq ($(findstring g++,$(CC)),)
+ nested_externs := -Wnested-externs
+ strict_prototypes := -Wstrict-prototypes
+ endif
+
+ CFLAGS := -c -g -O0 \
+ -Wall \
+ -W \
+ -Wundef \
+ -Wshadow \
+ -Wpointer-arith \
+ -Wwrite-strings \
+ -Wredundant-decls \
+ -Wno-long-long \
+ $(nested_externs) \
+ $(strict_prototypes)
+endif
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := -ansi -pedantic
+
+
+# Library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/gcc.mk b/3party/freetype/builds/compiler/gcc.mk
new file mode 100644
index 0000000000..f6b7101b38
--- /dev/null
+++ b/3party/freetype/builds/compiler/gcc.mk
@@ -0,0 +1,77 @@
+#
+# FreeType 2 gcc-specific definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2005, 2006, 2009 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.
+
+
+# Compiler command line name
+#
+CC := gcc
+COMPILER_SEP := /
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := o
+SO := o
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := a
+SA := a
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -c -g -O3 -Wall
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := -ansi -pedantic
+
+
+# Library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/intelc.mk b/3party/freetype/builds/compiler/intelc.mk
new file mode 100644
index 0000000000..413ce5bacc
--- /dev/null
+++ b/3party/freetype/builds/compiler/intelc.mk
@@ -0,0 +1,85 @@
+#
+# FreeType 2 Intel C/C++ definitions (VC++ compatibility mode)
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# compiler command line name
+#
+CC := icl
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := obj
+SO := obj
+
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := lib
+SA := lib
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := /I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := /D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := /Fl
+
+
+# Target flag.
+#
+T := /Fo
+TE := /Fe
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+# Note that the Intel C/C++ compiler version 4.5 complains about
+# the use of FT_FIELD_OFFSET with "value must be arithmetic type"!
+# This really looks like a bug in the compiler because the macro
+# _does_ compute an arithmetic value, so we disable this warning
+# with "/Qwd32".
+#
+CFLAGS ?= /nologo /c /Ox /G5 /W3 /Qwd32
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := /Qansi_alias /Za
+
+# Library linking
+#
+#CLEAN_LIBRARY =
+LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/unix-lcc.mk b/3party/freetype/builds/compiler/unix-lcc.mk
new file mode 100644
index 0000000000..d79f50846c
--- /dev/null
+++ b/3party/freetype/builds/compiler/unix-lcc.mk
@@ -0,0 +1,83 @@
+#
+# FreeType 2 Unix LCC specific definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# Command line name
+#
+CC := lcc
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := o
+SO := o
+
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := a
+SA := a
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -c -g
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+# LCC is pure ANSI anyway!
+#
+# the "-A" flag simply increments verbosity about non ANSI code
+#
+ANSIFLAGS := -A
+
+
+# library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(PROJECT_LIBRARY)
+LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/visualage.mk b/3party/freetype/builds/compiler/visualage.mk
new file mode 100644
index 0000000000..c109659bf7
--- /dev/null
+++ b/3party/freetype/builds/compiler/visualage.mk
@@ -0,0 +1,76 @@
+#
+# FreeType 2 Visual Age C++ specific definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# command line compiler name
+#
+CC := icc
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := obj
+SO := obj
+
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := lib
+SA := lib
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := /I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := /D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := /Fl
+
+
+# Target flag.
+#
+T := /Fo
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+CFLAGS ?= /Q- /Gd+ /O2 /G5 /W3 /C
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSI_FLAGS := /Sa
+
+
+# Library linking
+#
+#CLEAN_LIBRARY :=
+LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/visualc.mk b/3party/freetype/builds/compiler/visualc.mk
new file mode 100644
index 0000000000..2e19ef86a3
--- /dev/null
+++ b/3party/freetype/builds/compiler/visualc.mk
@@ -0,0 +1,82 @@
+#
+# FreeType 2 Visual C++ definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2005, 2006, 2008 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.
+
+
+# compiler command line name
+#
+CC := cl
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := obj
+SO := obj
+
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := lib
+SA := lib
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := /I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := /D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := /Fl
+
+
+# Target flag.
+#
+T := /Fo
+
+# Target executable flag
+#
+TE := /Fe
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= /nologo /c /Ox /W3 /WX
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := /Za /D_CRT_SECURE_NO_DEPRECATE
+
+
+# Library linking
+#
+#CLEAN_LIBRARY =
+LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
+
+
+# EOF
diff --git a/3party/freetype/builds/compiler/watcom.mk b/3party/freetype/builds/compiler/watcom.mk
new file mode 100644
index 0000000000..4db1e7fece
--- /dev/null
+++ b/3party/freetype/builds/compiler/watcom.mk
@@ -0,0 +1,81 @@
+#
+# FreeType 2 Watcom-specific definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# Compiler command line name
+#
+CC := wcc386
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := obj
+SO := obj
+
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := lib
+SA := lib
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I=
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -FO=
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -zq
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := -za
+
+
+# Library linking
+#
+CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+LINK_LIBRARY = $(subst /,$(COMPILER_SEP), \
+ wlib -q -n $@; \
+ $(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
+ echo > nul)
+
+# EOF
diff --git a/3party/freetype/builds/compiler/win-lcc.mk b/3party/freetype/builds/compiler/win-lcc.mk
new file mode 100644
index 0000000000..5d02d82462
--- /dev/null
+++ b/3party/freetype/builds/compiler/win-lcc.mk
@@ -0,0 +1,81 @@
+#
+# FreeType 2 Win32-LCC specific definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# Command line name
+#
+CC := lcc
+COMPILER_SEP := $(SEP)
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := obj
+SO := obj
+
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := lib
+SA := lib
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -Fl
+
+
+# Target flag.
+#
+T := -Fo
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+CFLAGS ?= -c -g2 -O
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+# LCC is pure ANSI anyway!
+#
+ANSIFLAGS :=
+
+
+# library linking
+#
+#CLEAN_LIBRARY :=
+LINK_LIBRARY = lcclib /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
+
+
+# EOF
diff --git a/3party/freetype/builds/detect.mk b/3party/freetype/builds/detect.mk
new file mode 100644
index 0000000000..987ae51c41
--- /dev/null
+++ b/3party/freetype/builds/detect.mk
@@ -0,0 +1,154 @@
+#
+# FreeType 2 host platform detection rules
+#
+
+
+# Copyright 1996-2000, 2001, 2002, 2003, 2006, 2008 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+# This sub-Makefile is in charge of detecting the current platform. It sets
+# the following variables:
+#
+# BUILD_DIR The configuration and system-specific directory. Usually
+# `freetype/builds/$(PLATFORM)' but can be different for
+# custom builds of the library.
+#
+# The following variables must be defined in system specific `detect.mk'
+# files:
+#
+# PLATFORM The detected platform. This will default to `ansi' if
+# auto-detection fails.
+# CONFIG_FILE The configuration sub-makefile to use. This usually depends
+# on the compiler defined in the `CC' environment variable.
+# DELETE The shell command used to remove a given file.
+# COPY The shell command used to copy one file.
+# SEP The platform-specific directory separator.
+# COMPILER_SEP The separator used in arguments of the compilation tools.
+# CC The compiler to use.
+#
+# You need to set the following variable(s) before calling it:
+#
+# TOP_DIR The top-most directory in the FreeType library source
+# hierarchy. If not defined, it will default to `.'.
+
+# Set auto-detection default to `ansi' resp. UNIX-like operating systems.
+#
+PLATFORM := ansi
+DELETE := $(RM)
+COPY := cp
+CAT := cat
+SEP := /
+
+BUILD_CONFIG := $(TOP_DIR)/builds
+
+# These two assignments must be delayed.
+BUILD_DIR = $(BUILD_CONFIG)/$(PLATFORM)
+CONFIG_RULES = $(BUILD_DIR)/$(CONFIG_FILE)
+
+# We define the BACKSLASH variable to hold a single back-slash character.
+# This is needed because a line like
+#
+# SEP := \
+#
+# does not work with GNU Make (the backslash is interpreted as a line
+# continuation). While a line like
+#
+# SEP := \\
+#
+# really defines $(SEP) as `\' on Unix, and `\\' on Dos and Windows!
+#
+BACKSLASH := $(strip \ )
+
+# Find all auto-detectable platforms.
+#
+PLATFORMS := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG)/*/detect.mk)))
+.PHONY: $(PLATFORMS) ansi
+
+# Filter out platform specified as setup target.
+#
+PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS)))
+
+# If no setup target platform was specified, enable auto-detection/
+# default platform.
+#
+ifeq ($(PLATFORM),)
+ PLATFORM := ansi
+endif
+
+# If the user has explicitly asked for `ansi' on the command line,
+# disable auto-detection.
+#
+ifeq ($(findstring ansi,$(MAKECMDGOALS)),)
+ # Now, include all detection rule files found in the `builds/<system>'
+ # directories. Note that the calling order of the various `detect.mk'
+ # files isn't predictable.
+ #
+ include $(wildcard $(BUILD_CONFIG)/*/detect.mk)
+endif
+
+# In case no detection rule file was successful, use the default.
+#
+ifndef CONFIG_FILE
+ CONFIG_FILE := ansi.mk
+ setup: std_setup
+ .PHONY: setup
+endif
+
+# The following targets are equivalent, with the exception that they use
+# a slightly different syntax for the `echo' command.
+#
+# std_setup: defined for most (i.e. Unix-like) platforms
+# dos_setup: defined for Dos-ish platforms like Dos, Windows & OS/2
+#
+.PHONY: std_setup dos_setup
+
+std_setup:
+ @echo ""
+ @echo "$(PROJECT_TITLE) build system -- automatic system detection"
+ @echo ""
+ @echo "The following settings are used:"
+ @echo ""
+ @echo " platform $(PLATFORM)"
+ @echo " compiler $(CC)"
+ @echo " configuration directory $(BUILD_DIR)"
+ @echo " configuration rules $(CONFIG_RULES)"
+ @echo ""
+ @echo "If this does not correspond to your system or settings please remove the file"
+ @echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
+ @echo ""
+ @echo "Otherwise, simply type \`$(MAKE)' again to build the library,"
+ @echo "or \`$(MAKE) refdoc' to build the API reference (the latter needs python)."
+ @echo ""
+ @$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
+
+
+# Special case for Dos, Windows, OS/2, where echo "" doesn't work correctly!
+#
+dos_setup:
+ @type builds$(SEP)newline
+ @echo $(PROJECT_TITLE) build system -- automatic system detection
+ @type builds$(SEP)newline
+ @echo The following settings are used:
+ @type builds$(SEP)newline
+ @echo platformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(PLATFORM)
+ @echo compilerÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ$(CC)
+ @echo configuration directoryÿÿÿÿÿÿ$(subst /,$(SEP),$(BUILD_DIR))
+ @echo configuration rulesÿÿÿÿÿÿÿÿÿÿ$(subst /,$(SEP),$(CONFIG_RULES))
+ @type builds$(SEP)newline
+ @echo If this does not correspond to your system or settings please remove the file
+ @echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
+ @type builds$(SEP)newline
+ @echo Otherwise, simply type 'make' again to build the library.
+ @echo or 'make refdoc' to build the API reference (the latter needs python).
+ @type builds$(SEP)newline
+ @$(COPY) $(subst /,$(SEP),$(CONFIG_RULES) $(CONFIG_MK)) > nul
+
+
+# EOF
diff --git a/3party/freetype/builds/dos/detect.mk b/3party/freetype/builds/dos/detect.mk
new file mode 100644
index 0000000000..700a122688
--- /dev/null
+++ b/3party/freetype/builds/dos/detect.mk
@@ -0,0 +1,142 @@
+#
+# FreeType 2 configuration file to detect a DOS host platform.
+#
+
+
+# Copyright 1996-2000, 2003, 2004, 2006 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.
+
+
+.PHONY: setup
+
+
+ifeq ($(PLATFORM),ansi)
+
+ # Test for DJGPP by checking the DJGPP environment variable, which must be
+ # set in order to use the system (ie. it will always be present when the
+ # `make' utility is run).
+ #
+ # We test for the COMSPEC environment variable, then run the `ver'
+ # command-line program to see if its output contains the word `Dos' or
+ # `DOS'.
+ #
+ # If this is true, we are running a Dos-ish platform (or an emulation).
+ #
+ ifdef DJGPP
+ PLATFORM := dos
+ else
+ ifdef COMSPEC
+ is_dos := $(findstring DOS,$(subst Dos,DOS,$(shell ver)))
+
+ # We try to recognize a Dos session under OS/2. The `ver' command
+ # returns `Operating System/2 ...' there, so `is_dos' should be empty.
+ #
+ # To recognize a Dos session under OS/2, we check COMSPEC for the
+ # substring `MDOS\COMMAND'
+ #
+ ifeq ($(is_dos),)
+ is_dos := $(findstring MDOS\COMMAND,$(COMSPEC))
+ endif
+
+ # We also try to recognize Dos 7.x without Windows 9X launched.
+ # See builds/win32/detect.mk for explanations about the logic.
+ #
+ ifeq ($(is_dos),)
+ ifdef winbootdir
+#ifneq ($(OS),Windows_NT)
+ # If win32 is available, do not trigger this test.
+ ifndef windir
+ is_dos := $(findstring Windows,$(strip $(shell ver)))
+ endif
+#endif
+ endif
+ endif
+
+ endif # test COMSPEC
+
+ ifneq ($(is_dos),)
+
+ PLATFORM := dos
+
+ endif # test Dos
+ endif # test DJGPP
+endif # test PLATFORM ansi
+
+ifeq ($(PLATFORM),dos)
+
+ # Use DJGPP (i.e. gcc) by default.
+ #
+ CONFIG_FILE := dos-gcc.mk
+ CC ?= gcc
+
+ # additionally, we provide hooks for various other compilers
+ #
+ ifneq ($(findstring emx,$(MAKECMDGOALS)),) # EMX gcc
+ CONFIG_FILE := dos-emx.mk
+ CC := gcc
+ emx: setup
+ .PHONY: emx
+ endif
+
+ ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
+ CONFIG_FILE := dos-tcc.mk
+ CC := tcc
+ turboc: setup
+ .PHONY: turboc
+ endif
+
+ ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
+ CONFIG_FILE := dos-wat.mk
+ CC := wcc386
+ watcom: setup
+ .PHONY: watcom
+ endif
+
+ ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
+ CONFIG_FILE := dos-bcc.mk
+ CC := bcc32
+ borlandc: setup
+ .PHONY: borlandc
+ endif
+
+ ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
+ CONFIG_FILE := dos-bcc.mk
+ CC := bcc
+ borlandc16: setup
+ .PHONY: borlandc16
+ endif
+
+ ifneq ($(findstring bash,$(SHELL)),) # check for bash
+ SEP := /
+ DELETE := rm
+ COPY := cp
+ CAT := cat
+ setup: std_setup
+ else
+ SEP := $(BACKSLASH)
+ DELETE := del
+ CAT := type
+
+ # Setting COPY is a bit trickier. We can be running DJGPP on some
+ # Windows NT derivatives, like XP. See builds/win32/detect.mk for
+ # explanations why we need hacking here.
+ #
+ ifeq ($(OS),Windows_NT)
+ COPY := cmd.exe /c copy
+ else
+ COPY := copy
+ endif # test NT
+
+ setup: dos_setup
+ endif
+
+endif # test PLATFORM dos
+
+
+# EOF
diff --git a/3party/freetype/builds/dos/dos-def.mk b/3party/freetype/builds/dos/dos-def.mk
new file mode 100644
index 0000000000..950f581a00
--- /dev/null
+++ b/3party/freetype/builds/dos/dos-def.mk
@@ -0,0 +1,45 @@
+#
+# FreeType 2 DOS specific definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2005, 2006 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.
+
+
+DELETE := del
+CAT := type
+SEP := $(strip \ )
+BUILD_DIR := $(TOP_DIR)/builds/dos
+PLATFORM := dos
+
+
+# The executable file extension (for tools), *with* leading dot.
+#
+E := .exe
+
+# The directory where all library files are placed.
+#
+# By default, this is the same as $(OBJ_DIR); however, this can be changed
+# to suit particular needs.
+#
+LIB_DIR := $(OBJ_DIR)
+
+# The name of the final library file. Note that the DOS-specific Makefile
+# uses a shorter (8.3) name.
+#
+LIBRARY := $(PROJECT)
+
+
+# The NO_OUTPUT macro is used to ignore the output of commands.
+#
+NO_OUTPUT = > nul
+
+
+# EOF
diff --git a/3party/freetype/builds/dos/dos-emx.mk b/3party/freetype/builds/dos/dos-emx.mk
new file mode 100644
index 0000000000..6ea8f6d872
--- /dev/null
+++ b/3party/freetype/builds/dos/dos-emx.mk
@@ -0,0 +1,21 @@
+#
+# FreeType 2 configuration rules for the EMX gcc compiler
+#
+
+
+# Copyright 2003 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.
+
+
+include $(TOP_DIR)/builds/dos/dos-def.mk
+include $(TOP_DIR)/builds/compiler/emx.mk
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/dos/dos-gcc.mk b/3party/freetype/builds/dos/dos-gcc.mk
new file mode 100644
index 0000000000..e14255c1f2
--- /dev/null
+++ b/3party/freetype/builds/dos/dos-gcc.mk
@@ -0,0 +1,21 @@
+#
+# FreeType 2 configuration rules for the DJGPP compiler
+#
+
+
+# Copyright 1996-2000, 2003 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.
+
+
+include $(TOP_DIR)/builds/dos/dos-def.mk
+include $(TOP_DIR)/builds/compiler/gcc.mk
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/dos/dos-wat.mk b/3party/freetype/builds/dos/dos-wat.mk
new file mode 100644
index 0000000000..c763b163cd
--- /dev/null
+++ b/3party/freetype/builds/dos/dos-wat.mk
@@ -0,0 +1,20 @@
+#
+# FreeType 2 configuration rules for the Watcom C/C++ compiler
+#
+
+
+# Copyright 2003 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.
+
+include $(TOP_DIR)/builds/dos/dos-def.mk
+include $(TOP_DIR)/builds/compiler/watcom.mk
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/exports.mk b/3party/freetype/builds/exports.mk
new file mode 100644
index 0000000000..52f2912d39
--- /dev/null
+++ b/3party/freetype/builds/exports.mk
@@ -0,0 +1,76 @@
+#
+# FreeType 2 exports sub-Makefile
+#
+
+
+# Copyright 2005, 2006 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.
+
+
+# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
+# OTHER MAKEFILES.
+
+
+# This sub-Makefile is used to compute the list of exported symbols whenever
+# the EXPORTS_LIST variable is defined by one of the platform or compiler
+# specific build files.
+#
+# EXPORTS_LIST contains the name of the `list' file, for example a Windows
+# .DEF file.
+#
+ifneq ($(EXPORTS_LIST),)
+
+ # CCexe is the compiler used to compile the `apinames' tool program
+ # on the host machine. This isn't necessarily the same as the compiler
+ # which can be a cross-compiler for a different architecture, for example.
+ #
+ ifeq ($(CCexe),)
+ CCexe := $(CC)
+ endif
+
+ # TE acts like T, but for executables instead of object files.
+ ifeq ($(TE),)
+ TE := $T
+ endif
+
+ # The list of public headers we're going to parse.
+ PUBLIC_HEADERS := $(wildcard $(PUBLIC_DIR)/*.h)
+
+ # The `apinames' source and executable. We use $E_BUILD as the host
+ # executable suffix, which *includes* the final dot.
+ #
+ # Note that $(APINAMES_OPTIONS) is empty, except for Windows compilers.
+ #
+ APINAMES_SRC := $(subst /,$(SEP),$(TOP_DIR)/src/tools/apinames.c)
+ APINAMES_EXE := $(subst /,$(SEP),$(OBJ_DIR)/apinames$(E_BUILD))
+
+ $(APINAMES_EXE): $(APINAMES_SRC)
+ $(CCexe) $(TE)$@ $<
+
+ .PHONY: symbols_list
+
+ symbols_list: $(EXPORTS_LIST)
+
+ # We manually add TT_New_Context and TT_RunIns, which are needed by TT
+ # debuggers, to the EXPORTS_LIST.
+ #
+ $(EXPORTS_LIST): $(APINAMES_EXE) $(PUBLIC_HEADERS)
+ $(subst /,$(SEP),$(APINAMES_EXE)) -o$@ $(APINAMES_OPTIONS) $(PUBLIC_HEADERS)
+ @echo TT_New_Context >> $(EXPORTS_LIST)
+ @echo TT_RunIns >> $(EXPORTS_LIST)
+
+ $(PROJECT_LIBRARY): $(EXPORTS_LIST)
+
+ CLEAN += $(EXPORTS_LIST) \
+ $(APINAMES_EXE)
+
+endif
+
+
+# EOF
diff --git a/3party/freetype/builds/freetype.mk b/3party/freetype/builds/freetype.mk
new file mode 100644
index 0000000000..7a89c8e3d0
--- /dev/null
+++ b/3party/freetype/builds/freetype.mk
@@ -0,0 +1,361 @@
+#
+# FreeType 2 library sub-Makefile
+#
+
+
+# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 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.
+
+
+# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
+# OTHER MAKEFILES.
+
+
+# The following variables (set by other Makefile components, in the
+# environment, or on the command line) are used:
+#
+# BUILD_DIR The architecture dependent directory,
+# e.g. `$(TOP_DIR)/builds/unix'. Added to INCLUDES also.
+#
+# OBJ_DIR The directory in which object files are created.
+#
+# LIB_DIR The directory in which the library is created.
+#
+# DOC_DIR The directory in which the API reference is created.
+#
+# INCLUDES A list of directories to be included additionally.
+#
+# DEVEL_DIR Development directory which is added to the INCLUDES
+# variable before the standard include directories.
+#
+# CFLAGS Compilation flags. This overrides the default settings
+# in the platform-specific configuration files.
+#
+# FTSYS_SRC If set, its value is used as the name of a replacement
+# file for `src/base/ftsystem.c'.
+#
+# FTDEBUG_SRC If set, its value is used as the name of a replacement
+# file for `src/base/ftdebug.c'. [For a normal build, this
+# file does nothing.]
+#
+# FTMODULE_H The file which contains the list of module classes for
+# the current build. Usually, this is automatically
+# created by `modules.mk'.
+#
+# BASE_OBJ_S
+# BASE_OBJ_M A list of base objects (for single object and multiple
+# object builds, respectively). Set up in
+# `src/base/rules.mk'.
+#
+# BASE_EXT_OBJ A list of base extension objects. Set up in
+# `src/base/rules.mk'.
+#
+# DRV_OBJ_S
+# DRV_OBJ_M A list of driver objects (for single object and multiple
+# object builds, respectively). Set up cumulatively in
+# `src/<driver>/rules.mk'.
+#
+# CLEAN
+# DISTCLEAN The sub-makefiles can append additional stuff to these two
+# variables which is to be removed for the `clean' resp.
+# `distclean' target.
+#
+# TOP_DIR, SEP,
+# COMPILER_SEP,
+# LIBRARY, CC,
+# A, I, O, T Check `config.mk' for details.
+
+
+# The targets `objects' and `library' are defined at the end of this
+# Makefile after all other rules have been included.
+#
+.PHONY: single multi objects library refdoc
+
+# default target -- build single objects and library
+#
+single: objects library
+
+# `multi' target -- build multiple objects and library
+#
+multi: objects library
+
+
+# The FreeType source directory, usually `./src'.
+#
+SRC_DIR := $(TOP_DIR)/src
+
+# The directory where the base layer components are placed, usually
+# `./src/base'.
+#
+BASE_DIR := $(SRC_DIR)/base
+
+# Other derived directories.
+#
+PUBLIC_DIR := $(TOP_DIR)/include/freetype
+INTERNAL_DIR := $(PUBLIC_DIR)/internal
+SERVICES_DIR := $(INTERNAL_DIR)/services
+CONFIG_DIR := $(PUBLIC_DIR)/config
+
+# The documentation directory.
+#
+DOC_DIR ?= $(TOP_DIR)/docs/reference
+
+# The final name of the library file.
+#
+PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
+
+
+# include paths
+#
+# IMPORTANT NOTE: The architecture-dependent directory must ALWAYS be placed
+# before the standard include list. Porters are then able to
+# put their own version of some of the FreeType components
+# in the `freetype/builds/<system>' directory, as these
+# files will override the default sources.
+#
+INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
+ $(DEVEL_DIR) \
+ $(BUILD_DIR) \
+ $(TOP_DIR)/include)
+
+INCLUDE_FLAGS := $(INCLUDES:%=$I%)
+
+
+# C flags used for the compilation of an object file. This must include at
+# least the paths for the `base' and `builds/<system>' directories;
+# debug/optimization/warning flags + ansi compliance if needed.
+#
+# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
+# old FreeType versions.
+#
+# Note what we also define the macro FT2_BUILD_LIBRARY when building
+# FreeType. This is required to let our sources include the internal
+# headers (something forbidden by clients).
+#
+# Finally, we define FT_CONFIG_MODULES_H so that the compiler uses the
+# generated version of `ftmodule.h' in $(OBJ_DIR). If there is an
+# `ftoption.h' files in $(OBJ_DIR), define FT_CONFIG_OPTIONS_H too.
+#
+ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),)
+ FTOPTION_H := $(OBJ_DIR)/ftoption.h
+ FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>"
+endif
+
+FT_CFLAGS = $(CPPFLAGS) \
+ $(INCLUDE_FLAGS) \
+ $(CFLAGS) \
+ $DFT2_BUILD_LIBRARY \
+ $DFT_CONFIG_MODULES_H="<ftmodule.h>" \
+ $(FTOPTION_FLAG)
+FT_CC = $(CC) $(FT_CFLAGS)
+FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
+
+
+# Include the `exports' rules file.
+#
+include $(TOP_DIR)/builds/exports.mk
+
+
+# Initialize the list of objects.
+#
+OBJECTS_LIST :=
+
+
+# Define $(PUBLIC_H) as the list of all public header files located in
+# `$(TOP_DIR)/include/freetype'. $(INTERNAL_H), and $(CONFIG_H) are defined
+# similarly.
+#
+# This is used to simplify the dependency rules -- if one of these files
+# changes, the whole library is recompiled.
+#
+PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
+INTERNAL_H := $(wildcard $(INTERNAL_DIR)/*.h) \
+ $(wildcard $(SERVICES_DIR)/*.h)
+CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \
+ $(wildcard $(BUILD_DIR)/freetype/config/*.h) \
+ $(FTMODULE_H) \
+ $(FTOPTION_H)
+DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
+
+FREETYPE_H := $(PUBLIC_H) $(INTERNAL_H) $(CONFIG_H) $(DEVEL_H)
+
+
+# ftsystem component
+#
+FTSYS_SRC ?= $(BASE_DIR)/ftsystem.c
+
+FTSYS_OBJ := $(OBJ_DIR)/ftsystem.$O
+
+OBJECTS_LIST += $(FTSYS_OBJ)
+
+$(FTSYS_OBJ): $(FTSYS_SRC) $(FREETYPE_H)
+ $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# ftdebug component
+#
+FTDEBUG_SRC ?= $(BASE_DIR)/ftdebug.c
+
+FTDEBUG_OBJ := $(OBJ_DIR)/ftdebug.$O
+
+OBJECTS_LIST += $(FTDEBUG_OBJ)
+
+$(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H)
+ $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# Include all rule files from FreeType components.
+#
+include $(SRC_DIR)/base/rules.mk
+include $(patsubst %,$(SRC_DIR)/%/rules.mk,$(MODULES))
+
+
+# ftinit component
+#
+# The C source `ftinit.c' contains the FreeType initialization routines.
+# It is able to automatically register one or more drivers when the API
+# function FT_Init_FreeType() is called.
+#
+# The set of initial drivers is determined by the driver Makefiles
+# includes above. Each driver Makefile updates the FTINIT_xxx lists
+# which contain additional include paths and macros used to compile the
+# single `ftinit.c' source.
+#
+FTINIT_SRC := $(BASE_DIR)/ftinit.c
+FTINIT_OBJ := $(OBJ_DIR)/ftinit.$O
+
+OBJECTS_LIST += $(FTINIT_OBJ)
+
+$(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H)
+ $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# All FreeType library objects.
+#
+OBJ_M := $(BASE_OBJ_M) $(BASE_EXT_OBJ) $(DRV_OBJS_M)
+OBJ_S := $(BASE_OBJ_S) $(BASE_EXT_OBJ) $(DRV_OBJS_S)
+
+
+# The target `multi' on the Make command line indicates that we want to
+# compile each source file independently.
+#
+# Otherwise, each module/driver is compiled in a single object file through
+# source file inclusion (see `src/base/ftbase.c' or
+# `src/truetype/truetype.c' for examples).
+#
+BASE_OBJECTS := $(OBJECTS_LIST)
+
+ifneq ($(findstring multi,$(MAKECMDGOALS)),)
+ OBJECTS_LIST += $(OBJ_M)
+else
+ OBJECTS_LIST += $(OBJ_S)
+endif
+
+objects: $(OBJECTS_LIST)
+
+library: $(PROJECT_LIBRARY)
+
+dll: $(PROJECT_LIBRARY) exported_symbols
+
+.c.$O:
+ $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+ifneq ($(findstring refdoc,$(MAKECMDGOALS)),)
+ # poor man's `sed' emulation with make's built-in string functions
+ work := $(strip $(shell $(CAT) $(PUBLIC_DIR)/freetype.h))
+ work := $(subst |,x,$(work))
+ work := $(subst $(space),|,$(work))
+ work := $(subst \#define|FREETYPE_MAJOR|,$(space),$(work))
+ work := $(word 2,$(work))
+ major := $(subst |,$(space),$(work))
+ major := $(firstword $(major))
+
+ work := $(subst \#define|FREETYPE_MINOR|,$(space),$(work))
+ work := $(word 2,$(work))
+ minor := $(subst |,$(space),$(work))
+ minor := $(firstword $(minor))
+
+ work := $(subst \#define|FREETYPE_PATCH|,$(space),$(work))
+ work := $(word 2,$(work))
+ patch := $(subst |,$(space),$(work))
+ patch := $(firstword $(patch))
+
+ version := $(major).$(minor).$(patch)
+endif
+
+# We write-protect the docmaker directory to suppress generation
+# of .pyc files.
+#
+refdoc:
+ -chmod -w $(SRC_DIR)/tools/docmaker
+ python $(SRC_DIR)/tools/docmaker/docmaker.py \
+ --prefix=ft2 \
+ --title=FreeType-$(version) \
+ --output=$(DOC_DIR) \
+ $(PUBLIC_DIR)/*.h \
+ $(PUBLIC_DIR)/config/*.h \
+ $(PUBLIC_DIR)/cache/*.h
+ -chmod +w $(SRC_DIR)/tools/docmaker
+
+
+.PHONY: clean_project_std distclean_project_std
+
+# Standard cleaning and distclean rules. These are not accepted
+# on all systems though.
+#
+clean_project_std:
+ -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S) $(CLEAN)
+
+distclean_project_std: clean_project_std
+ -$(DELETE) $(PROJECT_LIBRARY)
+ -$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
+
+
+.PHONY: clean_project_dos distclean_project_dos
+
+# The Dos command shell does not support very long list of arguments, so
+# we are stuck with wildcards.
+#
+# Don't break the command lines with \; this prevents the "del" command from
+# working correctly on Win9x.
+#
+clean_project_dos:
+ -$(DELETE) $(subst /,$(SEP),$(OBJ_DIR)/*.$O $(CLEAN) $(NO_OUTPUT))
+
+distclean_project_dos: clean_project_dos
+ -$(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY) $(DISTCLEAN) $(NO_OUTPUT))
+
+
+.PHONY: remove_config_mk remove_ftmodule_h
+
+# Remove configuration file (used for distclean).
+#
+remove_config_mk:
+ -$(DELETE) $(subst /,$(SEP),$(CONFIG_MK) $(NO_OUTPUT))
+
+# Remove module list (used for distclean).
+#
+remove_ftmodule_h:
+ -$(DELETE) $(subst /,$(SEP),$(FTMODULE_H) $(NO_OUTPUT))
+
+
+.PHONY: clean distclean
+
+# The `config.mk' file must define `clean_freetype' and
+# `distclean_freetype'. Implementations may use to relay these to either
+# the `std' or `dos' versions from above, or simply provide their own
+# implementation.
+#
+clean: clean_project
+distclean: distclean_project remove_config_mk remove_ftmodule_h
+ -$(DELETE) $(subst /,$(SEP),$(DOC_DIR)/*.html $(NO_OUTPUT))
+
+
+# EOF
diff --git a/3party/freetype/builds/link_dos.mk b/3party/freetype/builds/link_dos.mk
new file mode 100644
index 0000000000..c37ac7e52c
--- /dev/null
+++ b/3party/freetype/builds/link_dos.mk
@@ -0,0 +1,42 @@
+#
+# Link instructions for Dos-like systems (Dos, Win32, OS/2)
+#
+
+
+# Copyright 1996-2000 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.
+
+
+ifdef BUILD_PROJECT
+
+ .PHONY: clean_project distclean_project
+
+ # Now include the main sub-makefile. It contains all the rules used to
+ # build the library with the previous variables defined.
+ #
+ include $(TOP_DIR)/builds/$(PROJECT).mk
+
+ # The cleanup targets.
+ #
+ clean_project: clean_project_dos
+ distclean_project: distclean_project_dos
+
+ # This final rule is used to link all object files into a single library.
+ # this is compiler-specific
+ #
+ $(PROJECT_LIBRARY): $(OBJECTS_LIST)
+ ifdef CLEAN_LIBRARY
+ -$(CLEAN_LIBRARY) $(NO_OUTPUT)
+ endif
+ $(LINK_LIBRARY)
+
+endif
+
+
+# EOF
diff --git a/3party/freetype/builds/link_std.mk b/3party/freetype/builds/link_std.mk
new file mode 100644
index 0000000000..0bd2163bb1
--- /dev/null
+++ b/3party/freetype/builds/link_std.mk
@@ -0,0 +1,42 @@
+#
+# Link instructions for standard systems
+#
+
+
+# Copyright 1996-2000 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.
+
+
+ifdef BUILD_PROJECT
+
+ .PHONY: clean_project distclean_project
+
+ # Now include the main sub-makefile. It contains all the rules used to
+ # build the library with the previous variables defined.
+ #
+ include $(TOP_DIR)/builds/$(PROJECT).mk
+
+ # The cleanup targets.
+ #
+ clean_project: clean_project_std
+ distclean_project: distclean_project_std
+
+ # This final rule is used to link all object files into a single library.
+ # this is compiler-specific
+ #
+ $(PROJECT_LIBRARY): $(OBJECTS_LIST)
+ ifdef CLEAN_LIBRARY
+ -$(CLEAN_LIBRARY) $(NO_OUTPUT)
+ endif
+ $(LINK_LIBRARY)
+
+endif
+
+
+# EOF
diff --git a/3party/freetype/builds/mac/FreeType.m68k_cfm.make.txt b/3party/freetype/builds/mac/FreeType.m68k_cfm.make.txt
new file mode 100644
index 0000000000..0bd145257a
--- /dev/null
+++ b/3party/freetype/builds/mac/FreeType.m68k_cfm.make.txt
@@ -0,0 +1,211 @@
+# File: FreeType.m68k_cfm.make
+# Target: FreeType.m68k_cfm
+# Created: Thursday, October 27, 2005 09:23:25 PM
+
+
+MAKEFILE = FreeType.m68k_cfm.make
+\xA5MondoBuild\xA5 = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
+
+ObjDir = :objs:
+Includes = \xB6
+ -ansi strict \xB6
+ -includes unix \xB6
+ -i :include: \xB6
+ -i :src: \xB6
+ -i :include:freetype:config:
+
+Sym-68K = -sym off
+
+COptions = \xB6
+ -d HAVE_FSSPEC=1 \xB6
+ -d HAVE_FSREF=0 \xB6
+ -d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
+ -d HAVE_QUICKDRAW_CARBON=0 \xB6
+ -d HAVE_ATS=0 \xB6
+ -d FT2_BUILD_LIBRARY \xB6
+ -d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
+ -d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
+ {Includes} {Sym-68K} -model cfmseg
+
+
+### Source Files ###
+
+SrcFiles = \xB6
+ :src:autofit:autofit.c \xB6
+ :builds:mac:ftbase.c \xB6
+ :src:base:ftbbox.c \xB6
+ :src:base:ftbdf.c \xB6
+ :src:base:ftbitmap.c \xB6
+ :src:base:ftdebug.c \xB6
+ :src:base:ftfstype.c \xB6
+ :src:base:ftglyph.c \xB6
+ :src:base:ftgxval.c \xB6
+ :src:base:ftinit.c \xB6
+ :src:base:ftmm.c \xB6
+ :src:base:ftotval.c \xB6
+ :src:base:ftpfr.c \xB6
+ :src:base:ftstroke.c \xB6
+ :src:base:ftsynth.c \xB6
+ :src:base:ftsystem.c \xB6
+ :src:base:fttype1.c \xB6
+ :src:base:ftwinfnt.c \xB6
+ :src:base:ftxf86.c \xB6
+ :src:cache:ftcache.c \xB6
+ :src:bdf:bdf.c \xB6
+ :src:cff:cff.c \xB6
+ :src:cid:type1cid.c \xB6
+# :src:gxvalid:gxvalid.c \xB6
+ :src:gzip:ftgzip.c \xB6
+ :src:bzip2:ftbzip2.c \xB6
+ :src:lzw:ftlzw.c \xB6
+ :src:otvalid:otvalid.c \xB6
+ :src:pcf:pcf.c \xB6
+ :src:pfr:pfr.c \xB6
+ :src:psaux:psaux.c \xB6
+ :src:pshinter:pshinter.c \xB6
+ :src:psnames:psmodule.c \xB6
+ :src:raster:raster.c \xB6
+ :src:sfnt:sfnt.c \xB6
+ :src:smooth:smooth.c \xB6
+ :src:truetype:truetype.c \xB6
+ :src:type1:type1.c \xB6
+ :src:type42:type42.c \xB6
+ :src:winfonts:winfnt.c
+
+
+### Object Files ###
+
+ObjFiles-68K = \xB6
+ "{ObjDir}autofit.c.o" \xB6
+ "{ObjDir}ftbase.c.o" \xB6
+ "{ObjDir}ftbbox.c.o" \xB6
+ "{ObjDir}ftbdf.c.o" \xB6
+ "{ObjDir}ftbitmap.c.o" \xB6
+ "{ObjDir}ftdebug.c.o" \xB6
+ "{ObjDir}ftfstype.c.o" \xB6
+ "{ObjDir}ftglyph.c.o" \xB6
+ "{ObjDir}ftgxval.c.o" \xB6
+ "{ObjDir}ftinit.c.o" \xB6
+ "{ObjDir}ftmm.c.o" \xB6
+ "{ObjDir}ftotval.c.o" \xB6
+ "{ObjDir}ftpfr.c.o" \xB6
+ "{ObjDir}ftstroke.c.o" \xB6
+ "{ObjDir}ftsynth.c.o" \xB6
+ "{ObjDir}ftsystem.c.o" \xB6
+ "{ObjDir}fttype1.c.o" \xB6
+ "{ObjDir}ftwinfnt.c.o" \xB6
+ "{ObjDir}ftxf86.c.o" \xB6
+ "{ObjDir}ftcache.c.o" \xB6
+ "{ObjDir}bdf.c.o" \xB6
+ "{ObjDir}cff.c.o" \xB6
+ "{ObjDir}type1cid.c.o" \xB6
+# "{ObjDir}gxvalid.c.o" \xB6
+ "{ObjDir}ftgzip.c.o" \xB6
+ "{ObjDir}ftbzip2.c.o" \xB6
+ "{ObjDir}ftlzw.c.o" \xB6
+ "{ObjDir}otvalid.c.o" \xB6
+ "{ObjDir}pcf.c.o" \xB6
+ "{ObjDir}pfr.c.o" \xB6
+ "{ObjDir}psaux.c.o" \xB6
+ "{ObjDir}pshinter.c.o" \xB6
+ "{ObjDir}psmodule.c.o" \xB6
+ "{ObjDir}raster.c.o" \xB6
+ "{ObjDir}sfnt.c.o" \xB6
+ "{ObjDir}smooth.c.o" \xB6
+ "{ObjDir}truetype.c.o" \xB6
+ "{ObjDir}type1.c.o" \xB6
+ "{ObjDir}type42.c.o" \xB6
+ "{ObjDir}winfnt.c.o"
+
+
+### Libraries ###
+
+LibFiles-68K =
+
+
+### Default Rules ###
+
+.c.o \xC4 .c {\xA5MondoBuild\xA5}
+ {C} {depDir}{default}.c -o {targDir}{default}.c.o {COptions}
+
+
+### Build Rules ###
+
+:builds:mac:ftbase.c \xC4\xC4 :src:base:ftbase.c
+ Duplicate :src:base:ftbase.c :builds:mac:ftbase.c
+
+"{ObjDir}ftbase.c.o" \xC4\xC4 :builds:mac:ftbase.c
+ {C} :builds:mac:ftbase.c -o "{ObjDir}ftbase.c.o" \xB6
+ -i :builds:mac: \xB6
+ -i :src:base: \xB6
+ {COptions}
+
+FreeType.m68k_cfm \xC4\xC4 FreeType.m68k_cfm.o
+
+FreeType.m68k_cfm.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5}
+ Lib \xB6
+ -o {Targ} \xB6
+ {ObjFiles-68K} \xB6
+ {LibFiles-68K} \xB6
+ {Sym-68K} \xB6
+ -mf -d
+
+
+
+### Required Dependencies ###
+
+"{ObjDir}autofit.c.o" \xC4 :src:autofit:autofit.c
+# "{ObjDir}ftbase.c.o" \xC4 :src:base:ftbase.c
+"{ObjDir}ftbbox.c.o" \xC4 :src:base:ftbbox.c
+"{ObjDir}ftbdf.c.o" \xC4 :src:base:ftbdf.c
+"{ObjDir}ftbitmap.c.o" \xC4 :src:base:ftbitmap.c
+"{ObjDir}ftdebug.c.o" \xC4 :src:base:ftdebug.c
+"{ObjDir}ftfstype.c.o" \xC4 :src:base:ftfstype.c
+"{ObjDir}ftglyph.c.o" \xC4 :src:base:ftglyph.c
+"{ObjDir}ftgxval.c.o" \xC4 :src:base:ftgxval.c
+"{ObjDir}ftinit.c.o" \xC4 :src:base:ftinit.c
+"{ObjDir}ftmm.c.o" \xC4 :src:base:ftmm.c
+"{ObjDir}ftotval.c.o" \xC4 :src:base:ftotval.c
+"{ObjDir}ftpfr.c.o" \xC4 :src:base:ftpfr.c
+"{ObjDir}ftstroke.c.o" \xC4 :src:base:ftstroke.c
+"{ObjDir}ftsynth.c.o" \xC4 :src:base:ftsynth.c
+"{ObjDir}ftsystem.c.o" \xC4 :src:base:ftsystem.c
+"{ObjDir}fttype1.c.o" \xC4 :src:base:fttype1.c
+"{ObjDir}ftwinfnt.c.o" \xC4 :src:base:ftwinfnt.c
+"{ObjDir}ftxf86.c.o" \xC4 :src:base:ftxf86.c
+"{ObjDir}ftcache.c.o" \xC4 :src:cache:ftcache.c
+"{ObjDir}bdf.c.o" \xC4 :src:bdf:bdf.c
+"{ObjDir}cff.c.o" \xC4 :src:cff:cff.c
+"{ObjDir}type1cid.c.o" \xC4 :src:cid:type1cid.c
+# "{ObjDir}gxvalid.c.o" \xC4 :src:gxvalid:gxvalid.c
+"{ObjDir}ftgzip.c.o" \xC4 :src:gzip:ftgzip.c
+"{ObjDir}ftbzip2.c.o" \xC4 :src:bzip2:ftbzip2.c
+"{ObjDir}ftlzw.c.o" \xC4 :src:lzw:ftlzw.c
+"{ObjDir}otvalid.c.o" \xC4 :src:otvalid:otvalid.c
+"{ObjDir}pcf.c.o" \xC4 :src:pcf:pcf.c
+"{ObjDir}pfr.c.o" \xC4 :src:pfr:pfr.c
+"{ObjDir}psaux.c.o" \xC4 :src:psaux:psaux.c
+"{ObjDir}pshinter.c.o" \xC4 :src:pshinter:pshinter.c
+"{ObjDir}psmodule.c.o" \xC4 :src:psnames:psmodule.c
+"{ObjDir}raster.c.o" \xC4 :src:raster:raster.c
+"{ObjDir}sfnt.c.o" \xC4 :src:sfnt:sfnt.c
+"{ObjDir}smooth.c.o" \xC4 :src:smooth:smooth.c
+"{ObjDir}truetype.c.o" \xC4 :src:truetype:truetype.c
+"{ObjDir}type1.c.o" \xC4 :src:type1:type1.c
+"{ObjDir}type42.c.o" \xC4 :src:type42:type42.c
+"{ObjDir}winfnt.c.o" \xC4 :src:winfonts:winfnt.c
+
+
+### Optional Dependencies ###
+### Build this target to generate "include file" dependencies. ###
+
+Dependencies \xC4 $OutOfDate
+ MakeDepend \xB6
+ -append {MAKEFILE} \xB6
+ -ignore "{CIncludes}" \xB6
+ -objdir "{ObjDir}" \xB6
+ -objext .o \xB6
+ {Includes} \xB6
+ {SrcFiles}
+
+
diff --git a/3party/freetype/builds/mac/FreeType.m68k_far.make.txt b/3party/freetype/builds/mac/FreeType.m68k_far.make.txt
new file mode 100644
index 0000000000..e8e2f6eb19
--- /dev/null
+++ b/3party/freetype/builds/mac/FreeType.m68k_far.make.txt
@@ -0,0 +1,210 @@
+# File: FreeType.m68k_far.make
+# Target: FreeType.m68k_far
+# Created: Tuesday, October 25, 2005 03:34:05 PM
+
+
+MAKEFILE = FreeType.m68k_far.make
+\xA5MondoBuild\xA5 = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
+
+ObjDir = :objs:
+Includes = \xB6
+ -includes unix \xB6
+ -i :include: \xB6
+ -i :src: \xB6
+ -i :include:freetype:config:
+
+Sym-68K = -sym off
+
+COptions = \xB6
+ -d HAVE_FSSPEC=1 \xB6
+ -d HAVE_FSREF=0 \xB6
+ -d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
+ -d HAVE_QUICKDRAW_CARBON=0 \xB6
+ -d HAVE_ATS=0 \xB6
+ -d FT2_BUILD_LIBRARY \xB6
+ -d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
+ -d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
+ {Includes} {Sym-68K} -model far
+
+
+### Source Files ###
+
+SrcFiles = \xB6
+ :src:autofit:autofit.c \xB6
+ :builds:mac:ftbase.c \xB6
+ :src:base:ftbbox.c \xB6
+ :src:base:ftbdf.c \xB6
+ :src:base:ftbitmap.c \xB6
+ :src:base:ftdebug.c \xB6
+ :src:base:ftfstype.c \xB6
+ :src:base:ftglyph.c \xB6
+ :src:base:ftgxval.c \xB6
+ :src:base:ftinit.c \xB6
+ :src:base:ftmm.c \xB6
+ :src:base:ftotval.c \xB6
+ :src:base:ftpfr.c \xB6
+ :src:base:ftstroke.c \xB6
+ :src:base:ftsynth.c \xB6
+ :src:base:ftsystem.c \xB6
+ :src:base:fttype1.c \xB6
+ :src:base:ftwinfnt.c \xB6
+ :src:base:ftxf86.c \xB6
+ :src:cache:ftcache.c \xB6
+ :src:bdf:bdf.c \xB6
+ :src:cff:cff.c \xB6
+ :src:cid:type1cid.c \xB6
+ :src:gxvalid:gxvalid.c \xB6
+ :src:gzip:ftgzip.c \xB6
+ :src:bzip2:ftbzip2.c \xB6
+ :src:lzw:ftlzw.c \xB6
+ :src:otvalid:otvalid.c \xB6
+ :src:pcf:pcf.c \xB6
+ :src:pfr:pfr.c \xB6
+ :src:psaux:psaux.c \xB6
+ :src:pshinter:pshinter.c \xB6
+ :src:psnames:psmodule.c \xB6
+ :src:raster:raster.c \xB6
+ :src:sfnt:sfnt.c \xB6
+ :src:smooth:smooth.c \xB6
+ :src:truetype:truetype.c \xB6
+ :src:type1:type1.c \xB6
+ :src:type42:type42.c \xB6
+ :src:winfonts:winfnt.c
+
+
+### Object Files ###
+
+ObjFiles-68K = \xB6
+ "{ObjDir}autofit.c.o" \xB6
+ "{ObjDir}ftbase.c.o" \xB6
+ "{ObjDir}ftbbox.c.o" \xB6
+ "{ObjDir}ftbdf.c.o" \xB6
+ "{ObjDir}ftbitmap.c.o" \xB6
+ "{ObjDir}ftdebug.c.o" \xB6
+ "{ObjDir}ftfstype.c.o" \xB6
+ "{ObjDir}ftglyph.c.o" \xB6
+ "{ObjDir}ftgxval.c.o" \xB6
+ "{ObjDir}ftinit.c.o" \xB6
+ "{ObjDir}ftmm.c.o" \xB6
+ "{ObjDir}ftotval.c.o" \xB6
+ "{ObjDir}ftpfr.c.o" \xB6
+ "{ObjDir}ftstroke.c.o" \xB6
+ "{ObjDir}ftsynth.c.o" \xB6
+ "{ObjDir}ftsystem.c.o" \xB6
+ "{ObjDir}fttype1.c.o" \xB6
+ "{ObjDir}ftwinfnt.c.o" \xB6
+ "{ObjDir}ftxf86.c.o" \xB6
+ "{ObjDir}ftcache.c.o" \xB6
+ "{ObjDir}bdf.c.o" \xB6
+ "{ObjDir}cff.c.o" \xB6
+ "{ObjDir}type1cid.c.o" \xB6
+ "{ObjDir}gxvalid.c.o" \xB6
+ "{ObjDir}ftgzip.c.o" \xB6
+ "{ObjDir}ftbzip2.c.o" \xB6
+ "{ObjDir}ftlzw.c.o" \xB6
+ "{ObjDir}otvalid.c.o" \xB6
+ "{ObjDir}pcf.c.o" \xB6
+ "{ObjDir}pfr.c.o" \xB6
+ "{ObjDir}psaux.c.o" \xB6
+ "{ObjDir}pshinter.c.o" \xB6
+ "{ObjDir}psmodule.c.o" \xB6
+ "{ObjDir}raster.c.o" \xB6
+ "{ObjDir}sfnt.c.o" \xB6
+ "{ObjDir}smooth.c.o" \xB6
+ "{ObjDir}truetype.c.o" \xB6
+ "{ObjDir}type1.c.o" \xB6
+ "{ObjDir}type42.c.o" \xB6
+ "{ObjDir}winfnt.c.o"
+
+
+### Libraries ###
+
+LibFiles-68K =
+
+
+### Default Rules ###
+
+.c.o \xC4 .c {\xA5MondoBuild\xA5}
+ {C} {depDir}{default}.c -o {targDir}{default}.c.o {COptions} \xB6
+ -ansi strict
+
+### Build Rules ###
+
+:builds:mac:ftbase.c \xC4\xC4 :src:base:ftbase.c
+ Duplicate :src:base:ftbase.c :builds:mac:ftbase.c
+
+"{ObjDir}ftbase.c.o" \xC4\xC4 :builds:mac:ftbase.c
+ {C} :builds:mac:ftbase.c -o "{ObjDir}ftbase.c.o" \xB6
+ -i :builds:mac: \xB6
+ -i :src:base: \xB6
+ {COptions}
+
+FreeType.m68k_far \xC4\xC4 FreeType.m68k_far.o
+
+FreeType.m68k_far.o \xC4\xC4 {ObjFiles-68K} {LibFiles-68K} {\xA5MondoBuild\xA5}
+ Lib \xB6
+ -o {Targ} \xB6
+ {ObjFiles-68K} \xB6
+ {LibFiles-68K} \xB6
+ {Sym-68K} \xB6
+ -mf -d
+
+
+
+### Required Dependencies ###
+
+"{ObjDir}autofit.c.o" \xC4 :src:autofit:autofit.c
+# "{ObjDir}ftbase.c.o" \xC4 :src:base:ftbase.c
+"{ObjDir}ftbbox.c.o" \xC4 :src:base:ftbbox.c
+"{ObjDir}ftbdf.c.o" \xC4 :src:base:ftbdf.c
+"{ObjDir}ftbitmap.c.o" \xC4 :src:base:ftbitmap.c
+"{ObjDir}ftdebug.c.o" \xC4 :src:base:ftdebug.c
+"{ObjDir}ftfstype.c.o" \xC4 :src:base:ftfstype.c
+"{ObjDir}ftglyph.c.o" \xC4 :src:base:ftglyph.c
+"{ObjDir}ftgxval.c.o" \xC4 :src:base:ftgxval.c
+"{ObjDir}ftinit.c.o" \xC4 :src:base:ftinit.c
+"{ObjDir}ftmm.c.o" \xC4 :src:base:ftmm.c
+"{ObjDir}ftotval.c.o" \xC4 :src:base:ftotval.c
+"{ObjDir}ftpfr.c.o" \xC4 :src:base:ftpfr.c
+"{ObjDir}ftstroke.c.o" \xC4 :src:base:ftstroke.c
+"{ObjDir}ftsynth.c.o" \xC4 :src:base:ftsynth.c
+"{ObjDir}ftsystem.c.o" \xC4 :src:base:ftsystem.c
+"{ObjDir}fttype1.c.o" \xC4 :src:base:fttype1.c
+"{ObjDir}ftwinfnt.c.o" \xC4 :src:base:ftwinfnt.c
+"{ObjDir}ftxf86.c.o" \xC4 :src:base:ftxf86.c
+"{ObjDir}ftcache.c.o" \xC4 :src:cache:ftcache.c
+"{ObjDir}bdf.c.o" \xC4 :src:bdf:bdf.c
+"{ObjDir}cff.c.o" \xC4 :src:cff:cff.c
+"{ObjDir}type1cid.c.o" \xC4 :src:cid:type1cid.c
+"{ObjDir}gxvalid.c.o" \xC4 :src:gxvalid:gxvalid.c
+"{ObjDir}ftgzip.c.o" \xC4 :src:gzip:ftgzip.c
+"{ObjDir}ftbzip2.c.o" \xC4 :src:bzip2:ftbzip2.c
+"{ObjDir}ftlzw.c.o" \xC4 :src:lzw:ftlzw.c
+"{ObjDir}otvalid.c.o" \xC4 :src:otvalid:otvalid.c
+"{ObjDir}pcf.c.o" \xC4 :src:pcf:pcf.c
+"{ObjDir}pfr.c.o" \xC4 :src:pfr:pfr.c
+"{ObjDir}psaux.c.o" \xC4 :src:psaux:psaux.c
+"{ObjDir}pshinter.c.o" \xC4 :src:pshinter:pshinter.c
+"{ObjDir}psmodule.c.o" \xC4 :src:psnames:psmodule.c
+"{ObjDir}raster.c.o" \xC4 :src:raster:raster.c
+"{ObjDir}sfnt.c.o" \xC4 :src:sfnt:sfnt.c
+"{ObjDir}smooth.c.o" \xC4 :src:smooth:smooth.c
+"{ObjDir}truetype.c.o" \xC4 :src:truetype:truetype.c
+"{ObjDir}type1.c.o" \xC4 :src:type1:type1.c
+"{ObjDir}type42.c.o" \xC4 :src:type42:type42.c
+"{ObjDir}winfnt.c.o" \xC4 :src:winfonts:winfnt.c
+
+
+### Optional Dependencies ###
+### Build this target to generate "include file" dependencies. ###
+
+Dependencies \xC4 $OutOfDate
+ MakeDepend \xB6
+ -append {MAKEFILE} \xB6
+ -ignore "{CIncludes}" \xB6
+ -objdir "{ObjDir}" \xB6
+ -objext .o \xB6
+ {Includes} \xB6
+ {SrcFiles}
+
+
diff --git a/3party/freetype/builds/mac/FreeType.ppc_carbon.make.txt b/3party/freetype/builds/mac/FreeType.ppc_carbon.make.txt
new file mode 100644
index 0000000000..c37e0f36f9
--- /dev/null
+++ b/3party/freetype/builds/mac/FreeType.ppc_carbon.make.txt
@@ -0,0 +1,214 @@
+# File: FreeType.ppc_carbon.make
+# Target: FreeType.ppc_carbon
+# Created: Friday, October 28, 2005 03:40:06 PM
+
+
+MAKEFILE = FreeType.ppc_carbon.make
+\xA5MondoBuild\xA5 = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
+
+ObjDir = :objs:
+Includes = \xB6
+ -ansi strict \xB6
+ -includes unix \xB6
+ -i :include: \xB6
+ -i :src: \xB6
+ -i :include:freetype:config:
+
+Sym-PPC = -sym off
+
+PPCCOptions = \xB6
+ -d HAVE_FSSPEC=1 \xB6
+ -d HAVE_FSREF=1 \xB6
+ -d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
+ -d HAVE_QUICKDRAW_CARBON=1 \xB6
+ -d HAVE_ATS=0 \xB6
+ -d FT2_BUILD_LIBRARY \xB6
+ -d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
+ -d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
+ {Includes} {Sym-PPC} -d TARGET_API_MAC_CARBON=1
+
+
+### Source Files ###
+
+SrcFiles = \xB6
+ :src:autofit:autofit.c \xB6
+ :builds:mac:ftbase.c \xB6
+ :src:base:ftbbox.c \xB6
+ :src:base:ftbdf.c \xB6
+ :src:base:ftbitmap.c \xB6
+ :src:base:ftdebug.c \xB6
+ :src:base:ftfstype.c \xB6
+ :src:base:ftglyph.c \xB6
+ :src:base:ftgxval.c \xB6
+ :src:base:ftinit.c \xB6
+ :src:base:ftmm.c \xB6
+ :src:base:ftotval.c \xB6
+ :src:base:ftpfr.c \xB6
+ :src:base:ftstroke.c \xB6
+ :src:base:ftsynth.c \xB6
+ :src:base:ftsystem.c \xB6
+ :src:base:fttype1.c \xB6
+ :src:base:ftwinfnt.c \xB6
+ :src:base:ftxf86.c \xB6
+ :src:cache:ftcache.c \xB6
+ :src:bdf:bdf.c \xB6
+ :src:cff:cff.c \xB6
+ :src:cid:type1cid.c \xB6
+ :src:gxvalid:gxvalid.c \xB6
+ :src:gzip:ftgzip.c \xB6
+ :src:bzip2:ftbzip2.c \xB6
+ :src:lzw:ftlzw.c \xB6
+ :src:otvalid:otvalid.c \xB6
+ :src:pcf:pcf.c \xB6
+ :src:pfr:pfr.c \xB6
+ :src:psaux:psaux.c \xB6
+ :src:pshinter:pshinter.c \xB6
+ :src:psnames:psmodule.c \xB6
+ :src:raster:raster.c \xB6
+ :src:sfnt:sfnt.c \xB6
+ :src:smooth:smooth.c \xB6
+ :src:truetype:truetype.c \xB6
+ :src:type1:type1.c \xB6
+ :src:type42:type42.c \xB6
+ :src:winfonts:winfnt.c
+
+
+### Object Files ###
+
+ObjFiles-PPC = \xB6
+ "{ObjDir}autofit.c.x" \xB6
+ "{ObjDir}ftbase.c.x" \xB6
+ "{ObjDir}ftbbox.c.x" \xB6
+ "{ObjDir}ftbdf.c.x" \xB6
+ "{ObjDir}ftbitmap.c.x" \xB6
+ "{ObjDir}ftdebug.c.x" \xB6
+ "{ObjDir}ftfstype.c.x" \xB6
+ "{ObjDir}ftglyph.c.x" \xB6
+ "{ObjDir}ftgxval.c.x" \xB6
+ "{ObjDir}ftinit.c.x" \xB6
+ "{ObjDir}ftmm.c.x" \xB6
+ "{ObjDir}ftotval.c.x" \xB6
+ "{ObjDir}ftpfr.c.x" \xB6
+ "{ObjDir}ftstroke.c.x" \xB6
+ "{ObjDir}ftsynth.c.x" \xB6
+ "{ObjDir}ftsystem.c.x" \xB6
+ "{ObjDir}fttype1.c.x" \xB6
+ "{ObjDir}ftwinfnt.c.x" \xB6
+ "{ObjDir}ftxf86.c.x" \xB6
+ "{ObjDir}ftcache.c.x" \xB6
+ "{ObjDir}bdf.c.x" \xB6
+ "{ObjDir}cff.c.x" \xB6
+ "{ObjDir}type1cid.c.x" \xB6
+ "{ObjDir}gxvalid.c.x" \xB6
+ "{ObjDir}ftgzip.c.x" \xB6
+ "{ObjDir}ftbzip2.c.x" \xB6
+ "{ObjDir}ftlzw.c.x" \xB6
+ "{ObjDir}otvalid.c.x" \xB6
+ "{ObjDir}pcf.c.x" \xB6
+ "{ObjDir}pfr.c.x" \xB6
+ "{ObjDir}psaux.c.x" \xB6
+ "{ObjDir}pshinter.c.x" \xB6
+ "{ObjDir}psmodule.c.x" \xB6
+ "{ObjDir}raster.c.x" \xB6
+ "{ObjDir}sfnt.c.x" \xB6
+ "{ObjDir}smooth.c.x" \xB6
+ "{ObjDir}truetype.c.x" \xB6
+ "{ObjDir}type1.c.x" \xB6
+ "{ObjDir}type42.c.x" \xB6
+ "{ObjDir}winfnt.c.x"
+
+
+### Libraries ###
+
+LibFiles-PPC =
+
+
+### Default Rules ###
+
+.c.x \xC4 .c {\xA5MondoBuild\xA5}
+ {PPCC} {depDir}{default}.c -o {targDir}{default}.c.x {PPCCOptions}
+
+
+### Build Rules ###
+
+:builds:mac:ftbase.c \xC4\xC4 :src:base:ftbase.c
+ Duplicate :src:base:ftbase.c :builds:mac:ftbase.c
+
+"{ObjDir}ftbase.c.x" \xC4\xC4 :builds:mac:ftbase.c
+ {PPCC} :builds:mac:ftbase.c -o {ObjDir}ftbase.c.x \xB6
+ -i :builds:mac: \xB6
+ -i :src:base: \xB6
+ {PPCCOptions}
+
+FreeType.ppc_carbon \xC4\xC4 FreeType.ppc_carbon.o
+
+FreeType.ppc_carbon.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\xA5}
+ PPCLink \xB6
+ -o {Targ} \xB6
+ {ObjFiles-PPC} \xB6
+ {LibFiles-PPC} \xB6
+ {Sym-PPC} \xB6
+ -mf -d \xB6
+ -t 'XCOF' \xB6
+ -c 'MPS ' \xB6
+ -xm l
+
+
+
+### Required Dependencies ###
+
+"{ObjDir}autofit.c.x" \xC4 :src:autofit:autofit.c
+# "{ObjDir}ftbase.c.x" \xC4 :builds:mac:ftbase.c
+"{ObjDir}ftbbox.c.x" \xC4 :src:base:ftbbox.c
+"{ObjDir}ftbdf.c.x" \xC4 :src:base:ftbdf.c
+"{ObjDir}ftbitmap.c.x" \xC4 :src:base:ftbitmap.c
+"{ObjDir}ftdebug.c.x" \xC4 :src:base:ftdebug.c
+"{ObjDir}ftfstype.c.x" \xC4 :src:base:ftfstype.c
+"{ObjDir}ftglyph.c.x" \xC4 :src:base:ftglyph.c
+"{ObjDir}ftgxval.c.x" \xC4 :src:base:ftgxval.c
+"{ObjDir}ftinit.c.x" \xC4 :src:base:ftinit.c
+"{ObjDir}ftmm.c.x" \xC4 :src:base:ftmm.c
+"{ObjDir}ftotval.c.x" \xC4 :src:base:ftotval.c
+"{ObjDir}ftpfr.c.x" \xC4 :src:base:ftpfr.c
+"{ObjDir}ftstroke.c.x" \xC4 :src:base:ftstroke.c
+"{ObjDir}ftsynth.c.x" \xC4 :src:base:ftsynth.c
+"{ObjDir}ftsystem.c.x" \xC4 :src:base:ftsystem.c
+"{ObjDir}fttype1.c.x" \xC4 :src:base:fttype1.c
+"{ObjDir}ftwinfnt.c.x" \xC4 :src:base:ftwinfnt.c
+"{ObjDir}ftxf86.c.x" \xC4 :src:base:ftxf86.c
+"{ObjDir}ftcache.c.x" \xC4 :src:cache:ftcache.c
+"{ObjDir}bdf.c.x" \xC4 :src:bdf:bdf.c
+"{ObjDir}cff.c.x" \xC4 :src:cff:cff.c
+"{ObjDir}type1cid.c.x" \xC4 :src:cid:type1cid.c
+"{ObjDir}gxvalid.c.x" \xC4 :src:gxvalid:gxvalid.c
+"{ObjDir}ftgzip.c.x" \xC4 :src:gzip:ftgzip.c
+"{ObjDir}ftbzip2.c.x" \xC4 :src:bzip2:ftbzip2.c
+"{ObjDir}ftlzw.c.x" \xC4 :src:lzw:ftlzw.c
+"{ObjDir}otvalid.c.x" \xC4 :src:otvalid:otvalid.c
+"{ObjDir}pcf.c.x" \xC4 :src:pcf:pcf.c
+"{ObjDir}pfr.c.x" \xC4 :src:pfr:pfr.c
+"{ObjDir}psaux.c.x" \xC4 :src:psaux:psaux.c
+"{ObjDir}pshinter.c.x" \xC4 :src:pshinter:pshinter.c
+"{ObjDir}psmodule.c.x" \xC4 :src:psnames:psmodule.c
+"{ObjDir}raster.c.x" \xC4 :src:raster:raster.c
+"{ObjDir}sfnt.c.x" \xC4 :src:sfnt:sfnt.c
+"{ObjDir}smooth.c.x" \xC4 :src:smooth:smooth.c
+"{ObjDir}truetype.c.x" \xC4 :src:truetype:truetype.c
+"{ObjDir}type1.c.x" \xC4 :src:type1:type1.c
+"{ObjDir}type42.c.x" \xC4 :src:type42:type42.c
+"{ObjDir}winfnt.c.x" \xC4 :src:winfonts:winfnt.c
+
+
+### Optional Dependencies ###
+### Build this target to generate "include file" dependencies. ###
+
+Dependencies \xC4 $OutOfDate
+ MakeDepend \xB6
+ -append {MAKEFILE} \xB6
+ -ignore "{CIncludes}" \xB6
+ -objdir "{ObjDir}" \xB6
+ -objext .x \xB6
+ {Includes} \xB6
+ {SrcFiles}
+
+
diff --git a/3party/freetype/builds/mac/FreeType.ppc_classic.make.txt b/3party/freetype/builds/mac/FreeType.ppc_classic.make.txt
new file mode 100644
index 0000000000..0c0991eb07
--- /dev/null
+++ b/3party/freetype/builds/mac/FreeType.ppc_classic.make.txt
@@ -0,0 +1,215 @@
+# File: FreeType.ppc_classic.make
+# Target: FreeType.ppc_classic
+# Created: Thursday, October 27, 2005 07:42:43 PM
+
+
+MAKEFILE = FreeType.ppc_classic.make
+\xA5MondoBuild\xA5 = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
+
+ObjDir = :objs:
+Includes = \xB6
+ -ansi strict \xB6
+ -includes unix \xB6
+ -i :include: \xB6
+ -i :src: \xB6
+ -i :include:freetype:config:
+
+Sym-PPC = -sym off
+
+PPCCOptions = \xB6
+ -d HAVE_FSSPEC=1 \xB6
+ -d HAVE_FSREF=0 \xB6
+ -d HAVE_QUICKDRAW_TOOLBOX=1 \xB6
+ -d HAVE_QUICKDRAW_CARBON=0 \xB6
+ -d HAVE_ATS=0 \xB6
+ -d FT2_BUILD_LIBRARY \xB6
+ -d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
+ -d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
+ {Includes} {Sym-PPC}
+
+
+### Source Files ###
+
+SrcFiles = \xB6
+ :src:autofit:autofit.c \xB6
+ :builds:mac:ftbase.c \xB6
+ :src:base:ftbbox.c \xB6
+ :src:base:ftbdf.c \xB6
+ :src:base:ftbitmap.c \xB6
+ :src:base:ftdebug.c \xB6
+ :src:base:ftfstype.c \xB6
+ :src:base:ftglyph.c \xB6
+ :src:base:ftgxval.c \xB6
+ :src:base:ftinit.c \xB6
+ :src:base:ftmm.c \xB6
+ :src:base:ftotval.c \xB6
+ :src:base:ftpfr.c \xB6
+ :src:base:ftstroke.c \xB6
+ :src:base:ftsynth.c \xB6
+ :src:base:ftsystem.c \xB6
+ :src:base:fttype1.c \xB6
+ :src:base:ftwinfnt.c \xB6
+ :src:base:ftxf86.c \xB6
+ :src:cache:ftcache.c \xB6
+ :src:bdf:bdf.c \xB6
+ :src:cff:cff.c \xB6
+ :src:cid:type1cid.c \xB6
+ :src:gxvalid:gxvalid.c \xB6
+ :src:gzip:ftgzip.c \xB6
+ :src:bzip2:ftbzip2.c \xB6
+ :src:lzw:ftlzw.c \xB6
+ :src:otvalid:otvalid.c \xB6
+ :src:pcf:pcf.c \xB6
+ :src:pfr:pfr.c \xB6
+ :src:psaux:psaux.c \xB6
+ :src:pshinter:pshinter.c \xB6
+ :src:psnames:psmodule.c \xB6
+ :src:raster:raster.c \xB6
+ :src:sfnt:sfnt.c \xB6
+ :src:smooth:smooth.c \xB6
+ :src:truetype:truetype.c \xB6
+ :src:type1:type1.c \xB6
+ :src:type42:type42.c \xB6
+ :src:winfonts:winfnt.c
+
+
+### Object Files ###
+
+ObjFiles-PPC = \xB6
+ "{ObjDir}autofit.c.x" \xB6
+ "{ObjDir}ftbase.c.x" \xB6
+ "{ObjDir}ftbbox.c.x" \xB6
+ "{ObjDir}ftbdf.c.x" \xB6
+ "{ObjDir}ftbitmap.c.x" \xB6
+ "{ObjDir}ftdebug.c.x" \xB6
+ "{ObjDir}ftfstype.c.x" \xB6
+ "{ObjDir}ftglyph.c.x" \xB6
+ "{ObjDir}ftgxval.c.x" \xB6
+ "{ObjDir}ftinit.c.x" \xB6
+ "{ObjDir}ftmm.c.x" \xB6
+ "{ObjDir}ftotval.c.x" \xB6
+ "{ObjDir}ftpfr.c.x" \xB6
+ "{ObjDir}ftstroke.c.x" \xB6
+ "{ObjDir}ftsynth.c.x" \xB6
+ "{ObjDir}ftsystem.c.x" \xB6
+ "{ObjDir}fttype1.c.x" \xB6
+ "{ObjDir}ftwinfnt.c.x" \xB6
+ "{ObjDir}ftxf86.c.x" \xB6
+ "{ObjDir}ftcache.c.x" \xB6
+ "{ObjDir}bdf.c.x" \xB6
+ "{ObjDir}cff.c.x" \xB6
+ "{ObjDir}type1cid.c.x" \xB6
+ "{ObjDir}gxvalid.c.x" \xB6
+ "{ObjDir}ftgzip.c.x" \xB6
+ "{ObjDir}ftbzip2.c.x" \xB6
+ "{ObjDir}ftlzw.c.x" \xB6
+ "{ObjDir}otvalid.c.x" \xB6
+ "{ObjDir}pcf.c.x" \xB6
+ "{ObjDir}pfr.c.x" \xB6
+ "{ObjDir}psaux.c.x" \xB6
+ "{ObjDir}pshinter.c.x" \xB6
+ "{ObjDir}psmodule.c.x" \xB6
+ "{ObjDir}raster.c.x" \xB6
+ "{ObjDir}sfnt.c.x" \xB6
+ "{ObjDir}smooth.c.x" \xB6
+ "{ObjDir}truetype.c.x" \xB6
+ "{ObjDir}type1.c.x" \xB6
+ "{ObjDir}type42.c.x" \xB6
+ "{ObjDir}winfnt.c.x"
+
+
+### Libraries ###
+
+LibFiles-PPC =
+
+
+### Default Rules ###
+
+.c.x \xC4 .c {\xA5MondoBuild\xA5}
+ {PPCC} {depDir}{default}.c -o {targDir}{default}.c.x {PPCCOptions}
+
+
+### Build Rules ###
+
+:builds:mac:ftbase.c \xC4\xC4 :src:base:ftbase.c
+ Duplicate :src:base:ftbase.c :builds:mac:ftbase.c
+
+"{ObjDir}ftbase.c.x" \xC4\xC4 :builds:mac:ftbase.c
+ {PPCC} :builds:mac:ftbase.c -o "{ObjDir}ftbase.c.x" \xB6
+ -i :builds:mac: \xB6
+ -i :src:base: \xB6
+ {PPCCOptions}
+
+FreeType.ppc_classic \xC4\xC4 FreeType.ppc_classic.o
+
+FreeType.ppc_classic.o \xC4\xC4 {ObjFiles-PPC} {LibFiles-PPC} {\xA5MondoBuild\xA5}
+ PPCLink \xB6
+ -o {Targ} \xB6
+ {ObjFiles-PPC} \xB6
+ {LibFiles-PPC} \xB6
+ {Sym-PPC} \xB6
+ -mf -d \xB6
+ -t 'XCOF' \xB6
+ -c 'MPS ' \xB6
+ -xm l
+
+
+
+### Required Dependencies ###
+
+"{ObjDir}autofit.c.x" \xC4 :src:autofit:autofit.c
+# "{ObjDir}ftbase.c.x" \xC4 :builds:mac:ftbase.c
+"{ObjDir}ftbbox.c.x" \xC4 :src:base:ftbbox.c
+"{ObjDir}ftbdf.c.x" \xC4 :src:base:ftbdf.c
+"{ObjDir}ftbitmap.c.x" \xC4 :src:base:ftbitmap.c
+"{ObjDir}ftdebug.c.x" \xC4 :src:base:ftdebug.c
+"{ObjDir}ftfstype.c.x" \xC4 :src:base:ftfstype.c
+"{ObjDir}ftglyph.c.x" \xC4 :src:base:ftglyph.c
+"{ObjDir}ftgxval.c.x" \xC4 :src:base:ftgxval.c
+"{ObjDir}ftinit.c.x" \xC4 :src:base:ftinit.c
+"{ObjDir}ftmm.c.x" \xC4 :src:base:ftmm.c
+"{ObjDir}ftotval.c.x" \xC4 :src:base:ftotval.c
+"{ObjDir}ftpfr.c.x" \xC4 :src:base:ftpfr.c
+"{ObjDir}ftstroke.c.x" \xC4 :src:base:ftstroke.c
+"{ObjDir}ftsynth.c.x" \xC4 :src:base:ftsynth.c
+"{ObjDir}ftsystem.c.x" \xC4 :src:base:ftsystem.c
+"{ObjDir}fttype1.c.x" \xC4 :src:base:fttype1.c
+"{ObjDir}ftwinfnt.c.x" \xC4 :src:base:ftwinfnt.c
+"{ObjDir}ftxf86.c.x" \xC4 :src:base:ftxf86.c
+"{ObjDir}ftcache.c.x" \xC4 :src:cache:ftcache.c
+"{ObjDir}bdf.c.x" \xC4 :src:bdf:bdf.c
+"{ObjDir}cff.c.x" \xC4 :src:cff:cff.c
+"{ObjDir}type1cid.c.x" \xC4 :src:cid:type1cid.c
+"{ObjDir}gxvalid.c.x" \xC4 :src:gxvalid:gxvalid.c
+"{ObjDir}ftgzip.c.x" \xC4 :src:gzip:ftgzip.c
+"{ObjDir}ftbzip2.c.x" \xC4 :src:bzip2:ftbzip2.c
+"{ObjDir}ftlzw.c.x" \xC4 :src:lzw:ftlzw.c
+"{ObjDir}otvalid.c.x" \xC4 :src:otvalid:otvalid.c
+"{ObjDir}pcf.c.x" \xC4 :src:pcf:pcf.c
+"{ObjDir}pfr.c.x" \xC4 :src:pfr:pfr.c
+"{ObjDir}psaux.c.x" \xC4 :src:psaux:psaux.c
+"{ObjDir}pshinter.c.x" \xC4 :src:pshinter:pshinter.c
+"{ObjDir}psmodule.c.x" \xC4 :src:psnames:psmodule.c
+"{ObjDir}raster.c.x" \xC4 :src:raster:raster.c
+"{ObjDir}sfnt.c.x" \xC4 :src:sfnt:sfnt.c
+"{ObjDir}smooth.c.x" \xC4 :src:smooth:smooth.c
+"{ObjDir}truetype.c.x" \xC4 :src:truetype:truetype.c
+"{ObjDir}type1.c.x" \xC4 :src:type1:type1.c
+"{ObjDir}type42.c.x" \xC4 :src:type42:type42.c
+"{ObjDir}winfnt.c.x" \xC4 :src:winfonts:winfnt.c
+
+
+
+### Optional Dependencies ###
+### Build this target to generate "include file" dependencies. ###
+
+Dependencies \xC4 $OutOfDate
+ MakeDepend \xB6
+ -append {MAKEFILE} \xB6
+ -ignore "{CIncludes}" \xB6
+ -objdir "{ObjDir}" \xB6
+ -objext .x \xB6
+ {Includes} \xB6
+ {SrcFiles}
+
+
diff --git a/3party/freetype/builds/mac/README b/3party/freetype/builds/mac/README
new file mode 100644
index 0000000000..bd3df8ada4
--- /dev/null
+++ b/3party/freetype/builds/mac/README
@@ -0,0 +1,403 @@
+This folder contains
+
+ * Makefile skeltons for Apple MPW (Macintosh's Programmers Workshop)
+
+ * Python script to generate MPW makefile from skelton
+
+ * Metrowerks CodeWarrior 9.0 project file in XML format
+
+------------------------------------------------------------
+
+1. What is this
+---------------
+
+Files in this directory are designed to build FreeType
+running on classic MacOS. To build FreeType running on
+Mac OS X, build as the system is UNIX.
+
+However, Mac OS X is most useful to manipulate files in
+vanilla FreeType to fit classic MacOS.
+
+The information about MacOS specific API is written in
+appendix of this document.
+
+2. Requirement
+--------------
+
+You can use MPW: a free-charged developer environment
+by Apple, or CodeWarrior: a commercial developer
+environment by Metrowerks. GCC for MPW and Symantec
+"Think C" are not tested at present.
+
+
+ 2-1. Apple MPW
+ --------------
+
+ Following C compilers are tested:
+
+ m68k target: Apple SC 8.9.0d3e1
+ ppc target: Apple MrC 5.0.0d3c1
+
+ The final MPW-GM (official release on 1999/Dec) is too
+ old and cannot compile FreeType, because bundled C
+ compilers cannot search header files in sub directories.
+ Updating by the final MPW-PR (pre-release on 2001/Feb)
+ is required.
+
+ Required files are downloadable from:
+
+ http://developer.apple.com/tools/mpw-tools/index.html
+
+ Also you can find documents how to update by MPW-PR.
+
+ Python is required to restore MPW makefiles from the
+ skeltons. Python bundled to Mac OS X is enough. For
+ classic MacOS, MacPython is available:
+
+ http://homepages.cwi.nl/~jack/macpython/
+
+ MPW requires all files are typed by resource fork.
+ ResEdit bundled to MPW is enough. In Mac OS X,
+ /Developer/Tools/SetFile of DevTool is useful to
+ manipulate from commandline.
+
+ 2-2. Metrowerks CodeWarrior
+ ---------------------------
+
+ XML project file is generated and tested by
+ CodeWarrior 9.0. Older versions are not tested
+ at all. At present, static library for ppc target
+ is available in the project file.
+
+
+3. How to build
+---------------
+
+ 3-1. Apple MPW
+ --------------
+ Detailed building procedure by Apple MPW is
+ described in following.
+
+ 3-1-1. Generate MPW makefiles from the skeltons
+ ------------------------------------------------
+
+ Here are 4 skeltons for following targets are
+ included.
+
+ - FreeType.m68k_far.make.txt
+ Ancient 32bit binary executable format for
+ m68k MacOS: System 6, with 32bit addressing
+ mode (far-pointer-model) So-called "Toolbox"
+ API is used.
+
+ - FreeType.m68k_cfm.make.txt
+ CFM binary executable format for m68k MacOS:
+ System 7. So-called "Toolbox" API is used.
+
+ - FreeType.ppc_classic.make.txt
+ CFM binary executable format for ppc MacOS:
+ System 7, MacOS 8, MacOS 9. So-called "Toolbox"
+ API is used.
+
+ - FreeType.ppc_carbon.make.txt
+ CFM binary executable format for ppc MacOS:
+ MacOS 9. Carbon API is used.
+
+ At present, static library is only supported,
+ although targets except of m68k_far are capable
+ to use shared library.
+
+ MPW makefile syntax uses 8bit characters. To keep
+ from violating them during version control, here
+ we store skeltons in pure ASCII format. You must
+ generate MPW makefile by Python script ascii2mpw.py.
+
+ In Mac OS X terminal, you can convert as:
+
+ python builds/mac/ascii2mpw.py \
+ < builds/mac/FreeType.m68k_far.make.txt \
+ > FreeType.m68k_far.make
+
+ The skeltons are designed to use in the top
+ directory where there are builds, include, src etc.
+ You must name the generated MPW makefile by removing
+ ".txt" from source skelton name.
+
+ 3-1-2. Add resource forks to related files
+ ------------------------------------------
+
+ MPW's Make and C compilers cannot recognize files
+ without resource fork. You have to add resource
+ fork to the files that MPW uses. In Mac OS X
+ terminal of the system, you can do as:
+
+ find . -name '*.[ch]' -exec \
+ /Developer/Tools/SetFile -a l -c "MPS " -t TEXT \{\} \;
+
+ find . -name '*.make' -exec \
+ /Developer/Tools/SetFile -a l -c "MPS " -t TEXT \{\} \;
+
+
+ 3-1-3. Open MPW shell and build
+ -------------------------------
+
+ Open MPW shell and go to the top directory that
+ FreeType sources are extracted (MPW makefile must
+ be located in there), from "Set Directory" in
+ "Directory" menu.
+
+ Choose "Build" from "Build" menu, and type the
+ name of project by removing ".make" from MPW
+ makefile, as: FreeType.m68k_far
+
+ If building is successfully finished, you can find
+ built library in objs/ directory.
+
+
+ 3-2. Metrowerks CodeWarrior
+ ---------------------------
+
+ Detailed building procedure by Metrowerks
+ CodeWarrior (CW) 9.0 is described in following.
+
+ 3-2-1. Import XML project file
+ ------------------------------
+
+ CW XML project file is not ready for double-
+ click. Start CodeWarrior IDE, and choose
+ "Import project" in "File" menu. Choose XML
+ project file: builds/mac/ftlib.prj.xml.
+ In next, you will be asked where to save CW
+ native project file: you must choose
+ "builds/mac/ftlib.prj". The project file is
+ designed with relative path from there. After
+ CW native project file is generated, it is
+ automatically loaded, small project window
+ titled "ftlib.prj" is displayed.
+
+ 3-2-2. Building
+ ---------------
+ Choose "Make" from "Project" menu. If building
+ is successfully finished, you can find built
+ library at objs/FreeTypeLib.
+
+4. TODO
+-------
+
+ 4-1. All modules should be included
+ -----------------------------------
+
+ At present, MPW makefiles and CW project file are
+ just updated versions of these by Leonard. Some
+ modules are added after the last maintenance, they
+ are not included.
+
+ 4-2. Working test with ftdemos
+ ------------------------------
+
+ At present, MPW makefiles and CW project file can
+ build FreeType for classic MacOS. But their working
+ behaviours are not tested at all. Building ftdemos
+ for classic MacOS and working test is required.
+
+ 4-3. Porting Jam onto MPW
+ -------------------------
+
+ FreeType uses Jam (and FT-Jam) for unified cross-
+ platform building tool. At present, Jam is not ported
+ to MPW. To update classic MacOS support easily,
+ building by Jam is expected on MPW.
+
+
+APPENDIX I
+----------
+
+ A-1. Framework dependencies
+ ---------------------------
+
+ src/base/ftmac.c adds two Mac-specific features to
+ FreeType. These features are based on MacOS libraries.
+
+ * accessing resource-fork font
+ The fonts for classic MacOS store their graphical data
+ in resource forks which cannot be accessed via ANSI C
+ functions. FreeType2 provides functions to handle such
+ resource fork fonts, they are based on File Manager
+ framework of MacOS. In addition, HFS and HFS+ file
+ system driver of Linux is supported. Following
+ functions are for this purpose.
+
+ FT_New_Face_From_Resource()
+ FT_New_Face_From_FSSpec()
+ FT_New_Face_From_FSRef()
+
+ * resolving font name to font file
+ The font menu of MacOS application prefers font name
+ written in FOND resource than sfnt resource. FreeType2
+ provides functions to find font file by name in MacOS
+ application, they are based on QuickDraw Font Manager
+ and Apple Type Service framework of MacOS.
+
+ FT_GetFile_From_Mac_Name()
+ FT_GetFile_From_Mac_ATS_Name()
+
+ Working functions for each MacOS are summarized as
+ following.
+
+ upto MacOS 6:
+ not tested (you have to obtain MPW 2.x)
+
+ MacOS 7.x, 8.x, 9.x (without CarbonLib):
+ FT_GetFile_From_Mac_Name()
+ FT_New_Face_From_Resource()
+ FT_New_Face_From_FSSpec()
+
+ MacOS 9.x (with CarbonLib):
+ FT_GetFile_From_Mac_Name()
+ FT_New_Face_From_Resource()
+ FT_New_Face_From_FSSpec()
+ FT_New_Face_From_FSRef()
+
+ Mac OS X upto 10.4.x:
+ FT_GetFile_From_Mac_Name() deprecated
+ FT_New_Face_From_FSSpec() deprecated
+ FT_GetFile_From_Mac_ATS_Name() deprecated?
+ FT_New_Face_From_FSRef()
+
+ A-2. Deprecated Functions
+ -------------------------
+
+ A-2-1. FileManager
+ ------------------
+
+ For convenience to write MacOS application, ftmac.c
+ provides functions to specify a file by FSSpec and FSRef,
+ because the file identification pathname had ever been
+ unrecommended method in MacOS programming.
+
+ Toward to MacOS X 10.4 & 5, Carbon functions using FSSpec
+ datatype is noticed as deprecated, and recommended to
+ migrate to FSRef datatype. The big differences of FSRef
+ against FSSpec are explained in Apple TechNotes 2078.
+
+ http://developer.apple.com/technotes/tn2002/tn2078.html
+
+ - filename length: the max length of file
+ name of FSRef is 255 chars (it is limit of HFS+),
+ that of FSSpec is 31 chars (it is limit of HFS).
+
+ - filename encoding: FSSpec is localized by
+ legacy encoding for each language system,
+ FSRef is Unicode enabled.
+
+ A-2-2. FontManager
+ ------------------
+
+ Following functions receive QuickDraw fontname:
+
+ FT_GetFile_From_Mac_Name()
+
+ QuickDraw is deprecated and replaced by Quartz
+ since Mac OS X 10.4. They are still kept for
+ backward compatibility. By undefinition of
+ HAVE_QUICKDRAW in building, you can change these
+ functions to return FT_Err_Unimplemented always.
+
+ Replacement functions are added for migration.
+
+ FT_GetFile_From_Mac_ATS_Name()
+
+ They are usable on Mac OS X only. On older systems,
+ these functions return FT_Err_Unimplemented always.
+
+ The detailed incompatibilities and possibility
+ of FontManager emulation without QuickDraw is
+ explained in
+
+ http://www.gyve.org/~mpsuzuki/ats_benchmark.html
+
+ A-3. Framework Availabilities
+ -----------------------------
+
+ The framework of MacOS are often revised, especially
+ when new format of binary executable is introduced.
+ Following table is the minimum version of frameworks
+ to use functions used in FreeType2. The table is
+ extracted from MPW header files for assembly language.
+
+ *** NOTE ***
+ The conditional definition of available data type
+ in MPW compiler is insufficient. You can compile
+ program using FSRef data type for older systems
+ (MacOS 7, 8) that don't know FSRef data type.
+
+
+ +-------------------+-----------------------------+
+ CPU | mc680x0 | PowerPC |
+ +---------+---------+---------+---------+---------+
+ Binary Executable Format | Classic | 68K-CFM | CFM | CFM | Mach-O |
+ +---------+---------+---------+---------+---------+
+ Framework API | Toolbox | Toolbox | Toolbox | Carbon | Carbon |
+ +---------+---------+---------+---------+---------+
+
+ +---------+---------+---------+---------+---------+
+ | ?(*) |Interface|Interface|CarbonLib|Mac OS X |
+ | |Lib |Lib | | |
+* Files.h +---------+---------+---------+---------+---------+
+PBGetFCBInfoSync() | o | 7.1- | 7.1- | 1.0- | o |
+FSMakeFSSpec() | o | 7.1- | 7.1- | 1.0- | o |
+FSGetForkCBInfo() | o | (**) | 9.0- | 1.0- | o |
+FSpMakeFSRef() | o | (**) | 9.0- | 1.0- | o |
+FSGetCatalogInfo() | o | (**) | 9.0- | 1.0- | -10.3 |
+FSPathMakeRef() | x | x | x | 1.1- | -10.3 |
+ +---------+---------+---------+---------+---------+
+
+ +---------+---------+---------+---------+---------+
+ | ?(*) |Font |Font |CarbonLib|Mac OS X |
+ | |Manager |Manager | | |
+* Fonts.h +---------+---------+---------+---------+---------+
+FMCreateFontFamilyIterator() | x | x | 9.0- | 1.0- | -10.3 |
+FMDisposeFontFamilyIterator() | x | x | 9.0- | 1.0- | -10.3 |
+FMGetNextFontFamily() | x | x | 9.0- | 1.0- | -10.3 |
+FMGetFontFamilyName() | x | x | 9.0- | 1.0- | -10.3 |
+FMCreateFontFamilyInstanceIterator() | x | x | 9.0- | 1.0- | -10.3 |
+FMDisposeFontFamilyInstanceIterator() | x | x | 9.0- | 1.0- | -10.3 |
+FMGetNextFontFamilyInstance() | x | x | 9.0- | 1.0- | -10.3 |
+ +---------+---------+---------+---------+---------+
+
+ +---------+---------+---------+---------+---------+
+ | - | - | - |CarbonLib|Mac OS X |
+* ATSFont.h (***) +---------+---------+---------+---------+---------+
+ATSFontFindFromName() | x | x | x | x | o |
+ATSFontGetFileSpecification() | x | x | x | x | o |
+ +---------+---------+---------+---------+---------+
+
+ (*)
+ In the "Classic": the original binary executable
+ format, these framework functions are directly
+ transformed to MacOS system call. Therefore, the
+ exact availability should be checked by running
+ system.
+
+ (**)
+ InterfaceLib is bundled to MacOS and its version
+ is usually equal to MacOS. There's no separate
+ update for InterfaceLib. It is supposed that
+ there's no InterfaceLib 9.x for m68k platforms.
+ In fact, these functions are FSRef dependent.
+
+ (***)
+ ATSUI framework is available on ATSUnicode 8.5 on
+ ppc Toolbox CFM, CarbonLib 1.0 too. But its base:
+ ATS font manager is not published in these versions.
+
+------------------------------------------------------------
+Last update: 2009-Jul-25.
+
+Currently maintained by
+ suzuki toshiya, <mpsuzuki@hiroshima-u.ac.jp>
+Originally prepared by
+ Leonard Rosenthol, <leonardr@lazerware.com>
+ Just van Rossum, <just@letterror.com>
+
+This directory is now actively maintained as part of the FreeType Project.
diff --git a/3party/freetype/builds/mac/ascii2mpw.py b/3party/freetype/builds/mac/ascii2mpw.py
new file mode 100755
index 0000000000..ad32b21977
--- /dev/null
+++ b/3party/freetype/builds/mac/ascii2mpw.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+import sys
+import string
+
+if len( sys.argv ) == 1 :
+ for asc_line in sys.stdin.readlines():
+ mpw_line = string.replace(asc_line, "\\xA5", "\245")
+ mpw_line = string.replace(mpw_line, "\\xB6", "\266")
+ mpw_line = string.replace(mpw_line, "\\xC4", "\304")
+ mpw_line = string.replace(mpw_line, "\\xC5", "\305")
+ mpw_line = string.replace(mpw_line, "\\xFF", "\377")
+ mpw_line = string.replace(mpw_line, "\n", "\r")
+ mpw_line = string.replace(mpw_line, "\\n", "\n")
+ sys.stdout.write(mpw_line)
+elif sys.argv[1] == "-r" :
+ for mpw_line in sys.stdin.readlines():
+ asc_line = string.replace(mpw_line, "\n", "\\n")
+ asc_line = string.replace(asc_line, "\r", "\n")
+ asc_line = string.replace(asc_line, "\245", "\\xA5")
+ asc_line = string.replace(asc_line, "\266", "\\xB6")
+ asc_line = string.replace(asc_line, "\304", "\\xC4")
+ asc_line = string.replace(asc_line, "\305", "\\xC5")
+ asc_line = string.replace(asc_line, "\377", "\\xFF")
+ sys.stdout.write(asc_line)
diff --git a/3party/freetype/builds/mac/ftlib.prj.xml b/3party/freetype/builds/mac/ftlib.prj.xml
new file mode 100644
index 0000000000..cbbc45ee55
--- /dev/null
+++ b/3party/freetype/builds/mac/ftlib.prj.xml
@@ -0,0 +1,1194 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<?codewarrior exportversion="1.0.1" ideversion="5.0" ?>
+
+<!DOCTYPE PROJECT [
+<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>
+<!ELEMENT TARGETLIST (TARGET+)>
+<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?, FRAMEWORKLIST?, PACKAGEACTIONSLIST?)>
+<!ELEMENT NAME (#PCDATA)>
+<!ELEMENT USERSOURCETREETYPE (#PCDATA)>
+<!ELEMENT PATH (#PCDATA)>
+<!ELEMENT FILELIST (FILE*)>
+<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>
+<!ELEMENT PATHTYPE (#PCDATA)>
+<!ELEMENT PATHROOT (#PCDATA)>
+<!ELEMENT ACCESSPATH (#PCDATA)>
+<!ELEMENT PATHFORMAT (#PCDATA)>
+<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>
+<!ELEMENT FILEKIND (#PCDATA)>
+<!ELEMENT FILEFLAGS (#PCDATA)>
+<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>
+<!ELEMENT TARGETNAME (#PCDATA)>
+<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>
+<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>
+<!ELEMENT PANELDATA (NAME, VALUE)>
+<!ELEMENT VALUE (#PCDATA)>
+<!ELEMENT LINKORDER (FILEREF*)>
+<!ELEMENT SEGMENTLIST (SEGMENT+)>
+<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>
+<!ELEMENT ATTRIBUTES (#PCDATA)>
+<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>
+<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>
+<!ELEMENT BASEADDRESS (#PCDATA)>
+<!ELEMENT OVERLAY (NAME, FILEREF*)>
+<!ELEMENT SUBTARGETLIST (SUBTARGET+)>
+<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)>
+<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>
+<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>
+<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>
+<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)>
+<!ELEMENT FRAMEWORKLIST (FRAMEWORK+)>
+<!ELEMENT FRAMEWORK (FILEREF, LIBRARYFILE?, VERSION?)>
+<!ELEMENT PACKAGEACTIONSLIST (PACKAGEACTION+)>
+<!ELEMENT PACKAGEACTION (#PCDATA)>
+<!ELEMENT LIBRARYFILE (FILEREF)>
+<!ELEMENT VERSION (#PCDATA)>
+<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>
+<!ELEMENT ORDEREDTARGET (NAME)>
+<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>
+<!ELEMENT GROUPLIST (GROUP|FILEREF)*>
+<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>
+<!ELEMENT DESIGNLIST (DESIGN+)>
+<!ELEMENT DESIGN (NAME, DESIGNDATA)>
+<!ELEMENT DESIGNDATA (#PCDATA)>
+]>
+
+<PROJECT>
+ <TARGETLIST>
+ <TARGET>
+ <NAME>FreeTypeLib</NAME>
+ <SETTINGLIST>
+
+ <!-- Settings for "Source Trees" panel -->
+ <SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>
+
+ <!-- Settings for "Access Paths" panel -->
+ <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>SourceRelativeIncludes</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>UserSearchPaths</NAME>
+ <SETTING>
+ <SETTING><NAME>SearchPath</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>SearchPath</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:::include:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>SearchPath</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:::src:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>SearchPath</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>::</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
+ </SETTING>
+ </SETTING>
+ <SETTING><NAME>SystemSearchPaths</NAME>
+ <SETTING>
+ <SETTING><NAME>SearchPath</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
+ </SETTING>
+ </SETTING>
+
+ <!-- Settings for "Debugger Runtime" panel -->
+ <SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWRuntimeSettings_HostApplication</NAME>
+ <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING>
+
+ <!-- Settings for "Target Settings" panel -->
+ <SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>
+ <SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Targetname</NAME><VALUE>FreeTypeLib</VALUE></SETTING>
+ <SETTING><NAME>OutputDirectory</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:::objs:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>
+
+ <!-- Settings for "File Mappings" panel -->
+ <SETTING><NAME>FileMappings</NAME>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.ppu</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.o</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.ppob</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ <SETTING>
+ <SETTING><NAME>FileExtension</NAME><VALUE>.rsrc</VALUE></SETTING>
+ <SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
+ </SETTING>
+ </SETTING>
+
+ <!-- Settings for "Build Extras" panel -->
+ <SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>BrowserGenerator</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>DebuggerAppPath</NAME>
+ <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>DebuggerWorkingDir</NAME>
+ <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>CodeCompletionPrefixFileName</NAME><VALUE>MacHeaders.c</VALUE></SETTING>
+ <SETTING><NAME>CodeCompletionMacroFileName</NAME><VALUE>MacOS_Carbon_C++_Macros.h</VALUE></SETTING>
+
+ <!-- Settings for "Debugger Target" panel -->
+ <SETTING><NAME>ConsoleEncoding</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>AutoTargetDLLs</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>
+ <SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>AltExePath</NAME>
+ <SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>
+ <SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING>
+
+ <!-- Settings for "Remote Debug" panel -->
+ <SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>CoreID</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>JTAGClockSpeed</NAME><VALUE>8000</VALUE></SETTING>
+ <SETTING><NAME>IsMultiCore</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>OSDownload</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>UseGlobalOSDownload</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>OSDownloadConnectionName</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>OSDownloadPath</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>AltDownload</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>AltDownloadConnectionName</NAME><VALUE></VALUE></SETTING>
+
+ <!-- Settings for "Auto-target" panel -->
+ <SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING>
+
+ <!-- Settings for "Analyzer Connections" panel -->
+ <SETTING><NAME>AnalyzerConnectionName</NAME><VALUE></VALUE></SETTING>
+
+ <!-- Settings for "Custom Keywords" panel -->
+ <SETTING><NAME>CustomColor1</NAME>
+ <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
+ <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>CustomColor2</NAME>
+ <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
+ <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>CustomColor3</NAME>
+ <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
+ <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>CustomColor4</NAME>
+ <SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
+ <SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
+ </SETTING>
+
+ <!-- Settings for "C/C++ Compiler" panel -->
+ <SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_templateparser</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_c99</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_bottomupinline</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_gcc_extensions</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_instance_manager</NAME><VALUE>0</VALUE></SETTING>
+
+ <!-- Settings for "C/C++ Preprocessor" panel -->
+ <SETTING><NAME>C_CPP_Preprocessor_EmitFile</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>C_CPP_Preprocessor_EmitLine</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>C_CPP_Preprocessor_EmitFullPath</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>C_CPP_Preprocessor_KeepComments</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>C_CPP_Preprocessor_PCHUsesPrefixText</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>C_CPP_Preprocessor_EmitPragmas</NAME><VALUE>true</VALUE></SETTING>
+ <SETTING><NAME>C_CPP_Preprocessor_KeepWhiteSpace</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>C_CPP_Preprocessor_MultiByteEncoding</NAME><VALUE>encASCII_Unicode</VALUE></SETTING>
+ <SETTING><NAME>C_CPP_Preprocessor_PrefixText</NAME><VALUE>/* settings imported from old "C/C++ Language" panel */
+
+#if !__option(precompile)
+#include "ftoption.h" /* was "Prefix file" */
+#endif
+</VALUE></SETTING>
+
+ <!-- Settings for "C/C++ Warnings" panel -->
+ <SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_missingreturn</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_no_side_effect</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_resultnotused</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_padding</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_impl_i2f_conv</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_impl_f2i_conv</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_impl_s2u_conv</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_illtokenpasting</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_filenamecaps</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_filenamecapssystem</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_undefmacro</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWWarning_C_warn_ptrintconv</NAME><VALUE>0</VALUE></SETTING>
+
+ <!-- Settings for "MacOS Merge Panel" panel -->
+ <SETTING><NAME>MWMerge_MacOS_projectType</NAME><VALUE>Application</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_outputName</NAME><VALUE>Merge Out</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_outputCreator</NAME><VALUE>????</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_outputType</NAME><VALUE>APPL</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_suppressWarning</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_copyFragments</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_copyResources</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_flattenResource</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_flatFileName</NAME><VALUE>a.rsrc</VALUE></SETTING>
+ <SETTING><NAME>MWMerge_MacOS_flatFileOutputPath</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>MWMerge_MacOS_skipResources</NAME>
+ <SETTING><VALUE>DLGX</VALUE></SETTING>
+ <SETTING><VALUE>ckid</VALUE></SETTING>
+ <SETTING><VALUE>Proj</VALUE></SETTING>
+ <SETTING><VALUE>WSPC</VALUE></SETTING>
+ </SETTING>
+
+ <!-- Settings for "Output Flags" panel -->
+ <SETTING><NAME>FileLocked</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>ResourcesMapIsReadOnly</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>PrinterDriverIsMultiFinderCompatible</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Invisible</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HasBundle</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>NameLocked</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Stationery</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HasCustomIcon</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Shared</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HasBeenInited</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>Label</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>Comments</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>HasCustomBadge</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>HasRoutingInfo</NAME><VALUE>false</VALUE></SETTING>
+
+ <!-- Settings for "PPC CodeGen" panel -->
+ <SETTING><NAME>MWCodeGen_PPC_structalignment</NAME><VALUE>PPC_mw</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_tracebacktables</NAME><VALUE>None</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_processor</NAME><VALUE>Generic</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_function_align</NAME><VALUE>4</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_tocdata</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_largetoc</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_profiler</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_vectortocdata</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_poolconst</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_peephole</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_readonlystrings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_linkerpoolsstrings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_volatileasm</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_schedule</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_altivec</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_altivec_move_block</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_strictIEEEfp</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_fpcontract</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_genfsel</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_PPC_orderedfpcmp</NAME><VALUE>0</VALUE></SETTING>
+
+ <!-- Settings for "PPC CodeGen Mach-O" panel -->
+ <SETTING><NAME>MWCodeGen_MachO_structalignment</NAME><VALUE>PPC_mw</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_profiler_enum</NAME><VALUE>Off</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_processor</NAME><VALUE>Generic</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_function_align</NAME><VALUE>4</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_common</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_boolisint</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_peephole</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_readonlystrings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_linkerpoolsstrings</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_volatileasm</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_schedule</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_altivec</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_vecmove</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_fp_ieee_strict</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_fpcontract</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_genfsel</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWCodeGen_MachO_fp_cmps_ordered</NAME><VALUE>0</VALUE></SETTING>
+
+ <!-- Settings for "PPC Disassembler" panel -->
+ <SETTING><NAME>MWDisassembler_PPC_showcode</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWDisassembler_PPC_extended</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWDisassembler_PPC_mix</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWDisassembler_PPC_nohex</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWDisassembler_PPC_showdata</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWDisassembler_PPC_showexceptions</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWDisassembler_PPC_showsym</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWDisassembler_PPC_shownames</NAME><VALUE>1</VALUE></SETTING>
+
+ <!-- Settings for "PPC Global Optimizer" panel -->
+ <SETTING><NAME>GlobalOptimizer_PPC_optimizationlevel</NAME><VALUE>Level0</VALUE></SETTING>
+ <SETTING><NAME>GlobalOptimizer_PPC_optfor</NAME><VALUE>Speed</VALUE></SETTING>
+
+ <!-- Settings for "PPC Linker" panel -->
+ <SETTING><NAME>MWLinker_PPC_linksym</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_symfullpath</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_linkmap</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_code_folding</NAME><VALUE>None</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE></VALUE></SETTING>
+
+ <!-- Settings for "PPC Mac OS X Linker" panel -->
+ <SETTING><NAME>MWLinker_MacOSX_linksym</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_symfullpath</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_linkmap</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_use_objectivec_semantics</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_strip_debug_symbols</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_split_segs</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_report_msl_overloads</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_objects_follow_linkorder</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_linkmode</NAME><VALUE>Normal</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_exports</NAME><VALUE>ReferencedGlobals</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_sortcode</NAME><VALUE>None</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_mainname</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_initname</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_code_folding</NAME><VALUE>None</VALUE></SETTING>
+ <SETTING><NAME>MWLinker_MacOSX_stabsgen</NAME><VALUE>None</VALUE></SETTING>
+
+ <!-- Settings for "PPC Mac OS X Project" panel -->
+ <SETTING><NAME>MWProject_MacOSX_type</NAME><VALUE>Executable</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_filecreator</NAME><VALUE>????</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_filetype</NAME><VALUE>MEXE</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_vmaddress</NAME><VALUE>4096</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_usedefaultvmaddr</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_flatrsrc</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_flatrsrcfilename</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_flatrsrcoutputdir</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>MWProject_MacOSX_installpath</NAME><VALUE>./</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_dont_prebind</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_flat_namespace</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_frameworkversion</NAME><VALUE>A</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_currentversion</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_flat_oldimpversion</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_MacOSX_AddrMode</NAME><VALUE>1</VALUE></SETTING>
+
+ <!-- Settings for "PPC PEF" panel -->
+ <SETTING><NAME>MWPEF_exports</NAME><VALUE>None</VALUE></SETTING>
+ <SETTING><NAME>MWPEF_libfolder</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWPEF_sortcode</NAME><VALUE>None</VALUE></SETTING>
+ <SETTING><NAME>MWPEF_expandbss</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWPEF_sharedata</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWPEF_olddefversion</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWPEF_oldimpversion</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWPEF_currentversion</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWPEF_fragmentname</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWPEF_collapsereloads</NAME><VALUE>0</VALUE></SETTING>
+
+ <!-- Settings for "PPC Project" panel -->
+ <SETTING><NAME>MWProject_PPC_type</NAME><VALUE>Library</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_outfile</NAME><VALUE>FreeTypeLib</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_filecreator</NAME><VALUE>????</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_filetype</NAME><VALUE>????</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_size</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_minsize</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_stacksize</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_flags</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_symfilename</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_rsrcname</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_rsrcheader</NAME><VALUE>Native</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_rsrctype</NAME><VALUE>????</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_rsrcid</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_rsrcflags</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_rsrcstore</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_rsrcmerge</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_flatrsrc</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWProject_PPC_flatrsrcoutputdir</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>MWProject_PPC_flatrsrcfilename</NAME><VALUE></VALUE></SETTING>
+
+ <!-- Settings for "PPCAsm Panel" panel -->
+ <SETTING><NAME>MWAssembler_PPC_auxheader</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWAssembler_PPC_symmode</NAME><VALUE>Mac</VALUE></SETTING>
+ <SETTING><NAME>MWAssembler_PPC_dialect</NAME><VALUE>PPC</VALUE></SETTING>
+ <SETTING><NAME>MWAssembler_PPC_prefixfile</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWAssembler_PPC_typecheck</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWAssembler_PPC_warnings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWAssembler_PPC_casesensitive</NAME><VALUE>0</VALUE></SETTING>
+
+ <!-- Settings for "Property List" panel -->
+ <SETTING><NAME>PList_OutputType</NAME><VALUE>File</VALUE></SETTING>
+ <SETTING><NAME>PList_OutputEncoding</NAME><VALUE>UTF-8</VALUE></SETTING>
+ <SETTING><NAME>PList_PListVersion</NAME><VALUE>1.0</VALUE></SETTING>
+ <SETTING><NAME>PList_Prefix</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>PList_FileFilename</NAME><VALUE>Info.plist</VALUE></SETTING>
+ <SETTING><NAME>PList_FileDirectory</NAME>
+ <SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
+ <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
+ </SETTING>
+ <SETTING><NAME>PList_ResourceType</NAME><VALUE>plst</VALUE></SETTING>
+ <SETTING><NAME>PList_ResourceID</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>PList_ResourceName</NAME><VALUE></VALUE></SETTING>
+
+ <!-- Settings for "Rez Compiler" panel -->
+ <SETTING><NAME>MWRez_Language_maxwidth</NAME><VALUE>80</VALUE></SETTING>
+ <SETTING><NAME>MWRez_Language_script</NAME><VALUE>Roman</VALUE></SETTING>
+ <SETTING><NAME>MWRez_Language_alignment</NAME><VALUE>Align1</VALUE></SETTING>
+ <SETTING><NAME>MWRez_Language_filtermode</NAME><VALUE>FilterSkip</VALUE></SETTING>
+ <SETTING><NAME>MWRez_Language_suppresswarnings</NAME><VALUE>0</VALUE></SETTING>
+ <SETTING><NAME>MWRez_Language_escapecontrolchars</NAME><VALUE>1</VALUE></SETTING>
+ <SETTING><NAME>MWRez_Language_prefixname</NAME><VALUE></VALUE></SETTING>
+ <SETTING><NAME>MWRez_Language_filteredtypes</NAME><VALUE>'CODE' 'DATA' 'PICT'</VALUE></SETTING>
+ </SETTINGLIST>
+ <FILELIST>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftsystem.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftbase.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftinit.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>sfnt.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>psnames.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftdebug.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>type1cid.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>cff.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>smooth.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>winfnt.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>truetype.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftmac.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>psaux.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS></FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftcache.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS></FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftglyph.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS></FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>type1.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>pshinter.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>pcf.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftraster.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftrend1.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Text</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
+ </FILELIST>
+ <LINKORDER>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftsystem.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftbase.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftinit.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>sfnt.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>psnames.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftdebug.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>type1cid.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>cff.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>smooth.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>winfnt.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>truetype.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftmac.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>psaux.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftcache.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftglyph.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>type1.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>pshinter.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>pcf.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftraster.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftrend1.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ </LINKORDER>
+ </TARGET>
+ </TARGETLIST>
+
+ <TARGETORDER>
+ <ORDEREDTARGET><NAME>FreeTypeLib</NAME></ORDEREDTARGET>
+ </TARGETORDER>
+
+ <GROUPLIST>
+ <GROUP><NAME>base</NAME>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftbase.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftdebug.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftglyph.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftinit.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftsystem.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftmac.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ </GROUP>
+ <GROUP><NAME>ftmodules</NAME>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>cff.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftcache.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>psaux.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>psnames.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>sfnt.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>smooth.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>truetype.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>type1cid.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>winfnt.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>type1.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>pshinter.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>pcf.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftraster.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ <FILEREF>
+ <TARGETNAME>FreeTypeLib</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>ftrend1.c</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
+ </GROUP>
+ </GROUPLIST>
+
+</PROJECT>
diff --git a/3party/freetype/builds/mac/ftmac.c b/3party/freetype/builds/mac/ftmac.c
new file mode 100644
index 0000000000..c974f670f2
--- /dev/null
+++ b/3party/freetype/builds/mac/ftmac.c
@@ -0,0 +1,1531 @@
+/***************************************************************************/
+/* */
+/* ftmac.c */
+/* */
+/* Mac FOND support. Written by just@letterror.com. */
+/* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */
+/* */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Just van Rossum, 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. */
+/* */
+/***************************************************************************/
+
+
+ /*
+ Notes
+
+ Mac suitcase files can (and often do!) contain multiple fonts. To
+ support this I use the face_index argument of FT_(Open|New)_Face()
+ functions, and pretend the suitcase file is a collection.
+
+ Warning: fbit and NFNT bitmap resources are not supported yet. In old
+ sfnt fonts, bitmap glyph data for each size is stored in each `NFNT'
+ resources instead of the `bdat' table in the sfnt resource. Therefore,
+ face->num_fixed_sizes is set to 0, because bitmap data in `NFNT'
+ resource is unavailable at present.
+
+ The Mac FOND support works roughly like this:
+
+ - Check whether the offered stream points to a Mac suitcase file. This
+ is done by checking the file type: it has to be 'FFIL' or 'tfil'. The
+ stream that gets passed to our init_face() routine is a stdio stream,
+ which isn't usable for us, since the FOND resources live in the
+ resource fork. So we just grab the stream->pathname field.
+
+ - Read the FOND resource into memory, then check whether there is a
+ TrueType font and/or(!) a Type 1 font available.
+
+ - If there is a Type 1 font available (as a separate `LWFN' file), read
+ its data into memory, massage it slightly so it becomes PFB data, wrap
+ it into a memory stream, load the Type 1 driver and delegate the rest
+ of the work to it by calling FT_Open_Face(). (XXX TODO: after this
+ has been done, the kerning data from the FOND resource should be
+ appended to the face: On the Mac there are usually no AFM files
+ available. However, this is tricky since we need to map Mac char
+ codes to ps glyph names to glyph ID's...)
+
+ - If there is a TrueType font (an `sfnt' resource), read it into memory,
+ wrap it into a memory stream, load the TrueType driver and delegate
+ the rest of the work to it, by calling FT_Open_Face().
+
+ - Some suitcase fonts (notably Onyx) might point the `LWFN' file to
+ itself, even though it doesn't contains `POST' resources. To handle
+ this special case without opening the file an extra time, we just
+ ignore errors from the `LWFN' and fallback to the `sfnt' if both are
+ available.
+ */
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TRUETYPE_TAGS_H
+#include FT_INTERNAL_STREAM_H
+#include "ftbase.h"
+
+#if defined( __GNUC__ ) || defined( __IBMC__ )
+ /* This is for Mac OS X. Without redefinition, OS_INLINE */
+ /* expands to `static inline' which doesn't survive the */
+ /* -ansi compilation flag of GCC. */
+#if !HAVE_ANSI_OS_INLINE
+#undef OS_INLINE
+#define OS_INLINE static __inline__
+#endif
+#include <CoreServices/CoreServices.h>
+#include <ApplicationServices/ApplicationServices.h>
+#include <sys/syslimits.h> /* PATH_MAX */
+#else
+#include <Resources.h>
+#include <Fonts.h>
+#include <Endian.h>
+#include <Errors.h>
+#include <Files.h>
+#include <TextUtils.h>
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 1024 /* same with Mac OS X's syslimits.h */
+#endif
+
+#if defined( __MWERKS__ ) && !TARGET_RT_MAC_MACHO
+#include <FSp_fopen.h>
+#endif
+
+#define FT_DEPRECATED_ATTRIBUTE
+
+#include FT_MAC_H
+
+ /* undefine blocking-macros in ftmac.h */
+#undef FT_GetFile_From_Mac_Name
+#undef FT_GetFile_From_Mac_ATS_Name
+#undef FT_New_Face_From_FOND
+#undef FT_New_Face_From_FSSpec
+#undef FT_New_Face_From_FSRef
+
+
+ /* FSSpec functions are deprecated since Mac OS X 10.4 */
+#ifndef HAVE_FSSPEC
+#if TARGET_API_MAC_OS8 || TARGET_API_MAC_CARBON
+#define HAVE_FSSPEC 1
+#else
+#define HAVE_FSSPEC 0
+#endif
+#endif
+
+ /* most FSRef functions were introduced since Mac OS 9 */
+#ifndef HAVE_FSREF
+#if TARGET_API_MAC_OSX
+#define HAVE_FSREF 1
+#else
+#define HAVE_FSREF 0
+#endif
+#endif
+
+ /* QuickDraw is deprecated since Mac OS X 10.4 */
+#ifndef HAVE_QUICKDRAW_CARBON
+#if TARGET_API_MAC_OS8 || TARGET_API_MAC_CARBON
+#define HAVE_QUICKDRAW_CARBON 1
+#else
+#define HAVE_QUICKDRAW_CARBON 0
+#endif
+#endif
+
+ /* AppleTypeService is available since Mac OS X */
+#ifndef HAVE_ATS
+#if TARGET_API_MAC_OSX
+#define HAVE_ATS 1
+#ifndef kATSOptionFlagsUnRestrictedScope /* since Mac OS X 10.1 */
+#define kATSOptionFlagsUnRestrictedScope kATSOptionFlagsDefault
+#endif
+#else
+#define HAVE_ATS 0
+#endif
+#endif
+
+ /* `configure' checks the availability of `ResourceIndex' strictly */
+ /* and sets HAVE_TYPE_RESOURCE_INDEX to 1 or 0 always. If it is */
+ /* not set (e.g., a build without `configure'), the availability */
+ /* is guessed from the SDK version. */
+#ifndef HAVE_TYPE_RESOURCE_INDEX
+#if !defined( MAC_OS_X_VERSION_10_5 ) || \
+ ( MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 )
+#define HAVE_TYPE_RESOURCE_INDEX 0
+#else
+#define HAVE_TYPE_RESOURCE_INDEX 1
+#endif
+#endif /* !HAVE_TYPE_RESOURCE_INDEX */
+
+#if ( HAVE_TYPE_RESOURCE_INDEX == 0 )
+typedef short ResourceIndex;
+#endif
+
+ /* Set PREFER_LWFN to 1 if LWFN (Type 1) is preferred over
+ TrueType in case *both* are available (this is not common,
+ but it *is* possible). */
+#ifndef PREFER_LWFN
+#define PREFER_LWFN 1
+#endif
+
+
+#if !HAVE_QUICKDRAW_CARBON /* QuickDraw is deprecated since Mac OS X 10.4 */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_GetFile_From_Mac_Name( const char* fontName,
+ FSSpec* pathSpec,
+ FT_Long* face_index )
+ {
+ FT_UNUSED( fontName );
+ FT_UNUSED( pathSpec );
+ FT_UNUSED( face_index );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+#else
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_GetFile_From_Mac_Name( const char* fontName,
+ FSSpec* pathSpec,
+ FT_Long* face_index )
+ {
+ OptionBits options = kFMUseGlobalScopeOption;
+
+ FMFontFamilyIterator famIter;
+ OSStatus status = FMCreateFontFamilyIterator( NULL, NULL,
+ options,
+ &famIter );
+ FMFont the_font = 0;
+ FMFontFamily family = 0;
+
+
+ *face_index = 0;
+ while ( status == 0 && !the_font )
+ {
+ status = FMGetNextFontFamily( &famIter, &family );
+ if ( status == 0 )
+ {
+ int stat2;
+ FMFontFamilyInstanceIterator instIter;
+ Str255 famNameStr;
+ char famName[256];
+
+
+ /* get the family name */
+ FMGetFontFamilyName( family, famNameStr );
+ CopyPascalStringToC( famNameStr, famName );
+
+ /* iterate through the styles */
+ FMCreateFontFamilyInstanceIterator( family, &instIter );
+
+ *face_index = 0;
+ stat2 = 0;
+
+ while ( stat2 == 0 && !the_font )
+ {
+ FMFontStyle style;
+ FMFontSize size;
+ FMFont font;
+
+
+ stat2 = FMGetNextFontFamilyInstance( &instIter, &font,
+ &style, &size );
+ if ( stat2 == 0 && size == 0 )
+ {
+ char fullName[256];
+
+
+ /* build up a complete face name */
+ ft_strcpy( fullName, famName );
+ if ( style & bold )
+ ft_strcat( fullName, " Bold" );
+ if ( style & italic )
+ ft_strcat( fullName, " Italic" );
+
+ /* compare with the name we are looking for */
+ if ( ft_strcmp( fullName, fontName ) == 0 )
+ {
+ /* found it! */
+ the_font = font;
+ }
+ else
+ ++(*face_index);
+ }
+ }
+
+ FMDisposeFontFamilyInstanceIterator( &instIter );
+ }
+ }
+
+ FMDisposeFontFamilyIterator( &famIter );
+
+ if ( the_font )
+ {
+ FMGetFontContainer( the_font, pathSpec );
+ return FT_Err_Ok;
+ }
+ else
+ return FT_Err_Unknown_File_Format;
+ }
+
+#endif /* HAVE_QUICKDRAW_CARBON */
+
+
+#if HAVE_ATS
+
+ /* Private function. */
+ /* The FSSpec type has been discouraged for a long time, */
+ /* unfortunately an FSRef replacement API for */
+ /* ATSFontGetFileSpecification() is only available in */
+ /* Mac OS X 10.5 and later. */
+ static OSStatus
+ FT_ATSFontGetFileReference( ATSFontRef ats_font_id,
+ FSRef* ats_font_ref )
+ {
+ OSStatus err;
+
+#if !defined( MAC_OS_X_VERSION_10_5 ) || \
+ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
+ FSSpec spec;
+
+
+ err = ATSFontGetFileSpecification( ats_font_id, &spec );
+ if ( noErr == err )
+ err = FSpMakeFSRef( &spec, ats_font_ref );
+#else
+ err = ATSFontGetFileReference( ats_font_id, ats_font_ref );
+#endif
+
+ return err;
+ }
+
+
+ static FT_Error
+ FT_GetFileRef_From_Mac_ATS_Name( const char* fontName,
+ FSRef* ats_font_ref,
+ FT_Long* face_index )
+ {
+ CFStringRef cf_fontName;
+ ATSFontRef ats_font_id;
+
+
+ *face_index = 0;
+
+ cf_fontName = CFStringCreateWithCString( NULL, fontName,
+ kCFStringEncodingMacRoman );
+ ats_font_id = ATSFontFindFromName( cf_fontName,
+ kATSOptionFlagsUnRestrictedScope );
+ CFRelease( cf_fontName );
+
+ if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
+ return FT_Err_Unknown_File_Format;
+
+ if ( noErr != FT_ATSFontGetFileReference( ats_font_id, ats_font_ref ) )
+ return FT_Err_Unknown_File_Format;
+
+ /* face_index calculation by searching preceding fontIDs */
+ /* with same FSRef */
+ {
+ ATSFontRef id2 = ats_font_id - 1;
+ FSRef ref2;
+
+
+ while ( id2 > 0 )
+ {
+ if ( noErr != FT_ATSFontGetFileReference( id2, &ref2 ) )
+ break;
+ if ( noErr != FSCompareFSRefs( ats_font_ref, &ref2 ) )
+ break;
+
+ id2--;
+ }
+ *face_index = ats_font_id - ( id2 + 1 );
+ }
+
+ return FT_Err_Ok;
+ }
+
+#endif
+
+#if !HAVE_ATS
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_GetFilePath_From_Mac_ATS_Name( const char* fontName,
+ UInt8* path,
+ UInt32 maxPathSize,
+ FT_Long* face_index )
+ {
+ FT_UNUSED( fontName );
+ FT_UNUSED( path );
+ FT_UNUSED( maxPathSize );
+ FT_UNUSED( face_index );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+#else
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_GetFilePath_From_Mac_ATS_Name( const char* fontName,
+ UInt8* path,
+ UInt32 maxPathSize,
+ FT_Long* face_index )
+ {
+ FSRef ref;
+ FT_Error err;
+
+
+ err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
+ if ( FT_Err_Ok != err )
+ return err;
+
+ if ( noErr != FSRefMakePath( &ref, path, maxPathSize ) )
+ return FT_Err_Unknown_File_Format;
+
+ return FT_Err_Ok;
+ }
+
+#endif /* HAVE_ATS */
+
+
+#if !HAVE_FSSPEC || !HAVE_ATS
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_GetFile_From_Mac_ATS_Name( const char* fontName,
+ FSSpec* pathSpec,
+ FT_Long* face_index )
+ {
+ FT_UNUSED( fontName );
+ FT_UNUSED( pathSpec );
+ FT_UNUSED( face_index );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+#else
+
+ /* This function is deprecated because FSSpec is deprecated in Mac OS X. */
+ FT_EXPORT_DEF( FT_Error )
+ FT_GetFile_From_Mac_ATS_Name( const char* fontName,
+ FSSpec* pathSpec,
+ FT_Long* face_index )
+ {
+ FSRef ref;
+ FT_Error err;
+
+
+ err = FT_GetFileRef_From_Mac_ATS_Name( fontName, &ref, face_index );
+ if ( FT_Err_Ok != err )
+ return err;
+
+ if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone, NULL, NULL,
+ pathSpec, NULL ) )
+ return FT_Err_Unknown_File_Format;
+
+ return FT_Err_Ok;
+ }
+
+#endif
+
+
+#if defined( __MWERKS__ ) && !TARGET_RT_MAC_MACHO
+
+#define STREAM_FILE( stream ) ( (FT_FILE*)stream->descriptor.pointer )
+
+
+ FT_CALLBACK_DEF( void )
+ ft_FSp_stream_close( FT_Stream stream )
+ {
+ ft_fclose( STREAM_FILE( stream ) );
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+ stream->base = 0;
+ }
+
+
+ FT_CALLBACK_DEF( unsigned long )
+ ft_FSp_stream_io( FT_Stream stream,
+ unsigned long offset,
+ unsigned char* buffer,
+ unsigned long count )
+ {
+ FT_FILE* file;
+
+
+ file = STREAM_FILE( stream );
+
+ ft_fseek( file, offset, SEEK_SET );
+
+ return (unsigned long)ft_fread( buffer, 1, count, file );
+ }
+
+#endif /* __MWERKS__ && !TARGET_RT_MAC_MACHO */
+
+
+#if HAVE_FSSPEC && !HAVE_FSREF
+
+ /* isDirectory is a dummy to synchronize API with FSPathMakeRef() */
+ static OSErr
+ FT_FSPathMakeSpec( const UInt8* pathname,
+ FSSpec* spec_p,
+ Boolean isDirectory )
+ {
+ const char *p, *q;
+ short vRefNum;
+ long dirID;
+ Str255 nodeName;
+ OSErr err;
+ FT_UNUSED( isDirectory );
+
+
+ p = q = (const char *)pathname;
+ dirID = 0;
+ vRefNum = 0;
+
+ while ( 1 )
+ {
+ int len = ft_strlen( p );
+
+
+ if ( len > 255 )
+ len = 255;
+
+ q = p + len;
+
+ if ( q == p )
+ return 0;
+
+ if ( 255 < ft_strlen( (char *)pathname ) )
+ {
+ while ( p < q && *q != ':' )
+ q--;
+ }
+
+ if ( p < q )
+ *(char *)nodeName = q - p;
+ else if ( ft_strlen( p ) < 256 )
+ *(char *)nodeName = ft_strlen( p );
+ else
+ return errFSNameTooLong;
+
+ ft_strncpy( (char *)nodeName + 1, (char *)p, *(char *)nodeName );
+ err = FSMakeFSSpec( vRefNum, dirID, nodeName, spec_p );
+ if ( err || '\0' == *q )
+ return err;
+
+ vRefNum = spec_p->vRefNum;
+ dirID = spec_p->parID;
+
+ p = q;
+ }
+ }
+
+
+ static OSErr
+ FT_FSpMakePath( const FSSpec* spec_p,
+ UInt8* path,
+ UInt32 maxPathSize )
+ {
+ OSErr err;
+ FSSpec spec = *spec_p;
+ short vRefNum;
+ long dirID;
+ Str255 parDir_name;
+
+
+ FT_MEM_SET( path, 0, maxPathSize );
+ while ( 1 )
+ {
+ int child_namelen = ft_strlen( (char *)path );
+ unsigned char node_namelen = spec.name[0];
+ unsigned char* node_name = spec.name + 1;
+
+
+ if ( node_namelen + child_namelen > maxPathSize )
+ return errFSNameTooLong;
+
+ FT_MEM_MOVE( path + node_namelen + 1, path, child_namelen );
+ FT_MEM_COPY( path, node_name, node_namelen );
+ if ( child_namelen > 0 )
+ path[node_namelen] = ':';
+
+ vRefNum = spec.vRefNum;
+ dirID = spec.parID;
+ parDir_name[0] = '\0';
+ err = FSMakeFSSpec( vRefNum, dirID, parDir_name, &spec );
+ if ( noErr != err || dirID == spec.parID )
+ break;
+ }
+ return noErr;
+ }
+
+#endif /* HAVE_FSSPEC && !HAVE_FSREF */
+
+
+ static OSErr
+ FT_FSPathMakeRes( const UInt8* pathname,
+ ResFileRefNum* res )
+ {
+
+#if HAVE_FSREF
+
+ OSErr err;
+ FSRef ref;
+
+
+ if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )
+ return FT_Err_Cannot_Open_Resource;
+
+ /* at present, no support for dfont format */
+ err = FSOpenResourceFile( &ref, 0, NULL, fsRdPerm, res );
+ if ( noErr == err )
+ return err;
+
+ /* fallback to original resource-fork font */
+ *res = FSOpenResFile( &ref, fsRdPerm );
+ err = ResError();
+
+#else
+
+ OSErr err;
+ FSSpec spec;
+
+
+ if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )
+ return FT_Err_Cannot_Open_Resource;
+
+ /* at present, no support for dfont format without FSRef */
+ /* (see above), try original resource-fork font */
+ *res = FSpOpenResFile( &spec, fsRdPerm );
+ err = ResError();
+
+#endif /* HAVE_FSREF */
+
+ return err;
+ }
+
+
+ /* Return the file type for given pathname */
+ static OSType
+ get_file_type_from_path( const UInt8* pathname )
+ {
+
+#if HAVE_FSREF
+
+ FSRef ref;
+ FSCatalogInfo info;
+
+
+ if ( noErr != FSPathMakeRef( pathname, &ref, FALSE ) )
+ return ( OSType ) 0;
+
+ if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoFinderInfo, &info,
+ NULL, NULL, NULL ) )
+ return ( OSType ) 0;
+
+ return ((FInfo *)(info.finderInfo))->fdType;
+
+#else
+
+ FSSpec spec;
+ FInfo finfo;
+
+
+ if ( noErr != FT_FSPathMakeSpec( pathname, &spec, FALSE ) )
+ return ( OSType ) 0;
+
+ if ( noErr != FSpGetFInfo( &spec, &finfo ) )
+ return ( OSType ) 0;
+
+ return finfo.fdType;
+
+#endif /* HAVE_FSREF */
+
+ }
+
+
+ /* Given a PostScript font name, create the Macintosh LWFN file name. */
+ static void
+ create_lwfn_name( char* ps_name,
+ Str255 lwfn_file_name )
+ {
+ int max = 5, count = 0;
+ FT_Byte* p = lwfn_file_name;
+ FT_Byte* q = (FT_Byte*)ps_name;
+
+
+ lwfn_file_name[0] = 0;
+
+ while ( *q )
+ {
+ if ( ft_isupper( *q ) )
+ {
+ if ( count )
+ max = 3;
+ count = 0;
+ }
+ if ( count < max && ( ft_isalnum( *q ) || *q == '_' ) )
+ {
+ *++p = *q;
+ lwfn_file_name[0]++;
+ count++;
+ }
+ q++;
+ }
+ }
+
+
+ static short
+ count_faces_sfnt( char* fond_data )
+ {
+ /* The count is 1 greater than the value in the FOND. */
+ /* Isn't that cute? :-) */
+
+ return EndianS16_BtoN( *( (short*)( fond_data +
+ sizeof ( FamRec ) ) ) ) + 1;
+ }
+
+
+ static short
+ count_faces_scalable( char* fond_data )
+ {
+ AsscEntry* assoc;
+ FamRec* fond;
+ short i, face, face_all;
+
+
+ fond = (FamRec*)fond_data;
+ face_all = EndianS16_BtoN( *( (short *)( fond_data +
+ sizeof ( FamRec ) ) ) ) + 1;
+ assoc = (AsscEntry*)( fond_data + sizeof ( FamRec ) + 2 );
+ face = 0;
+
+ for ( i = 0; i < face_all; i++ )
+ {
+ if ( 0 == EndianS16_BtoN( assoc[i].fontSize ) )
+ face++;
+ }
+ return face;
+ }
+
+
+ /* Look inside the FOND data, answer whether there should be an SFNT
+ resource, and answer the name of a possible LWFN Type 1 file.
+
+ Thanks to Paul Miller (paulm@profoundeffects.com) for the fix
+ to load a face OTHER than the first one in the FOND!
+ */
+
+ static void
+ parse_fond( char* fond_data,
+ short* have_sfnt,
+ ResID* sfnt_id,
+ Str255 lwfn_file_name,
+ short face_index )
+ {
+ AsscEntry* assoc;
+ AsscEntry* base_assoc;
+ FamRec* fond;
+
+
+ *sfnt_id = 0;
+ *have_sfnt = 0;
+ lwfn_file_name[0] = 0;
+
+ fond = (FamRec*)fond_data;
+ assoc = (AsscEntry*)( fond_data + sizeof ( FamRec ) + 2 );
+ base_assoc = assoc;
+
+ /* the maximum faces in a FOND is 48, size of StyleTable.indexes[] */
+ if ( 47 < face_index )
+ return;
+
+ /* Let's do a little range checking before we get too excited here */
+ if ( face_index < count_faces_sfnt( fond_data ) )
+ {
+ assoc += face_index; /* add on the face_index! */
+
+ /* if the face at this index is not scalable,
+ fall back to the first one (old behavior) */
+ if ( EndianS16_BtoN( assoc->fontSize ) == 0 )
+ {
+ *have_sfnt = 1;
+ *sfnt_id = EndianS16_BtoN( assoc->fontID );
+ }
+ else if ( base_assoc->fontSize == 0 )
+ {
+ *have_sfnt = 1;
+ *sfnt_id = EndianS16_BtoN( base_assoc->fontID );
+ }
+ }
+
+ if ( EndianS32_BtoN( fond->ffStylOff ) )
+ {
+ unsigned char* p = (unsigned char*)fond_data;
+ StyleTable* style;
+ unsigned short string_count;
+ char ps_name[256];
+ unsigned char* names[64];
+ int i;
+
+
+ p += EndianS32_BtoN( fond->ffStylOff );
+ style = (StyleTable*)p;
+ p += sizeof ( StyleTable );
+ string_count = EndianS16_BtoN( *(short*)(p) );
+ p += sizeof ( short );
+
+ for ( i = 0; i < string_count && i < 64; i++ )
+ {
+ names[i] = p;
+ p += names[i][0];
+ p++;
+ }
+
+ {
+ size_t ps_name_len = (size_t)names[0][0];
+
+
+ if ( ps_name_len != 0 )
+ {
+ ft_memcpy(ps_name, names[0] + 1, ps_name_len);
+ ps_name[ps_name_len] = 0;
+ }
+ if ( style->indexes[face_index] > 1 &&
+ style->indexes[face_index] <= FT_MIN( string_count, 64 ) )
+ {
+ unsigned char* suffixes = names[style->indexes[face_index] - 1];
+
+
+ for ( i = 1; i <= suffixes[0]; i++ )
+ {
+ unsigned char* s;
+ size_t j = suffixes[i] - 1;
+
+
+ if ( j < string_count && ( s = names[j] ) != NULL )
+ {
+ size_t s_len = (size_t)s[0];
+
+
+ if ( s_len != 0 && ps_name_len + s_len < sizeof ( ps_name ) )
+ {
+ ft_memcpy( ps_name + ps_name_len, s + 1, s_len );
+ ps_name_len += s_len;
+ ps_name[ps_name_len] = 0;
+ }
+ }
+ }
+ }
+ }
+
+ create_lwfn_name( ps_name, lwfn_file_name );
+ }
+ }
+
+
+ static FT_Error
+ lookup_lwfn_by_fond( const UInt8* path_fond,
+ ConstStr255Param base_lwfn,
+ UInt8* path_lwfn,
+ int path_size )
+ {
+
+#if HAVE_FSREF
+
+ FSRef ref, par_ref;
+ int dirname_len;
+
+
+ /* Pathname for FSRef can be in various formats: HFS, HFS+, and POSIX. */
+ /* We should not extract parent directory by string manipulation. */
+
+ if ( noErr != FSPathMakeRef( path_fond, &ref, FALSE ) )
+ return FT_Err_Invalid_Argument;
+
+ if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
+ NULL, NULL, NULL, &par_ref ) )
+ return FT_Err_Invalid_Argument;
+
+ if ( noErr != FSRefMakePath( &par_ref, path_lwfn, path_size ) )
+ return FT_Err_Invalid_Argument;
+
+ if ( ft_strlen( (char *)path_lwfn ) + 1 + base_lwfn[0] > path_size )
+ return FT_Err_Invalid_Argument;
+
+ /* now we have absolute dirname in path_lwfn */
+ if ( path_lwfn[0] == '/' )
+ ft_strcat( (char *)path_lwfn, "/" );
+ else
+ ft_strcat( (char *)path_lwfn, ":" );
+
+ dirname_len = ft_strlen( (char *)path_lwfn );
+ ft_strcat( (char *)path_lwfn, (char *)base_lwfn + 1 );
+ path_lwfn[dirname_len + base_lwfn[0]] = '\0';
+
+ if ( noErr != FSPathMakeRef( path_lwfn, &ref, FALSE ) )
+ return FT_Err_Cannot_Open_Resource;
+
+ if ( noErr != FSGetCatalogInfo( &ref, kFSCatInfoNone,
+ NULL, NULL, NULL, NULL ) )
+ return FT_Err_Cannot_Open_Resource;
+
+ return FT_Err_Ok;
+
+#else
+
+ int i;
+ FSSpec spec;
+
+
+ /* pathname for FSSpec is always HFS format */
+ if ( ft_strlen( (char *)path_fond ) > path_size )
+ return FT_Err_Invalid_Argument;
+
+ ft_strcpy( (char *)path_lwfn, (char *)path_fond );
+
+ i = ft_strlen( (char *)path_lwfn ) - 1;
+ while ( i > 0 && ':' != path_lwfn[i] )
+ i--;
+
+ if ( i + 1 + base_lwfn[0] > path_size )
+ return FT_Err_Invalid_Argument;
+
+ if ( ':' == path_lwfn[i] )
+ {
+ ft_strcpy( (char *)path_lwfn + i + 1, (char *)base_lwfn + 1 );
+ path_lwfn[i + 1 + base_lwfn[0]] = '\0';
+ }
+ else
+ {
+ ft_strcpy( (char *)path_lwfn, (char *)base_lwfn + 1 );
+ path_lwfn[base_lwfn[0]] = '\0';
+ }
+
+ if ( noErr != FT_FSPathMakeSpec( path_lwfn, &spec, FALSE ) )
+ return FT_Err_Cannot_Open_Resource;
+
+ return FT_Err_Ok;
+
+#endif /* HAVE_FSREF */
+
+ }
+
+
+ static short
+ count_faces( Handle fond,
+ const UInt8* pathname )
+ {
+ ResID sfnt_id;
+ short have_sfnt, have_lwfn;
+ Str255 lwfn_file_name;
+ UInt8 buff[PATH_MAX];
+ FT_Error err;
+ short num_faces;
+
+
+ have_sfnt = have_lwfn = 0;
+
+ HLock( fond );
+ parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, 0 );
+
+ if ( lwfn_file_name[0] )
+ {
+ err = lookup_lwfn_by_fond( pathname, lwfn_file_name,
+ buff, sizeof ( buff ) );
+ if ( FT_Err_Ok == err )
+ have_lwfn = 1;
+ }
+
+ if ( have_lwfn && ( !have_sfnt || PREFER_LWFN ) )
+ num_faces = 1;
+ else
+ num_faces = count_faces_scalable( *fond );
+
+ HUnlock( fond );
+ return num_faces;
+ }
+
+
+ /* Read Type 1 data from the POST resources inside the LWFN file,
+ return a PFB buffer. This is somewhat convoluted because the FT2
+ PFB parser wants the ASCII header as one chunk, and the LWFN
+ chunks are often not organized that way, so we glue chunks
+ of the same type together. */
+ static FT_Error
+ read_lwfn( FT_Memory memory,
+ ResFileRefNum res,
+ FT_Byte** pfb_data,
+ FT_ULong* size )
+ {
+ FT_Error error = FT_Err_Ok;
+ ResID res_id;
+ unsigned char *buffer, *p, *size_p = NULL;
+ FT_ULong total_size = 0;
+ FT_ULong old_total_size = 0;
+ FT_ULong post_size, pfb_chunk_size;
+ Handle post_data;
+ char code, last_code;
+
+
+ UseResFile( res );
+
+ /* First pass: load all POST resources, and determine the size of */
+ /* the output buffer. */
+ res_id = 501;
+ last_code = -1;
+
+ for (;;)
+ {
+ post_data = Get1Resource( TTAG_POST, res_id++ );
+ if ( post_data == NULL )
+ break; /* we are done */
+
+ code = (*post_data)[0];
+
+ if ( code != last_code )
+ {
+ if ( code == 5 )
+ total_size += 2; /* just the end code */
+ else
+ total_size += 6; /* code + 4 bytes chunk length */
+ }
+
+ total_size += GetHandleSize( post_data ) - 2;
+ last_code = code;
+
+ /* detect integer overflows */
+ if ( total_size < old_total_size )
+ {
+ error = FT_Err_Array_Too_Large;
+ goto Error;
+ }
+
+ old_total_size = total_size;
+ }
+
+ if ( FT_ALLOC( buffer, (FT_Long)total_size ) )
+ goto Error;
+
+ /* Second pass: append all POST data to the buffer, add PFB fields. */
+ /* Glue all consecutive chunks of the same type together. */
+ p = buffer;
+ res_id = 501;
+ last_code = -1;
+ pfb_chunk_size = 0;
+
+ for (;;)
+ {
+ post_data = Get1Resource( TTAG_POST, res_id++ );
+ if ( post_data == NULL )
+ break; /* we are done */
+
+ post_size = (FT_ULong)GetHandleSize( post_data ) - 2;
+ code = (*post_data)[0];
+
+ if ( code != last_code )
+ {
+ if ( last_code != -1 )
+ {
+ /* we are done adding a chunk, fill in the size field */
+ if ( size_p != NULL )
+ {
+ *size_p++ = (FT_Byte)( pfb_chunk_size & 0xFF );
+ *size_p++ = (FT_Byte)( ( pfb_chunk_size >> 8 ) & 0xFF );
+ *size_p++ = (FT_Byte)( ( pfb_chunk_size >> 16 ) & 0xFF );
+ *size_p++ = (FT_Byte)( ( pfb_chunk_size >> 24 ) & 0xFF );
+ }
+ pfb_chunk_size = 0;
+ }
+
+ *p++ = 0x80;
+ if ( code == 5 )
+ *p++ = 0x03; /* the end */
+ else if ( code == 2 )
+ *p++ = 0x02; /* binary segment */
+ else
+ *p++ = 0x01; /* ASCII segment */
+
+ if ( code != 5 )
+ {
+ size_p = p; /* save for later */
+ p += 4; /* make space for size field */
+ }
+ }
+
+ ft_memcpy( p, *post_data + 2, post_size );
+ pfb_chunk_size += post_size;
+ p += post_size;
+ last_code = code;
+ }
+
+ *pfb_data = buffer;
+ *size = total_size;
+
+ Error:
+ CloseResFile( res );
+ return error;
+ }
+
+
+ /* Create a new FT_Face from a file spec to an LWFN file. */
+ static FT_Error
+ FT_New_Face_From_LWFN( FT_Library library,
+ const UInt8* pathname,
+ FT_Long face_index,
+ FT_Face* aface )
+ {
+ FT_Byte* pfb_data;
+ FT_ULong pfb_size;
+ FT_Error error;
+ ResFileRefNum res;
+
+
+ if ( noErr != FT_FSPathMakeRes( pathname, &res ) )
+ return FT_Err_Cannot_Open_Resource;
+
+ pfb_data = NULL;
+ pfb_size = 0;
+ error = read_lwfn( library->memory, res, &pfb_data, &pfb_size );
+ CloseResFile( res ); /* PFB is already loaded, useless anymore */
+ if ( error )
+ return error;
+
+ return open_face_from_buffer( library,
+ pfb_data,
+ pfb_size,
+ face_index,
+ "type1",
+ aface );
+ }
+
+
+ /* Create a new FT_Face from an SFNT resource, specified by res ID. */
+ static FT_Error
+ FT_New_Face_From_SFNT( FT_Library library,
+ ResID sfnt_id,
+ FT_Long face_index,
+ FT_Face* aface )
+ {
+ Handle sfnt = NULL;
+ FT_Byte* sfnt_data;
+ size_t sfnt_size;
+ FT_Error error = FT_Err_Ok;
+ FT_Memory memory = library->memory;
+ int is_cff, is_sfnt_ps;
+
+
+ sfnt = GetResource( TTAG_sfnt, sfnt_id );
+ if ( sfnt == NULL )
+ return FT_Err_Invalid_Handle;
+
+ sfnt_size = (FT_ULong)GetHandleSize( sfnt );
+ if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) )
+ {
+ ReleaseResource( sfnt );
+ return error;
+ }
+
+ HLock( sfnt );
+ ft_memcpy( sfnt_data, *sfnt, sfnt_size );
+ HUnlock( sfnt );
+ ReleaseResource( sfnt );
+
+ is_cff = sfnt_size > 4 && !ft_memcmp( sfnt_data, "OTTO", 4 );
+ is_sfnt_ps = sfnt_size > 4 && !ft_memcmp( sfnt_data, "typ1", 4 );
+
+ if ( is_sfnt_ps )
+ {
+ FT_Stream stream;
+
+
+ if ( FT_NEW( stream ) )
+ goto Try_OpenType;
+
+ FT_Stream_OpenMemory( stream, sfnt_data, sfnt_size );
+ if ( !open_face_PS_from_sfnt_stream( library,
+ stream,
+ face_index,
+ 0, NULL,
+ aface ) )
+ {
+ FT_Stream_Close( stream );
+ FT_FREE( stream );
+ FT_FREE( sfnt_data );
+ goto Exit;
+ }
+
+ FT_FREE( stream );
+ }
+ Try_OpenType:
+ error = open_face_from_buffer( library,
+ sfnt_data,
+ sfnt_size,
+ face_index,
+ is_cff ? "cff" : "truetype",
+ aface );
+ Exit:
+ return error;
+ }
+
+
+ /* Create a new FT_Face from a file spec to a suitcase file. */
+ static FT_Error
+ FT_New_Face_From_Suitcase( FT_Library library,
+ const UInt8* pathname,
+ FT_Long face_index,
+ FT_Face* aface )
+ {
+ FT_Error error = FT_Err_Cannot_Open_Resource;
+ ResFileRefNum res_ref;
+ ResourceIndex res_index;
+ Handle fond;
+ short num_faces_in_res, num_faces_in_fond;
+
+
+ if ( noErr != FT_FSPathMakeRes( pathname, &res_ref ) )
+ return FT_Err_Cannot_Open_Resource;
+
+ UseResFile( res_ref );
+ if ( ResError() )
+ return FT_Err_Cannot_Open_Resource;
+
+ num_faces_in_res = 0;
+ for ( res_index = 1; ; ++res_index )
+ {
+ fond = Get1IndResource( TTAG_FOND, res_index );
+ if ( ResError() )
+ break;
+
+ num_faces_in_fond = count_faces( fond, pathname );
+ num_faces_in_res += num_faces_in_fond;
+
+ if ( 0 <= face_index && face_index < num_faces_in_fond && error )
+ error = FT_New_Face_From_FOND( library, fond, face_index, aface );
+
+ face_index -= num_faces_in_fond;
+ }
+
+ CloseResFile( res_ref );
+ if ( FT_Err_Ok == error && NULL != aface )
+ (*aface)->num_faces = num_faces_in_res;
+ return error;
+ }
+
+
+ /* documentation is in ftmac.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_New_Face_From_FOND( FT_Library library,
+ Handle fond,
+ FT_Long face_index,
+ FT_Face* aface )
+ {
+ short have_sfnt, have_lwfn = 0;
+ ResID sfnt_id, fond_id;
+ OSType fond_type;
+ Str255 fond_name;
+ Str255 lwfn_file_name;
+ UInt8 path_lwfn[PATH_MAX];
+ OSErr err;
+ FT_Error error = FT_Err_Ok;
+
+
+ GetResInfo( fond, &fond_id, &fond_type, fond_name );
+ if ( ResError() != noErr || fond_type != TTAG_FOND )
+ return FT_Err_Invalid_File_Format;
+
+ HLock( fond );
+ parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, face_index );
+ HUnlock( fond );
+
+ if ( lwfn_file_name[0] )
+ {
+ ResFileRefNum res;
+
+
+ res = HomeResFile( fond );
+ if ( noErr != ResError() )
+ goto found_no_lwfn_file;
+
+#if HAVE_FSREF
+
+ {
+ UInt8 path_fond[PATH_MAX];
+ FSRef ref;
+
+
+ err = FSGetForkCBInfo( res, kFSInvalidVolumeRefNum,
+ NULL, NULL, NULL, &ref, NULL );
+ if ( noErr != err )
+ goto found_no_lwfn_file;
+
+ err = FSRefMakePath( &ref, path_fond, sizeof ( path_fond ) );
+ if ( noErr != err )
+ goto found_no_lwfn_file;
+
+ error = lookup_lwfn_by_fond( path_fond, lwfn_file_name,
+ path_lwfn, sizeof ( path_lwfn ) );
+ if ( FT_Err_Ok == error )
+ have_lwfn = 1;
+ }
+
+#elif HAVE_FSSPEC
+
+ {
+ UInt8 path_fond[PATH_MAX];
+ FCBPBRec pb;
+ Str255 fond_file_name;
+ FSSpec spec;
+
+
+ FT_MEM_SET( &spec, 0, sizeof ( FSSpec ) );
+ FT_MEM_SET( &pb, 0, sizeof ( FCBPBRec ) );
+
+ pb.ioNamePtr = fond_file_name;
+ pb.ioVRefNum = 0;
+ pb.ioRefNum = res;
+ pb.ioFCBIndx = 0;
+
+ err = PBGetFCBInfoSync( &pb );
+ if ( noErr != err )
+ goto found_no_lwfn_file;
+
+ err = FSMakeFSSpec( pb.ioFCBVRefNum, pb.ioFCBParID,
+ fond_file_name, &spec );
+ if ( noErr != err )
+ goto found_no_lwfn_file;
+
+ err = FT_FSpMakePath( &spec, path_fond, sizeof ( path_fond ) );
+ if ( noErr != err )
+ goto found_no_lwfn_file;
+
+ error = lookup_lwfn_by_fond( path_fond, lwfn_file_name,
+ path_lwfn, sizeof ( path_lwfn ) );
+ if ( FT_Err_Ok == error )
+ have_lwfn = 1;
+ }
+
+#endif /* HAVE_FSREF, HAVE_FSSPEC */
+
+ }
+
+ if ( have_lwfn && ( !have_sfnt || PREFER_LWFN ) )
+ error = FT_New_Face_From_LWFN( library,
+ path_lwfn,
+ face_index,
+ aface );
+ else
+ error = FT_Err_Unknown_File_Format;
+
+ found_no_lwfn_file:
+ if ( have_sfnt && FT_Err_Ok != error )
+ error = FT_New_Face_From_SFNT( library,
+ sfnt_id,
+ face_index,
+ aface );
+
+ return error;
+ }
+
+
+ /* Common function to load a new FT_Face from a resource file. */
+ static FT_Error
+ FT_New_Face_From_Resource( FT_Library library,
+ const UInt8* pathname,
+ FT_Long face_index,
+ FT_Face* aface )
+ {
+ OSType file_type;
+ FT_Error error;
+
+
+ /* LWFN is a (very) specific file format, check for it explicitly */
+ file_type = get_file_type_from_path( pathname );
+ if ( file_type == TTAG_LWFN )
+ return FT_New_Face_From_LWFN( library, pathname, face_index, aface );
+
+ /* Otherwise the file type doesn't matter (there are more than */
+ /* `FFIL' and `tfil'). Just try opening it as a font suitcase; */
+ /* if it works, fine. */
+
+ error = FT_New_Face_From_Suitcase( library, pathname, face_index, aface );
+ if ( error == 0 )
+ return error;
+
+ /* 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;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Face */
+ /* */
+ /* <Description> */
+ /* This is the Mac-specific implementation of FT_New_Face. In */
+ /* addition to the standard FT_New_Face() functionality, it also */
+ /* accepts pathnames to Mac suitcase files. For further */
+ /* documentation see the original FT_New_Face() in freetype.h. */
+ /* */
+ FT_EXPORT_DEF( FT_Error )
+ FT_New_Face( FT_Library library,
+ const char* pathname,
+ FT_Long face_index,
+ FT_Face* aface )
+ {
+ FT_Open_Args args;
+ FT_Error error;
+
+
+ /* test for valid `library' and `aface' delayed to FT_Open_Face() */
+ if ( !pathname )
+ return FT_Err_Invalid_Argument;
+
+ error = FT_Err_Ok;
+ *aface = NULL;
+
+ /* try resourcefork based font: LWFN, FFIL */
+ error = FT_New_Face_From_Resource( library, (UInt8 *)pathname,
+ face_index, aface );
+ if ( error != 0 || *aface != NULL )
+ 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 );
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Face_From_FSRef */
+ /* */
+ /* <Description> */
+ /* FT_New_Face_From_FSRef is identical to FT_New_Face except it */
+ /* accepts an FSRef instead of a path. */
+ /* */
+ /* This function is deprecated because Carbon data types (FSRef) */
+ /* are not cross-platform, and thus not suitable for the freetype API. */
+ FT_EXPORT_DEF( FT_Error )
+ FT_New_Face_From_FSRef( FT_Library library,
+ const FSRef* ref,
+ FT_Long face_index,
+ FT_Face* aface )
+ {
+
+#if !HAVE_FSREF
+
+ FT_UNUSED( library );
+ FT_UNUSED( ref );
+ FT_UNUSED( face_index );
+ FT_UNUSED( aface );
+
+ return FT_Err_Unimplemented_Feature;
+
+#else
+
+ FT_Error error;
+ FT_Open_Args args;
+ OSErr err;
+ UInt8 pathname[PATH_MAX];
+
+
+ if ( !ref )
+ return FT_Err_Invalid_Argument;
+
+ err = FSRefMakePath( ref, pathname, sizeof ( pathname ) );
+ if ( err )
+ error = FT_Err_Cannot_Open_Resource;
+
+ error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
+ if ( error != 0 || *aface != NULL )
+ return error;
+
+ /* fallback to datafork font */
+ args.flags = FT_OPEN_PATHNAME;
+ args.pathname = (char*)pathname;
+ return FT_Open_Face( library, &args, face_index, aface );
+
+#endif /* HAVE_FSREF */
+
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Face_From_FSSpec */
+ /* */
+ /* <Description> */
+ /* FT_New_Face_From_FSSpec is identical to FT_New_Face except it */
+ /* accepts an FSSpec instead of a path. */
+ /* */
+ /* This function is deprecated because Carbon data types (FSSpec) */
+ /* are not cross-platform, and thus not suitable for the freetype API. */
+ FT_EXPORT_DEF( FT_Error )
+ FT_New_Face_From_FSSpec( FT_Library library,
+ const FSSpec* spec,
+ FT_Long face_index,
+ FT_Face* aface )
+ {
+
+#if HAVE_FSREF
+
+ FSRef ref;
+
+
+ if ( !spec || FSpMakeFSRef( spec, &ref ) != noErr )
+ return FT_Err_Invalid_Argument;
+ else
+ return FT_New_Face_From_FSRef( library, &ref, face_index, aface );
+
+#elif HAVE_FSSPEC
+
+ FT_Error error;
+ FT_Open_Args args;
+ OSErr err;
+ UInt8 pathname[PATH_MAX];
+
+
+ if ( !spec )
+ return FT_Err_Invalid_Argument;
+
+ err = FT_FSpMakePath( spec, pathname, sizeof ( pathname ) );
+ if ( err )
+ error = FT_Err_Cannot_Open_Resource;
+
+ error = FT_New_Face_From_Resource( library, pathname, face_index, aface );
+ if ( error != 0 || *aface != NULL )
+ return error;
+
+ /* fallback to datafork font */
+ args.flags = FT_OPEN_PATHNAME;
+ args.pathname = (char*)pathname;
+ return FT_Open_Face( library, &args, face_index, aface );
+
+#else
+
+ FT_UNUSED( library );
+ FT_UNUSED( spec );
+ FT_UNUSED( face_index );
+ FT_UNUSED( aface );
+
+ return FT_Err_Unimplemented_Feature;
+
+#endif /* HAVE_FSREF, HAVE_FSSPEC */
+
+ }
+
+
+/* END */
diff --git a/3party/freetype/builds/modules.mk b/3party/freetype/builds/modules.mk
new file mode 100644
index 0000000000..c4a882cbdb
--- /dev/null
+++ b/3party/freetype/builds/modules.mk
@@ -0,0 +1,79 @@
+#
+# FreeType 2 modules sub-Makefile
+#
+
+
+# Copyright 1996-2000, 2003, 2006, 2008 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.
+
+
+# DO NOT INVOKE THIS MAKEFILE DIRECTLY! IT IS MEANT TO BE INCLUDED BY
+# OTHER MAKEFILES.
+
+
+# This file is in charge of handling the generation of the modules list
+# file.
+
+
+# Build the modules list.
+#
+$(FTMODULE_H): $(MODULES_CFG)
+ $(FTMODULE_H_INIT)
+ $(FTMODULE_H_CREATE)
+ $(FTMODULE_H_DONE)
+
+ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
+ OPEN_MODULE := @echo$(space)
+ CLOSE_MODULE := >> $(subst /,$(SEP),$(FTMODULE_H))
+ REMOVE_MODULE := @-$(DELETE) $(subst /,$(SEP),$(FTMODULE_H))
+else
+ OPEN_MODULE := @echo "
+ CLOSE_MODULE := " >> $(FTMODULE_H)
+ REMOVE_MODULE := @-$(DELETE) $(FTMODULE_H)
+endif
+
+
+define FTMODULE_H_INIT
+$(REMOVE_MODULE)
+@-echo Generating modules list in $(FTMODULE_H)...
+$(OPEN_MODULE)/* This is a generated file. */$(CLOSE_MODULE)
+endef
+
+# It is no mistake that the final closing parenthesis is on the
+# next line -- it produces proper newlines during the expansion
+# of `foreach'.
+#
+define FTMODULE_H_CREATE
+$(foreach COMMAND,$(FTMODULE_H_COMMANDS),$($(COMMAND))
+)
+endef
+
+define FTMODULE_H_DONE
+$(OPEN_MODULE)/* EOF */$(CLOSE_MODULE)
+@echo done.
+endef
+
+
+# $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver
+# in the `module.mk' rules file.
+#
+OPEN_DRIVER := $(OPEN_MODULE)FT_USE_MODULE(
+CLOSE_DRIVER := )$(CLOSE_MODULE)
+
+ECHO_DRIVER := @echo "* module:$(space)
+ECHO_DRIVER_DESC := (
+ECHO_DRIVER_DONE := )"
+
+# Each `module.mk' in the `src/*' subdirectories adds a variable with
+# commands to $(FTMODULE_H_COMMANDS). Note that we can't use SRC_DIR here.
+#
+-include $(patsubst %,$(TOP_DIR)/src/%/module.mk,$(MODULES))
+
+
+# EOF
diff --git a/3party/freetype/builds/newline b/3party/freetype/builds/newline
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/3party/freetype/builds/newline
@@ -0,0 +1 @@
+
diff --git a/3party/freetype/builds/os2/detect.mk b/3party/freetype/builds/os2/detect.mk
new file mode 100644
index 0000000000..47a40a2f85
--- /dev/null
+++ b/3party/freetype/builds/os2/detect.mk
@@ -0,0 +1,73 @@
+#
+# FreeType 2 configuration file to detect an OS/2 host platform.
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+.PHONY: setup
+
+
+ifeq ($(PLATFORM),ansi)
+
+ ifdef OS2_SHELL
+
+ PLATFORM := os2
+
+ endif # test OS2_SHELL
+endif
+
+ifeq ($(PLATFORM),os2)
+
+ COPY := copy
+ DELETE := del
+ CAT := type
+ SEP := $(BACKSLASH)
+
+ # gcc-emx by default
+ CONFIG_FILE := os2-gcc.mk
+
+ # additionally, we provide hooks for various other compilers
+ #
+ ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
+ CONFIG_FILE := os2-icc.mk
+ CC := icc
+ visualage: setup
+ .PHONY: visualage
+ endif
+
+ ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
+ CONFIG_FILE := os2-wat.mk
+ CC := wcc386
+ watcom: setup
+ .PHONY: watcom
+ endif
+
+ ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit
+ CONFIG_FILE := os2-bcc.mk
+ CC := bcc32
+ borlandc: setup
+ .PHONY: borlandc
+ endif
+
+ ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
+ CONFIG_FILE := os2-dev.mk
+ CC := gcc
+ devel: setup
+ .PHONY: devel
+ endif
+
+ setup: dos_setup
+
+endif # test PLATFORM os2
+
+
+# EOF
diff --git a/3party/freetype/builds/os2/os2-def.mk b/3party/freetype/builds/os2/os2-def.mk
new file mode 100644
index 0000000000..01cda9285a
--- /dev/null
+++ b/3party/freetype/builds/os2/os2-def.mk
@@ -0,0 +1,44 @@
+#
+# FreeType 2 OS/2 specific definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2005, 2006 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.
+
+
+DELETE := del
+CAT := type
+SEP := $(strip \ )
+BUILD_DIR := $(TOP_DIR)/builds/os2
+PLATFORM := os2
+
+# The executable file extension (for tools), *with* leading dot.
+#
+E := .exe
+
+# The directory where all library files are placed.
+#
+# By default, this is the same as $(OBJ_DIR); however, this can be changed
+# to suit particular needs.
+#
+LIB_DIR := $(OBJ_DIR)
+
+# The name of the final library file. Note that the DOS-specific Makefile
+# uses a shorter (8.3) name.
+#
+LIBRARY := $(PROJECT)
+
+
+# The NO_OUTPUT macro is used to ignore the output of commands.
+#
+NO_OUTPUT = 2> nul
+
+
+# EOF
diff --git a/3party/freetype/builds/os2/os2-dev.mk b/3party/freetype/builds/os2/os2-dev.mk
new file mode 100644
index 0000000000..83da8dea33
--- /dev/null
+++ b/3party/freetype/builds/os2/os2-dev.mk
@@ -0,0 +1,30 @@
+#
+# FreeType 2 configuration rules for OS/2 + GCC
+#
+# Development version without optimizations.
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+DEVEL_DIR := $(TOP_DIR)/devel
+
+# include OS/2-specific definitions
+include $(TOP_DIR)/builds/os2/os2-def.mk
+
+# include gcc-specific definitions
+include $(TOP_DIR)/builds/compiler/gcc-dev.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/os2/os2-gcc.mk b/3party/freetype/builds/os2/os2-gcc.mk
new file mode 100644
index 0000000000..446073e4f5
--- /dev/null
+++ b/3party/freetype/builds/os2/os2-gcc.mk
@@ -0,0 +1,26 @@
+#
+# FreeType 2 configuration rules for the OS/2 + gcc
+#
+
+
+# Copyright 1996-2000 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.
+
+
+# include OS/2-specific definitions
+include $(TOP_DIR)/builds/os2/os2-def.mk
+
+# include gcc-specific definitions
+include $(TOP_DIR)/builds/compiler/gcc.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/toplevel.mk b/3party/freetype/builds/toplevel.mk
new file mode 100644
index 0000000000..d9fbee0b38
--- /dev/null
+++ b/3party/freetype/builds/toplevel.mk
@@ -0,0 +1,256 @@
+#
+# FreeType build system -- top-level sub-Makefile
+#
+
+
+# Copyright 1996-2000, 2001, 2003, 2006, 2008, 2009, 2010 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+# This file is designed for GNU Make, do not use it with another Make tool!
+#
+# It works as follows:
+#
+# - When invoked for the first time, this Makefile includes the rules found
+# in `PROJECT/builds/detect.mk'. They are in charge of detecting the
+# current platform.
+#
+# A summary of the detection is displayed, and the file `config.mk' is
+# created in the current directory.
+#
+# - When invoked later, this Makefile includes the rules found in
+# `config.mk'. This sub-Makefile defines some system-specific variables
+# (like compiler, compilation flags, object suffix, etc.), then includes
+# the rules found in `PROJECT/builds/PROJECT.mk', used to build the
+# library.
+#
+# See the comments in `builds/detect.mk' and `builds/PROJECT.mk' for more
+# details on host platform detection and library builds.
+
+
+# First of all, check whether we have `$(value ...)'. We do this by testing
+# for `$(eval ...)' which has been introduced in the same GNU make version.
+
+eval_available :=
+$(eval eval_available := T)
+ifneq ($(eval_available),T)
+ $(error FreeType's build system needs a Make program which supports $$(value))
+endif
+
+
+.PHONY: all dist distclean modules setup
+
+
+# The `space' variable is used to avoid trailing spaces in defining the
+# `T' variable later.
+#
+empty :=
+space := $(empty) $(empty)
+
+
+# The main configuration file, defining the `XXX_MODULES' variables. We
+# prefer a `modules.cfg' file in OBJ_DIR over TOP_DIR.
+#
+ifndef MODULES_CFG
+ MODULES_CFG := $(TOP_DIR)/modules.cfg
+ ifneq ($(wildcard $(OBJ_DIR)/modules.cfg),)
+ MODULES_CFG := $(OBJ_DIR)/modules.cfg
+ endif
+endif
+
+
+# FTMODULE_H, as its name suggests, indicates where the FreeType module
+# class file resides.
+#
+FTMODULE_H ?= $(OBJ_DIR)/ftmodule.h
+
+
+include $(MODULES_CFG)
+
+
+# The list of modules we are using.
+#
+MODULES := $(FONT_MODULES) \
+ $(HINTING_MODULES) \
+ $(RASTER_MODULES) \
+ $(AUX_MODULES)
+
+
+CONFIG_MK ?= config.mk
+
+# If no configuration sub-makefile is present, or if `setup' is the target
+# to be built, run the auto-detection rules to figure out which
+# configuration rules file to use.
+#
+# Note that the configuration file is put in the current directory, which is
+# not necessarily $(TOP_DIR).
+
+# If `config.mk' is not present, set `check_platform'.
+#
+ifeq ($(wildcard $(CONFIG_MK)),)
+ check_platform := 1
+endif
+
+# If `setup' is one of the targets requested, set `check_platform'.
+#
+ifneq ($(findstring setup,$(MAKECMDGOALS)),)
+ check_platform := 1
+endif
+
+# Include the automatic host platform detection rules when we need to
+# check the platform.
+#
+ifdef check_platform
+
+ all modules: setup
+
+ include $(TOP_DIR)/builds/detect.mk
+
+ # This rule makes sense for Unix only to remove files created by a run
+ # of the configure script which hasn't been successful (so that no
+ # `config.mk' has been created). It uses the built-in $(RM) command of
+ # GNU make. Similarly, `nul' is created if e.g. `make setup win32' has
+ # been erroneously used.
+ #
+ # Note: This test is duplicated in `builds/unix/detect.mk'.
+ #
+ is_unix := $(strip $(wildcard /sbin/init) \
+ $(wildcard /usr/sbin/init) \
+ $(wildcard /hurd/auth))
+ ifneq ($(is_unix),)
+
+ distclean:
+ $(RM) builds/unix/config.cache
+ $(RM) builds/unix/config.log
+ $(RM) builds/unix/config.status
+ $(RM) builds/unix/unix-def.mk
+ $(RM) builds/unix/unix-cc.mk
+ $(RM) builds/unix/freetype2.pc
+ $(RM) nul
+
+ endif # test is_unix
+
+ # IMPORTANT:
+ #
+ # `setup' must be defined by the host platform detection rules to create
+ # the `config.mk' file in the current directory.
+
+else
+
+ # A configuration sub-Makefile is present -- simply run it.
+ #
+ all: single
+
+ BUILD_PROJECT := yes
+ include $(CONFIG_MK)
+
+endif # test check_platform
+
+
+# We always need the list of modules in ftmodule.h.
+#
+all setup: $(FTMODULE_H)
+
+
+# The `modules' target unconditionally rebuilds the module list.
+#
+modules:
+ $(FTMODULE_H_INIT)
+ $(FTMODULE_H_CREATE)
+ $(FTMODULE_H_DONE)
+
+include $(TOP_DIR)/builds/modules.mk
+
+
+# This target builds the tarballs.
+#
+# Not to be run by a normal user -- there are no attempts to make it
+# generic.
+
+# we check for `dist', not `distclean'
+ifneq ($(findstring distx,$(MAKECMDGOALS)x),)
+ FT_H := include/freetype/freetype.h
+
+ major := $(shell sed -n 's/.*FREETYPE_MAJOR[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H))
+ minor := $(shell sed -n 's/.*FREETYPE_MINOR[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H))
+ patch := $(shell sed -n 's/.*FREETYPE_PATCH[^0-9]*\([0-9]\+\)/\1/p' < $(FT_H))
+
+ version := $(major).$(minor).$(patch)
+ winversion := $(major)$(minor)$(patch)
+endif
+
+dist:
+ -rm -rf tmp
+ rm -f freetype-$(version).tar.gz
+ rm -f freetype-$(version).tar.bz2
+ rm -f ft$(winversion).zip
+
+ for d in `find . -wholename '*/.git' -prune \
+ -o -type f \
+ -o -print` ; do \
+ mkdir -p tmp/$$d ; \
+ done ;
+
+ currdir=`pwd` ; \
+ for f in `find . -wholename '*/.git' -prune \
+ -o -name .cvsignore \
+ -o -type d \
+ -o -print` ; do \
+ ln -s $$currdir/$$f tmp/$$f ; \
+ done
+
+ @# Prevent generation of .pyc files. Python follows (soft) links if
+ @# the link's directory is write protected, so we have temporarily
+ @# disable write access here too.
+ chmod -w src/tools/docmaker
+
+ cd tmp ; \
+ $(MAKE) devel ; \
+ $(MAKE) do-dist
+
+ chmod +w src/tools/docmaker
+
+ mv tmp freetype-$(version)
+
+ tar cfh - freetype-$(version) \
+ | gzip -9 -c > freetype-$(version).tar.gz
+ tar cfh - freetype-$(version) \
+ | bzip2 -c > freetype-$(version).tar.bz2
+
+ @# Use CR/LF for zip files.
+ zip -lr9 ft$(winversion).zip freetype-$(version)
+
+ rm -fr freetype-$(version)
+
+
+# The locations of the latest `config.guess' and `config.sub' versions (from
+# GNU `config' git repository), relative to the `tmp' directory used during
+# `make dist'.
+#
+CONFIG_GUESS = ~/git/config/config.guess
+CONFIG_SUB = ~/git/config/config.sub
+
+
+# Don't say `make do-dist'. Always use `make dist' instead.
+#
+.PHONY: do-dist
+
+do-dist: distclean refdoc
+ @# Without removing the files, `autoconf' and friends follow links.
+ rm -f builds/unix/aclocal.m4
+ rm -f builds/unix/configure.ac
+ rm -f builds/unix/configure
+
+ sh autogen.sh
+ rm -rf builds/unix/autom4te.cache
+
+ cp $(CONFIG_GUESS) builds/unix
+ cp $(CONFIG_SUB) builds/unix
+
+# EOF
diff --git a/3party/freetype/builds/unix/.gitignore b/3party/freetype/builds/unix/.gitignore
new file mode 100644
index 0000000000..e4e0a12c64
--- /dev/null
+++ b/3party/freetype/builds/unix/.gitignore
@@ -0,0 +1,17 @@
+aclocal.m4
+autom4te.cache
+config.cache
+config.guess
+config.log
+config.status
+config.sub
+configure
+configure.ac
+freetype2.pc
+freetype-config
+ftconfig.h
+install-sh
+libtool
+ltmain.sh
+unix-cc.mk
+unix-def.mk
diff --git a/3party/freetype/builds/unix/configure.raw b/3party/freetype/builds/unix/configure.raw
new file mode 100644
index 0000000000..378c26ebca
--- /dev/null
+++ b/3party/freetype/builds/unix/configure.raw
@@ -0,0 +1,707 @@
+# This file is part of the FreeType project.
+#
+# Process this file with autoconf to produce a configure script.
+#
+# Copyright 2001-2011 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.
+
+AC_INIT([FreeType], [@VERSION@], [freetype@nongnu.org], [freetype])
+AC_CONFIG_SRCDIR([ftconfig.in])
+
+
+# Don't forget to update docs/VERSION.DLL!
+
+version_info='13:0:7'
+AC_SUBST([version_info])
+ft_version=`echo $version_info | tr : .`
+AC_SUBST([ft_version])
+
+
+# checks for system type
+
+AC_CANONICAL_HOST
+
+
+# checks for programs
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_SUBST(EXEEXT)
+
+
+# checks for native programs to generate building tool
+
+if test ${cross_compiling} = yes; then
+ AC_CHECK_PROG(CC_BUILD, ${build}-gcc, ${build}-gcc)
+ test -z "${CC_BUILD}" && AC_CHECK_PROG(CC_BUILD, gcc, gcc)
+ test -z "${CC_BUILD}" && AC_CHECK_PROG(CC_BUILD, cc, cc, , , /usr/ucb/cc)
+ test -z "${CC_BUILD}" && AC_MSG_ERROR([cannot find native C compiler])
+
+ AC_MSG_CHECKING([for suffix of native executables])
+ rm -f a.* b.* a_out.exe conftest.*
+ echo > conftest.c "int main() { return 0;}"
+ ${CC_BUILD} conftest.c || AC_MSG_ERROR([native C compiler is not working])
+ rm -f conftest.c
+ if test -x a.out -o -x b.out -o -x conftest; then
+ EXEEXT_BUILD=""
+ elif test -x a_out.exe -o -x conftest.exe; then
+ EXEEXT_BUILD=".exe"
+ elif test -x conftest.*; then
+ EXEEXT_BUILD=`echo conftest.* | sed -n '1s/^.*\././'`
+ fi
+ rm -f a.* b.* a_out.exe conftest.*
+ AC_MSG_RESULT($EXEEXT_BUILD)
+else
+ CC_BUILD=${CC}
+ EXEEXT_BUILD=${EXEEXT}
+fi
+
+AC_SUBST(CC_BUILD)
+AC_SUBST(EXEEXT_BUILD)
+
+
+
+# get compiler flags right
+
+if test "x$GCC" = xyes; then
+ XX_CFLAGS="-Wall"
+ XX_ANSIFLAGS="-pedantic -ansi"
+else
+ case "$host" in
+ *-dec-osf*)
+ CFLAGS=
+ XX_CFLAGS="-std1 -g3"
+ XX_ANSIFLAGS=
+ ;;
+ *)
+ XX_CFLAGS=
+ XX_ANSIFLAGS=
+ ;;
+ esac
+fi
+AC_SUBST([XX_CFLAGS])
+AC_SUBST([XX_ANSIFLAGS])
+
+
+# auxiliary programs
+
+AC_CHECK_PROG([RMF], [rm], [rm -f])
+AC_CHECK_PROG([RMDIR], [rmdir], [rmdir])
+
+
+# Since this file will be finally moved to another directory we make
+# the path of the install script absolute. This small code snippet has
+# been taken from automake's `ylwrap' script.
+
+AC_PROG_INSTALL
+case "$INSTALL" in
+/*)
+ ;;
+*/*)
+ INSTALL="`pwd`/$INSTALL"
+ ;;
+esac
+
+
+# checks for header files
+
+AC_HEADER_STDC
+AC_CHECK_HEADERS([fcntl.h unistd.h])
+
+
+# checks for typedefs, structures, and compiler characteristics
+
+AC_C_CONST
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
+
+
+# check whether cpp computation of size of int and long in ftconfig.in works
+
+AC_MSG_CHECKING([cpp computation of bit length in ftconfig.in works])
+orig_CPPFLAGS="${CPPFLAGS}"
+CPPFLAGS="-I${srcdir} -I. ${CPPFLAGS}"
+ac_clean_files="ft2build.h ftoption.h ftstdlib.h"
+touch ft2build.h ftoption.h ftstdlib.h
+
+cat > conftest.c <<\_ACEOF
+#include <limits.h>
+#define FT_CONFIG_OPTIONS_H "ftoption.h"
+#define FT_CONFIG_STANDARD_LIBRARY_H "ftstdlib.h"
+#define FT_UINT_MAX UINT_MAX
+#define FT_ULONG_MAX ULONG_MAX
+#include "ftconfig.in"
+_ACEOF
+echo >> conftest.c "#if FT_SIZEOF_INT == "${ac_cv_sizeof_int}
+echo >> conftest.c "ac_cpp_ft_sizeof_int="${ac_cv_sizeof_int}
+echo >> conftest.c "#endif"
+echo >> conftest.c "#if FT_SIZEOF_LONG == "${ac_cv_sizeof_long}
+echo >> conftest.c "ac_cpp_ft_sizeof_long="${ac_cv_sizeof_long}
+echo >> conftest.c "#endif"
+
+${CPP} ${CPPFLAGS} conftest.c | ${GREP} ac_cpp_ft > conftest.sh
+eval `cat conftest.sh`
+${RMF} conftest.c conftest.sh confft2build.h ftoption.h ftstdlib.h
+
+if test x != "x${ac_cpp_ft_sizeof_int}" \
+ -a x != x"${ac_cpp_ft_sizeof_long}"; then
+ unset ft_use_autoconf_sizeof_types
+else
+ ft_use_autoconf_sizeof_types=yes
+fi
+
+AC_ARG_ENABLE(biarch-config,
+[ --enable-biarch-config install biarch ftconfig.h to support multiple
+ architectures by single file], [], [])
+
+case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
+ :yes:yes:)
+ AC_MSG_RESULT([broken but use it])
+ unset ft_use_autoconf_sizeof_types
+ ;;
+ ::no:)
+ AC_MSG_RESULT([works but ignore it])
+ ft_use_autoconf_sizeof_types=yes
+ ;;
+ ::yes: | :::)
+ AC_MSG_RESULT([yes])
+ unset ft_use_autoconf_sizeof_types
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ft_use_autoconf_sizeof_types=yes
+ ;;
+esac
+
+if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
+ AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES])
+fi
+
+CPPFLAGS="${orig_CPPFLAGS}"
+
+
+# checks for library functions
+
+# Here we check whether we can use our mmap file component.
+
+AC_ARG_ENABLE([mmap],
+ AS_HELP_STRING([--disable-mmap],
+ [do not check mmap() and do not use]),
+ [enable_mmap="no"],[enable_mmap="yes"])
+if test "x${enable_mmap}" != "xno"; then
+ AC_FUNC_MMAP
+fi
+if test "x${enable_mmap}" = "xno" \
+ -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
+ FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
+else
+ FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
+
+ AC_CHECK_DECLS([munmap],
+ [],
+ [],
+ [
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/mman.h>
+
+ ])
+
+ FT_MUNMAP_PARAM
+fi
+AC_SUBST([FTSYS_SRC])
+
+AC_CHECK_FUNCS([memcpy memmove])
+
+
+# check for system zlib
+
+# don't quote AS_HELP_STRING!
+AC_ARG_WITH([zlib],
+ AS_HELP_STRING([--without-zlib],
+ [use internal zlib instead of system-wide]))
+if test x$with_zlib != xno && test -z "$LIBZ"; then
+ AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
+fi
+if test x$with_zlib != xno && test -n "$LIBZ"; then
+ CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
+ LDFLAGS="$LDFLAGS $LIBZ"
+ SYSTEM_ZLIB=yes
+fi
+
+# check for system libbz2
+
+# don't quote AS_HELP_STRING!
+AC_ARG_WITH([bzip2],
+ AS_HELP_STRING([--without-bzip2],
+ [do not support bzip2 compressed fonts]))
+if test x$with_bzip2 != xno && test -z "$LIBBZ2"; then
+ AC_CHECK_LIB([bz2], [BZ2_bzDecompress], [AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2'])])
+fi
+if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then
+ CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
+ LDFLAGS="$LDFLAGS $LIBBZ2"
+fi
+
+# Some options handling SDKs/archs in CFLAGS should be copied
+# to LDFLAGS. Apple TechNote 2137 recommends to include these
+# options in CFLAGS but not in LDFLAGS.
+
+save_config_args=$*
+set dummy ${CFLAGS}
+i=1
+while test $i -le $#
+do
+ c=$1
+
+ case "${c}" in
+ -isysroot|-arch) # options taking 1 argument
+ a=$2
+ AC_MSG_CHECKING([whether CFLAGS and LDFLAGS share ${c} ${a}])
+ if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
+ then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no, copy to LDFLAGS])
+ LDFLAGS="${LDFLAGS} ${c} ${a}"
+ fi
+ shift 1
+ ;;
+ -m32|-m64|-march=*|-mcpu=*) # options taking no argument
+ AC_MSG_RESULT([whether CFLAGS and LDFLAGS share ${c}])
+ if expr " ${LDFLAGS} " : ".* ${c} *${a}.*" > /dev/null
+ then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no, copy to LDFLAGS])
+ LDFLAGS="${LDFLAGS} ${c}"
+ fi
+ ;;
+ # *)
+ # AC_MSG_RESULT([${c} is not copied to LDFLAGS])
+ # ;;
+ esac
+
+ shift 1
+done
+set ${save_config_args}
+
+
+# Whether to use Mac OS resource-based fonts.
+
+ftmac_c="" # src/base/ftmac.c should not be included in makefiles by default
+
+# don't quote AS_HELP_STRING!
+AC_ARG_WITH([old-mac-fonts],
+ AS_HELP_STRING([--with-old-mac-fonts],
+ [allow Mac resource-based fonts to be used]))
+if test x$with_old_mac_fonts = xyes; then
+ orig_LDFLAGS="${LDFLAGS}"
+ AC_MSG_CHECKING([CoreServices & ApplicationServices of Mac OS X])
+ FT2_EXTRA_LIBS="-Wl,-framework,CoreServices -Wl,-framework,ApplicationServices"
+ LDFLAGS="$LDFLAGS $FT2_EXTRA_LIBS"
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+ ],
+ [
+
+ short res = 0;
+
+
+ UseResFile( res );
+
+ ])],
+ [AC_MSG_RESULT([ok])
+ ftmac_c='ftmac.c'
+ AC_MSG_CHECKING([OS_INLINE macro is ANSI compatible])
+ orig_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+ ],
+ [
+
+ /* OSHostByteOrder() is typed as OS_INLINE */
+ int32_t os_byte_order = OSHostByteOrder();
+
+
+ if ( OSBigEndian != os_byte_order )
+ return 1;
+
+ ])],
+ [AC_MSG_RESULT([ok])
+ CFLAGS="$orig_CFLAGS"
+ CFLAGS="$CFLAGS -DHAVE_ANSI_OS_INLINE=1"
+ ],
+ [AC_MSG_RESULT([no, ANSI incompatible])
+ CFLAGS="$orig_CFLAGS"
+ ])
+ AC_MSG_CHECKING([type ResourceIndex])
+ orig_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $XX_CFLAGS $XX_ANSIFLAGS"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+# include <Resources.h>
+#endif
+
+ ],
+ [
+
+ ResourceIndex i = 0;
+ return i;
+
+ ])],
+ [AC_MSG_RESULT([ok])
+ CFLAGS="$orig_CFLAGS"
+ CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=1"
+ ],
+ [AC_MSG_RESULT([no])
+ CFLAGS="$orig_CFLAGS"
+ CFLAGS="$CFLAGS -DHAVE_TYPE_RESOURCE_INDEX=0"
+ ])],
+ [AC_MSG_RESULT([not found])
+ FT2_EXTRA_LIBS=""
+ LDFLAGS="${orig_LDFLAGS}"
+ CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"])
+else
+ case x$host_os in
+ xdarwin*)
+ dnl AC_MSG_WARN([host system is MacOS but configured to build without Carbon])
+ CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+
+# Whether to use FileManager which is deprecated since Mac OS X 10.4.
+
+AC_ARG_WITH([fsspec],
+ AS_HELP_STRING([--with-fsspec],
+ [use obsolete FSSpec API of MacOS, if available (default=yes)]))
+if test x$with_fsspec = xno; then
+ CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"
+elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then
+ AC_MSG_CHECKING([FSSpec-based FileManager])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+ ],
+ [
+
+ FCBPBPtr paramBlock;
+ short vRefNum;
+ long dirID;
+ ConstStr255Param fileName;
+ FSSpec* spec;
+
+
+ /* FSSpec functions: deprecated since Mac OS X 10.4 */
+ PBGetFCBInfoSync( paramBlock );
+ FSMakeFSSpec( vRefNum, dirID, fileName, spec );
+
+ ])],
+ [AC_MSG_RESULT([ok])
+ CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"],
+ [AC_MSG_RESULT([not found])
+ CFLAGS="$CFLAGS -DHAVE_FSSPEC=0"])
+fi
+
+
+# Whether to use FileManager in Carbon since MacOS 9.x.
+
+AC_ARG_WITH([fsref],
+ AS_HELP_STRING([--with-fsref],
+ [use Carbon FSRef API of MacOS, if available (default=yes)]))
+if test x$with_fsref = xno; then
+ AC_MSG_WARN([
+*** WARNING
+ FreeType2 built without FSRef API cannot load
+ data-fork fonts on MacOS, except of XXX.dfont.
+ ])
+ CFLAGS="$CFLAGS -DHAVE_FSREF=0"
+elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
+ AC_MSG_CHECKING([FSRef-based FileManager])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+ ],
+ [
+
+ short vRefNum;
+ long dirID;
+ ConstStr255Param fileName;
+
+ Boolean* isDirectory;
+ UInt8* path;
+ SInt16 desiredRefNum;
+ SInt16* iterator;
+ SInt16* actualRefNum;
+ HFSUniStr255* outForkName;
+ FSVolumeRefNum volume;
+ FSCatalogInfoBitmap whichInfo;
+ FSCatalogInfo* catalogInfo;
+ FSForkInfo* forkInfo;
+ FSRef* ref;
+
+#if HAVE_FSSPEC
+ FSSpec* spec;
+#endif
+
+ /* FSRef functions: no need to check? */
+ FSGetForkCBInfo( desiredRefNum, volume, iterator,
+ actualRefNum, forkInfo, ref,
+ outForkName );
+ FSPathMakeRef( path, ref, isDirectory );
+
+#if HAVE_FSSPEC
+ FSpMakeFSRef ( spec, ref );
+ FSGetCatalogInfo( ref, whichInfo, catalogInfo,
+ outForkName, spec, ref );
+#endif
+ ])],
+ [AC_MSG_RESULT([ok])
+ CFLAGS="$CFLAGS -DHAVE_FSREF=1"],
+ [AC_MSG_RESULT([not found])
+ CFLAGS="$CFLAGS -DHAVE_FSREF=0"])
+fi
+
+
+# Whether to use QuickDraw API in ToolBox which is deprecated since
+# Mac OS X 10.4.
+
+AC_ARG_WITH([quickdraw-toolbox],
+ AS_HELP_STRING([--with-quickdraw-toolbox],
+ [use MacOS QuickDraw in ToolBox, if available (default=yes)]))
+if test x$with_quickdraw_toolbox = xno; then
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"
+elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then
+ AC_MSG_CHECKING([QuickDraw FontManager functions in ToolBox])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Fonts.h>
+#endif
+
+ ],
+ [
+
+ Str255 familyName;
+ SInt16 familyID = 0;
+ FMInput* fmIn = NULL;
+ FMOutput* fmOut = NULL;
+
+
+ GetFontName( familyID, familyName );
+ GetFNum( familyName, &familyID );
+ fmOut = FMSwapFont( fmIn );
+
+ ])],
+ [AC_MSG_RESULT([ok])
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=1"],
+ [AC_MSG_RESULT([not found])
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_TOOLBOX=0"])
+fi
+
+
+# Whether to use QuickDraw API in Carbon which is deprecated since
+# Mac OS X 10.4.
+
+AC_ARG_WITH([quickdraw-carbon],
+ AS_HELP_STRING([--with-quickdraw-carbon],
+ [use MacOS QuickDraw in Carbon, if available (default=yes)]))
+if test x$with_quickdraw_carbon = xno; then
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"
+elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_carbon != x; then
+ AC_MSG_CHECKING([QuickDraw FontManager functions in Carbon])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Fonts.h>
+#endif
+
+ ],
+ [
+
+ FMFontFamilyIterator famIter;
+ FMFontFamily family;
+ Str255 famNameStr;
+ FMFontFamilyInstanceIterator instIter;
+ FMFontStyle style;
+ FMFontSize size;
+ FMFont font;
+ FSSpec* pathSpec;
+
+
+ FMCreateFontFamilyIterator( NULL, NULL, kFMUseGlobalScopeOption,
+ &famIter );
+ FMGetNextFontFamily( &famIter, &family );
+ FMGetFontFamilyName( family, famNameStr );
+ FMCreateFontFamilyInstanceIterator( family, &instIter );
+ FMGetNextFontFamilyInstance( &instIter, &font, &style, &size );
+ FMDisposeFontFamilyInstanceIterator( &instIter );
+ FMDisposeFontFamilyIterator( &famIter );
+ FMGetFontContainer( font, pathSpec );
+
+ ])],
+ [AC_MSG_RESULT([ok])
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=1"],
+ [AC_MSG_RESULT([not found])
+ CFLAGS="$CFLAGS -DHAVE_QUICKDRAW_CARBON=0"])
+fi
+
+
+# Whether to use AppleTypeService since Mac OS X.
+
+# don't quote AS_HELP_STRING!
+AC_ARG_WITH([ats],
+ AS_HELP_STRING([--with-ats],
+ [use AppleTypeService, if available (default=yes)]))
+if test x$with_ats = xno; then
+ CFLAGS="$CFLAGS -DHAVE_ATS=0"
+elif test x$with_old_mac_fonts = xyes -a x$with_ats != x; then
+ AC_MSG_CHECKING([AppleTypeService functions])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+
+#if defined(__GNUC__) && defined(__APPLE_CC__)
+# include <CoreServices/CoreServices.h>
+# include <ApplicationServices/ApplicationServices.h>
+#else
+# include <ConditionalMacros.h>
+# include <Files.h>
+#endif
+
+ ],
+ [
+
+ FSSpec* pathSpec;
+
+
+ ATSFontFindFromName( NULL, kATSOptionFlagsUnRestrictedScope );
+#if HAVE_FSSPEC
+ ATSFontGetFileSpecification( 0, pathSpec );
+#endif
+
+ ])],
+ [AC_MSG_RESULT([ok])
+ CFLAGS="$CFLAGS -DHAVE_ATS=1"],
+ [AC_MSG_RESULT([not found])
+ CFLAGS="$CFLAGS -DHAVE_ATS=0"])
+fi
+
+case "$CFLAGS" in
+ *HAVE_FSSPEC* | *HAVE_FSREF* | *HAVE_QUICKDRAW* | *HAVE_ATS* )
+ AC_MSG_WARN([
+*** WARNING
+ FSSpec/FSRef/QuickDraw/ATS options are explicitly given,
+ thus it is recommended to replace src/base/ftmac.c by builds/mac/ftmac.c.
+ ])
+ CFLAGS="$CFLAGS "'-I$(TOP_DIR)/builds/mac/'
+ ;;
+ *)
+ ;;
+esac
+
+
+AC_SUBST([ftmac_c])
+AC_SUBST([LIBZ])
+AC_SUBST([LIBBZ2])
+AC_SUBST([CFLAGS])
+AC_SUBST([LDFLAGS])
+AC_SUBST([FT2_EXTRA_LIBS])
+AC_SUBST([SYSTEM_ZLIB])
+
+
+LT_INIT(win32-dll)
+
+AC_SUBST([hardcode_libdir_flag_spec])
+AC_SUBST([wl])
+AC_SUBST([build_libtool_libs])
+
+
+# configuration file -- stay in 8.3 limit
+#
+# since #undef doesn't survive in configuration header files we replace
+# `/undef' with `#undef' after creating the output file
+
+AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
+ [mv ftconfig.h ftconfig.tmp
+ sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
+ rm ftconfig.tmp])
+
+# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
+# and `builds/unix/unix-cc.mk' that will be used by the build system
+#
+AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
+ unix-def.mk:unix-def.in
+ freetype-config
+ freetype2.pc:freetype2.in])
+
+# re-generate the Jamfile to use libtool now
+#
+# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
+
+AC_OUTPUT
+
+# end of configure.raw
diff --git a/3party/freetype/builds/unix/detect.mk b/3party/freetype/builds/unix/detect.mk
new file mode 100644
index 0000000000..e74af57308
--- /dev/null
+++ b/3party/freetype/builds/unix/detect.mk
@@ -0,0 +1,91 @@
+#
+# FreeType 2 configuration file to detect a UNIX host platform.
+#
+
+
+# Copyright 1996-2000, 2002, 2003, 2004, 2006 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.
+
+.PHONY: setup
+
+ifeq ($(PLATFORM),ansi)
+
+ # Note: this test is duplicated in "builds/toplevel.mk".
+ #
+ is_unix := $(strip $(wildcard /sbin/init) \
+ $(wildcard /usr/sbin/init) \
+ $(wildcard /hurd/auth))
+ ifneq ($(is_unix),)
+
+ PLATFORM := unix
+
+ endif # test is_unix
+endif # test PLATFORM ansi
+
+ifeq ($(PLATFORM),unix)
+ COPY := cp
+ DELETE := rm -f
+ CAT := cat
+
+ # If `devel' is the requested target, we use a special configuration
+ # file named `unix-dev.mk'. It disables optimization and libtool.
+ #
+ ifneq ($(findstring devel,$(MAKECMDGOALS)),)
+ CONFIG_FILE := unix-dev.mk
+ CC := gcc
+ devel: setup
+ .PHONY: devel
+ else
+
+ # If `lcc' is the requested target, we use a special configuration
+ # file named `unix-lcc.mk'. It disables libtool for LCC.
+ #
+ ifneq ($(findstring lcc,$(MAKECMDGOALS)),)
+ CONFIG_FILE := unix-lcc.mk
+ CC := lcc
+ lcc: setup
+ .PHONY: lcc
+ else
+
+ # If a Unix platform is detected, the configure script is called and
+ # `unix-def.mk' together with `unix-cc.mk' is created.
+ #
+ # Arguments to `configure' should be in the CFG variable. Example:
+ #
+ # make CFG="--prefix=/usr --disable-static"
+ #
+ # If you need to set CFLAGS or LDFLAGS, do it here also.
+ #
+ # Feel free to add support for other platform specific compilers in
+ # this directory (e.g. solaris.mk + changes here to detect the
+ # platform).
+ #
+ CONFIG_FILE := unix.mk
+ unix: setup
+ must_configure := 1
+ .PHONY: unix
+ endif
+ endif
+
+ have_Makefile := $(wildcard $(OBJ_DIR)/Makefile)
+
+ setup: std_setup
+ ifdef must_configure
+ ifneq ($(have_Makefile),)
+ # we are building FT2 not in the src tree
+ $(TOP_DIR)/builds/unix/configure $(value CFG)
+ else
+ cd builds/unix; ./configure $(value CFG)
+ endif
+ endif
+
+endif # test PLATFORM unix
+
+
+# EOF
diff --git a/3party/freetype/builds/unix/freetype-config.in b/3party/freetype/builds/unix/freetype-config.in
new file mode 100644
index 0000000000..815367ba8e
--- /dev/null
+++ b/3party/freetype/builds/unix/freetype-config.in
@@ -0,0 +1,160 @@
+#! /bin/sh
+#
+# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 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.
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+includedir=@includedir@
+libdir=@libdir@
+enable_shared=@build_libtool_libs@
+wl=@wl@
+hardcode_libdir_flag_spec='@hardcode_libdir_flag_spec@'
+
+usage()
+{
+ cat <<EOF
+Usage: freetype-config [OPTION]...
+Get FreeType compilation and linking information.
+
+Options:
+ --prefix display \`--prefix' value used for building the
+ FreeType library
+ --prefix=PREFIX override \`--prefix' value with PREFIX
+ --exec-prefix display \`--exec-prefix' value used for building
+ the FreeType library
+ --exec-prefix=EPREFIX override \`--exec-prefix' value with EPREFIX
+ --version display libtool version of the FreeType library
+ --ftversion display FreeType version number
+ --libs display flags for linking with the FreeType library
+ --libtool display library name for linking with libtool
+ --cflags display flags for compiling with the FreeType
+ library
+EOF
+ exit $1
+}
+
+if test $# -eq 0 ; then
+ usage 1 1>&2
+fi
+
+while test $# -gt 0 ; do
+ case "$1" in
+ -*=*)
+ optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
+ ;;
+ *)
+ optarg=
+ ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ local_prefix=yes
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ local_prefix=yes
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --version)
+ echo @ft_version@
+ exit 0
+ ;;
+ --ftversion)
+ echo_ft_version=yes
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ --libtool)
+ echo_libtool=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+if test "$local_prefix" = "yes" ; then
+ if test "$exec_prefix_set" != "yes" ; then
+ exec_prefix=$prefix
+ fi
+fi
+
+if test "$echo_prefix" = "yes" ; then
+ echo ${SYSROOT}$prefix
+fi
+
+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 \
+ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
+ minor=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
+ | grep FREETYPE_MINOR \
+ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
+ patch=`grep define ${SYSROOT}$includedir/freetype2/freetype/freetype.h \
+ | grep FREETYPE_PATCH \
+ | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'`
+ echo $major.$minor.$patch
+fi
+
+if test "$echo_cflags" = "yes" ; then
+ cflags="-I${SYSROOT}$includedir/freetype2"
+ if test "${SYSROOT}$includedir" != "/usr/include" ; then
+ echo $cflags -I${SYSROOT}$includedir
+ else
+ echo $cflags
+ fi
+fi
+
+if test "$echo_libs" = "yes" ; then
+ rpath=
+ if test "$enable_shared" = "yes" ; then
+ eval "rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ libs="-lfreetype @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@"
+ if test "${SYSROOT}$libdir" != "/usr/lib" && test "${SYSROOT}$libdir" != "/usr/lib64"; then
+ echo -L${SYSROOT}$libdir $libs
+ else
+ echo $libs
+ fi
+fi
+
+if test "$echo_libtool" = "yes" ; then
+ convlib="libfreetype.la"
+ echo ${SYSROOT}$libdir/$convlib
+fi
+
+# EOF
diff --git a/3party/freetype/builds/unix/freetype2.in b/3party/freetype/builds/unix/freetype2.in
new file mode 100644
index 0000000000..b73180049a
--- /dev/null
+++ b/3party/freetype/builds/unix/freetype2.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: FreeType 2
+Description: A free, high-quality, and portable font engine.
+Version: @ft_version@
+Requires:
+Libs: -L${libdir} -lfreetype
+Libs.private: @LIBZ@ @LIBBZ2@ @FT2_EXTRA_LIBS@
+Cflags: -I${includedir}/freetype2 -I${includedir}
diff --git a/3party/freetype/builds/unix/freetype2.m4 b/3party/freetype/builds/unix/freetype2.m4
new file mode 100644
index 0000000000..3d0ecb3554
--- /dev/null
+++ b/3party/freetype/builds/unix/freetype2.m4
@@ -0,0 +1,194 @@
+# Configure paths for FreeType2
+# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
+#
+# Copyright 2001, 2003, 2007, 2009 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.
+#
+# As a special exception to the FreeType project license, this file may be
+# distributed as part of a program that contains a configuration script
+# generated by Autoconf, under the same distribution terms as the rest of
+# that program.
+#
+# serial 3
+
+# AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+# Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
+# MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is
+# FreeType 2.0.4).
+#
+AC_DEFUN([AC_CHECK_FT2],
+ [# Get the cflags and libraries from the freetype-config script
+ #
+ AC_ARG_WITH([ft-prefix],
+ dnl don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--with-ft-prefix=PREFIX],
+ [Prefix where FreeType is installed (optional)]),
+ [ft_config_prefix="$withval"],
+ [ft_config_prefix=""])
+
+ AC_ARG_WITH([ft-exec-prefix],
+ dnl don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
+ [Exec prefix where FreeType is installed (optional)]),
+ [ft_config_exec_prefix="$withval"],
+ [ft_config_exec_prefix=""])
+
+ AC_ARG_ENABLE([freetypetest],
+ dnl don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--disable-freetypetest],
+ [Do not try to compile and run a test FreeType program]),
+ [],
+ [enable_fttest=yes])
+
+ if test x$ft_config_exec_prefix != x ; then
+ ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
+ if test x${FT2_CONFIG+set} != xset ; then
+ FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
+ fi
+ fi
+
+ if test x$ft_config_prefix != x ; then
+ ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
+ if test x${FT2_CONFIG+set} != xset ; then
+ FT2_CONFIG=$ft_config_prefix/bin/freetype-config
+ fi
+ fi
+
+ if test "x$FT2_CONFIG" = x ; then
+ AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no])
+ fi
+
+ min_ft_version=m4_if([$1], [], [7.0.1], [$1])
+ AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version])
+ no_ft=""
+ if test "$FT2_CONFIG" = "no" ; then
+ no_ft=yes
+ else
+ FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
+ FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
+ ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ ft_min_major_version=`echo $min_ft_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ ft_min_minor_version=`echo $min_ft_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ ft_min_micro_version=`echo $min_ft_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test x$enable_fttest = xyes ; then
+ ft_config_is_lt=""
+ if test $ft_config_major_version -lt $ft_min_major_version ; then
+ ft_config_is_lt=yes
+ else
+ if test $ft_config_major_version -eq $ft_min_major_version ; then
+ if test $ft_config_minor_version -lt $ft_min_minor_version ; then
+ ft_config_is_lt=yes
+ else
+ if test $ft_config_minor_version -eq $ft_min_minor_version ; then
+ if test $ft_config_micro_version -lt $ft_min_micro_version ; then
+ ft_config_is_lt=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test x$ft_config_is_lt = xyes ; then
+ no_ft=yes
+ else
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $FT2_CFLAGS"
+ LIBS="$FT2_LIBS $LIBS"
+
+ #
+ # Sanity checks for the results of freetype-config to some extent.
+ #
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main()
+{
+ FT_Library library;
+ FT_Error error;
+
+ error = FT_Init_FreeType(&library);
+
+ if (error)
+ return 1;
+ else
+ {
+ FT_Done_FreeType(library);
+ return 0;
+ }
+}
+
+ ]])
+ ],
+ [],
+ [no_ft=yes],
+ [echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"])
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi # test $ft_config_version -lt $ft_min_version
+ fi # test x$enable_fttest = xyes
+ fi # test "$FT2_CONFIG" = "no"
+
+ if test x$no_ft = x ; then
+ AC_MSG_RESULT([yes])
+ m4_if([$2], [], [:], [$2])
+ else
+ AC_MSG_RESULT([no])
+ if test "$FT2_CONFIG" = "no" ; then
+ AC_MSG_WARN([
+
+ The freetype-config script installed by FreeType 2 could not be found.
+ If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in
+ your path, or set the FT2_CONFIG environment variable to the
+ full path to freetype-config.
+ ])
+ else
+ if test x$ft_config_is_lt = xyes ; then
+ AC_MSG_WARN([
+
+ Your installed version of the FreeType 2 library is too old.
+ If you have different versions of FreeType 2, make sure that
+ correct values for --with-ft-prefix or --with-ft-exec-prefix
+ are used, or set the FT2_CONFIG environment variable to the
+ full path to freetype-config.
+ ])
+ else
+ AC_MSG_WARN([
+
+ The FreeType test program failed to run. If your system uses
+ shared libraries and they are installed outside the normal
+ system library path, make sure the variable LD_LIBRARY_PATH
+ (or whatever is appropriate for your system) is correctly set.
+ ])
+ fi
+ fi
+
+ FT2_CFLAGS=""
+ FT2_LIBS=""
+ m4_if([$3], [], [:], [$3])
+ fi
+
+ AC_SUBST([FT2_CFLAGS])
+ AC_SUBST([FT2_LIBS])])
+
+# end of freetype2.m4
diff --git a/3party/freetype/builds/unix/ft-munmap.m4 b/3party/freetype/builds/unix/ft-munmap.m4
new file mode 100644
index 0000000000..68b3361e2b
--- /dev/null
+++ b/3party/freetype/builds/unix/ft-munmap.m4
@@ -0,0 +1,32 @@
+## FreeType specific autoconf tests
+#
+# Copyright 2002, 2003, 2004 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+# serial 2
+
+AC_DEFUN([FT_MUNMAP_PARAM],
+ [AC_MSG_CHECKING([for munmap's first parameter type])
+ AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([[
+
+#include <unistd.h>
+#include <sys/mman.h>
+int munmap(void *, size_t);
+
+ ]])
+ ],
+ [AC_MSG_RESULT([void *])
+ AC_DEFINE([MUNMAP_USES_VOIDP],
+ [],
+ [Define to 1 if the first argument of munmap is of type void *])],
+ [AC_MSG_RESULT([char *])])
+ ])
+
+# end of ft-munmap.m4
diff --git a/3party/freetype/builds/unix/ft2unix.h b/3party/freetype/builds/unix/ft2unix.h
new file mode 100644
index 0000000000..6a3b8d90e9
--- /dev/null
+++ b/3party/freetype/builds/unix/ft2unix.h
@@ -0,0 +1,61 @@
+/***************************************************************************/
+/* */
+/* ft2build.h */
+/* */
+/* Build macros of the FreeType 2 library. */
+/* */
+/* Copyright 1996-2001, 2003, 2006 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This is a Unix-specific version of <ft2build.h> that should be used */
+ /* exclusively *after* installation of the library. */
+ /* */
+ /* It assumes that `/usr/local/include/freetype2' (or whatever is */
+ /* returned by the `freetype-config --cflags' or `pkg-config --cflags' */
+ /* command) is in your compilation include path. */
+ /* */
+ /* We don't need to do anything special in this release. However, for */
+ /* a future FreeType 2 release, the following installation changes will */
+ /* be performed: */
+ /* */
+ /* - The contents of `freetype-2.x/include/freetype' will be installed */
+ /* to `/usr/local/include/freetype2' instead of */
+ /* `/usr/local/include/freetype2/freetype'. */
+ /* */
+ /* - This file will #include <freetype2/config/ftheader.h>, instead */
+ /* of <freetype/config/ftheader.h>. */
+ /* */
+ /* - The contents of `ftheader.h' will be processed with `sed' to */
+ /* replace all `<freetype/xxx>' with `<freetype2/xxx>'. */
+ /* */
+ /* - Adding `/usr/local/include/freetype2' to your compilation include */
+ /* path will not be necessary anymore. */
+ /* */
+ /* These changes will be transparent to client applications which use */
+ /* freetype-config (or pkg-config). No modifications will be necessary */
+ /* to compile with the new scheme. */
+ /* */
+ /*************************************************************************/
+
+
+#ifndef __FT2_BUILD_UNIX_H__
+#define __FT2_BUILD_UNIX_H__
+
+ /* `<prefix>/include/freetype2' must be in your current inclusion path */
+#include <freetype/config/ftheader.h>
+
+#endif /* __FT2_BUILD_UNIX_H__ */
+
+
+/* END */
diff --git a/3party/freetype/builds/unix/ftconfig.in b/3party/freetype/builds/unix/ftconfig.in
new file mode 100644
index 0000000000..46ef6e1da9
--- /dev/null
+++ b/3party/freetype/builds/unix/ftconfig.in
@@ -0,0 +1,551 @@
+/***************************************************************************/
+/* */
+/* ftconfig.in */
+/* */
+/* UNIX-specific configuration file (specification only). */
+/* */
+/* Copyright 1996-2004, 2006-2009, 2011 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This header file contains a number of macro definitions that are used */
+ /* by the rest of the engine. Most of the macros here are automatically */
+ /* determined at compile time, and you should not need to change it to */
+ /* port FreeType, except to compile the library with a non-ANSI */
+ /* compiler. */
+ /* */
+ /* Note however that if some specific modifications are needed, we */
+ /* advise you to place a modified copy in your build directory. */
+ /* */
+ /* The build directory is usually `freetype/builds/<system>', and */
+ /* contains system-specific files that are always included first when */
+ /* building the library. */
+ /* */
+ /*************************************************************************/
+
+
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
+
+#include <ft2build.h>
+#include FT_CONFIG_OPTIONS_H
+#include FT_CONFIG_STANDARD_LIBRARY_H
+
+
+FT_BEGIN_HEADER
+
+
+ /*************************************************************************/
+ /* */
+ /* PLATFORM-SPECIFIC CONFIGURATION MACROS */
+ /* */
+ /* These macros can be toggled to suit a specific system. The current */
+ /* ones are defaults used to compile FreeType in an ANSI C environment */
+ /* (16bit compilers are also supported). Copy this file to your own */
+ /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+ /* */
+ /*************************************************************************/
+
+
+#undef HAVE_UNISTD_H
+#undef HAVE_FCNTL_H
+#undef HAVE_STDINT_H
+
+
+ /* There are systems (like the Texas Instruments 'C54x) where a `char' */
+ /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */
+ /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */
+ /* is probably unexpected. */
+ /* */
+ /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */
+ /* `char' type. */
+
+#ifndef FT_CHAR_BIT
+#define FT_CHAR_BIT CHAR_BIT
+#endif
+
+
+#undef FT_USE_AUTOCONF_SIZEOF_TYPES
+#ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
+
+#undef SIZEOF_INT
+#undef SIZEOF_LONG
+#define FT_SIZEOF_INT SIZEOF_INT
+#define FT_SIZEOF_LONG SIZEOF_LONG
+
+#else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
+
+ /* Following cpp computation of the bit length of int and long */
+ /* is copied from default include/freetype/config/ftconfig.h. */
+ /* If any improvement is required for this file, it should be */
+ /* applied to the original header file for the builders that */
+ /* does not use configure script. */
+
+ /* The size of an `int' type. */
+#if FT_UINT_MAX == 0xFFFFUL
+#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
+#elif FT_UINT_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
+#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
+#define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
+#else
+#error "Unsupported size of `int' type!"
+#endif
+
+ /* The size of a `long' type. A five-byte `long' (as used e.g. on the */
+ /* DM642) is recognized but avoided. */
+#if FT_ULONG_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
+#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
+#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
+#else
+#error "Unsupported size of `long' type!"
+#endif
+
+#endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */
+
+
+ /* Preferred alignment of data */
+#define FT_ALIGNMENT 8
+
+
+ /* FT_UNUSED is a macro used to indicate that a given parameter is not */
+ /* used -- this is only used to get rid of unpleasant compiler warnings */
+#ifndef FT_UNUSED
+#define FT_UNUSED( arg ) ( (arg) = (arg) )
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* AUTOMATIC CONFIGURATION MACROS */
+ /* */
+ /* These macros are computed from the ones defined above. Don't touch */
+ /* their definition, unless you know precisely what you are doing. No */
+ /* porter should need to mess with them. */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Mac support */
+ /* */
+ /* This is the only necessary change, so it is defined here instead */
+ /* providing a new configuration file. */
+ /* */
+#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
+ ( defined( __MWERKS__ ) && defined( macintosh ) )
+ /* no Carbon frameworks for 64bit 10.4.x */
+ /* AvailabilityMacros.h is available since Mac OS X 10.2, */
+ /* so guess the system version by maximum errno before inclusion */
+#include <errno.h>
+#ifdef ECANCELED /* defined since 10.2 */
+#include "AvailabilityMacros.h"
+#endif
+#if defined( __LP64__ ) && \
+ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
+#define DARWIN_NO_CARBON 1
+#else
+#define FT_MACINTOSH 1
+#endif
+
+#elif defined( __SC__ ) || defined( __MRC__ )
+ /* Classic MacOS compilers */
+#include "ConditionalMacros.h"
+#if TARGET_OS_MAC
+#define FT_MACINTOSH 1
+#endif
+
+#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
+
+
+ /*************************************************************************/
+ /* */
+ /* IntN types */
+ /* */
+ /* Used to guarantee the size of some specific integers. */
+ /* */
+ typedef signed short FT_Int16;
+ typedef unsigned short FT_UInt16;
+
+#if FT_SIZEOF_INT == 4
+
+ typedef signed int FT_Int32;
+ typedef unsigned int FT_UInt32;
+
+#elif FT_SIZEOF_LONG == 4
+
+ typedef signed long FT_Int32;
+ typedef unsigned long FT_UInt32;
+
+#else
+#error "no 32bit type found -- please check your configuration files"
+#endif
+
+
+ /* look up an integer type that is at least 32 bits */
+#if FT_SIZEOF_INT >= 4
+
+ typedef int FT_Fast;
+ typedef unsigned int FT_UFast;
+
+#elif FT_SIZEOF_LONG >= 4
+
+ typedef long FT_Fast;
+ typedef unsigned long FT_UFast;
+
+#endif
+
+
+ /* determine whether we have a 64-bit int type for platforms without */
+ /* Autoconf */
+#if FT_SIZEOF_LONG == 8
+
+ /* FT_LONG64 must be defined if a 64-bit type is available */
+#define FT_LONG64
+#define FT_INT64 long
+
+#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+
+#elif defined( __BORLANDC__ ) /* Borland C++ */
+
+ /* XXXX: We should probably check the value of __BORLANDC__ in order */
+ /* to test the compiler version. */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+
+#elif defined( __WATCOMC__ ) /* Watcom C++ */
+
+ /* Watcom doesn't provide 64-bit data types */
+
+#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
+
+#define FT_LONG64
+#define FT_INT64 long long int
+
+#elif defined( __GNUC__ )
+
+ /* GCC provides the `long long' type */
+#define FT_LONG64
+#define FT_INT64 long long int
+
+#endif /* FT_SIZEOF_LONG == 8 */
+
+
+ /*************************************************************************/
+ /* */
+ /* A 64-bit data type will create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */
+ /* is defined. You can however ignore this rule by defining the */
+ /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
+ /* */
+#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#ifdef __STDC__
+
+ /* Undefine the 64-bit macros in strict ANSI compilation mode. */
+ /* Since `#undef' doesn't survive in configuration header files */
+ /* we use the postprocessing facility of AC_CONFIG_HEADERS to */
+ /* replace the leading `/' with `#'. */
+/undef FT_LONG64
+/undef FT_INT64
+
+#endif /* __STDC__ */
+
+#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
+
+
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
+#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
+
+
+#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
+ /* Provide assembler fragments for performance-critical functions. */
+ /* These must be defined `static __inline__' with GCC. */
+
+#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
+#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
+
+ /* documentation is in freetype.h */
+
+ static __inline FT_Int32
+ FT_MulFix_arm( FT_Int32 a,
+ FT_Int32 b )
+ {
+ register FT_Int32 t, t2;
+
+
+ __asm
+ {
+ smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
+ mov a, t, asr #31 /* a = (hi >> 31) */
+ add a, a, #0x8000 /* a += 0x8000 */
+ adds t2, t2, a /* t2 += a */
+ adc t, t, #0 /* t += carry */
+ mov a, t2, lsr #16 /* a = t2 >> 16 */
+ orr a, a, t, lsl #16 /* a |= t << 16 */
+ }
+ return a;
+ }
+
+#endif /* __CC_ARM || __ARMCC__ */
+
+
+#ifdef __GNUC__
+
+#if defined( __arm__ ) && !defined( __thumb__ ) && \
+ !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
+#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
+
+ /* documentation is in freetype.h */
+
+ static __inline__ FT_Int32
+ FT_MulFix_arm( FT_Int32 a,
+ FT_Int32 b )
+ {
+ register FT_Int32 t, t2;
+
+
+ __asm__ __volatile__ (
+ "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
+ "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
+ "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
+ "adds %1, %1, %0\n\t" /* %1 += %0 */
+ "adc %2, %2, #0\n\t" /* %2 += carry */
+ "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
+ "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
+ : "=r"(a), "=&r"(t2), "=&r"(t)
+ : "r"(a), "r"(b) );
+ return a;
+ }
+
+#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
+
+#if defined( __i386__ )
+#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
+
+ /* documentation is in freetype.h */
+
+ static __inline__ FT_Int32
+ FT_MulFix_i386( FT_Int32 a,
+ FT_Int32 b )
+ {
+ register FT_Int32 result;
+
+
+ __asm__ __volatile__ (
+ "imul %%edx\n"
+ "movl %%edx, %%ecx\n"
+ "sarl $31, %%ecx\n"
+ "addl $0x8000, %%ecx\n"
+ "addl %%ecx, %%eax\n"
+ "adcl $0, %%edx\n"
+ "shrl $16, %%eax\n"
+ "shll $16, %%edx\n"
+ "addl %%edx, %%eax\n"
+ : "=a"(result), "=d"(b)
+ : "a"(a), "d"(b)
+ : "%ecx", "cc" );
+ return result;
+ }
+
+#endif /* i386 */
+
+#endif /* __GNUC__ */
+
+
+#ifdef _MSC_VER /* Visual C++ */
+
+#ifdef _M_IX86
+
+#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
+
+ /* documentation is in freetype.h */
+
+ static __inline FT_Int32
+ FT_MulFix_i386( FT_Int32 a,
+ FT_Int32 b )
+ {
+ register FT_Int32 result;
+
+ __asm
+ {
+ mov eax, a
+ mov edx, b
+ imul edx
+ mov ecx, edx
+ sar ecx, 31
+ add ecx, 8000h
+ add eax, ecx
+ adc edx, 0
+ shr eax, 16
+ shl edx, 16
+ add eax, edx
+ mov result, eax
+ }
+ return result;
+ }
+
+#endif /* _M_IX86 */
+
+#endif /* _MSC_VER */
+
+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+
+#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
+#ifdef FT_MULFIX_ASSEMBLER
+#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
+#endif
+#endif
+
+
+#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
+
+#define FT_LOCAL( x ) static x
+#define FT_LOCAL_DEF( x ) static x
+
+#else
+
+#ifdef __cplusplus
+#define FT_LOCAL( x ) extern "C" x
+#define FT_LOCAL_DEF( x ) extern "C" x
+#else
+#define FT_LOCAL( x ) extern x
+#define FT_LOCAL_DEF( x ) x
+#endif
+
+#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+
+
+#ifndef FT_BASE
+
+#ifdef __cplusplus
+#define FT_BASE( x ) extern "C" x
+#else
+#define FT_BASE( x ) extern x
+#endif
+
+#endif /* !FT_BASE */
+
+
+#ifndef FT_BASE_DEF
+
+#ifdef __cplusplus
+#define FT_BASE_DEF( x ) x
+#else
+#define FT_BASE_DEF( x ) x
+#endif
+
+#endif /* !FT_BASE_DEF */
+
+
+#ifndef FT_EXPORT
+
+#ifdef __cplusplus
+#define FT_EXPORT( x ) extern "C" x
+#else
+#define FT_EXPORT( x ) extern x
+#endif
+
+#endif /* !FT_EXPORT */
+
+
+#ifndef FT_EXPORT_DEF
+
+#ifdef __cplusplus
+#define FT_EXPORT_DEF( x ) extern "C" x
+#else
+#define FT_EXPORT_DEF( x ) extern x
+#endif
+
+#endif /* !FT_EXPORT_DEF */
+
+
+#ifndef FT_EXPORT_VAR
+
+#ifdef __cplusplus
+#define FT_EXPORT_VAR( x ) extern "C" x
+#else
+#define FT_EXPORT_VAR( x ) extern x
+#endif
+
+#endif /* !FT_EXPORT_VAR */
+
+ /* The following macros are needed to compile the library with a */
+ /* C++ compiler and with 16bit compilers. */
+ /* */
+
+ /* This is special. Within C++, you must specify `extern "C"' for */
+ /* functions which are used via function pointers, and you also */
+ /* must do that for structures which contain function pointers to */
+ /* assure C linkage -- it's not possible to have (local) anonymous */
+ /* functions which are accessed by (global) function pointers. */
+ /* */
+ /* */
+ /* FT_CALLBACK_DEF is used to _define_ a callback function. */
+ /* */
+ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
+ /* contains pointers to callback functions. */
+ /* */
+ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
+ /* that contains pointers to callback functions. */
+ /* */
+ /* */
+ /* Some 16bit compilers have to redefine these macros to insert */
+ /* the infamous `_cdecl' or `__fastcall' declarations. */
+ /* */
+#ifndef FT_CALLBACK_DEF
+#ifdef __cplusplus
+#define FT_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_CALLBACK_DEF( x ) static x
+#endif
+#endif /* FT_CALLBACK_DEF */
+
+#ifndef FT_CALLBACK_TABLE
+#ifdef __cplusplus
+#define FT_CALLBACK_TABLE extern "C"
+#define FT_CALLBACK_TABLE_DEF extern "C"
+#else
+#define FT_CALLBACK_TABLE extern
+#define FT_CALLBACK_TABLE_DEF /* nothing */
+#endif
+#endif /* FT_CALLBACK_TABLE */
+
+
+FT_END_HEADER
+
+
+#endif /* __FTCONFIG_H__ */
+
+
+/* END */
diff --git a/3party/freetype/builds/unix/ftsystem.c b/3party/freetype/builds/unix/ftsystem.c
new file mode 100644
index 0000000000..95f8271ec3
--- /dev/null
+++ b/3party/freetype/builds/unix/ftsystem.c
@@ -0,0 +1,419 @@
+/***************************************************************************/
+/* */
+/* ftsystem.c */
+/* */
+/* Unix-specific FreeType low-level system interface (body). */
+/* */
+/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 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. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+ /* we use our special ftconfig.h file, not the standard one */
+#include <ftconfig.h>
+#include FT_INTERNAL_DEBUG_H
+#include FT_SYSTEM_H
+#include FT_ERRORS_H
+#include FT_TYPES_H
+#include FT_INTERNAL_STREAM_H
+
+ /* memory-mapping includes and definitions */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <sys/mman.h>
+#ifndef MAP_FILE
+#define MAP_FILE 0x00
+#endif
+
+#ifdef MUNMAP_USES_VOIDP
+#define MUNMAP_ARG_CAST void *
+#else
+#define MUNMAP_ARG_CAST char *
+#endif
+
+#ifdef NEED_MUNMAP_DECL
+
+#ifdef __cplusplus
+ extern "C"
+#else
+ extern
+#endif
+ int
+ munmap( char* addr,
+ int len );
+
+#define MUNMAP_ARG_CAST char *
+
+#endif /* NEED_DECLARATION_MUNMAP */
+
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+
+ /*************************************************************************/
+ /* */
+ /* MEMORY MANAGEMENT INTERFACE */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_alloc */
+ /* */
+ /* <Description> */
+ /* The memory allocation function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* size :: The requested size in bytes. */
+ /* */
+ /* <Return> */
+ /* The address of newly allocated block. */
+ /* */
+ FT_CALLBACK_DEF( void* )
+ ft_alloc( FT_Memory memory,
+ long size )
+ {
+ FT_UNUSED( memory );
+
+ return malloc( size );
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_realloc */
+ /* */
+ /* <Description> */
+ /* The memory reallocation function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* cur_size :: The current size of the allocated memory block. */
+ /* */
+ /* new_size :: The newly requested size in bytes. */
+ /* */
+ /* block :: The current address of the block in memory. */
+ /* */
+ /* <Return> */
+ /* The address of the reallocated memory block. */
+ /* */
+ FT_CALLBACK_DEF( void* )
+ ft_realloc( FT_Memory memory,
+ long cur_size,
+ long new_size,
+ void* block )
+ {
+ FT_UNUSED( memory );
+ FT_UNUSED( cur_size );
+
+ return realloc( block, new_size );
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_free */
+ /* */
+ /* <Description> */
+ /* The memory release function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* block :: The address of block in memory to be freed. */
+ /* */
+ FT_CALLBACK_DEF( void )
+ ft_free( FT_Memory memory,
+ void* block )
+ {
+ FT_UNUSED( memory );
+
+ free( block );
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* RESOURCE MANAGEMENT INTERFACE */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_io
+
+ /* We use the macro STREAM_FILE for convenience to extract the */
+ /* system-specific stream handle from a given FreeType stream object */
+#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_close_stream_by_munmap */
+ /* */
+ /* <Description> */
+ /* The function to close a stream which is opened by mmap. */
+ /* */
+ /* <Input> */
+ /* stream :: A pointer to the stream object. */
+ /* */
+ FT_CALLBACK_DEF( void )
+ ft_close_stream_by_munmap( FT_Stream stream )
+ {
+ munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+ stream->base = 0;
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_close_stream_by_free */
+ /* */
+ /* <Description> */
+ /* The function to close a stream which is created by ft_alloc. */
+ /* */
+ /* <Input> */
+ /* stream :: A pointer to the stream object. */
+ /* */
+ FT_CALLBACK_DEF( void )
+ ft_close_stream_by_free( FT_Stream stream )
+ {
+ ft_free( NULL, stream->descriptor.pointer );
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+ stream->base = 0;
+ }
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( FT_Error )
+ FT_Stream_Open( FT_Stream stream,
+ const char* filepathname )
+ {
+ int file;
+ struct stat stat_buf;
+
+
+ if ( !stream )
+ return FT_Err_Invalid_Stream_Handle;
+
+ /* open the file */
+ file = open( filepathname, O_RDONLY );
+ if ( file < 0 )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not open `%s'\n", filepathname ));
+ return FT_Err_Cannot_Open_Resource;
+ }
+
+ /* Here we ensure that a "fork" will _not_ duplicate */
+ /* our opened input streams on Unix. This is critical */
+ /* since it avoids some (possible) access control */
+ /* issues and cleans up the kernel file table a bit. */
+ /* */
+#ifdef F_SETFD
+#ifdef FD_CLOEXEC
+ (void)fcntl( file, F_SETFD, FD_CLOEXEC );
+#else
+ (void)fcntl( file, F_SETFD, 1 );
+#endif /* FD_CLOEXEC */
+#endif /* F_SETFD */
+
+ if ( fstat( file, &stat_buf ) < 0 )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not `fstat' file `%s'\n", filepathname ));
+ goto Fail_Map;
+ }
+
+ /* XXX: TODO -- real 64bit platform support */
+ /* */
+ /* `stream->size' is typedef'd to unsigned long (in */
+ /* freetype/ftsystem.h); `stat_buf.st_size', however, is usually */
+ /* typedef'd to off_t (in sys/stat.h). */
+ /* On some platforms, the former is 32bit and the latter is 64bit. */
+ /* To avoid overflow caused by fonts in huge files larger than */
+ /* 2GB, do a test. Temporary fix proposed by Sean McBride. */
+ /* */
+ if ( stat_buf.st_size > LONG_MAX )
+ {
+ FT_ERROR(( "FT_Stream_Open: file is too big\n" ));
+ goto Fail_Map;
+ }
+ else if ( stat_buf.st_size == 0 )
+ {
+ FT_ERROR(( "FT_Stream_Open: zero-length file\n" ));
+ goto Fail_Map;
+ }
+
+ /* This cast potentially truncates a 64bit to 32bit! */
+ stream->size = (unsigned long)stat_buf.st_size;
+ stream->pos = 0;
+ stream->base = (unsigned char *)mmap( NULL,
+ stream->size,
+ PROT_READ,
+ MAP_FILE | MAP_PRIVATE,
+ file,
+ 0 );
+
+ /* on some RTOS, mmap might return 0 */
+ if ( (long)stream->base != -1 && stream->base != NULL )
+ stream->close = ft_close_stream_by_munmap;
+ else
+ {
+ ssize_t total_read_count;
+
+
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
+
+ stream->base = (unsigned char*)ft_alloc( NULL, stream->size );
+
+ if ( !stream->base )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not `alloc' memory\n" ));
+ goto Fail_Map;
+ }
+
+ total_read_count = 0;
+ do {
+ ssize_t read_count;
+
+
+ read_count = read( file,
+ stream->base + total_read_count,
+ stream->size - total_read_count );
+
+ if ( read_count <= 0 )
+ {
+ if ( read_count == -1 && errno == EINTR )
+ continue;
+
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " error while `read'ing file `%s'\n", filepathname ));
+ goto Fail_Read;
+ }
+
+ total_read_count += read_count;
+
+ } while ( (unsigned long)total_read_count != stream->size );
+
+ stream->close = ft_close_stream_by_free;
+ }
+
+ close( file );
+
+ stream->descriptor.pointer = stream->base;
+ stream->pathname.pointer = (char*)filepathname;
+
+ stream->read = 0;
+
+ FT_TRACE1(( "FT_Stream_Open:" ));
+ FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
+ filepathname, stream->size ));
+
+ return FT_Err_Ok;
+
+ Fail_Read:
+ ft_free( NULL, stream->base );
+
+ Fail_Map:
+ close( file );
+
+ stream->base = NULL;
+ stream->size = 0;
+ stream->pos = 0;
+
+ return FT_Err_Cannot_Open_Stream;
+ }
+
+
+#ifdef FT_DEBUG_MEMORY
+
+ extern FT_Int
+ ft_mem_debug_init( FT_Memory memory );
+
+ extern void
+ ft_mem_debug_done( FT_Memory memory );
+
+#endif
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( FT_Memory )
+ FT_New_Memory( void )
+ {
+ FT_Memory memory;
+
+
+ memory = (FT_Memory)malloc( sizeof ( *memory ) );
+ if ( memory )
+ {
+ memory->user = 0;
+ memory->alloc = ft_alloc;
+ memory->realloc = ft_realloc;
+ memory->free = ft_free;
+#ifdef FT_DEBUG_MEMORY
+ ft_mem_debug_init( memory );
+#endif
+ }
+
+ return memory;
+ }
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( void )
+ FT_Done_Memory( FT_Memory memory )
+ {
+#ifdef FT_DEBUG_MEMORY
+ ft_mem_debug_done( memory );
+#endif
+ memory->free( memory, memory );
+ }
+
+
+/* END */
diff --git a/3party/freetype/builds/unix/install.mk b/3party/freetype/builds/unix/install.mk
new file mode 100644
index 0000000000..2e5ef080e3
--- /dev/null
+++ b/3party/freetype/builds/unix/install.mk
@@ -0,0 +1,97 @@
+#
+# FreeType 2 installation instructions for Unix systems
+#
+
+
+# Copyright 1996-2000, 2002, 2003, 2006 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.
+
+# If you say
+#
+# make install DESTDIR=/tmp/somewhere/
+#
+# don't forget the final backslash (this command is mainly for package
+# maintainers).
+
+
+.PHONY: install uninstall check
+
+# Unix installation and deinstallation targets.
+#
+# Note that we no longer install internal headers, and we remove any
+# `internal' subdirectory found in `$(includedir)/freetype2/freetype'.
+#
+install: $(PROJECT_LIBRARY)
+ $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(libdir)/pkgconfig \
+ $(DESTDIR)$(includedir)/freetype2/freetype/config \
+ $(DESTDIR)$(includedir)/freetype2/freetype/cache \
+ $(DESTDIR)$(bindir) \
+ $(DESTDIR)$(datadir)/aclocal
+ $(LIBTOOL) --mode=install $(INSTALL) \
+ $(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
+ -for P in $(PUBLIC_H) ; do \
+ $(INSTALL_DATA) \
+ $$P $(DESTDIR)$(includedir)/freetype2/freetype ; \
+ done
+ -for P in $(CONFIG_H) ; do \
+ $(INSTALL_DATA) \
+ $$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
+ done
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/cache/*
+ -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/cache
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/internal/*
+ -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/internal
+ $(INSTALL_DATA) $(BUILD_DIR)/ft2unix.h \
+ $(DESTDIR)$(includedir)/ft2build.h
+ $(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \
+ $(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h
+ $(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \
+ $(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h
+ $(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
+ $(DESTDIR)$(bindir)/freetype-config
+ $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
+ $(DESTDIR)$(datadir)/aclocal/freetype2.m4
+ $(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
+ $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
+
+
+uninstall:
+ -$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(LIBRARY).$A
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/config/*
+ -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype/config
+ -$(DELETE) $(DESTDIR)$(includedir)/freetype2/freetype/*
+ -$(DELDIR) $(DESTDIR)$(includedir)/freetype2/freetype
+ -$(DELDIR) $(DESTDIR)$(includedir)/freetype2
+ -$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
+ -$(DELETE) $(DESTDIR)$(bindir)/freetype-config
+ -$(DELETE) $(DESTDIR)$(datadir)/aclocal/freetype2.m4
+ -$(DELETE) $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
+
+
+check:
+ @echo There is no validation suite for this package.
+
+
+.PHONY: clean_project_unix distclean_project_unix
+
+# Unix cleaning and distclean rules.
+#
+clean_project_unix:
+ -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
+ -$(DELETE) $(patsubst %.$O,%.$(SO),$(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)) \
+ $(CLEAN)
+
+distclean_project_unix: clean_project_unix
+ -$(DELETE) $(PROJECT_LIBRARY)
+ -$(DELETE) $(OBJ_DIR)/.libs/*
+ -$(DELDIR) $(OBJ_DIR)/.libs
+ -$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
+
+# EOF
diff --git a/3party/freetype/builds/unix/mkinstalldirs b/3party/freetype/builds/unix/mkinstalldirs
new file mode 100755
index 0000000000..ef7e16fdaf
--- /dev/null
+++ b/3party/freetype/builds/unix/mkinstalldirs
@@ -0,0 +1,161 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+
+scriptversion=2006-05-11.19
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+IFS=" "" $nl"
+errstatus=0
+dirmode=
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage"
+ exit $?
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --version)
+ echo "$0 $scriptversion"
+ exit $?
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error. This is a problem when calling mkinstalldirs
+# from a parallel make. We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
+case $dirmode in
+ '')
+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ test -d ./-p && rmdir ./-p
+ test -d ./--version && rmdir ./--version
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+ test ! -d ./--version; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ else
+ # Clean up after NextStep and OpenStep mkdir.
+ for d in ./-m ./-p ./--version "./$dirmode";
+ do
+ test -d $d && rmdir $d
+ done
+ fi
+ ;;
+esac
+
+for file
+do
+ case $file in
+ /*) pathcomp=/ ;;
+ *) pathcomp= ;;
+ esac
+ oIFS=$IFS
+ IFS=/
+ set fnord $file
+ shift
+ IFS=$oIFS
+
+ for d
+ do
+ test "x$d" = x && continue
+
+ pathcomp=$pathcomp$d
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp=$pathcomp/
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/3party/freetype/builds/unix/unix-cc.in b/3party/freetype/builds/unix/unix-cc.in
new file mode 100644
index 0000000000..b84bc5d27b
--- /dev/null
+++ b/3party/freetype/builds/unix/unix-cc.in
@@ -0,0 +1,114 @@
+#
+# FreeType 2 template for Unix-specific compiler definitions
+#
+
+# Copyright 1996-2000, 2002, 2003, 2005, 2006 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.
+
+
+CC := @CC@
+COMPILER_SEP := $(SEP)
+FT_LIBTOOL_DIR ?= $(BUILD_DIR)
+
+LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := lo
+SO := o
+
+
+# The executable file extension. Although most Unix platforms use no
+# extension, we copy the extension detected by autoconf. Useful for cross
+# building on Unix systems for non-Unix systems.
+#
+E := @EXEEXT@
+
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := la
+SA := a
+
+
+# The name of the final library file. Note that the DOS-specific Makefile
+# uses a shorter (8.3) name.
+#
+LIBRARY := lib$(PROJECT)
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+# We use our own FreeType configuration file.
+#
+CPPFLAGS := @CPPFLAGS@
+CFLAGS := -c @XX_CFLAGS@ @CFLAGS@ -DFT_CONFIG_CONFIG_H="<ftconfig.h>"
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS := @XX_ANSIFLAGS@
+
+# C compiler to use -- we use libtool!
+#
+#
+CCraw := $(CC)
+CC := $(LIBTOOL) --mode=compile $(CCraw)
+
+# Linker flags.
+#
+LDFLAGS := @LDFLAGS@
+
+
+# export symbols
+#
+CCraw_build := @CC_BUILD@ # native CC of building system
+E_BUILD := @EXEEXT_BUILD@ # extension for exexutable on building system
+EXPORTS_LIST := $(OBJ_DIR)/ftexport.sym
+CCexe := $(CCraw_build) # used to compile `apinames' only
+
+
+# Library linking
+#
+LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
+ -rpath $(libdir) -version-info $(version_info) \
+ $(LDFLAGS) -no-undefined \
+ # -export-symbols $(EXPORTS_LIST)
+
+# EOF
diff --git a/3party/freetype/builds/unix/unix-def.in b/3party/freetype/builds/unix/unix-def.in
new file mode 100644
index 0000000000..e0a7a3a61f
--- /dev/null
+++ b/3party/freetype/builds/unix/unix-def.in
@@ -0,0 +1,85 @@
+#
+# FreeType 2 configuration rules templates for Unix + configure
+#
+
+
+# Copyright 1996-2000, 2002, 2004, 2006, 2008 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.
+
+
+TOP_DIR := $(shell cd $(TOP_DIR); pwd)
+
+DELETE := @RMF@
+DELDIR := @RMDIR@
+CAT := cat
+SEP := /
+
+# this is used for `make distclean' and `make install'
+OBJ_BUILD ?= $(BUILD_DIR)
+
+# don't use `:=' here since the path stuff will be included after this file
+#
+FTSYS_SRC = @FTSYS_SRC@
+
+INSTALL := @INSTALL@
+INSTALL_DATA := @INSTALL_DATA@
+INSTALL_PROGRAM := @INSTALL_PROGRAM@
+INSTALL_SCRIPT := @INSTALL_SCRIPT@
+MKINSTALLDIRS := $(BUILD_DIR)/mkinstalldirs
+
+DISTCLEAN += $(OBJ_BUILD)/config.cache \
+ $(OBJ_BUILD)/config.log \
+ $(OBJ_BUILD)/config.status \
+ $(OBJ_BUILD)/unix-def.mk \
+ $(OBJ_BUILD)/unix-cc.mk \
+ $(OBJ_BUILD)/ftconfig.h \
+ $(OBJ_BUILD)/freetype-config \
+ $(OBJ_BUILD)/freetype2.pc \
+ $(LIBTOOL) \
+ $(OBJ_BUILD)/Makefile
+
+
+# Standard installation variables.
+#
+prefix := @prefix@
+exec_prefix := @exec_prefix@
+libdir := @libdir@
+bindir := @bindir@
+includedir := @includedir@
+datarootdir := @datarootdir@
+datadir := @datadir@
+
+version_info := @version_info@
+
+
+# The directory where all library files are placed.
+#
+# By default, this is the same as $(OBJ_DIR); however, this can be changed
+# to suit particular needs.
+#
+LIB_DIR := $(OBJ_DIR)
+
+# The BASE_SRC macro lists all source files that should be included in
+# src/base/ftbase.c. When configure sets up CFLAGS to build ftmac.c,
+# ftmac.c should be added to BASE_SRC.
+ftmac_c := @ftmac_c@
+
+# The SYSTEM_ZLIB macro is defined if the user wishes to link dynamically
+# with its system wide zlib. If SYSTEM_ZLIB is 'yes', the zlib part of the
+# ftgzip module is not compiled in.
+SYSTEM_ZLIB := @SYSTEM_ZLIB@
+
+
+# The NO_OUTPUT macro is appended to command lines in order to ignore
+# the output of some programs.
+#
+NO_OUTPUT := 2> /dev/null
+
+
+# EOF
diff --git a/3party/freetype/builds/unix/unix-dev.mk b/3party/freetype/builds/unix/unix-dev.mk
new file mode 100644
index 0000000000..76bae3862a
--- /dev/null
+++ b/3party/freetype/builds/unix/unix-dev.mk
@@ -0,0 +1,26 @@
+#
+# FreeType 2 Configuration rules for Unix + GCC
+#
+# Development version without optimizations & libtool
+# and no installation.
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+DEVEL_DIR := $(TOP_DIR)/devel
+
+include $(TOP_DIR)/builds/unix/unixddef.mk
+include $(TOP_DIR)/builds/compiler/gcc-dev.mk
+include $(TOP_DIR)/builds/link_std.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/unix/unix-lcc.mk b/3party/freetype/builds/unix/unix-lcc.mk
new file mode 100644
index 0000000000..6038e52392
--- /dev/null
+++ b/3party/freetype/builds/unix/unix-lcc.mk
@@ -0,0 +1,24 @@
+#
+# FreeType 2 Configuration rules for Unix + LCC
+#
+# Development version without optimizations & libtool
+# and no installation.
+#
+
+
+# Copyright 1996-2000 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.
+
+
+include $(TOP_DIR)/builds/unix/unixddef.mk
+include $(TOP_DIR)/builds/compiler/unix-lcc.mk
+include $(TOP_DIR)/builds/link_std.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/unix/unix.mk b/3party/freetype/builds/unix/unix.mk
new file mode 100644
index 0000000000..7f9d9a34fb
--- /dev/null
+++ b/3party/freetype/builds/unix/unix.mk
@@ -0,0 +1,62 @@
+#
+# FreeType 2 configuration rules for UNIX platforms
+#
+
+
+# Copyright 1996-2000, 2002, 2004, 2006 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.
+
+# We need these declarations here since unix-def.mk is a generated file.
+BUILD_DIR := $(TOP_DIR)/builds/unix
+PLATFORM := unix
+
+have_mk := $(wildcard $(OBJ_DIR)/unix-def.mk)
+ifneq ($(have_mk),)
+ # We are building FreeType 2 not in the src tree.
+ include $(OBJ_DIR)/unix-def.mk
+ include $(OBJ_DIR)/unix-cc.mk
+else
+ include $(BUILD_DIR)/unix-def.mk
+ include $(BUILD_DIR)/unix-cc.mk
+endif
+
+ifdef BUILD_PROJECT
+
+ .PHONY: clean_project distclean_project
+
+ # Now include the main sub-makefile. It contains all the rules used to
+ # build the library with the previous variables defined.
+ #
+ include $(TOP_DIR)/builds/$(PROJECT).mk
+
+
+ # The cleanup targets.
+ #
+ clean_project: clean_project_unix
+ distclean_project: distclean_project_unix
+
+
+ # This final rule is used to link all object files into a single library.
+ # It is part of the system-specific sub-Makefile because not all
+ # librarians accept a simple syntax like
+ #
+ # librarian library_file {list of object files}
+ #
+ $(PROJECT_LIBRARY): $(OBJECTS_LIST)
+ ifdef CLEAN_LIBRARY
+ -$(CLEAN_LIBRARY) $(NO_OUTPUT)
+ endif
+ $(LINK_LIBRARY)
+
+ include $(TOP_DIR)/builds/unix/install.mk
+
+endif
+
+
+# EOF
diff --git a/3party/freetype/builds/unix/unixddef.mk b/3party/freetype/builds/unix/unixddef.mk
new file mode 100644
index 0000000000..130d6b0f62
--- /dev/null
+++ b/3party/freetype/builds/unix/unixddef.mk
@@ -0,0 +1,45 @@
+#
+# FreeType 2 configuration rules templates for
+# development under Unix with no configure script (gcc only)
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+TOP_DIR := $(shell cd $(TOP_DIR); pwd)
+OBJ_DIR := $(shell cd $(OBJ_DIR); pwd)
+
+PLATFORM := unix
+
+DELETE := rm -f
+CAT := cat
+SEP := /
+
+# we use a special devel ftoption.h
+DEVEL_DIR := $(TOP_DIR)/devel
+
+
+# library file name
+#
+LIBRARY := lib$(PROJECT)
+
+
+# The directory where all library files are placed.
+#
+# By default, this is the same as $(OBJ_DIR); however, this can be changed
+# to suit particular needs.
+#
+LIB_DIR := $(OBJ_DIR)
+
+
+NO_OUTPUT := 2> /dev/null
+
+# EOF
diff --git a/3party/freetype/builds/vms/ftconfig.h b/3party/freetype/builds/vms/ftconfig.h
new file mode 100644
index 0000000000..aefb544833
--- /dev/null
+++ b/3party/freetype/builds/vms/ftconfig.h
@@ -0,0 +1,351 @@
+/***************************************************************************/
+/* */
+/* ftconfig.h */
+/* */
+/* VMS-specific configuration file (specification only). */
+/* */
+/* Copyright 1996-2004, 2006-2008, 2011 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This header file contains a number of macro definitions that are used */
+ /* by the rest of the engine. Most of the macros here are automatically */
+ /* determined at compile time, and you should not need to change it to */
+ /* port FreeType, except to compile the library with a non-ANSI */
+ /* compiler. */
+ /* */
+ /* Note however that if some specific modifications are needed, we */
+ /* advise you to place a modified copy in your build directory. */
+ /* */
+ /* The build directory is usually `freetype/builds/<system>', and */
+ /* contains system-specific files that are always included first when */
+ /* building the library. */
+ /* */
+ /*************************************************************************/
+
+
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
+
+
+ /* Include the header file containing all developer build options */
+#include <ft2build.h>
+#include FT_CONFIG_OPTIONS_H
+#include FT_CONFIG_STANDARD_LIBRARY_H
+
+
+FT_BEGIN_HEADER
+
+ /*************************************************************************/
+ /* */
+ /* PLATFORM-SPECIFIC CONFIGURATION MACROS */
+ /* */
+ /* These macros can be toggled to suit a specific system. The current */
+ /* ones are defaults used to compile FreeType in an ANSI C environment */
+ /* (16bit compilers are also supported). Copy this file to your own */
+ /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+ /* */
+ /*************************************************************************/
+
+
+#define HAVE_UNISTD_H 1
+#define HAVE_FCNTL_H 1
+
+#define SIZEOF_INT 4
+#define SIZEOF_LONG 4
+
+#define FT_SIZEOF_INT 4
+#define FT_SIZEOF_LONG 4
+
+#define FT_CHAR_BIT 8
+
+
+ /* Preferred alignment of data */
+#define FT_ALIGNMENT 8
+
+
+ /* FT_UNUSED is a macro used to indicate that a given parameter is not */
+ /* used -- this is only used to get rid of unpleasant compiler warnings */
+#ifndef FT_UNUSED
+#define FT_UNUSED( arg ) ( (arg) = (arg) )
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* AUTOMATIC CONFIGURATION MACROS */
+ /* */
+ /* These macros are computed from the ones defined above. Don't touch */
+ /* their definition, unless you know precisely what you are doing. No */
+ /* porter should need to mess with them. */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Mac support */
+ /* */
+ /* This is the only necessary change, so it is defined here instead */
+ /* providing a new configuration file. */
+ /* */
+#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
+ ( defined( __MWERKS__ ) && defined( macintosh ) )
+ /* no Carbon frameworks for 64bit 10.4.x */
+ /* AvailabilityMacros.h is available since Mac OS X 10.2, */
+ /* so guess the system version by maximum errno before inclusion */
+#include <errno.h>
+#ifdef ECANCELED /* defined since 10.2 */
+#include "AvailabilityMacros.h"
+#endif
+#if defined( __LP64__ ) && \
+ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
+#define DARWIN_NO_CARBON 1
+#else
+#define FT_MACINTOSH 1
+#endif
+
+#elif defined( __SC__ ) || defined( __MRC__ )
+ /* Classic MacOS compilers */
+#include "ConditionalMacros.h"
+#if TARGET_OS_MAC
+#define FT_MACINTOSH 1
+#endif
+
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* IntN types */
+ /* */
+ /* Used to guarantee the size of some specific integers. */
+ /* */
+ typedef signed short FT_Int16;
+ typedef unsigned short FT_UInt16;
+
+#if FT_SIZEOF_INT == 4
+
+ typedef signed int FT_Int32;
+ typedef unsigned int FT_UInt32;
+
+#elif FT_SIZEOF_LONG == 4
+
+ typedef signed long FT_Int32;
+ typedef unsigned long FT_UInt32;
+
+#else
+#error "no 32bit type found -- please check your configuration files"
+#endif
+
+ /* look up an integer type that is at least 32 bits */
+#if FT_SIZEOF_INT >= 4
+
+ typedef int FT_Fast;
+ typedef unsigned int FT_UFast;
+
+#elif FT_SIZEOF_LONG >= 4
+
+ typedef long FT_Fast;
+ typedef unsigned long FT_UFast;
+
+#endif
+
+
+ /* determine whether we have a 64-bit int type for platforms without */
+ /* Autoconf */
+#if FT_SIZEOF_LONG == 8
+
+ /* FT_LONG64 must be defined if a 64-bit type is available */
+#define FT_LONG64
+#define FT_INT64 long
+
+#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+
+#elif defined( __BORLANDC__ ) /* Borland C++ */
+
+ /* XXXX: We should probably check the value of __BORLANDC__ in order */
+ /* to test the compiler version. */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+
+#elif defined( __WATCOMC__ ) /* Watcom C++ */
+
+ /* Watcom doesn't provide 64-bit data types */
+
+#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
+
+#define FT_LONG64
+#define FT_INT64 long long int
+
+#elif defined( __GNUC__ )
+
+ /* GCC provides the `long long' type */
+#define FT_LONG64
+#define FT_INT64 long long int
+
+#endif /* FT_SIZEOF_LONG == 8 */
+
+
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
+#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
+
+
+ /*************************************************************************/
+ /* */
+ /* A 64-bit data type will create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable their use if */
+ /* __STDC__ is defined. You can however ignore this rule by */
+ /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
+ /* */
+#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#ifdef __STDC__
+
+ /* undefine the 64-bit macros in strict ANSI compilation mode */
+#undef FT_LONG64
+#undef FT_INT64
+
+#endif /* __STDC__ */
+
+#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
+
+
+#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
+
+#define FT_LOCAL( x ) static x
+#define FT_LOCAL_DEF( x ) static x
+
+#else
+
+#ifdef __cplusplus
+#define FT_LOCAL( x ) extern "C" x
+#define FT_LOCAL_DEF( x ) extern "C" x
+#else
+#define FT_LOCAL( x ) extern x
+#define FT_LOCAL_DEF( x ) x
+#endif
+
+#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+
+
+#ifndef FT_BASE
+
+#ifdef __cplusplus
+#define FT_BASE( x ) extern "C" x
+#else
+#define FT_BASE( x ) extern x
+#endif
+
+#endif /* !FT_BASE */
+
+
+#ifndef FT_BASE_DEF
+
+#ifdef __cplusplus
+#define FT_BASE_DEF( x ) extern "C" x
+#else
+#define FT_BASE_DEF( x ) extern x
+#endif
+
+#endif /* !FT_BASE_DEF */
+
+
+#ifndef FT_EXPORT
+
+#ifdef __cplusplus
+#define FT_EXPORT( x ) extern "C" x
+#else
+#define FT_EXPORT( x ) extern x
+#endif
+
+#endif /* !FT_EXPORT */
+
+
+#ifndef FT_EXPORT_DEF
+
+#ifdef __cplusplus
+#define FT_EXPORT_DEF( x ) extern "C" x
+#else
+#define FT_EXPORT_DEF( x ) extern x
+#endif
+
+#endif /* !FT_EXPORT_DEF */
+
+
+#ifndef FT_EXPORT_VAR
+
+#ifdef __cplusplus
+#define FT_EXPORT_VAR( x ) extern "C" x
+#else
+#define FT_EXPORT_VAR( x ) extern x
+#endif
+
+#endif /* !FT_EXPORT_VAR */
+
+ /* The following macros are needed to compile the library with a */
+ /* C++ compiler and with 16bit compilers. */
+ /* */
+
+ /* This is special. Within C++, you must specify `extern "C"' for */
+ /* functions which are used via function pointers, and you also */
+ /* must do that for structures which contain function pointers to */
+ /* assure C linkage -- it's not possible to have (local) anonymous */
+ /* functions which are accessed by (global) function pointers. */
+ /* */
+ /* */
+ /* FT_CALLBACK_DEF is used to _define_ a callback function. */
+ /* */
+ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
+ /* contains pointers to callback functions. */
+ /* */
+ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
+ /* that contains pointers to callback functions. */
+ /* */
+ /* */
+ /* Some 16bit compilers have to redefine these macros to insert */
+ /* the infamous `_cdecl' or `__fastcall' declarations. */
+ /* */
+#ifndef FT_CALLBACK_DEF
+#ifdef __cplusplus
+#define FT_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_CALLBACK_DEF( x ) static x
+#endif
+#endif /* FT_CALLBACK_DEF */
+
+#ifndef FT_CALLBACK_TABLE
+#ifdef __cplusplus
+#define FT_CALLBACK_TABLE extern "C"
+#define FT_CALLBACK_TABLE_DEF extern "C"
+#else
+#define FT_CALLBACK_TABLE extern
+#define FT_CALLBACK_TABLE_DEF /* nothing */
+#endif
+#endif /* FT_CALLBACK_TABLE */
+
+
+FT_END_HEADER
+
+
+#endif /* __FTCONFIG_H__ */
+
+
+/* END */
diff --git a/3party/freetype/builds/vms/ftsystem.c b/3party/freetype/builds/vms/ftsystem.c
new file mode 100644
index 0000000000..fb35967ccf
--- /dev/null
+++ b/3party/freetype/builds/vms/ftsystem.c
@@ -0,0 +1,328 @@
+/***************************************************************************/
+/* */
+/* ftsystem.c */
+/* */
+/* VMS-specific FreeType low-level system interface (body). */
+/* */
+/* Copyright 1996-2001, 2002, 2005, 2010 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* 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. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+ /* we use our special ftconfig.h file, not the standard one */
+#include <ftconfig.h>
+#include FT_INTERNAL_DEBUG_H
+#include FT_SYSTEM_H
+#include FT_ERRORS_H
+#include FT_TYPES_H
+#include FT_INTERNAL_OBJECTS_H
+
+ /* memory-mapping includes and definitions */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <sys/mman.h>
+#ifndef MAP_FILE
+#define MAP_FILE 0x00
+#endif
+
+#ifdef MUNMAP_USES_VOIDP
+#define MUNMAP_ARG_CAST void *
+#else
+#define MUNMAP_ARG_CAST char *
+#endif
+
+#ifdef NEED_MUNMAP_DECL
+
+#ifdef __cplusplus
+ extern "C"
+#else
+ extern
+#endif
+ int
+ munmap( char* addr,
+ int len );
+
+#define MUNMAP_ARG_CAST char *
+
+#endif /* NEED_DECLARATION_MUNMAP */
+
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+ /*************************************************************************/
+ /* */
+ /* MEMORY MANAGEMENT INTERFACE */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_alloc */
+ /* */
+ /* <Description> */
+ /* The memory allocation function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* size :: The requested size in bytes. */
+ /* */
+ /* <Return> */
+ /* The address of newly allocated block. */
+ /* */
+ FT_CALLBACK_DEF( void* )
+ ft_alloc( FT_Memory memory,
+ long size )
+ {
+ FT_UNUSED( memory );
+
+ return malloc( size );
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_realloc */
+ /* */
+ /* <Description> */
+ /* The memory reallocation function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* cur_size :: The current size of the allocated memory block. */
+ /* */
+ /* new_size :: The newly requested size in bytes. */
+ /* */
+ /* block :: The current address of the block in memory. */
+ /* */
+ /* <Return> */
+ /* The address of the reallocated memory block. */
+ /* */
+ FT_CALLBACK_DEF( void* )
+ ft_realloc( FT_Memory memory,
+ long cur_size,
+ long new_size,
+ void* block )
+ {
+ FT_UNUSED( memory );
+ FT_UNUSED( cur_size );
+
+ return realloc( block, new_size );
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_free */
+ /* */
+ /* <Description> */
+ /* The memory release function. */
+ /* */
+ /* <Input> */
+ /* memory :: A pointer to the memory object. */
+ /* */
+ /* block :: The address of block in memory to be freed. */
+ /* */
+ FT_CALLBACK_DEF( void )
+ ft_free( FT_Memory memory,
+ void* block )
+ {
+ FT_UNUSED( memory );
+
+ free( block );
+ }
+
+
+ /*************************************************************************/
+ /* */
+ /* RESOURCE MANAGEMENT INTERFACE */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_io
+
+ /* We use the macro STREAM_FILE for convenience to extract the */
+ /* system-specific stream handle from a given FreeType stream object */
+#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_close_stream */
+ /* */
+ /* <Description> */
+ /* The function to close a stream. */
+ /* */
+ /* <Input> */
+ /* stream :: A pointer to the stream object. */
+ /* */
+ FT_CALLBACK_DEF( void )
+ ft_close_stream( FT_Stream stream )
+ {
+ munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+ stream->base = 0;
+ }
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( FT_Error )
+ FT_Stream_Open( FT_Stream stream,
+ const char* filepathname )
+ {
+ int file;
+ struct stat stat_buf;
+
+
+ if ( !stream )
+ return FT_Err_Invalid_Stream_Handle;
+
+ /* open the file */
+ file = open( filepathname, O_RDONLY );
+ if ( file < 0 )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not open `%s'\n", filepathname ));
+ return FT_Err_Cannot_Open_Resource;
+ }
+
+ if ( fstat( file, &stat_buf ) < 0 )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not `fstat' file `%s'\n", filepathname ));
+ goto Fail_Map;
+ }
+
+ stream->size = stat_buf.st_size;
+ if ( !stream->size )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
+ goto Fail_Map;
+ }
+
+ stream->pos = 0;
+ stream->base = (unsigned char *)mmap( NULL,
+ stream->size,
+ PROT_READ,
+ MAP_FILE | MAP_PRIVATE,
+ file,
+ 0 );
+
+ if ( (long)stream->base == -1 )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
+ goto Fail_Map;
+ }
+
+ close( file );
+
+ stream->descriptor.pointer = stream->base;
+ stream->pathname.pointer = (char*)filepathname;
+
+ stream->close = ft_close_stream;
+ stream->read = 0;
+
+ FT_TRACE1(( "FT_Stream_Open:" ));
+ FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
+ filepathname, stream->size ));
+
+ return FT_Err_Ok;
+
+ Fail_Map:
+ close( file );
+
+ stream->base = NULL;
+ stream->size = 0;
+ stream->pos = 0;
+
+ return FT_Err_Cannot_Open_Stream;
+ }
+
+
+#ifdef FT_DEBUG_MEMORY
+
+ extern FT_Int
+ ft_mem_debug_init( FT_Memory memory );
+
+ extern void
+ ft_mem_debug_done( FT_Memory memory );
+
+#endif
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( FT_Memory )
+ FT_New_Memory( void )
+ {
+ FT_Memory memory;
+
+
+ memory = (FT_Memory)malloc( sizeof ( *memory ) );
+ if ( memory )
+ {
+ memory->user = 0;
+ memory->alloc = ft_alloc;
+ memory->realloc = ft_realloc;
+ memory->free = ft_free;
+#ifdef FT_DEBUG_MEMORY
+ ft_mem_debug_init( memory );
+#endif
+ }
+
+ return memory;
+ }
+
+
+ /* documentation is in ftobjs.h */
+
+ FT_BASE_DEF( void )
+ FT_Done_Memory( FT_Memory memory )
+ {
+#ifdef FT_DEBUG_MEMORY
+ ft_mem_debug_done( memory );
+#endif
+ memory->free( memory, memory );
+ }
+
+
+/* END */
diff --git a/3party/freetype/builds/win32/.gitignore b/3party/freetype/builds/win32/.gitignore
new file mode 100644
index 0000000000..41456a48a1
--- /dev/null
+++ b/3party/freetype/builds/win32/.gitignore
@@ -0,0 +1,5 @@
+# user-specific cache/settings files
+*.opensdf
+*.sdf
+*.suo
+*.user
diff --git a/3party/freetype/builds/win32/detect.mk b/3party/freetype/builds/win32/detect.mk
new file mode 100644
index 0000000000..1906539609
--- /dev/null
+++ b/3party/freetype/builds/win32/detect.mk
@@ -0,0 +1,183 @@
+#
+# FreeType 2 configuration file to detect a Win32 host platform.
+#
+
+
+# Copyright 1996-2000, 2003, 2004, 2006, 2007 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.
+
+
+.PHONY: setup
+
+
+ifeq ($(PLATFORM),ansi)
+
+ # Detecting Windows NT is easy, as the OS variable must be defined and
+ # contains `Windows_NT'. This also works with Windows 2000 and XP.
+ #
+ ifeq ($(OS),Windows_NT)
+
+ PLATFORM := win32
+
+ else
+
+ # Detecting Windows 9X
+
+ # We used to run the `ver' command to see if its output contains the
+ # word `Windows'. If this is true, we are running Windows 95 or later:
+ #
+ # ifdef COMSPEC
+ # # First, check if we have the COMSPEC environment variable, which
+ # # indicates we can use COMMAND.COM's internal commands
+ # is_windows := $(findstring Windows,$(strip $(shell ver)))
+ # endif
+ #
+ # Unfortunately, this also detects the case when one is running
+ # DOS 7.x (the MS-DOS version that lies below Windows) without actually
+ # launching the GUI.
+ #
+ # A better test is to check whether there are both the environment
+ # variables `winbootdir' and `windir'. The first indicates an
+ # underlying DOS 7.x, while the second is set only if win32 is available.
+ #
+ # Note that on Windows NT, such an environment variable will not be seen
+ # from DOS-based tools like DJGPP's make; this is not actually a problem
+ # since NT is detected independently above. But do not try to be clever!
+ #
+ ifdef winbootdir
+ ifdef windir
+
+ PLATFORM := win32
+
+ endif
+ endif
+
+ endif # test NT
+
+endif # test PLATFORM ansi
+
+ifeq ($(PLATFORM),win32)
+
+ DELETE := del
+ CAT := type
+ SEP := $(BACKSLASH)
+
+ # Setting COPY is a bit trickier. Plain COPY on NT will not work
+ # correctly, because it will uppercase 8.3 filenames, creating a
+ # `CONFIG.MK' file which isn't found later on by `make'.
+ # Since we do not want that, we need to force execution of CMD.EXE.
+ # Unfortunately, CMD.EXE is not available on Windows 9X.
+ # So we need to hack.
+ #
+ # Kudos to Eli Zaretskii (DJGPP guru) that helped debug it.
+ # Details are available in threads of the freetype mailing list
+ # (2004-11-11), and then in the devel mailing list (2004-11-20 to -23).
+ #
+ ifeq ($(OS),Windows_NT)
+ COPY := cmd.exe /c copy
+ else
+ COPY := copy
+ endif # test NT
+
+
+ # gcc Makefile by default
+ CONFIG_FILE := w32-gcc.mk
+ ifeq ($(firstword $(CC)),cc)
+ CC := gcc
+ endif
+
+ ifneq ($(findstring list,$(MAKECMDGOALS)),) # test for the "list" target
+ dump_target_list:
+ @echo ÿ
+ @echo $(PROJECT_TITLE) build system -- supported compilers
+ @echo ÿ
+ @echo Several command-line compilers are supported on Win32:
+ @echo ÿ
+ @echo ÿÿmake setupÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿgcc (with Mingw)
+ @echo ÿÿmake setup visualcÿÿÿÿÿÿÿÿÿÿÿÿÿMicrosoft Visual C++
+ @echo ÿÿmake setup bcc32ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBorland C/C++
+ @echo ÿÿmake setup lccÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWin32-LCC
+ @echo ÿÿmake setup intelcÿÿÿÿÿÿÿÿÿÿÿÿÿÿIntel C/C++
+ @echo ÿ
+
+ setup: dump_target_list
+ .PHONY: dump_target_list list
+ else
+ setup: dos_setup
+ endif
+
+ # additionally, we provide hooks for various other compilers
+ #
+ ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
+ CONFIG_FILE := w32-vcc.mk
+ CC := cl
+ visualc: setup
+ .PHONY: visualc
+ endif
+
+ ifneq ($(findstring intelc,$(MAKECMDGOALS)),) # Intel C/C++
+ CONFIG_FILE := w32-intl.mk
+ CC := cl
+ visualc: setup
+ .PHONY: intelc
+ endif
+
+ ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
+ CONFIG_FILE := w32-wat.mk
+ CC := wcc386
+ watcom: setup
+ .PHONY: watcom
+ endif
+
+ ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
+ CONFIG_FILE := w32-icc.mk
+ CC := icc
+ visualage: setup
+ .PHONY: visualage
+ endif
+
+ ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
+ CONFIG_FILE := w32-lcc.mk
+ CC := lcc
+ lcc: setup
+ .PHONY: lcc
+ endif
+
+ ifneq ($(findstring mingw32,$(MAKECMDGOALS)),) # mingw32
+ CONFIG_FILE := w32-mingw32.mk
+ CC := gcc
+ mingw32: setup
+ .PHONY: mingw32
+ endif
+
+ ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++
+ CONFIG_FILE := w32-bcc.mk
+ CC := bcc32
+ bcc32: setup
+ .PHONY: bcc32
+ endif
+
+ ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target
+ CONFIG_FILE := w32-bccd.mk
+ CC := bcc32
+ devel-bcc: setup
+ .PHONY: devel-bcc
+ endif
+
+ ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target
+ CONFIG_FILE := w32-dev.mk
+ CC := gcc
+ devel-gcc: setup
+ .PHONY: devel-gcc
+ endif
+
+endif # test PLATFORM win32
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/ftdebug.c b/3party/freetype/builds/win32/ftdebug.c
new file mode 100644
index 0000000000..d1ca15ac95
--- /dev/null
+++ b/3party/freetype/builds/win32/ftdebug.c
@@ -0,0 +1,214 @@
+/***************************************************************************/
+/* */
+/* ftdebug.c */
+/* */
+/* Debugging and logging component for Win32 (body). */
+/* */
+/* Copyright 1996-2001, 2002, 2005, 2008, 2009 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This component contains various macros and functions used to ease the */
+ /* debugging of the FreeType engine. Its main purpose is in assertion */
+ /* checking, tracing, and error detection. */
+ /* */
+ /* There are now three debugging modes: */
+ /* */
+ /* - trace mode */
+ /* */
+ /* Error and trace messages are sent to the log file (which can be the */
+ /* standard error output). */
+ /* */
+ /* - error mode */
+ /* */
+ /* Only error messages are generated. */
+ /* */
+ /* - release mode: */
+ /* */
+ /* No error message is sent or generated. The code is free from any */
+ /* debugging parts. */
+ /* */
+ /*************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
+
+#ifdef FT_DEBUG_LEVEL_ERROR
+
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <windows.h>
+
+
+ FT_BASE_DEF( void )
+ FT_Message( const char* fmt, ... )
+ {
+ static char buf[8192];
+ va_list ap;
+
+
+ va_start( ap, fmt );
+ vprintf( fmt, ap );
+ /* send the string to the debugger as well */
+ vsprintf( buf, fmt, ap );
+ OutputDebugStringA( buf );
+ va_end( ap );
+ }
+
+
+ FT_BASE_DEF( void )
+ FT_Panic( const char* fmt, ... )
+ {
+ static char buf[8192];
+ va_list ap;
+
+
+ va_start( ap, fmt );
+ vsprintf( buf, fmt, ap );
+ OutputDebugStringA( buf );
+ va_end( ap );
+
+ exit( EXIT_FAILURE );
+ }
+
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+
+ /* array of trace levels, initialized to 0 */
+ int ft_trace_levels[trace_count];
+
+ /* define array of trace toggle names */
+#define FT_TRACE_DEF( x ) #x ,
+
+ static const char* ft_trace_toggles[trace_count + 1] =
+ {
+#include FT_INTERNAL_TRACE_H
+ NULL
+ };
+
+#undef FT_TRACE_DEF
+
+
+ /*************************************************************************/
+ /* */
+ /* Initialize the tracing sub-system. This is done by retrieving the */
+ /* value of the "FT2_DEBUG" environment variable. It must be a list of */
+ /* toggles, separated by spaces, `;' or `,'. Example: */
+ /* */
+ /* "any:3 memory:6 stream:5" */
+ /* */
+ /* This will request that all levels be set to 3, except the trace level */
+ /* for the memory and stream components which are set to 6 and 5, */
+ /* respectively. */
+ /* */
+ /* See the file <freetype/internal/fttrace.h> for details of the */
+ /* available toggle names. */
+ /* */
+ /* The level must be between 0 and 6; 0 means quiet (except for serious */
+ /* runtime errors), and 6 means _very_ verbose. */
+ /* */
+ FT_BASE_DEF( void )
+ ft_debug_init( void )
+ {
+ const char* ft2_debug = getenv( "FT2_DEBUG" );
+
+
+ if ( ft2_debug )
+ {
+ const char* p = ft2_debug;
+ const char* q;
+
+
+ for ( ; *p; p++ )
+ {
+ /* skip leading whitespace and separators */
+ if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
+ continue;
+
+ /* read toggle name, followed by ':' */
+ q = p;
+ while ( *p && *p != ':' )
+ p++;
+
+ if ( *p == ':' && p > q )
+ {
+ int n, i, len = p - q;
+ int level = -1, found = -1;
+
+
+ for ( n = 0; n < trace_count; n++ )
+ {
+ const char* toggle = ft_trace_toggles[n];
+
+
+ for ( i = 0; i < len; i++ )
+ {
+ if ( toggle[i] != q[i] )
+ break;
+ }
+
+ if ( i == len && toggle[i] == 0 )
+ {
+ found = n;
+ break;
+ }
+ }
+
+ /* read level */
+ p++;
+ if ( *p )
+ {
+ level = *p++ - '0';
+ if ( level < 0 || level > 7 )
+ level = -1;
+ }
+
+ if ( found >= 0 && level >= 0 )
+ {
+ if ( found == trace_any )
+ {
+ /* special case for "any" */
+ for ( n = 0; n < trace_count; n++ )
+ ft_trace_levels[n] = level;
+ }
+ else
+ ft_trace_levels[found] = level;
+ }
+ }
+ }
+ }
+ }
+
+
+#else /* !FT_DEBUG_LEVEL_TRACE */
+
+
+ FT_BASE_DEF( void )
+ ft_debug_init( void )
+ {
+ /* nothing */
+ }
+
+
+#endif /* !FT_DEBUG_LEVEL_TRACE */
+
+#endif /* FT_DEBUG_LEVEL_ERROR */
+
+
+/* END */
diff --git a/3party/freetype/builds/win32/vc2005/index.html b/3party/freetype/builds/win32/vc2005/index.html
new file mode 100644
index 0000000000..127aa13129
--- /dev/null
+++ b/3party/freetype/builds/win32/vc2005/index.html
@@ -0,0 +1,37 @@
+<html>
+<header>
+<title>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2005
+</title>
+
+<body>
+<h1>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2005
+</h1>
+
+<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.4.5 sources:</p>
+
+<ul>
+ <pre>
+ freetype245.lib - release build; single threaded
+ freetype245_D.lib - debug build; single threaded
+ freetype245MT.lib - release build; multi-threaded
+ freetype245MT_D.lib - debug build; multi-threaded</pre>
+</ul>
+
+<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
+archives are already stored this way, so no further action is required. If
+you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
+tool to convert the line endings. For example, with <a
+href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR
+file smart CR/LF Conversion</it> option. Alternatively, you may consider
+using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
+around, which specifically deal with this particular problem.
+
+<p>Build directories are placed in the top-level <tt>objs</tt>
+directory.</p>
+
+</body>
+</html>
diff --git a/3party/freetype/builds/win32/vc2008/index.html b/3party/freetype/builds/win32/vc2008/index.html
new file mode 100644
index 0000000000..6e919e88ab
--- /dev/null
+++ b/3party/freetype/builds/win32/vc2008/index.html
@@ -0,0 +1,37 @@
+<html>
+<header>
+<title>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2008
+</title>
+
+<body>
+<h1>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2008
+</h1>
+
+<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.4.5 sources:</p>
+
+<ul>
+ <pre>
+ freetype245.lib - release build; single threaded
+ freetype245_D.lib - debug build; single threaded
+ freetype245MT.lib - release build; multi-threaded
+ freetype245MT_D.lib - debug build; multi-threaded</pre>
+</ul>
+
+<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
+archives are already stored this way, so no further action is required. If
+you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
+tool to convert the line endings. For example, with <a
+href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR
+file smart CR/LF Conversion</it> option. Alternatively, you may consider
+using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
+around, which specifically deal with this particular problem.
+
+<p>Build directories are placed in the top-level <tt>objs</tt>
+directory.</p>
+
+</body>
+</html>
diff --git a/3party/freetype/builds/win32/vc2010/index.html b/3party/freetype/builds/win32/vc2010/index.html
new file mode 100644
index 0000000000..8802ab2c97
--- /dev/null
+++ b/3party/freetype/builds/win32/vc2010/index.html
@@ -0,0 +1,37 @@
+<html>
+<header>
+<title>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2010
+</title>
+
+<body>
+<h1>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2010
+</h1>
+
+<p>This directory contains a project file for Visual C++, named
+<tt>freetype.vcxproj</tt>, and Visual Studio, called <tt>freetype.sln</tt>. It
+compiles the following libraries from the FreeType 2.4.5 sources:</p>
+
+<ul>
+ <pre>
+ freetype245.lib - release build; single threaded
+ freetype245_D.lib - debug build; single threaded
+ freetype245MT.lib - release build; multi-threaded
+ freetype245MT_D.lib - debug build; multi-threaded</pre>
+</ul>
+
+<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
+archives are already stored this way, so no further action is required. If
+you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
+tool to convert the line endings. For example, with <a
+href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR
+file smart CR/LF Conversion</it> option. Alternatively, you may consider
+using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
+around, which specifically deal with this particular problem.
+
+<p>Build directories are placed in the top-level <tt>objs</tt>
+directory.</p>
+
+</body>
+</html>
diff --git a/3party/freetype/builds/win32/visualc/freetype.dsp b/3party/freetype/builds/win32/visualc/freetype.dsp
new file mode 100644
index 0000000000..a2d3ac8771
--- /dev/null
+++ b/3party/freetype/builds/win32/visualc/freetype.dsp
@@ -0,0 +1,400 @@
+# Microsoft Developer Studio Project File - Name="freetype" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=freetype - Win32 Debug Singlethreaded
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "freetype.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Singlethreaded"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "freetype - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Debug Multithreaded" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Release Multithreaded" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Release Singlethreaded" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Debug Singlethreaded" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "freetype - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\objs\release"
+# PROP Intermediate_Dir "..\..\..\objs\release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /MD /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /c
+# SUBTRACT CPP /nologo /Z<none> /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245.lib"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\objs\debug"
+# PROP Intermediate_Dir "..\..\..\objs\debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /MDd /Za /W4 /GX /Z7 /Od /I "..\..\..\include" /D "_DEBUG" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /GZ /c
+# SUBTRACT CPP /nologo /X /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245_D.lib"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "freetype___Win32_Debug_Multithreaded"
+# PROP BASE Intermediate_Dir "freetype___Win32_Debug_Multithreaded"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\objs\debug_mt"
+# PROP Intermediate_Dir "..\..\..\objs\debug_mt"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c
+# SUBTRACT BASE CPP /X
+# ADD CPP /MTd /Za /W4 /GX /Z7 /Od /I "..\..\..\include" /D "_DEBUG" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /GZ /c
+# SUBTRACT CPP /nologo /X /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"lib\freetype245_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245MT_D.lib"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "freetype___Win32_Release_Multithreaded"
+# PROP BASE Intermediate_Dir "freetype___Win32_Release_Multithreaded"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\objs\release_mt"
+# PROP Intermediate_Dir "..\..\..\objs\release_mt"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c
+# ADD CPP /MT /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /c
+# SUBTRACT CPP /nologo /Z<none> /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"lib\freetype245.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245MT.lib"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "freetype___Win32_Release_Singlethreaded"
+# PROP BASE Intermediate_Dir "freetype___Win32_Release_Singlethreaded"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\objs\release_st"
+# PROP Intermediate_Dir "..\..\..\objs\release_st"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
+# SUBTRACT BASE CPP /YX
+# ADD CPP /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /c
+# SUBTRACT CPP /nologo /Z<none> /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype245.lib"
+# ADD LIB32 /out:"..\..\..\objs\freetype245ST.lib"
+# SUBTRACT LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "freetype___Win32_Debug_Singlethreaded"
+# PROP BASE Intermediate_Dir "freetype___Win32_Debug_Singlethreaded"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\objs\debug_st"
+# PROP Intermediate_Dir "..\..\..\objs\debug_st"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /Za /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
+# SUBTRACT BASE CPP /X /YX
+# ADD CPP /Za /W4 /GX /Z7 /Od /I "..\..\..\include" /D "_DEBUG" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /GZ /c
+# SUBTRACT CPP /nologo /X /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype245_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245ST_D.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "freetype - Win32 Release"
+# Name "freetype - Win32 Debug"
+# Name "freetype - Win32 Debug Multithreaded"
+# Name "freetype - Win32 Release Multithreaded"
+# Name "freetype - Win32 Release Singlethreaded"
+# Name "freetype - Win32 Debug Singlethreaded"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\src\autofit\autofit.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\bdf\bdf.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\cff\cff.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbase.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbbox.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbdf.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbitmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftfstype.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftgasp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\cache\ftcache.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\ftdebug.c
+# ADD CPP /Ze
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftglyph.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftgxval.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\gzip\ftgzip.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftinit.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\lzw\ftlzw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftmm.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftotval.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftpfr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftstroke.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftsynth.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftsystem.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\fttype1.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftwinfnt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftxf86.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\pcf\pcf.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\pfr\pfr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\psaux\psaux.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\pshinter\pshinter.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\psnames\psmodule.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\raster\raster.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\sfnt\sfnt.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\smooth\smooth.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\truetype\truetype.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\type1\type1.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\cid\type1cid.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\type42\type42.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\winfonts\winfnt.c
+# SUBTRACT CPP /Fr
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\include\ft2build.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftheader.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftmodule.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftoption.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftstdlib.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/3party/freetype/builds/win32/visualc/freetype.dsw b/3party/freetype/builds/win32/visualc/freetype.dsw
new file mode 100644
index 0000000000..b149e769b5
--- /dev/null
+++ b/3party/freetype/builds/win32/visualc/freetype.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "freetype"=.\freetype.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/3party/freetype/builds/win32/visualc/index.html b/3party/freetype/builds/win32/visualc/index.html
new file mode 100644
index 0000000000..b7e5a191a2
--- /dev/null
+++ b/3party/freetype/builds/win32/visualc/index.html
@@ -0,0 +1,37 @@
+<html>
+<header>
+<title>
+ FreeType&nbsp;2 Project Files for Visual&nbsp;C++ and VS.NET&nbsp;2005
+</title>
+
+<body>
+<h1>
+ FreeType&nbsp;2 Project Files for Visual&nbsp;C++ and VS.NET&nbsp;2005
+</h1>
+
+<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.4.5 sources:</p>
+
+<ul>
+ <pre>
+ freetype245.lib - release build; single threaded
+ freetype245_D.lib - debug build; single threaded
+ freetype245MT.lib - release build; multi-threaded
+ freetype245MT_D.lib - debug build; multi-threaded</pre>
+</ul>
+
+<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
+archives are already stored this way, so no further action is required. If
+you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
+tool to convert the line endings. For example, with <a
+href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR
+file smart CR/LF Conversion</it> option. Alternatively, you may consider
+using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
+around, which specifically deal with this particular problem.
+
+<p>Build directories are placed in the top-level <tt>objs</tt>
+directory.</p>
+
+</body>
+</html>
diff --git a/3party/freetype/builds/win32/visualce/freetype.dsp b/3party/freetype/builds/win32/visualce/freetype.dsp
new file mode 100644
index 0000000000..a2d3ac8771
--- /dev/null
+++ b/3party/freetype/builds/win32/visualce/freetype.dsp
@@ -0,0 +1,400 @@
+# Microsoft Developer Studio Project File - Name="freetype" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=freetype - Win32 Debug Singlethreaded
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "freetype.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "freetype.mak" CFG="freetype - Win32 Debug Singlethreaded"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "freetype - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Debug Multithreaded" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Release Multithreaded" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Release Singlethreaded" (based on "Win32 (x86) Static Library")
+!MESSAGE "freetype - Win32 Debug Singlethreaded" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "freetype - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\objs\release"
+# PROP Intermediate_Dir "..\..\..\objs\release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /MD /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /c
+# SUBTRACT CPP /nologo /Z<none> /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245.lib"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\objs\debug"
+# PROP Intermediate_Dir "..\..\..\objs\debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /MDd /Za /W4 /GX /Z7 /Od /I "..\..\..\include" /D "_DEBUG" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /GZ /c
+# SUBTRACT CPP /nologo /X /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245_D.lib"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "freetype___Win32_Debug_Multithreaded"
+# PROP BASE Intermediate_Dir "freetype___Win32_Debug_Multithreaded"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\objs\debug_mt"
+# PROP Intermediate_Dir "..\..\..\objs\debug_mt"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c
+# SUBTRACT BASE CPP /X
+# ADD CPP /MTd /Za /W4 /GX /Z7 /Od /I "..\..\..\include" /D "_DEBUG" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /GZ /c
+# SUBTRACT CPP /nologo /X /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"lib\freetype245_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245MT_D.lib"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "freetype___Win32_Release_Multithreaded"
+# PROP BASE Intermediate_Dir "freetype___Win32_Release_Multithreaded"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\objs\release_mt"
+# PROP Intermediate_Dir "..\..\..\objs\release_mt"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c
+# ADD CPP /MT /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /c
+# SUBTRACT CPP /nologo /Z<none> /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"lib\freetype245.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245MT.lib"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "freetype___Win32_Release_Singlethreaded"
+# PROP BASE Intermediate_Dir "freetype___Win32_Release_Singlethreaded"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\objs\release_st"
+# PROP Intermediate_Dir "..\..\..\objs\release_st"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /Za /W4 /GX /Zi /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
+# SUBTRACT BASE CPP /YX
+# ADD CPP /Za /W4 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /c
+# SUBTRACT CPP /nologo /Z<none> /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype245.lib"
+# ADD LIB32 /out:"..\..\..\objs\freetype245ST.lib"
+# SUBTRACT LIB32 /nologo
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "freetype___Win32_Debug_Singlethreaded"
+# PROP BASE Intermediate_Dir "freetype___Win32_Debug_Singlethreaded"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\objs\debug_st"
+# PROP Intermediate_Dir "..\..\..\objs\debug_st"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /Za /W4 /Gm /GX /Zi /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
+# SUBTRACT BASE CPP /X /YX
+# ADD CPP /Za /W4 /GX /Z7 /Od /I "..\..\..\include" /D "_DEBUG" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT2_BUILD_LIBRARY" /FD /GZ /c
+# SUBTRACT CPP /nologo /X /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype245_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype245ST_D.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "freetype - Win32 Release"
+# Name "freetype - Win32 Debug"
+# Name "freetype - Win32 Debug Multithreaded"
+# Name "freetype - Win32 Release Multithreaded"
+# Name "freetype - Win32 Release Singlethreaded"
+# Name "freetype - Win32 Debug Singlethreaded"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\src\autofit\autofit.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\bdf\bdf.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\cff\cff.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbase.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbbox.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbdf.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbitmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftfstype.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftgasp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\cache\ftcache.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\ftdebug.c
+# ADD CPP /Ze
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftglyph.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftgxval.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\gzip\ftgzip.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftinit.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\lzw\ftlzw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftmm.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftotval.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftpfr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftstroke.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftsynth.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftsystem.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\fttype1.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftwinfnt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftxf86.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\pcf\pcf.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\pfr\pfr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\psaux\psaux.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\pshinter\pshinter.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\psnames\psmodule.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\raster\raster.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\sfnt\sfnt.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\smooth\smooth.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\truetype\truetype.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\type1\type1.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\cid\type1cid.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\type42\type42.c
+# SUBTRACT CPP /Fr
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\winfonts\winfnt.c
+# SUBTRACT CPP /Fr
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\include\ft2build.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftconfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftheader.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftmodule.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftoption.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\freetype\config\ftstdlib.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/3party/freetype/builds/win32/visualce/freetype.dsw b/3party/freetype/builds/win32/visualce/freetype.dsw
new file mode 100644
index 0000000000..b149e769b5
--- /dev/null
+++ b/3party/freetype/builds/win32/visualce/freetype.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "freetype"=.\freetype.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/3party/freetype/builds/win32/visualce/index.html b/3party/freetype/builds/win32/visualce/index.html
new file mode 100644
index 0000000000..293488a632
--- /dev/null
+++ b/3party/freetype/builds/win32/visualce/index.html
@@ -0,0 +1,47 @@
+<html>
+<header>
+<title>
+ FreeType&nbsp;2 Project Files for Visual&nbsp;C++ and VS.NET&nbsp;2005
+ (Pocket PC)
+</title>
+
+<body>
+<h1>
+ FreeType&nbsp;2 Project Files for Visual&nbsp;C++ and VS.NET&nbsp;2005
+ (Pocket PC)
+</h1>
+
+<p>This directory contains project files for Visual C++, named
+<tt>freetype.dsp</tt>, and Visual Studio, called <tt>freetype.sln</tt> for
+the following targets:
+
+<ul>
+ <li>PPC/SP 2003 (Pocket PC 2003)</li>
+ <li>PPC/SP WM5 (Windows Mobile 5)</li>
+ <li>PPC/SP WM6 (Windows Mobile 6)</li>
+</ul>
+
+It compiles the following libraries from the FreeType 2.4.5 sources:</p>
+
+<ul>
+ <pre>
+ freetype245.lib - release build; single threaded
+ freetype245_D.lib - debug build; single threaded
+ freetype245MT.lib - release build; multi-threaded
+ freetype245MT_D.lib - debug build; multi-threaded</pre>
+</ul>
+
+<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
+archives are already stored this way, so no further action is required. If
+you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
+tool to convert the line endings. For example, with <a
+href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR
+file smart CR/LF Conversion</it> option. Alternatively, you may consider
+using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
+around, which specifically deal with this particular problem.
+
+<p>Build directories are placed in the top-level <tt>objs</tt>
+directory.</p>
+
+</body>
+</html>
diff --git a/3party/freetype/builds/win32/w32-bcc.mk b/3party/freetype/builds/win32/w32-bcc.mk
new file mode 100644
index 0000000000..a9f48fc60b
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-bcc.mk
@@ -0,0 +1,28 @@
+#
+# FreeType 2 Borland C++ on Win32
+#
+
+
+# Copyright 1996-2000, 2003, 2005 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.
+
+# default definitions of the export list
+#
+EXPORTS_LIST = $(OBJ_DIR)/freetype.def
+EXPORTS_OPTIONS = /DEF:$(EXPORTS_LIST)
+APINAMES_OPTIONS := -dfreetype.dll -wB
+
+include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/compiler/bcc.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/w32-bccd.mk b/3party/freetype/builds/win32/w32-bccd.mk
new file mode 100644
index 0000000000..51b15d9032
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-bccd.mk
@@ -0,0 +1,26 @@
+#
+# FreeType 2 Borland C++ on Win32 + debugging
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+DEVEL_DIR := $(TOP_DIR)/devel
+
+include $(TOP_DIR)/builds/win32/win32-def.mk
+
+include $(TOP_DIR)/builds/compiler/bcc-dev.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/w32-dev.mk b/3party/freetype/builds/win32/w32-dev.mk
new file mode 100644
index 0000000000..00cacb0f67
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-dev.mk
@@ -0,0 +1,32 @@
+#
+# FreeType 2 configuration rules for Win32 + GCC
+#
+# Development version without optimizations.
+#
+
+
+# Copyright 1996-2000, 2003, 2006 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.
+
+
+# NOTE: This version requires that GNU Make is invoked from the Windows
+# Shell (_not_ Cygwin BASH)!
+#
+
+DEVEL_DIR := $(TOP_DIR)/devel
+
+include $(TOP_DIR)/builds/win32/win32-def.mk
+
+include $(TOP_DIR)/builds/compiler/gcc-dev.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/w32-gcc.mk b/3party/freetype/builds/win32/w32-gcc.mk
new file mode 100644
index 0000000000..580afc5c94
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-gcc.mk
@@ -0,0 +1,31 @@
+#
+# FreeType 2 configuration rules for Win32 + GCC
+#
+
+
+# Copyright 1996-2000, 2003, 2005 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.
+
+# default definitions of the export list
+#
+EXPORTS_LIST = $(OBJ_DIR)/freetype.def
+EXPORTS_OPTIONS = $(EXPORTS_LIST)
+APINAMES_OPTIONS := -dfreetype.dll -w
+
+# include Win32-specific definitions
+include $(TOP_DIR)/builds/win32/win32-def.mk
+
+# include gcc-specific definitions
+include $(TOP_DIR)/builds/compiler/gcc.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/w32-icc.mk b/3party/freetype/builds/win32/w32-icc.mk
new file mode 100644
index 0000000000..8819a1f49f
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-icc.mk
@@ -0,0 +1,28 @@
+#
+# FreeType 2 configuration rules for Win32 + IBM Visual Age C++
+#
+
+
+# Copyright 1996-2000, 2005 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.
+
+# default definitions of the export list
+#
+EXPORTS_LIST = $(OBJ_DIR)/freetype.def
+EXPORTS_OPTIONS = /DEF:$(EXPORTS_LIST)
+APINAMES_OPTIONS := -dfreetype.dll -w
+
+include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/compiler/visualage.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/w32-intl.mk b/3party/freetype/builds/win32/w32-intl.mk
new file mode 100644
index 0000000000..ae62e1bcda
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-intl.mk
@@ -0,0 +1,28 @@
+#
+# FreeType 2 configuration rules for Intel C/C++ on Win32
+#
+
+
+# Copyright 1996-2000, 2003, 2005 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.
+
+# default definitions of the export list
+#
+EXPORTS_LIST = $(OBJ_DIR)/freetype.def
+EXPORTS_OPTIONS = /DEF:$(EXPORTS_LIST)
+APINAMES_OPTIONS := -dfreetype.dll -w
+
+include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/compiler/intelc.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/w32-lcc.mk b/3party/freetype/builds/win32/w32-lcc.mk
new file mode 100644
index 0000000000..a147c4cb61
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-lcc.mk
@@ -0,0 +1,24 @@
+#
+# FreeType 2 configuration rules for Win32 + LCC
+#
+
+
+# Copyright 1996-2000 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.
+
+
+SEP := /
+include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/compiler/win-lcc.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+# EOF
+
diff --git a/3party/freetype/builds/win32/w32-mingw32.mk b/3party/freetype/builds/win32/w32-mingw32.mk
new file mode 100644
index 0000000000..04e9e211c0
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-mingw32.mk
@@ -0,0 +1,33 @@
+#
+# FreeType 2 configuration rules for mingw32
+#
+
+
+# Copyright 1996-2000, 2003, 2005 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.
+
+# default definitions of the export list
+#
+EXPORTS_LIST = $(OBJ_DIR)/freetype.def
+EXPORTS_OPTIONS = $(EXPORTS_LIST)
+APINAMES_OPTIONS := -dfreetype.dll -w
+
+# include Win32-specific definitions
+include $(TOP_DIR)/builds/win32/win32-def.mk
+
+LIBRARY := lib$(PROJECT)
+
+# include gcc-specific definitions
+include $(TOP_DIR)/builds/compiler/gcc.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/w32-vcc.mk b/3party/freetype/builds/win32/w32-vcc.mk
new file mode 100644
index 0000000000..7fb8794865
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-vcc.mk
@@ -0,0 +1,28 @@
+#
+# FreeType 2 Visual C++ on Win32
+#
+
+
+# Copyright 1996-2000, 2003, 2005 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.
+
+# definitions of the export list
+#
+EXPORTS_LIST = $(OBJ_DIR)/freetype.def
+EXPORTS_OPTIONS = /DEF:$(EXPORTS_LIST)
+APINAMES_OPTIONS := -dfreetype.dll -w
+
+include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/compiler/visualc.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/w32-wat.mk b/3party/freetype/builds/win32/w32-wat.mk
new file mode 100644
index 0000000000..820b817358
--- /dev/null
+++ b/3party/freetype/builds/win32/w32-wat.mk
@@ -0,0 +1,28 @@
+#
+# FreeType 2 configuration rules for Watcom C/C++
+#
+
+
+# Copyright 1996-2000, 2003, 2005 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.
+
+# redefine export symbol definitions
+#
+EXPORTS_LIST = $(OBJ_DIR)/watcom-ftexports.lbc
+EXPORTS_OPTIONS = -\"export @$(EXPORTS_LIST)\"-
+APINAMES_OPTIONS := -wW
+
+include $(TOP_DIR)/builds/win32/win32-def.mk
+include $(TOP_DIR)/builds/compiler/watcom.mk
+
+# include linking instructions
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/3party/freetype/builds/win32/win32-def.mk b/3party/freetype/builds/win32/win32-def.mk
new file mode 100644
index 0000000000..e6ae31c3b2
--- /dev/null
+++ b/3party/freetype/builds/win32/win32-def.mk
@@ -0,0 +1,47 @@
+#
+# FreeType 2 Win32 specific definitions
+#
+
+
+# Copyright 1996-2000, 2003, 2005, 2006 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.
+
+
+DELETE := del
+CAT := type
+SEP := $(strip \ )
+BUILD_DIR := $(TOP_DIR)/builds/win32
+PLATFORM := win32
+
+# The executable file extension (for tools). NOTE: WE INCLUDE THE DOT HERE !!
+#
+E := .exe
+E_BUILD := .exe
+
+
+# The directory where all library files are placed.
+#
+# By default, this is the same as $(OBJ_DIR); however, this can be changed
+# to suit particular needs.
+#
+LIB_DIR := $(OBJ_DIR)
+
+
+# The name of the final library file. Note that the DOS-specific Makefile
+# uses a shorter (8.3) name.
+#
+LIBRARY := $(PROJECT)
+
+
+# The NO_OUTPUT macro is used to ignore the output of commands.
+#
+NO_OUTPUT = 2> nul
+
+
+# EOF
diff --git a/3party/freetype/builds/wince/ftdebug.c b/3party/freetype/builds/wince/ftdebug.c
new file mode 100644
index 0000000000..272415d3d0
--- /dev/null
+++ b/3party/freetype/builds/wince/ftdebug.c
@@ -0,0 +1,236 @@
+/***************************************************************************/
+/* */
+/* ftdebug.c */
+/* */
+/* Debugging and logging component for WinCE (body). */
+/* */
+/* Copyright 1996-2001, 2002, 2005, 2008, 2009 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This component contains various macros and functions used to ease the */
+ /* debugging of the FreeType engine. Its main purpose is in assertion */
+ /* checking, tracing, and error detection. */
+ /* */
+ /* There are now three debugging modes: */
+ /* */
+ /* - trace mode */
+ /* */
+ /* Error and trace messages are sent to the log file (which can be the */
+ /* standard error output). */
+ /* */
+ /* - error mode */
+ /* */
+ /* Only error messages are generated. */
+ /* */
+ /* - release mode: */
+ /* */
+ /* No error message is sent or generated. The code is free from any */
+ /* debugging parts. */
+ /* */
+ /*************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
+
+#ifdef FT_DEBUG_LEVEL_ERROR
+
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <windows.h>
+
+
+ void
+ OutputDebugStringEx( const char* str )
+ {
+ static WCHAR buf[8192];
+
+
+ int sz = MultiByteToWideChar( CP_ACP, 0, str, -1, buf,
+ sizeof ( buf ) / sizeof ( *buf ) );
+ if ( !sz )
+ lstrcpyW( buf, L"OutputDebugStringEx: MultiByteToWideChar failed" );
+
+ OutputDebugStringW( buf );
+ }
+
+
+ FT_BASE_DEF( void )
+ FT_Message( const char* fmt, ... )
+ {
+ static char buf[8192];
+ va_list ap;
+
+
+ va_start( ap, fmt );
+ vprintf( fmt, ap );
+ /* send the string to the debugger as well */
+ vsprintf( buf, fmt, ap );
+ OutputDebugStringEx( buf );
+ va_end( ap );
+ }
+
+
+ FT_BASE_DEF( void )
+ FT_Panic( const char* fmt, ... )
+ {
+ static char buf[8192];
+ va_list ap;
+
+
+ va_start( ap, fmt );
+ vsprintf( buf, fmt, ap );
+ OutputDebugStringEx( buf );
+ va_end( ap );
+
+ exit( EXIT_FAILURE );
+ }
+
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+
+ /* array of trace levels, initialized to 0 */
+ int ft_trace_levels[trace_count];
+
+ /* define array of trace toggle names */
+#define FT_TRACE_DEF( x ) #x ,
+
+ static const char* ft_trace_toggles[trace_count + 1] =
+ {
+#include FT_INTERNAL_TRACE_H
+ NULL
+ };
+
+#undef FT_TRACE_DEF
+
+
+ /*************************************************************************/
+ /* */
+ /* Initialize the tracing sub-system. This is done by retrieving the */
+ /* value of the "FT2_DEBUG" environment variable. It must be a list of */
+ /* toggles, separated by spaces, `;' or `,'. Example: */
+ /* */
+ /* "any:3 memory:6 stream:5" */
+ /* */
+ /* This will request that all levels be set to 3, except the trace level */
+ /* for the memory and stream components which are set to 6 and 5, */
+ /* respectively. */
+ /* */
+ /* See the file <freetype/internal/fttrace.h> for details of the */
+ /* available toggle names. */
+ /* */
+ /* The level must be between 0 and 6; 0 means quiet (except for serious */
+ /* runtime errors), and 6 means _very_ verbose. */
+ /* */
+ FT_BASE_DEF( void )
+ ft_debug_init( void )
+ {
+ /* Windows Mobile doesn't have environment API: */
+ /* GetEnvironmentStrings, GetEnvironmentVariable, getenv. */
+ /* */
+ /* FIXME!!! How to set debug mode? */
+
+ /* const char* ft2_debug = getenv( "FT2_DEBUG" ); */
+
+ const char* ft2_debug = 0;
+
+
+ if ( ft2_debug )
+ {
+ const char* p = ft2_debug;
+ const char* q;
+
+
+ for ( ; *p; p++ )
+ {
+ /* skip leading whitespace and separators */
+ if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
+ continue;
+
+ /* read toggle name, followed by ':' */
+ q = p;
+ while ( *p && *p != ':' )
+ p++;
+
+ if ( *p == ':' && p > q )
+ {
+ int n, i, len = p - q;
+ int level = -1, found = -1;
+
+
+ for ( n = 0; n < trace_count; n++ )
+ {
+ const char* toggle = ft_trace_toggles[n];
+
+
+ for ( i = 0; i < len; i++ )
+ {
+ if ( toggle[i] != q[i] )
+ break;
+ }
+
+ if ( i == len && toggle[i] == 0 )
+ {
+ found = n;
+ break;
+ }
+ }
+
+ /* read level */
+ p++;
+ if ( *p )
+ {
+ level = *p++ - '0';
+ if ( level < 0 || level > 7 )
+ level = -1;
+ }
+
+ if ( found >= 0 && level >= 0 )
+ {
+ if ( found == trace_any )
+ {
+ /* special case for "any" */
+ for ( n = 0; n < trace_count; n++ )
+ ft_trace_levels[n] = level;
+ }
+ else
+ ft_trace_levels[found] = level;
+ }
+ }
+ }
+ }
+ }
+
+
+#else /* !FT_DEBUG_LEVEL_TRACE */
+
+
+ FT_BASE_DEF( void )
+ ft_debug_init( void )
+ {
+ /* nothing */
+ }
+
+
+#endif /* !FT_DEBUG_LEVEL_TRACE */
+
+#endif /* FT_DEBUG_LEVEL_ERROR */
+
+
+/* END */
diff --git a/3party/freetype/builds/wince/vc2005-ce/index.html b/3party/freetype/builds/wince/vc2005-ce/index.html
new file mode 100644
index 0000000000..42b6d19ac1
--- /dev/null
+++ b/3party/freetype/builds/wince/vc2005-ce/index.html
@@ -0,0 +1,47 @@
+<html>
+<header>
+<title>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2005
+ (Pocket PC)
+</title>
+
+<body>
+<h1>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2005
+ (Pocket PC)
+</h1>
+
+<p>This directory contains project files for Visual C++, named
+<tt>freetype.vcproj</tt>, and Visual Studio, called <tt>freetype.sln</tt> for
+the following targets:
+
+<ul>
+ <li>PPC/SP 2003 (Pocket PC 2003)</li>
+ <li>PPC/SP WM5 (Windows Mobile 5)</li>
+ <li>PPC/SP WM6 (Windows Mobile 6)</li>
+</ul>
+
+It compiles the following libraries from the FreeType 2.4.5 sources:</p>
+
+<ul>
+ <pre>
+ freetype245.lib - release build; single threaded
+ freetype245_D.lib - debug build; single threaded
+ freetype245MT.lib - release build; multi-threaded
+ freetype245MT_D.lib - debug build; multi-threaded</pre>
+</ul>
+
+<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
+archives are already stored this way, so no further action is required. If
+you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
+tool to convert the line endings. For example, with <a
+href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR
+file smart CR/LF Conversion</it> option. Alternatively, you may consider
+using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
+around, which specifically deal with this particular problem.
+
+<p>Build directories are placed in the top-level <tt>objs</tt>
+directory.</p>
+
+</body>
+</html>
diff --git a/3party/freetype/builds/wince/vc2008-ce/index.html b/3party/freetype/builds/wince/vc2008-ce/index.html
new file mode 100644
index 0000000000..ef749b3218
--- /dev/null
+++ b/3party/freetype/builds/wince/vc2008-ce/index.html
@@ -0,0 +1,47 @@
+<html>
+<header>
+<title>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2008
+ (Pocket PC)
+</title>
+
+<body>
+<h1>
+ FreeType&nbsp;2 Project Files for VS.NET&nbsp;2008
+ (Pocket PC)
+</h1>
+
+<p>This directory contains project files for Visual C++, named
+<tt>freetype.dsp</tt>, and Visual Studio, called <tt>freetype.sln</tt> for
+the following targets:
+
+<ul>
+ <li>PPC/SP 2003 (Pocket PC 2003)</li>
+ <li>PPC/SP WM5 (Windows Mobile 5)</li>
+ <li>PPC/SP WM6 (Windows Mobile 6)</li>
+</ul>
+
+It compiles the following libraries from the FreeType 2.4.5 sources:</p>
+
+<ul>
+ <pre>
+ freetype245.lib - release build; single threaded
+ freetype245_D.lib - debug build; single threaded
+ freetype245MT.lib - release build; multi-threaded
+ freetype245MT_D.lib - debug build; multi-threaded</pre>
+</ul>
+
+<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
+archives are already stored this way, so no further action is required. If
+you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
+tool to convert the line endings. For example, with <a
+href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR
+file smart CR/LF Conversion</it> option. Alternatively, you may consider
+using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
+around, which specifically deal with this particular problem.
+
+<p>Build directories are placed in the top-level <tt>objs</tt>
+directory.</p>
+
+</body>
+</html>
diff --git a/3party/freetype/configure b/3party/freetype/configure
new file mode 100755
index 0000000000..b397556241
--- /dev/null
+++ b/3party/freetype/configure
@@ -0,0 +1,125 @@
+#!/bin/sh
+#
+# Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, 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.
+#
+#
+# Call the `configure' script located in `builds/unix'.
+#
+
+rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk
+
+if test "x$GNUMAKE" = x; then
+ GNUMAKE=make
+fi
+
+if test -z "`$GNUMAKE -v 2>/dev/null | grep GNU`"; then
+ if test -z "`$GNUMAKE -v 2>/dev/null | grep makepp`"; then
+ echo "GNU make (>= 3.80) or makepp (>= 1.19) is required to build FreeType2." >&2
+ echo "Please try" >&2
+ echo " \`GNUMAKE=<GNU make command name> $0'." >&2
+ echo "or >&2"
+ echo " \`GNUMAKE=\"makepp --norc-substitution\" $0'." >&2
+ exit 1
+ fi
+fi
+
+# Get `dirname' functionality. This is taken and adapted from autoconf's
+# m4sh.m4 (_AS_EXPR_PREPARE, AS_DIRNAME_EXPR, and AS_DIRNAME_SED).
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ ft_expr=expr
+else
+ ft_expr=false
+fi
+
+ft2_dir=`(dirname "$0") 2>/dev/null ||
+ $ft_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+ echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+abs_curr_dir=`pwd`
+abs_ft2_dir=`cd "$ft2_dir" && pwd`
+
+# `--srcdir=' option can override abs_ft2_dir
+
+if test $# -gt 0; then
+ for x in "$@"; do
+ case x"$x" in
+ x--srcdir=*)
+ abs_ft2_dir=`echo $x | sed 's/^--srcdir=//'` ;;
+ esac
+ done
+fi
+
+# build a dummy Makefile if we are not building in the source tree;
+# we use inodes to avoid issues with symbolic links
+inode_src=`ls -id $abs_ft2_dir | awk '{print $1}'`
+inode_dst=`ls -id $abs_curr_dir | awk '{print $1}'`
+
+if test $inode_src -ne $inode_dst; then
+ if test ! -d reference; then
+ mkdir reference
+ fi
+ if test ! -r $abs_curr_dir/modules.cfg; then
+ echo "Copying \`modules.cfg'"
+ cp $abs_ft2_dir/modules.cfg $abs_curr_dir
+ fi
+ echo "Generating \`Makefile'"
+ echo "TOP_DIR := $abs_ft2_dir" > Makefile
+ echo "OBJ_DIR := $abs_curr_dir" >> Makefile
+ echo "OBJ_BUILD := \$(OBJ_DIR)" >> Makefile
+ echo "DOC_DIR := \$(OBJ_DIR)/reference" >> Makefile
+ echo "FT_LIBTOOL_DIR := \$(OBJ_DIR)" >> Makefile
+ echo "ifndef FT2DEMOS" >> Makefile
+ echo " include \$(TOP_DIR)/Makefile" >> Makefile
+ echo "else" >> Makefile
+ echo " TOP_DIR_2 := \$(TOP_DIR)/../ft2demos" >> Makefile
+ echo " PROJECT := freetype" >> Makefile
+ echo " CONFIG_MK := \$(OBJ_DIR)/config.mk" >> Makefile
+ echo " include \$(TOP_DIR_2)/Makefile" >> Makefile
+ echo "endif" >> Makefile
+fi
+
+# call make
+
+CFG=
+# work around zsh bug which doesn't like `${1+"$@"}'
+case $# in
+0) ;;
+*) for x in "$@"; do
+ case x"$x" in
+ x--srcdir=* ) CFG="$CFG '$x'/builds/unix" ;;
+ *) CFG="$CFG '$x'" ;;
+ esac
+ done ;;
+esac
+CFG=$CFG $GNUMAKE setup unix
+
+# eof
diff --git a/3party/freetype/custom/ftmodule.h b/3party/freetype/custom/ftmodule.h
deleted file mode 100644
index 76d271a74b..0000000000
--- a/3party/freetype/custom/ftmodule.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file registers the FreeType modules compiled into the library.
- *
- * If you use GNU make, this file IS NOT USED! Instead, it is created in
- * the objects directory (normally `<topdir>/objs/') based on information
- * from `<topdir>/modules.cfg'.
- *
- * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile
- * FreeType without GNU make.
- *
- */
-
-FT_USE_MODULE( FT_Module_Class, autofit_module_class )
-FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
-FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
-FT_USE_MODULE( FT_Module_Class, psaux_module_class )
-FT_USE_MODULE( FT_Module_Class, psnames_module_class )
-FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
-FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
-FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
-FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
-
-/* EOF */
diff --git a/3party/freetype/custom/ft2build.h b/3party/freetype/devel/ft2build.h
index b43df64936..c1d38c35ae 100644
--- a/3party/freetype/custom/ft2build.h
+++ b/3party/freetype/devel/ft2build.h
@@ -5,7 +5,7 @@
/* FreeType 2 build and setup macros. */
/* (Generic version) */
/* */
-/* Copyright 1996-2001, 2006 by */
+/* Copyright 1996-2001, 2003, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,26 +17,25 @@
/***************************************************************************/
- /*************************************************************************/
- /* */
- /* This file corresponds to the default `ft2build.h' file for */
- /* FreeType 2. It uses the `freetype' include root. */
- /* */
- /* Note that specific platforms might use a different configuration. */
- /* See builds/unix/ft2unix.h for an example. */
- /* */
- /*************************************************************************/
+ /*
+ * This is a development version of <ft2build.h> that is used
+ * to build the library in debug mode. Its only difference with
+ * the reference is that it forces the use of the local `ftoption.h'
+ * which contains different settings for all configuration macros.
+ *
+ * To use it, you must define the environment variable FT2_BUILD_INCLUDE
+ * to point to the directory containing these two files (`ft2build.h' and
+ * `ftoption.h'), then invoke Jam as usual.
+ */
+#ifndef __FT2_BUILD_DEVEL_H__
+#define __FT2_BUILD_DEVEL_H__
-#ifndef __FT2_CUSTOM_BUILD_H__
-#define __FT2_CUSTOM_BUILD_H__
-
-#define FT_CONFIG_OPTIONS_H <custom/ftoption.h>
-#define FT_CONFIG_MODULES_H <custom/ftmodule.h>
+#define FT_CONFIG_OPTIONS_H <ftoption.h>
#include <freetype/config/ftheader.h>
-#endif /* __FT2_BUILD_GENERIC_H__ */
+#endif /* __FT2_BUILD_DEVEL_H__ */
/* END */
diff --git a/3party/freetype/custom/ftoption.h b/3party/freetype/devel/ftoption.h
index 7f496054b2..a84f650af0 100644
--- a/3party/freetype/custom/ftoption.h
+++ b/3party/freetype/devel/ftoption.h
@@ -1,10 +1,10 @@
/***************************************************************************/
/* */
-/* ftoption.h */
+/* ftoption.h (for development) */
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -85,14 +85,14 @@ FT_BEGIN_HEADER
/* */
/* This macro has no impact on the FreeType API, only on its */
/* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
- /* FT_Render_Glyph still generates a bitmap that is 3 times larger than */
- /* the original size; the difference will be that each triplet of */
- /* subpixels has R=G=B. */
+ /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
+ /* the original size in case this macro isn't defined; however, each */
+ /* triplet of subpixels has R=G=B. */
/* */
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
/* */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/*************************************************************************/
@@ -121,9 +121,8 @@ FT_BEGIN_HEADER
/* performance-critical functions (e.g. FT_MulFix). You should only do */
/* that to verify that the assembler function works properly, or to */
/* execute benchmark tests of the various implementations. */
-#if defined( __arm__ ) && !defined( __thumb__ )
-#define FT_CONFIG_OPTION_NO_ASSEMBLER
-#endif
+/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
+
/*************************************************************************/
/* */
@@ -149,7 +148,7 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
-#undef FT_CONFIG_OPTION_USE_LZW
+#define FT_CONFIG_OPTION_USE_LZW
/*************************************************************************/
@@ -164,7 +163,7 @@ FT_BEGIN_HEADER
/* Define this macro if you want to enable this `feature'. See also */
/* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
/* */
-#undef FT_CONFIG_OPTION_USE_ZLIB
+#define FT_CONFIG_OPTION_USE_ZLIB
/*************************************************************************/
@@ -190,6 +189,22 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Bzip2-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* `bzip2' program. This is mostly used to parse many of the PCF */
+ /* files that come with XFree86. The implementation uses `libbz2' to */
+ /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */
+ /* Contrary to gzip, bzip2 currently is not included and need to use */
+ /* the system available bzip2 implementation. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+#define FT_CONFIG_OPTION_USE_BZIP2
+
+
+ /*************************************************************************/
+ /* */
/* DLL export compilation */
/* */
/* When compiling FreeType as a DLL, some systems/compilers need a */
@@ -252,7 +267,7 @@ FT_BEGIN_HEADER
/* You would normally undefine this configuration macro when building */
/* a version of FreeType that doesn't contain a Type 1 or CFF driver. */
/* */
-#undef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
/*************************************************************************/
@@ -270,7 +285,7 @@ FT_BEGIN_HEADER
/* able to synthesize a Unicode charmap out of the glyphs found in the */
/* fonts. */
/* */
-#undef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
+#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
/*************************************************************************/
@@ -283,7 +298,7 @@ FT_BEGIN_HEADER
/* */
/* Note that the `FOND' resource isn't checked. */
/* */
-#undef FT_CONFIG_OPTION_MAC_FONTS
+#define FT_CONFIG_OPTION_MAC_FONTS
/*************************************************************************/
@@ -313,10 +328,11 @@ FT_BEGIN_HEADER
/* */
/* Allow the use of FT_Incremental_Interface to load typefaces that */
/* contain no glyph data, but supply it via a callback function. */
- /* This allows FreeType to be used with the PostScript language, using */
- /* the GhostScript interpreter. */
+ /* This is required by clients supporting document formats which */
+ /* supply font data incrementally as the document is parsed, such */
+ /* as the Ghostscript interpreter for the PostScript language. */
/* */
-/* #define FT_CONFIG_OPTION_INCREMENTAL */
+#define FT_CONFIG_OPTION_INCREMENTAL
/*************************************************************************/
@@ -358,8 +374,41 @@ FT_BEGIN_HEADER
/* Do not #undef these macros here since the build system might define */
/* them for certain configurations only. */
/* */
-/* #define FT_DEBUG_LEVEL_ERROR */
-/* #define FT_DEBUG_LEVEL_TRACE */
+#define FT_DEBUG_LEVEL_ERROR
+#define FT_DEBUG_LEVEL_TRACE
+
+
+ /*************************************************************************/
+ /* */
+ /* Autofitter debugging */
+ /* */
+ /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */
+ /* control the autofitter behaviour for debugging purposes with global */
+ /* boolean variables (consequently, you should *never* enable this */
+ /* while compiling in `release' mode): */
+ /* */
+ /* _af_debug_disable_horz_hints */
+ /* _af_debug_disable_vert_hints */
+ /* _af_debug_disable_blue_hints */
+ /* */
+ /* Additionally, the following functions provide dumps of various */
+ /* internal autofit structures to stdout (using `printf'): */
+ /* */
+ /* af_glyph_hints_dump_points */
+ /* af_glyph_hints_dump_segments */
+ /* af_glyph_hints_dump_edges */
+ /* */
+ /* As an argument, they use another global variable: */
+ /* */
+ /* _af_debug_hints */
+ /* */
+ /* Please have a look at the `ftgrid' demo program to see how those */
+ /* variables and macros should be used. */
+ /* */
+ /* Do not #undef these macros here since the build system might define */
+ /* them for certain configurations only. */
+ /* */
+#define FT_DEBUG_AUTOFIT
/*************************************************************************/
@@ -377,7 +426,7 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here since the build system might define */
/* it for certain configurations only. */
/* */
-/* #define FT_DEBUG_MEMORY */
+#define FT_DEBUG_MEMORY
/*************************************************************************/
@@ -402,7 +451,7 @@ FT_BEGIN_HEADER
/* Position Independent Code */
/* */
/* If this macro is set (which is _not_ the default), FreeType2 will */
- /* avoid creating constants that require address fixups. Instead the */
+ /* avoid creating constants that require address fixups. Instead the */
/* constants will be moved into a struct and additional intialization */
/* code will be used. */
/* */
@@ -427,7 +476,7 @@ FT_BEGIN_HEADER
/* embedded bitmaps in all formats using the SFNT module (namely */
/* TrueType & OpenType). */
/* */
-#undef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
/*************************************************************************/
@@ -442,7 +491,7 @@ FT_BEGIN_HEADER
/* */
/* (By default, the module uses `PSNames' to extract glyph names.) */
/* */
-#undef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/*************************************************************************/
@@ -456,7 +505,7 @@ FT_BEGIN_HEADER
/* Accessing SFNT names is done through the functions declared in */
/* `freetype/ftsnames.h'. */
/* */
-#undef TT_CONFIG_OPTION_SFNT_NAMES
+#define TT_CONFIG_OPTION_SFNT_NAMES
/*************************************************************************/
@@ -487,8 +536,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
- /* a bytecode interpreter in the TrueType driver. Note that there are */
- /* important patent issues related to the use of the interpreter. */
+ /* a bytecode interpreter in the TrueType driver. */
/* */
/* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */
@@ -496,17 +544,20 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
/* of the TrueType bytecode interpreter is used that doesn't implement */
- /* any of the patented opcodes and algorithms. Note that the */
- /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
+ /* any of the patented opcodes and algorithms. The patents related to */
+ /* TrueType hinting have expired worldwide since May 2010; this option */
+ /* is now deprecated. */
+ /* */
+ /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
+ /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
+ /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
/* */
/* This macro is only useful for a small number of font files (mostly */
@@ -543,7 +594,7 @@ FT_BEGIN_HEADER
/* ... */
/* } */
/* */
-#define TT_CONFIG_OPTION_UNPATENTED_HINTING
+/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
/*************************************************************************/
@@ -572,7 +623,7 @@ FT_BEGIN_HEADER
/* composite flags array which can be used to disambiguate, but old */
/* fonts will not have them. */
/* */
- /* http://partners.adobe.com/asn/developer/opentype/glyf.html */
+ /* http://www.microsoft.com/typography/otspec/glyf.htm */
/* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
/* */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@@ -639,7 +690,7 @@ FT_BEGIN_HEADER
/* files into an existing face. Note that if set, the T1 driver will be */
/* unable to produce kerning distances. */
/* */
-#define T1_CONFIG_OPTION_NO_AFM
+#undef T1_CONFIG_OPTION_NO_AFM
/*************************************************************************/
@@ -648,7 +699,8 @@ FT_BEGIN_HEADER
/* compilation of the Multiple Masters font support in the Type 1 */
/* driver. */
/* */
-#define T1_CONFIG_OPTION_NO_MM_SUPPORT
+#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
+
/*************************************************************************/
/*************************************************************************/
@@ -664,13 +716,26 @@ FT_BEGIN_HEADER
/* Compile autofit module with CJK (Chinese, Japanese, Korean) script */
/* support. */
/* */
-#undef AF_CONFIG_OPTION_CJK
+#define AF_CONFIG_OPTION_CJK
/*************************************************************************/
/* */
/* Compile autofit module with Indic script support. */
/* */
-#undef AF_CONFIG_OPTION_INDIC
+#define AF_CONFIG_OPTION_INDIC
+
+ /*************************************************************************/
+ /* */
+ /* Compile autofit module with warp hinting. The idea of the warping */
+ /* code is to slightly scale and shift a glyph within a single dimension */
+ /* so that as much of its segments are aligned (more or less) on the */
+ /* grid. To find out the optimal scaling and shifting value, various */
+ /* parameter combinations are tried and scored. */
+ /* */
+ /* This experimental option is only active if the render mode is */
+ /* FT_RENDER_MODE_LIGHT. */
+ /* */
+#define AF_CONFIG_OPTION_USE_WARPER
/* */
@@ -685,7 +750,28 @@ FT_BEGIN_HEADER
* is recommended to disable the macro since it reduces the library's code
* size and activates a few memory-saving optimizations as well.
*/
-#undef FT_CONFIG_OPTION_OLD_INTERNALS
+#define FT_CONFIG_OPTION_OLD_INTERNALS
+
+
+ /*
+ * To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
+ * we restrict the number of charmaps in a font. The current API of
+ * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
+ * takes charcode only. To determine the passed value is for cmap_index
+ * or charcode, the possible cmap_index is restricted not to exceed
+ * the minimum possible charcode by a rogue client. It is also very
+ * unlikely that a rogue client is interested in Unicode values 0 to 15.
+ *
+ * NOTE: The original threshold was 4 deduced from popular number of
+ * cmap subtables in UCS-4 TrueType fonts, but now it is not
+ * irregular for OpenType fonts to have more than 4 subtables,
+ * because variation selector subtables are available for Apple
+ * and Microsoft platforms.
+ */
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#define FT_MAX_CHARMAP_CACHEABLE 15
+#endif
/*
diff --git a/3party/freetype/docs/CHANGES b/3party/freetype/docs/CHANGES
new file mode 100644
index 0000000000..8f6ac0f481
--- /dev/null
+++ b/3party/freetype/docs/CHANGES
@@ -0,0 +1,3545 @@
+CHANGES BETWEEN 2.4.4 and 2.4.5
+
+ I. IMPORTANT BUG FIXES
+
+ - A rendering regression for second-order Bézier curves has been
+ fixed, introduced in 2.4.3.
+
+
+ II. IMPORTANT CHANGES
+
+ - If autohinting is not explicitly disabled, FreeType now uses
+ the autohinter if a TrueType based font doesn't contain native
+ hints.
+
+ - The load flag FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH has been made
+ redundant and is simply ignored; this means that FreeType now
+ ignores the global advance width value in TrueType fonts.
+
+
+ III. MISCELLANEOUS
+
+ - `FT_Sfnt_Table_Info' can now return the number of SFNT tables of
+ a font.
+
+ - Support for PCF files compressed with bzip2 has been contributed
+ by Joel Klinghed. To make this work, the OS must provide a
+ bzip2 library.
+
+ - Bradley Grainger contributed project and solution files in
+ Visual Studio 2010 format.
+
+ - Again some fixes to better handle broken fonts.
+
+ - Some improvements to the B/W rasterizer.
+
+ - Fixes to the cache module to improve robustness.
+
+ - Just Fill Bugs contributed (experimental) code to compute blue
+ zones for CJK Ideographs, improving the alignment of horizontal
+ stems at the top or bottom edges.
+
+ - The `ftgrid' demo program can now display autohinter segments,
+ to be toggled on and off with key `s'.
+
+======================================================================
+
+CHANGES BETWEEN 2.4.3 and 2.4.4
+
+ I. IMPORTANT BUG FIXES
+
+ - UVS support (TrueType/OpenType cmap format 14) support is fixed.
+ This regression has been introduced in version 2.4.0.
+
+
+ II. MISCELLANEOUS
+
+ - Detect tricky fonts (e.g. MingLiU) by the lengths and checksums
+ of Type42-persistent subtables (`cvt ', `fpgm', and `prep') when
+ a TrueType font without family name is given. The previous fix,
+ introduced in 2.4.3, was too rigorous, causing many subsetted
+ fonts (mainly from PDF files) displayed badly because FreeType
+ forced rendering with the TrueType bytecode engine instead of
+ the autohinter.
+
+ - Better support for 64bit platforms.
+
+ - More fixes to improve handling of broken fonts.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.4.2 and 2.4.3
+
+ I. IMPORTANT BUG FIXES
+
+ - Fix rendering of certain cubic, S-shaped arcs. This regression
+ has been introduced in version 2.4.0.
+
+
+ II. MISCELLANEOUS
+
+ - To fix the above mentioned rendering issue, a new spline
+ flattening algorithm has been introduced which speeds up both
+ conic and cubic arcs.
+
+ - Handling of broken fonts has been further improved.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.4.1 and 2.4.2
+
+ I. IMPORTANT BUG FIXES
+
+ - A stack overflow in CFF Type2 CharStrings interpreter is fixed.
+
+ - Handling Type 42 font deallocation was broken; additionally, the
+ library is now more robust against malformed Type 42 fonts.
+
+
+ II. MISCELLANEOUS
+
+ - Two new functions, `FT_Reference_Library' (in FT_MODULE_H) and
+ `FT_Reference_Face' (in FT_FREETYPE_H), have been added to
+ simplify life-cycle management. A counter gets initialized to 1
+ at the time an FT_Library (or FT_Face) structure is created.
+ The two new functions increment the respective counter.
+ `FT_Done_Library' and `FT_Done_Face' then only destroy a library
+ or face if the counter is 1, otherwise they simply decrement the
+ counter.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.4.0 and 2.4.1
+
+ I. IMPORTANT CHANGES
+
+ - A serious bug in the CFF font module prevented display of many
+ glyphs in CFF fonts like `MinionPro-Regular.otf'.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.12 and 2.4.0
+
+ I. IMPORTANT CHANGES
+
+ - Since May 2010, all patents regarding the TrueType bytecode
+ interpreter have expired worldwide. Consequently, we now define
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER by default (and undefine
+ TT_CONFIG_OPTION_UNPATENTED_HINTING).
+
+ - A new function `FT_Library_SetLcdFilterWeights' is available to
+ adjust the filter weights set by `FT_Library_SetLcdFilter'.
+
+
+ II. MISCELLANEOUS
+
+ - Thanks to many reports from Robert Święcki, FreeType's stability
+ in handling broken or damaged fonts is much improved.
+
+ - Support for LCD filter control has been added to the demo
+ programs `ftdiff' and `ftview'.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.11 and 2.3.12
+
+ I. IMPORTANT CHANGES
+
+ - For `FT_Open_Face', new parameters are available to ignore
+ preferred family names: FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY and
+ FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY.
+
+
+ II. MISCELLANEOUS
+
+ - Support for incremental font loading (controlled with the
+ FT_CONFIG_OPTION_INCREMENTAL macro) is now active by default.
+
+ - Better support for vertical metrics.
+
+ - Various minor bug fixes.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.10 and 2.3.11
+
+ I. IMPORTANT BUG FIXES
+
+ - Version 2.3.10 broke PCF support.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.10 and 2.3.9
+
+ I. IMPORTANT BUG FIXES
+
+ - If all ASCII digits in a font have the same (unscaled) width,
+ the autohinter respects this and won't change it.
+
+ - TrueType fonts are now rasterized correctly if the horizontal
+ and vertical resolution differ.
+
+ - Type 1 fonts are now handled with increased precision internally
+ to avoid serious rounding issues if non-integral coordinates are
+ encountered.
+
+ - Horizontally condensed CFF fonts (using the font matrix) were
+ rendered incorrectly. This bug has been introduced after
+ release 2.3.5.
+
+
+ II. IMPORTANT CHANGES
+
+ - Support for the SFNT cmap 13 table format (as defined by the new
+ OpenType 1.6 specification) has been added.
+
+ - B/W rasterization of well-hinted TrueType fonts at small sizes
+ has been greatly improved.
+
+ - Calculation of vertical metrics in OpenType fonts has been
+ improved.
+
+
+ III. MISCELLANEOUS
+
+ - It is now possible to change the emboldening factor in the
+ `ftview' demo program with keys `e' and `E'.
+
+ - It is now possible to change the slant value in the `ftview'
+ demo program with keys `s' and `S'.
+
+ - The 5-levels grayscale mode of the `ftraster' module (which
+ FreeType doesn't use by default) was broken since version 2.3.0.
+
+ - Compilation of the `ftgrays' and `ftraster' modules was broken
+ in stand-alone mode.
+
+ - Various fixes for compilation on 64bit and 16bit architectures.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.9 and 2.3.8
+
+ I. IMPORTANT BUG FIXES
+
+ - Very unfortunately, FreeType 2.3.8 contained a change that broke
+ its official ABI. The end result is that programs compiled
+ against previous versions of the library, but dynamically linked
+ to 2.3.8 can experience memory corruption if they call the
+ `FT_Get_PS_Font_Info' function.
+
+ We recommend all users to upgrade to 2.3.9 as soon as possible,
+ or to downgrade to a previous release of the library if this is
+ not an option.
+
+ The origin of the bug is that a new field was added to the
+ publicly defined `PS_FontInfoRec' structure. Unfortunately,
+ objects of this type can be stack or heap allocated by callers
+ of `FT_Get_PS_Font_Info', resulting in a memory buffer
+ overwrite with its implementation in 2.3.8.
+
+ If you want to know whether your code is vulnerable to this
+ issue, simply search for the substrings `PS_FontInfo' and
+ `PS_Font_Info' in your source code. If none is found, your code
+ is safe and is not affected.
+
+ The FreeType team apologizes for the problem.
+
+ - The POSIX support of MacOS resource-fork fonts (Suitcase fonts
+ and LaserWriter Type1 PostScript fonts) was broken in 2.3.8. If
+ FreeType2 is built without Carbon framework, these fonts are not
+ handled correctly. Version 2.3.7 didn't have this bug.
+
+ - `FT_Get_Advance' (and `FT_Get_Advances') returned bad values for
+ almost all font formats except TrueType fonts.
+
+ - Fix a bug in the SFNT kerning table loader/parser which could
+ crash the engine if certain malformed tables were encountered.
+
+ - Composite SFNT bitmaps are now handled correctly.
+
+
+ II. IMPORTANT CHANGES
+
+ - The new functions `FT_Get_CID_Is_Internally_CID_keyed' and
+ `FT_Get_CID_From_Glyph_Index' can be used to access CID-keyed
+ CFF fonts via CID values. This code has been contributed by
+ Michael Toftdal.
+
+
+ III. MISCELLANEOUS
+
+ - `FT_Outline_Get_InsideBorder' returns FT_STROKER_BORDER_RIGHT
+ for empty outlines. This was incorrectly documented.
+
+ - The `ftview' demo program now supports UTF-8 encoded strings.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.8 and 2.3.7
+
+ I. IMPORTANT BUG FIXES
+
+ - CID-keyed fonts in an SFNT wrapper were not handled correctly.
+
+ - The smooth renderer produced truncated images (on the right) for
+ outline parts with negative horizontal values. Most fonts don't
+ contain outlines left to the y coordinate axis, but the effect
+ was very noticeable for outlines processed with FT_Glyph_Stroke,
+ using thick strokes.
+
+ - `FT_Get_TrueType_Engine_Type' returned a wrong value if both
+ configuration macros TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
+ TT_CONFIG_OPTION_UNPATENTED_HINTING were defined.
+
+ - The `face_index' field in the `FT_Face' structure wasn't
+ initialized properly after calling FT_Open_Face and friends with
+ a positive face index for CFFs, WinFNTs, and, most importantly,
+ for TrueType Collections (TTCs).
+
+
+ II. IMPORTANT CHANGES
+
+ - Rudimentary support for Type 1 fonts and CID-keyed Type 1 fonts
+ in an SFNT wrapper has been added -- such fonts are used on the
+ Mac. The core SFNT tables `TYP1' and `CID ' are passed to the
+ PS Type 1 and CID-keyed PS font drivers; other tables (`ALMX',
+ `BBOX', etc.) are not supported yet.
+
+ - A new interface to extract advance values of glyphs without
+ loading their outlines has been added. The functions are called
+ `FT_Get_Advance' and `FT_Get_Advances'; they are defined in file
+ `ftadvanc.h' (to be accessed as FT_ADVANCES_H).
+
+ - A new function `FT_Get_FSType_Flags' (in FT_FREETYPE_H) has been
+ contributed by David Bevan to access the embedding and
+ subsetting restriction information of fonts.
+
+
+ III. MISCELLANEOUS
+
+ - FT_MulFix is now an inlined function; by default, assembler code
+ is provided for x86 and ARM. See FT_CONFIG_OPTION_INLINE_MULFIX
+ and FT_CONFIG_OPTION_NO_ASSEMBLER (in ftoption.h) for more.
+
+ - The handling of `tricky' fonts (this is, fonts which don't work
+ with the autohinter, needing the font format's hinting engine)
+ has been generalized and changed slightly:
+
+ . A new face flag FT_FACE_FLAG_TRICKY indicates that the font
+ format's hinting engine is necessary for correct rendering.
+ The macro FT_IS_TRICKY can be used to check this flag.
+
+ . FT_LOAD_NO_HINTING is now ignored for tricky fonts. To really
+ force raw loading of such fonts (without hinting), both
+ FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT must be used --
+ this is something which you probably never want to do.
+
+ . Tricky TrueType fonts always use the bytecode interpreter,
+ either the patented or unpatented version.
+
+ - The function `FT_GlyphSlot_Own_Bitmap' has been moved from
+ FT_SYNTHESIS_H to FT_BITMAP_H; it is now part of the `official'
+ API. (The functions in FT_SYNTHESIS_H are still subject to
+ change, however.)
+
+ - In the `ftdiff' demo program you can now toggle the use of
+ FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH with key `a'.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.7 and 2.3.6
+
+ I. IMPORTANT BUG FIXES
+
+ - If the library was compiled on an i386 platform using gcc, and
+ compiler option -O3 was given, `FT_MulFix' sometimes returned
+ incorrect results which could have caused problems with
+ `FT_Request_Metrics' and `FT_Select_Metrics', returning an
+ incorrect descender size.
+
+ - Pure CFFs without subfonts were scaled incorrectly if the font
+ matrix was non-standard. This bug has been introduced in
+ version 2.3.6.
+
+ - The `style_name' field in the `FT_FaceRec' structure often
+ contained a wrong value for Type 1 fonts. This misbehaviour
+ has been introduced in version 2.3.6 while trying to fix
+ another problem. [Note, however, that this value is
+ informative only since the used algorithm to extract it is
+ very simplistic.]
+
+
+ II. IMPORTANT CHANGES
+
+ - Two new macros, FT_OUTLINE_SMART_DROPOUTS and
+ FT_OUTLINE_EXCLUDE_STUBS, have been introduced. Together with
+ FT_OUTLINE_IGNORE_DROPOUTS (which was ignored previously) it is
+ now possible to control the dropout mode of the `raster' module
+ (for B&W rasterization), using the `flags' field in the
+ `FT_Outline' structure.
+
+ - The TrueType bytecode interpreter now passes the dropout mode to
+ the B&W rasterizer. This greatly increases the output for small
+ ppem values of many fonts like `pala.ttf'.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.6 and 2.3.5
+
+ I. IMPORTANT BUG FIXES
+
+ - A bunch of potential security problems have been found. All
+ users should update.
+
+ - Microsoft Unicode cmaps in TrueType fonts are now always
+ preferred over Apple cmaps. This is not a bug per se, but there
+ exist some buggy fonts created for MS which have broken Apple
+ cmaps. This affects only the automatic selection of FreeType;
+ it's always possible to manually select an Apple Unicode cmap if
+ desired.
+
+ - Many bug fixes to the TrueType bytecode interpreter.
+
+ - Improved Mac support.
+
+ - Subsetted CID-keyed CFFs are now supported correctly.
+
+ - CID-keyed CFFs with subfonts which are scaled in a non-standard
+ way are now handled correctly.
+
+ - A call to FT_Open_Face with `face_index' < 0 crashed FreeType if
+ the font was a Windows (bitmap) FNT/FON.
+
+
+ II. IMPORTANT CHANGES
+
+ - The new function `FT_Get_CID_Registry_Ordering_Supplement' gives
+ access to those fields in a CID-keyed font. The code has been
+ contributed by Derek Clegg.
+
+ - George Williams contributed code to validate the new `MATH'
+ OpenType table (within the `otvalid' module). The `ftvalid'
+ demo program has been extended accordingly.
+
+ - An API for cmap 14 support (for Unicode Variant Selectors, UVS)
+ has been contributed by George Williams.
+
+ - A new face flag FT_FACE_FLAG_CID_KEYED has been added, together
+ with a macro FT_IS_CID_KEYED which evaluates to 1 if the font is
+ CID-keyed.
+
+
+ III. MISCELLANEOUS
+
+ - Build support for symbian has been contributed.
+
+ - Better WGL4 glyph name support, contributed by Sergey Tolstov.
+
+ - Debugging output of the various FT_TRACEX macros is now sent to
+ stderr.
+
+ - The `ftview' demo program now provides artificial slanting too.
+
+ - The `ftvalid' demo program has a new option `-f' to select the
+ font index.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.5 and 2.3.4
+
+ I. IMPORTANT BUG FIXES
+
+ - Some subglyphs in TrueType fonts were handled incorrectly due to
+ a missing graphics state reinitialization.
+
+ - Large .Z files (as distributed with some X11 packages) weren't
+ handled correctly, making FreeType increase the heap stack in an
+ endless loop.
+
+ - A large number of bugs have been fixed to avoid crashes and
+ endless loops with invalid fonts.
+
+
+ II. IMPORTANT CHANGES
+
+ - The two new cache functions `FTC_ImageCache_LookupScaler' and
+ `FTC_SBit_Cache_LookupScaler' have been added to allow lookup of
+ glyphs using an `FTC_Scaler' object; this makes it possible to
+ use fractional pixel sizes in the cache. The demo programs have
+ been updated accordingly to use this feature.
+
+ - A new API `FT_Get_CMap_Format' has been added to get the cmap
+ format of a TrueType font. This is useful in handling PDF
+ files. The code has been contributed by Derek Clegg.
+
+ - The auto-hinter now produces better output by default for
+ non-Latin scripts like Indic. This was done by using the CJK
+ hinting module as the default instead of the Latin one. Thanks
+ to Rahul Bhalerao for this suggestion.
+
+ - A new API `FT_Face_CheckTrueTypePatents' has been added to find
+ out whether a given TrueType font uses patented bytecode
+ instructions. The `ft2demos' bundle contains a new program
+ called `ftpatchk' which demonstrates its usage.
+
+ - A new API `FT_Face_SetUnpatentedHinting' has been added to
+ enable or disable the unpatented hinter.
+
+ - Support for Windows FON files in PE format has been contributed
+ by Dmitry Timoshkov.
+
+
+ III. MISCELLANEOUS
+
+ - Vincent Richomme contributed Visual C++ project files for Pocket
+ PCs.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.4 and 2.3.3
+
+ I. IMPORTANT BUG FIXES
+
+ - A serious bug in the handling of bitmap fonts (and bitmap
+ strikes of outline fonts) has been introduced in 2.3.3.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.3 and 2.3.2
+
+ I. IMPORTANT BUG FIXES
+
+ - Remove a serious regression in the TrueType bytecode interpreter
+ that was introduced in version 2.3.2. Note that this does not
+ disable the improvements introduced to the interpreter in
+ version 2.3.2, only some ill cases that occurred with certain
+ fonts (though a few popular ones).
+
+ - The auto-hinter now ignores single-point contours for computing
+ blue zones. This bug created `wavy' baselines when rendering
+ text with various fonts that use these contours to model
+ mark-attach points (these are points that are never rasterized
+ and are placed outside of the glyph's real outline).
+
+ - The `rsb_delta' and `lsb_delta' glyph slot fields are now set to
+ zero for mono-spaced fonts. Otherwise code that uses them would
+ essentially ruin the fixed-advance property.
+
+ - Fix CVE-2007-1351 which can cause an integer overflow while
+ parsing BDF fonts, leading to a potentially exploitable heap
+ overflow condition.
+
+
+ II. MISCELLANEOUS
+
+ - Fixed compilation issues on some 64-bit platforms (see ChangeLog
+ for details).
+
+ - A new demo program `ftdiff' has been added to compare TrueType
+ hinting, FreeType's auto hinting, and rendering without hinting
+ in three columns.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.2 and 2.3.1
+
+ I. IMPORTANT BUG FIXES
+
+ - FreeType returned incorrect kerning information from TrueType
+ fonts when the bytecode interpreter was enabled. This happened
+ due to a typo introduced in version 2.3.0.
+
+ - Negative kerning values from PFM files are now reported
+ correctly (they were read as 16-bit unsigned values from the
+ file).
+
+ - Fixed a small memory leak when `FT_Init_FreeType' failed for
+ some reason.
+
+ - The Postscript hinter placed and sized very thin and ghost stems
+ incorrectly.
+
+ - The TrueType bytecode interpreter has been fixed to get rid of
+ most of the rare differences seen in comparison to the Windows
+ font loader.
+
+
+ II. IMPORTANT CHANGES
+
+ - The auto-hinter now better deals with serifs and corner cases
+ (e.g., glyph '9' in Arial at 9pt, 96dpi). It also improves
+ spacing adjustments and doesn't change widths for non-spacing
+ glyphs.
+
+ - Many Mac-specific functions are deprecated (but still
+ available); modern replacements have been provided for them.
+ See the documentation in file `ftmac.h'.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.1 and 2.3.0
+
+ I. IMPORTANT BUG FIXES
+
+ - The TrueType interpreter sometimes returned incorrect horizontal
+ metrics due to a bug in the handling of the SHZ instruction.
+
+ - A typo in a security check introduced after version 2.2.1
+ prevented FreeType to render some glyphs in CFF fonts.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.3.0 and 2.2.1
+
+ I. IMPORTANT BUG FIXES
+
+ - The PCF font loader is now much more robust while loading
+ malformed font files.
+
+ - Various memory leaks have been found and fixed.
+
+ - The TrueType name loader now deals properly with some fonts that
+ encode their names in UTF-16 (the specification was vague, and
+ the code incorrectly assumed UCS-4).
+
+ - Fixed the TrueType bytecode loader to deal properly with subtle
+ monochrome/gray issues when scaling the CVT. Some fonts
+ exhibited bad rendering artifacts otherwise.
+
+ - `FT_GlyphSlot_Embolden' now supports vertical layouts correctly
+ (it mangled the vertical advance height).
+
+ - Fixed byte endian issues of `ftmac.c' to support Mac OS X on
+ i386.
+
+ - The PFR font loader no longer erroneously tags font files
+ without any outlines as FT_FACE_FLAG_SCALABLE.
+
+
+ II. NEW API FUNCTIONS
+
+ - `FT_Library_SetLcdFilter' allows you to select a special filter
+ to be applied to the bitmaps generated by `FT_Render_Glyph' if
+ one of the FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V modes has
+ been selected. This filter is used to reduce color fringes;
+ several settings are available through the FT_LCD_FILTER_XXX
+ enumeration.
+
+ Its declaration and documentation can be found in file
+ `include/freetype/ftlcdfil.h' (to be accessed with macro
+ FT_LCD_FILTER_H).
+
+ *IMPORTANT*: This function returns an error
+ (FT_Err_Unimplemented_Feature) in default builds of the library
+ for patent reasons. See below.
+
+ - `FT_Get_Gasp' allows you to query the flags of the TrueType
+ `gasp' table for a given character pixel size. This is useful
+ to duplicate the text rendering of MS Windows when the native
+ bytecode interpreter is enabled (which isn't the default for
+ other patent reasons).
+
+ Its declaration and documentation can be found in file
+ `include/freetype/ftgasp.h' (to be accessed with macro
+ FT_GASP_H).
+
+
+ III. IMPORTANT CHANGES
+
+ - The auto-hinter has been tuned a lot to improve its results with
+ serif fonts, resulting in much better font rendering of many web
+ pages.
+
+ - The unpatented hinter is now part of the default build of the
+ library; we have added code to automatically support `tricky'
+ fonts that need it.
+
+ This means that FreeType should `just work' with certain Asian
+ fonts, like MingLiU, which cannot properly be loaded without a
+ bytecode interpreter, but which fortunately do not use any of
+ the patented bytecode opcodes. We detect these fonts by name,
+ so please report any font file that doesn't seem to work with
+ FreeType, and we shall do what we can to support it in a next
+ release.
+
+ Note that the API hasn't changed, so you can still force
+ unpatented hinting with a special parameter to `FT_Open_Face' as
+ well. This might be useful in same cases; for example, a PDF
+ reader might present a user option to activate it to deal with
+ certain `tricky' embedded fonts which cannot be clearly
+ identified.
+
+ If you are a developer for embedded systems, you might want to
+ *disable* the feature to save code space by undefining
+ TT_CONFIG_OPTION_UNPATENTED_HINTING in file `ftoption.h'.
+
+ - LCD-optimized rendering is now *disabled* in all default builds
+ of the library, mainly due to patent issues. For more
+ information see:
+
+ http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
+
+ A new configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ has been introduced in `ftoption.h'; manually define it in this
+ file if you want to re-enable the feature.
+
+ The change only affects the implementation, not the FreeType
+ API. This means that clients don't need to be modified, because
+ the library still generates LCD decimated bitmaps, but with the
+ added constraint that R=G=B on each triplet.
+
+ The displayed result should be equal to normal anti-aliased
+ rendering.
+
+ Additionally, if FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
+ defined, the new `FT_Library_SetLcdFilter' function returns the
+ FT_Err_Unimplemented_Feature error code.
+
+ - Some computation bugs in the TrueType bytecode interpreter were
+ found, which allow us to get rid of very subtle and rare
+ differences we had experienced with the Windows renderer.
+
+ - It is now possible to cross-compile the library easily. See the
+ file `docs/INSTALL.CROSS' for details.
+
+ - The file `src/base/ftmac.c' now contains code for Mac OS X only;
+ its deprecated function `FT_GetFile_From_Mac_Font_Name' always
+ returns an error even if the QuickDraw framework is available.
+ The previous version has been moved to `builds/mac/ftmac.c'.
+
+ Selecting configure option `--with-quickdraw-carbon' makes the
+ build process use the original `ftmac.c' file instead of the Mac
+ OS X-only version.
+
+
+ IV. MISCELLANEOUS
+
+ - Various performance and memory footprint optimizations have been
+ performed on the TrueType and CFF font loaders, sometimes with
+ very drastic benefits (e.g., the TrueType loader is now about
+ 25% faster; FreeType should use less heap memory under nearly
+ all conditions).
+
+ - The anti-aliased rasterizer has been optimized and is now 15% to
+ 25% percent faster than in previous versions, depending on
+ content.
+
+ - The Type 1 loader has been improved; as an example, it now skips
+ top-level dictionaries properly.
+
+ - Better support for Mac fonts on POSIX systems, plus compilation
+ fixes for Mac OS X on ppc64 where `ftmac.c' cannot be built.
+
+ - Configuration without `--with-old-mac-fonts' does not include
+ `ftmac.c' (this was the behaviour in FreeType version 2.1.10).
+
+ - The TrueTypeGX validator (gxvalid) checks the order of glyph IDs
+ in the kern table.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.2.1 and 2.2
+
+ I. IMPORTANT BUG FIXES
+
+ - Various integer overflows have been fixed.
+
+ - PFB fonts with MacOS resource fork weren't handled correctly on
+ non-MacOS platforms.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.2 and 2.1.10
+
+(not released officially)
+
+ I. IMPORTANT BUG FIXES
+
+ - Vertical metrics for SFNT fonts were incorrect sometimes.
+
+ - The FT_HAS_KERNING macro always returned 0.
+
+ - CFF OpenType fonts didn't return correct vertical metrics for
+ glyphs with outlines.
+
+ - If FreeType was compiled without hinters, all font formats based
+ on PS outlines weren't scaled correctly.
+
+
+ II. IMPORTANT CHANGES
+
+ - Version 2.2 no longer exposes its internals, this is, the header
+ files located in the `include/freetype/internal' directory of
+ the source package are not copied anymore by the `make install'
+ command. Consequently, a number of rogue clients which directly
+ access FreeType's internal functions and structures won't
+ compile without modification.
+
+ We provide patches for most of those rogue clients. See the
+ following page for more information:
+
+ http://www.freetype.org/freetype2/patches/rogue-patches.html
+
+ Note that, as a convenience to our Unix desktop users, version
+ 2.2 is *binary* compatible with FreeType 2.1.7, which means that
+ installing this release on an existing distribution shall not
+ break any working desktop.
+
+ - FreeType's build mechanism has been redesigned. With GNU make
+ it is now sufficient in most cases to edit two files:
+ `modules.cfg', to select the library components, and the
+ configuration file `include/freetype/config/ftoption.h' (which
+ can be copied to the objects directory). Removing unused module
+ directories to prevent its compilation and editing
+ `include/freetype/config/ftmodule.h' is no longer necessary.
+
+ - The LIGHT hinting algorithm produces more pleasant results.
+ Also, using the FT_LOAD_TARGET_LIGHT flags within FT_Load_Glyph
+ always forces auto-hinting, as a special exception. This allows
+ you to experiment with it even if you have enabled the TrueType
+ bytecode interpreter in your build.
+
+ - The auto hinter now employs a new algorithm for CJK fonts, based
+ on Akito Hirai's patch. Note that this only works for fonts
+ with a Unicode charmap at the moment.
+
+ - The following callback function types have changed slightly (by
+ adding the `const' keyword where appropriate):
+
+ FT_Outline_MoveToFunc
+ FT_Outline_LineToFunc
+ FT_Outline_ConicToFunc
+ FT_Outline_CubicToFunc
+ FT_SpanFunc
+ FT_Raster_RenderFunc
+
+ FT_Glyph_TransformFunc
+ FT_Renderer_RenderFunc
+ FT_Renderer_TransformFunc
+
+ Note that this doesn't affect binary backward compatibility.
+
+ - On MacOS, new APIs have been added as replacements for legacy
+ APIs: `FT_New_Face_From_FSRef' for `FT_New_Face_From_FSSpec',
+ and `FT_GetFile_From_Mac_ATS_Name' for
+ `FT_GetFile_From_Mac_Name'. Legacy APIs are still available, if
+ FreeType is built without disabling them.
+
+ - A new API `FT_Select_Size' has been added to select a bitmap
+ strike by its index. Code using other functions to select
+ bitmap strikes should be updated to use this function.
+
+ - A new API `FT_Get_SubGlyph_Info' has been added to retrieve
+ subglyph data. This can be used by rogue clients which used to
+ access the internal headers to get the corresponding data.
+
+ - In 2.1.10, the behaviour of `FT_Set_Pixel_Sizes' was changed for
+ BDF/PCF fonts, and only for them. This causes inconsistency.
+ In this release, we undo the change. The intent of the change
+ in 2.1.10 is to allow size selection through real dimensions,
+ which can now be done through `FT_Request_Size'.
+
+ - Some security issues were discovered and fixed in the CFF and
+ Type 1 loader, causing crashes of FreeType by malformed font
+ files.
+
+
+ III. MISCELLANEOUS
+
+ - The documentation for FT_LOAD_TARGET_XXX and FT_RENDER_MODE_XXX
+ values now better reflects its usage and differences: One set is
+ used to specify the hinting algorithm, the other to specify the
+ pixel rendering mode.
+
+ - `FT_New_Face' and `FT_New_Face_From_FSSpec' in ftmac.c have been
+ changed to count supported scalable faces (sfnt, LWFN) only, and
+ to return the number of available faces via face->num_faces.
+ Unsupported bitmap faces (fbit, NFNT) are ignored.
+
+ - builds/unix/configure has been improved for MacOS X. It now
+ automatically checks available functions in Carbon library, and
+ prepare to use newest functions by default. Options to specify
+ the dependencies of each Carbon APIs (FSSpec, FSRef, old/new
+ QuickDraw, ATS) are available too. By manual disabling of all
+ QuickDraw functionality, FreeType can be built without
+ `deprecated function' warnings on MacOS 10.4.x, but
+ FT_GetFile_Mac_Name in ftmac.c then is changed to a dummy
+ function, and returns an `unimplemented' error. For details see
+ builds/mac/README.
+
+ - SFNT cmap handling has been improved, mainly to run much faster
+ with CJK fonts.
+
+ - A new function `FT_Get_TrueType_Engine_Type (declared in
+ `FT_MODULE_H') is provided to determine the status of the
+ TrueType bytecode interpreter compiled into the library
+ (patented, unpatented, unimplemented).
+
+ - Vertical metrics of glyphs are synthesized if the font does not
+ provide such information. You can tell whether the metrics are
+ synthesized or not by checking the FT_FACE_FLAG_VERTICAL flag of
+ the face.
+
+ - The demo programs `ftview' and `ftstring' have been rewritten
+ for better readability. `ftview' has a new switch `-p' to test
+ FT_New_Memory_Face (instead of FT_New_Face).
+
+ - FreeType now honours bit 1 in the `head' table of TrueType fonts
+ (meaning `left sidebearing point at x=0'). This helps with some
+ buggy fonts.
+
+ - Rudimentary support for Adobe's new `SING Glyphlet' format. See
+
+ http://www.adobe.com/products/indesign/sing_gaiji.html
+
+ for more information.
+
+ - The `ftdump' program from the `ft2demos' bundle now shows some
+ information about charmaps. It also supports a new switch `-v'
+ to increase verbosity.
+
+ - Better AFM support. This includes track kerning support.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.10 and 2.1.9
+
+ I. IMPORTANT BUG FIXES
+
+ - The size comparison for BDF and PCF files could fail sometimes.
+
+ - Some CFF files were still not loaded correctly. Patch from
+ Derek Noonburg.
+
+ - The stroker still had some serious bugs.
+
+ - Boris Letocha fixed a bug in the TrueType interpreter: The
+ NPUSHW instruction wasn't skipped correctly in IF clauses. Some
+ fonts like `Helvetica 75 Bold' failed.
+
+ - Another serious bug in handling TrueType hints caused many
+ distortions. It has been introduced in version 2.1.8, and it is
+ highly recommended to upgrade.
+
+ - FreeType didn't properly parse empty Type 1 glyphs.
+
+ - An unbound dynamic buffer growth was fixed in the PFR loader.
+
+ - Several bugs have been fixed in the cache sub-system.
+
+ - FreeType behaved incorrectly when resizing two distinct but very
+ close character pixel sizes through `FT_Set_Char_Size' (Savannah
+ bug #12263).
+
+ - The auto-hinter didn't work properly for fonts without a Unicode
+ charmap -- it even refused to load the glyphs.
+
+
+ II. IMPORTANT CHANGES
+
+ - Many fixes have been applied to drastically reduce the amount of
+ heap memory used by FreeType, especially when using
+ memory-mapped font files (which is the default on Unix systems
+ which support them).
+
+ - The auto-hinter has been replaced with a new module, called the
+ `auto-fitter'. It consumes less memory than its predecessor,
+ and it is prepared to support non-latin scripts better in next
+ releases.
+
+ - George Williams contributed code to read kerning data from PFM
+ files.
+
+ - FreeType now uses the TT_NAME_ID_PREFERRED_FAMILY and
+ TT_NAME_ID_PREFERRED_SUBFAMILY strings (if available) for
+ setting family and style in SFNT fonts (patch from Kornfeld
+ Eliyahu Peter).
+
+ - A new API `FT_Sfnt_Table_Info' (in FT_TRUETYPE_TABLES_H) has
+ been added to retrieve name and size information of SFNT tables.
+
+ - A new API `FT_OpenType_Validate' (in FT_OPENTYPE_VALIDATE_H) has
+ been added to validate OpenType tables (BASE, GDEF, GPOS, GSUB,
+ JSTF). After validation it is no longer necessary to check
+ for errors in those tables while accessing them.
+
+ Note that this module might be moved to another library in the
+ future to avoid a tight dependency between FreeType and the
+ OpenType specification.
+
+ - A new API in FT_BITMAP_H (`FT_Bitmap_New', `FT_Bitmap_Convert',
+ `FT_Bitmap_Copy', `FT_Bitmap_Embolden', `FT_Bitmap_Done') has
+ been added. Its use is to convert an FT_Bitmap structure in
+ 1bpp, 2bpp, 4bpp, or 8bpp format into another 8bpp FT_Bitmap,
+ 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.
+
+ - `FT_GlyphSlot_Embolden' (in FT_SYNTHESIS_H) now handles bitmaps
+ also (code contributed by Chia I Wu). Note that this function
+ is still experimental and may be replaced with a better API.
+
+ - The method how BDF and PCF bitmap fonts are accessed has been
+ refined. Formerly, FT_Set_Pixel_Sizes and FT_Set_Char_Size
+ were synonyms in FreeType's BDF and PCF interface. This has
+ changed now. FT_Set_Pixel_Sizes should be used to select the
+ actual font dimensions (the `strike', which is the sum of the
+ `FONT_ASCENT' and `FONT_DESCENT' properties), while
+ FT_Set_Char_Size selects the `nominal' size (the `PIXELSIZE'
+ property). In both functions, the width parameter is ignored.
+
+
+ III. MISCELLANEOUS
+
+ - The BDF driver no longer converts all returned bitmaps with a
+ depth of 2bpp or 4bpp to a depth of 8bpp. The documentation has
+ not mentioned this explicitly, but implementors might have
+ relied on this after looking into the source files.
+
+ - A new option `--ftversion' has been added to freetype-config to
+ return the FreeType version.
+
+ - The memory debugger has been updated to dump allocation
+ statistics on all allocation sources in the library. This is
+ useful to spot greedy allocations when loading and processing
+ fonts.
+
+ - We removed a huge array of constant pointers to constant strings
+ in the `psnames' module. The problem was that compilations in
+ PIC mode (i.e., when generating a Unix shared object/dll) put
+ the array into the non-shared writable section of the library
+ since absolute pointers are not relocatable by nature.
+
+ This reduces the memory consumption by approximately 16KByte per
+ process linked to FreeType. We now also store the array in a
+ compressed form (as a trie) which saves about 20KByte of code as
+ well.
+
+ - Kirill Smelkov provided patches to make src/raster/ftraster.c
+ compile stand-alone again.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.9 and 2.1.8
+
+ I. IMPORTANT BUG FIXES
+
+ - The function `FT_Get_CharMap_Index' was only declared, without
+ any real code. For consistency, it has been renamed to
+ `FT_Get_Charmap_Index'. (This function is needed to implement
+ cmap caches.)
+
+ - `FT_Outline_Get_BBox' sometimes returned incorrect values for
+ conic outlines (e.g., for TrueType fonts).
+
+ - Handling of `bhed' table has been fixed.
+
+ - The TrueType driver with enabled byte code interpreter sometimes
+ returned artifacts due to incorrect rounding. This bug has been
+ introduced after version 2.1.4.
+
+ - The BDF driver dropped the last glyph in the font.
+
+ - The BDF driver now uses the DEFAULT_CHAR property (if available)
+ to select a glyph shape for the undefined glyph.
+
+ - The stroker failed for closed outlines and single points.
+
+
+ II. IMPORTANT CHANGES
+
+ - George Williams contributed code to handle Apple's font
+ distortion technology found in GX fonts (`avar', `cvar', `fvar',
+ and `gvar' tables; the Multiple Masters API has been slightly
+ extended to cope with the new functionality).
+
+ - The `FT_GlyphSlotRec' structure has been extended: The elements
+ `lsb_delta' and `rsb_delta' give the difference between hinted
+ and unhinted left and right side bearings if autohinting is
+ active. Using those values can improve the inter-letter spacing
+ considerably. See the documentation of `FT_GlyphSlotRec' and
+ the `ftstring' demo program how to use it.
+
+ - Loading TrueType and Type 1 fonts has been made much faster.
+
+ - The stroker is no longer experimental (but the cache subsystem
+ still is).
+
+
+ III. MISCELLANEOUS
+
+ - A new documentation file `formats.txt' describes various font
+ formats supported (and not supported) by FreeType.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.8 and 2.1.7
+
+ I. IMPORTANT BUG FIXES
+
+ - The native TrueType hinter contained some bugs which prevented
+ some fonts to be rendered correctly, most notably Legendum.otf.
+
+ - The PostScript hinter now produces improved results.
+
+ - The linear advance width and height values were incorrectly
+ rounded, making them virtually unusable if not loaded with
+ FT_LOAD_LINEAR_DESIGN.
+
+ - Indexing CID-keyed CFF fonts is now working: The glyph index is
+ 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
+ font formats.
+
+ - Some subsetted Type 1 fonts weren't parsed correctly. This bug
+ has been introduced in 2.1.7. In summary, the Type 1 parser has
+ become more robust.
+
+ - Non-decimal numbers weren't parsed correctly in PS fonts.
+
+ - The WinFNT driver now correctly reports FT_ENCODING_NONE for all
+ but one encoding. Use the new FT_WinFNT_ID_XXX values together
+ with `FT_Get_WinFNT_Header' to get the WinFNT charset ID.
+
+ - The descender metrics (face->size->metrics.descender) for WinFNT
+ bitmap fonts had the wrong sign.
+
+ - The (emulated) `seac' support for CFF fonts was broken.
+
+ - The `flex' operator didn't work for CFF fonts.
+
+ - PS glyphs which use the `hintmask' operator haven't been
+ rendered correctly in some cases.
+
+ - Metrics for BDF and PCF bitmap font formats have been fixed.
+
+ - Autohinting is now disabled for glyphs which are vertically
+ distorted or mirrored (using a transformation matrix). This
+ fixes a bug which produced zero-height glyphs.
+
+ - The `freetype-config' script now handles --prefix and
+ --exec-prefix correctly; it also returns the proper --rpath (or
+ -R) value if FreeType has been built as a shared library.
+
+
+ II. IMPORTANT CHANGES
+
+ - Both PCF and BDF drivers now handle the SETWIDTH_NAME and
+ ADD_STYLE_NAME properties. Values are appended to
+ face->style_name; example: `Bold SemiCondensed'.
+
+ - The PCF driver now handles bitmap fonts compressed with the LZW
+ algorithm (extension .pcf.Z, compressed with `compress').
+
+ - A new API function `FT_Get_CMap_Language_ID' (declared in
+ `tttables.h') is available to get the language ID of a
+ TrueType/SFNT cmap.
+
+ - The hexadecimal format of data after the `StartData' command in
+ CID-keyed Type 1 fonts is now supported. While this can't occur
+ in file-based fonts, it can happen in document-embedded
+ resources of PostScript documents.
+
+ - Embedded bitmaps in SFNT-based CFF fonts are now supported.
+
+ - A simple API is now available to control FreeType's tracing
+ mechanism if compiled with FT_DEBUG_LEVEL_TRACE. See the file
+ `ftdebug.h' for more details.
+
+ - YAMATO Masatake contributed improved handling of MacOS resource
+ forks on non-MacOS platforms (for example, Linux can mount MacOS
+ file systems).
+
+ - Support for MacOS has been improved; there is now a new function
+ `FT_New_Face_From_FSSpec' similar to `FT_New_Face' except that
+ it accepts an FSSpec instead of a path.
+
+ - The cache sub-system has been rewritten.
+
+ - There is now support for deinstallation of faces.
+
+ - A new API function `FTC_Manager_RemoveFaceID' has been added
+ to delete all `idle' nodes that correspond to a given
+ FTC_FaceID. All `locked' nodes (i.e., those with a reference
+ count > 0), will be modified to prevent them from appearing in
+ further lookups (they will be cleaned normally when their
+ reference count reaches 0).
+
+ - There is now support for point scaling (i.e., providing
+ character sizes in points + dpis, instead of pixels).
+
+ - Three abstract cache classes are now available:
+
+ FTC_GCache: Used to store one glyph item per cache node,
+ with the ability to group common attributes into
+ `families'. This replaces the old
+ FTC_GlyphCache class.
+
+ FTC_ICache: Used to store one FT_Glyph per cache node. This
+ extends FTC_GCache. Family definition, family
+ comparison, and glyph loading are however left
+ to sub-classes.
+
+ FTC_SCache: Used to store up to 16 small bitmaps per cache
+ node. This extends FTC_GCache. Family
+ definition, family comparison and glyph loading
+ are however left to sub-classes.
+
+ - The file `src/cache/ftcbasic.c' implements:
+
+ FTC_ImageCache: Extends FTC_ICache; implements family
+ definitions and glyph loading similar to the
+ old API.
+
+ FTC_SBitCache: Extends FTC_SCache, implements family
+ definitions and glyph loading similar to the
+ old API
+
+ Client applications should be able to extend FTC_GCache,
+ FTC_ICache, or FTC_SCache much more easily (i.e., less code to
+ write, and less callbacks). For example, one could envision
+ caches that are capable of storing transformed (obliqued),
+ stroked, emboldened, or colored glyph images. Use
+ `ftcbasic.c' as an example.
+
+ - All public APIs are now in `include/freetype/ftcache.h', (to
+ be accessed as `FT_CACHE_H'). The contents of
+ `include/freetype/cache/' is only needed by applications that
+ wish to implement their own caches.
+
+ - There were some major performance improvements through the use
+ of various programming tricks. Cache hits are up to 70%
+ faster than in the old code.
+
+ - The FTC_CMapCache has been simplified. Charmaps can only be
+ accessed by index right now. There is also a new API named
+ `FT_Charmap_GetIndex' for this purpose.
+
+ - The demo programs have been updated to the new code. The
+ previous versions will not work with the current one.
+
+ - Using an invalid face index in FT_Open_Face and friends now
+ causes an error even if the font contains a single face only.
+
+
+ III. MISCELLANEOUS
+
+ - Wolfgang Domröse contributed support files for building FreeType
+ on the Atari using the PureC compiler. Note that the Atari is a
+ 16bit platform.
+
+ - Vitaliy Pasternak contributed project files for VS.NET 2003.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.7 and 2.1.6
+
+ I. IMPORTANT BUG FIXES
+
+ - Updated to newest libtool version, fixing build problems on
+ various platforms.
+
+ - On Unix platforms, `make install' didn't copy the correct
+ `ftconfig.h' file.
+
+ Note that version 2.1.7 contains the same library C source code as
+ version 2.1.6.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.6 and 2.1.5
+
+ I. IMPORTANT BUG FIXES
+
+ - The PFR font driver didn't load kerning tables correctly, and
+ the functions in FT_PFR_H didn't work at all.
+
+ - Type 1 font files in binary format (PFB) with an end-of-file
+ indicator weren't accepted by the FreeType engine.
+
+ - Fonts which contain /PaintType and /StrokeWidth no longer cause
+ a segfault. This bug has been introduced in version 2.1.5.
+
+ - Fonts loaded with FT_LOAD_RENDER no longer cause strange
+ results. This bug has been introduced in version 2.1.5.
+
+ - Some Windows (bitmap) FNT/FON files couldn't be handled
+ correctly.
+
+
+ II. IMPORTANT CHANGES
+
+ - The internal module API has been heavily changed in favor of
+ massive simplifications within the font engine. This also means
+ that authors of third-party modules must adapt their code to the
+ new scheme.
+
+ NOTE: THE NEW SCHEME IS NOT COMPLETED YET. PLEASE WAIT UNTIL A
+ FINAL ANNOUNCEMENT!
+
+ - The PostScript parser has been enhanced to handle comments and
+ strings correctly. Additionally, more syntax forms are
+ recognized.
+
+ - Added the optional unpatented hinting system for TrueType. It
+ allows typefaces which need hinting to produce correct glyph
+ forms (e.g., Chinese typefaces from Dynalab) to work acceptably
+ without infringing Apple patents. This system is compiled only
+ if TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined in
+ ftoption.h (activated by default).
+
+
+ III. MISCELLANEOUS
+
+ - There is now a guard in the public header files to protect
+ against inclusion of freetype.h from FreeType 1.
+
+ - Direct inclusion of freetype.h and other public header files no
+ longer works. You have to use the documented scheme
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+
+ to load freetype.h with a symbolic name. This protects against
+ renaming of public header files (which shouldn't happen but
+ actually has, avoiding two public header files with the same
+ name).
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.5 and 2.1.4
+
+ I. IMPORTANT BUG FIXES
+
+ - Parsing the /CIDFontName field now removes the leading slash to
+ be in sync with other font drivers.
+
+ - gzip support was buggy. Some fonts could not be read.
+
+ - Fonts which have nested subglyphs more than one level deep no
+ longer cause a segfault.
+
+ - Creation of synthetic cmaps for fonts in CFF format was broken
+ partially.
+
+ - Numeric font dictionary entries for synthetic fonts are no
+ longer overwritten.
+
+ - The font matrix wasn't applied to the advance width for Type1,
+ CID, and CFF fonts. This caused problems when loading certain
+ synthetic Type 1 fonts like `Helvetica Narrow'.
+
+ - The test for the charset registry in BDF and PCF fonts is now
+ case-insensitive.
+
+ - FT_Vector_Rotate sometimes returned strange values due to
+ rounding errors.
+
+ - The PCF driver now returns the correct number of glyphs
+ (including an artificial `notdef' glyph at index 0).
+
+ - FreeType now supports buggy CMaps which are contained in many
+ CJK fonts from Dynalab.
+
+ - Opening an invalid font on a Mac caused a segfault due to
+ double-freeing memory.
+
+ - BDF fonts with more than 32768 glyphs weren't supported
+ properly.
+
+
+ II. IMPORTANT CHANGES
+
+ - Accessing bitmap font formats has been synchronized. To do that
+ the FT_Bitmap_Size structure has been extended to contain new
+ fields `size', `x_ppem', and `y_ppem'.
+
+ - The FNT driver now returns multiple faces, not multiple strikes.
+
+ - The `psnames' module has been updated to the Adobe Glyph List
+ version 2.0.
+
+ - The `psnames' module now understands `uXXXX[X[X]]' glyph names.
+
+ - The algorithm for guessing the font style has been improved.
+
+ - For fonts in SFNT format, root->height is no longer increased if
+ the line gap is zero. There exist fonts (containing e.g. form
+ drawing characters) which intentionally have a zero line gap
+ value.
+
+ - ft_glyph_bbox_xxx flags are now deprecated in favour of
+ FT_GLYPH_BBOX_XXX.
+
+ - ft_module_xxx flags are now deprecated in favour of
+ FT_MODULE_XXX.
+
+ - FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} are now
+ deprecated in favour of
+ FT_ENCODING_{SJIS,GB2312,GIB5,WANSONG,JOHAB} -- those encodings
+ are not specific to Microsoft.
+
+
+ III. MISCELLANEOUS
+
+ - The autohinter has been further improved; for example, `m'
+ glyphs now retain its vertical symmetry.
+
+ - Partial support of Mac fonts on non-Mac platforms.
+
+ - `make refdoc' (after first `make') builds the HTML
+ documentation. You need Python for this.
+
+ - The make build system should now work more reliably on DOS-like
+ platforms.
+
+ - Support for EMX gcc and Watson C/C++ compilers on MS-DOS has
+ been added.
+
+ - Better VMS build support.
+
+ - Support for the pkg-config package by providing a `freetype.pc'
+ file.
+
+ - New configure option --with-old-mac-fonts for Darwin.
+
+ - Some source files have been renamed (mainly to fit into the 8.3
+ naming scheme).
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.4 and 2.1.3
+
+ I. IMPORTANT BUG FIXES
+
+ - Updated to newest libtool version, fixing build problems on
+ various platforms.
+
+ - A fix in the Gzip stream reader: It couldn't read certain .gz
+ files properly due to a small typo. In certain cases, FreeType
+ could also loop endlessly when trying to load tiny gzipped
+ files.
+
+ - The configure script now tries to use the system-wide zlib when
+ it finds one (instead of the copy found in src/gzip). And
+ `freetype-config' has been updated to return relevant flags in
+ this case when invoked with `--libs' (e.g. `-lzlib').
+
+ - Certain fonts couldn't be loaded by 2.1.3 because they lacked a
+ Unicode charmap (e.g. SYMBOL.TTF). FreeType erroneously
+ rejected them.
+
+ - The CFF loader was modified to accept fonts which only contain a
+ subset of their reference charset. This prevented the correct
+ use of PDF-embedded fonts.
+
+ - The logic to detect Unicode charmaps has been modified. This is
+ required to support fonts which include both 16-bit and 32-bit
+ charmaps (like very recent asian ones) using the new 10 and 12
+ SFNT formats.
+
+ - The TrueType loader now limits the depth of composite glyphs.
+ This is necessary to prevent broken fonts to break the engine by
+ blowing the stack with recursive glyph definitions.
+
+ - The CMap cache is now capable of managing UCS-4 character codes
+ that are mapped through extended charmaps in recent
+ TrueType/OpenType fonts.
+
+ - The cache sub-system now properly manages out-of-memory
+ conditions instead of blindly reporting them to the caller.
+ This means that it will try to empty the cache before restarting
+ its allocations to see if that can help.
+
+ - The PFR driver didn't return the list of available embedded
+ bitmaps properly.
+
+ - There was a nasty memory leak when using embedded bitmaps in
+ certain font formats.
+
+
+ II. IMPORTANT CHANGES
+
+ - David Chester contributed some enhancements to the auto-hinter
+ that significantly increase the quality of its output. The
+ Postscript hinter was also improved in several ways.
+
+ - The FT_RENDER_MODE_LIGHT render mode was implemented.
+
+ - A new API function called `FT_Get_BDF_Property' has been added
+ to FT_BDF_H to retrieve BDF properties from BDF _and_ PCF font
+ files. THIS IS STILL EXPERIMENTAL, since it hasn't been
+ properly tested yet.
+
+ - A Windows FNT specific API has been added, mostly to access font
+ headers. This is used by Wine.
+
+ - TrueType tables without an `hmtx' table are now tolerated when
+ an incremental interface is used. This happens for certain
+ Type42 fonts passed from Ghostscript to FreeType.
+
+ - The PFR font driver is now capable of returning the font family
+ and style names when they are available (instead of the sole
+ `FontID'). This is performed by parsing an *undocumented*
+ portion of the font file!
+
+
+ III. MISCELLANEOUS
+
+ - The path stroker in FT_STROKER_H has entered beta stage. It now
+ works very well, but its interface might change a bit in the
+ future. More on this in later releases.
+
+ - The documentation for FT_Size_Metrics didn't appear properly in
+ the API reference.
+
+ - The file docs/VERSION.DLL has been updated to explain versioning
+ with FreeType (i.e., comparing release/libtool/so numbers, and
+ how to use them in autoconf scripts).
+
+ - The installation documentation has been seriously revamped.
+ Everything is now in the `docs' directory.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.3 and 2.1.2
+
+ I. IMPORTANT BUG FIXES
+
+ - FT_Vector_Transform had been incorrectly modified in 2.1.2,
+ resulting in incorrect transformations being applied (for
+ example, rotations were processed in opposite angles).
+
+ - The format 8 and 12 TrueType charmap enumeration routines have
+ been fixed (FT_Get_Next_Char returned invalid values).
+
+ - The PFR font driver returned incorrect advance widths if the
+ outline and metrics resolution defined in the font file were
+ different.
+
+ - FT_Glyph_To_Bitmap now returns successfully when called with an
+ FT_BitmapGlyph argument (it previously returned an error).
+
+ - A bug in the Type 1 loader that prevented valid font bounding
+ boxes to be loaded from multiple master fonts.
+
+ - The SFNT validation code has been rewritten. FreeType can now
+ load `broken' fonts that were usable on Windows, but not with
+ previous versions of the library.
+
+ - The computation of bearings in the BDF driver has been fixed.
+
+ - The Postscript hinter crashed when trying to hint certain glyphs
+ (more precisely, when trying to apply hints to an empty glyph
+ outline).
+
+ - The TrueType glyph loader now supports composites in `Apple
+ format' (they differ slightly from Microsoft/OpenType ones in
+ the way transformation offsets are computed).
+
+ - FreeType was very slow at opening certain asian CID/CFF fonts,
+ due to fixed increment in dynamic array re-allocations. This
+ has been changed to exponential behaviour to get acceptable
+ performance.
+
+
+
+ II. IMPORTANT CHANGES
+
+ - The PCF driver now supports gzip-compressed font files natively.
+ This means that you will be able to use all these bitmap fonts
+ that come with XFree86 with FreeType (and libXft/libXft2, by
+ extension).
+
+ - The automatic and postscript hinters have both been updated.
+ This results in a relatively important increase of rendering
+ quality since many nasty defaults have been suppressed. Please
+ visit the web page:
+
+ http://www.freetype.org/hinting/smooth-hinting.html
+
+ for additional details on this topic.
+
+ - The `load_flags' parameter of `FT_Load_Glyph' is now an FT_Int32
+ (instead of just being an FT_Int). This breaks source and
+ binary compatibility for 16bit systems only, while retaining
+ both of them for 32 and 64 bit ones.
+
+ Some new flags have been added consequently:
+
+ FT_LOAD_NO_AUTOHINT :: Disable the use of the auto-hinter
+ (but not native format hinters).
+
+ FT_LOAD_TARGET_NORMAL :: Hint and render for normal
+ anti-aliased displays.
+
+ FT_LOAD_TARGET_MONO :: Hint and render for 1-bit displays.
+
+ FT_LOAD_TARGET_LCD :: Hint and render for horizontal RGB or
+ BGR sub-pixel displays (like LCD
+ screens). THIS IS STILL
+ EXPERIMENTAL!
+
+ FT_LOAD_TARGET_LCD_V :: Same as FT_LOAD_TARGET_LCD, for
+ vertical sub-pixel displays (like
+ rotated LCD screens). THIS IS STILL
+ EXPERIMENTAL!
+
+ FT_LOAD_MONOCHROME is still supported, but only affects
+ rendering, not the hinting.
+
+ Note that the `ftview' demo program available in the `ft2demos'
+ package has been updated to support LCD-optimized display on
+ non-paletted displays (under Win32 and X11).
+
+ - The PFR driver now supports embedded bitmaps (all formats
+ supported), and returns correct kerning metrics for all glyphs.
+
+ - The TrueType charmap loader now supports certain `broken' fonts
+ that load under Windows without problems.
+
+ - The cache API has been slightly modified (it's still a beta!):
+
+ - The type FTC_ImageDesc has been removed; it is now replaced
+ by FTC_ImageTypeRec. Note that one of its fields is a
+ `load_flag' parameter for FT_Load_Glyph.
+
+ - The field `num_grays' of FT_SBitRec has been changed to
+ `max_grays' in order to fit within a single byte. Its
+ maximum value is thus 255 (instead of 256 as previously).
+
+
+ III. MISCELLANEOUS
+
+ - Added support for the DESTDIR variable during `make install'.
+ This simplifies packaging of FreeType.
+
+ - Included modified copies of the ZLib sources in `src/gzip' in
+ order to support gzip-compressed PCF fonts. We do not use the
+ system-provided zlib for now, though this is a probable
+ enhancement for future releases.
+
+ - The DocMaker tool used to generate the on-line API reference has
+ been completely rewritten. It is now located in
+ `src/tools/docmaker/docmaker.py'. Features:
+
+ - better cross-referenced output
+ - more polished output
+ - uses Python regular expressions (though it didn't speed the
+ program)
+ - much more modular structure, which allows for different
+ `backends' in order to generate HTML, XML, or whatever
+ format.
+
+ One can regenerate the API reference by calling:
+
+ python src/tools/docmaker/docmaker.py \
+ --prefix=ft2 \
+ --title=FreeType-2.1.3 \
+ --output=<outputdirectory>
+ include/freetype/*.h \
+ include/freetype/config/*.h \
+ include/freetype/cache/*.h
+
+ - A new, experimental, support for incremental font loading (i.e.,
+ loading of fonts where the glyphs are not in the font file
+ itself, but provided by an external component, like a Postscript
+ interpreter) has been added by Graham Asher. This is still work
+ in progress, however.
+
+ - A new, EXPERIMENTAL, path stroker has been added. It doesn't
+ suffer from severe rounding errors and treat bezier arcs
+ directly. Still work in progress (i.e. not part of the official
+ API). See the file <freetype/ftstroker.h> for some of the
+ details.
+
+ - The massive re-formatting of sources and internal re-design is
+ still under-way. Many internal functions, constants, and types
+ have been renamed.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.2 and 2.1.1
+
+ I. IMPORTANT BUG FIXES
+
+ - Many font drivers didn't select a Unicode charmap by default
+ when a new face was opened (with the FT_CONFIG_OPTION_USE_CMAPS
+ options enabled), causing many applications to not be able to
+ display text correctly with the 2.1.x releases.
+
+ - The PFR driver had a bug in its composite loading code that
+ produces incorrectly placed accents with many fonts.
+
+ - The Type42 driver crashed sometimes due to a nasty bug.
+
+ - The Type 1 custom encoding charmap didn't handle the case where
+ the first glyph index wasn't 0.
+
+ - A serious typo in the TrueType composite loader produced
+ incorrectly placed glyphs in fonts like `Wingdings' and a few
+ others.
+
+
+ II. MISCELLANEOUS
+
+ - The Win32 Visual C++ project file has been updated to include
+ the PFR driver as well.
+
+ - `freetype.m4' is now installed by default by `make install' on
+ Unix systems.
+
+ - The function FT_Get_PS_Font_Info now works with CID and Type42
+ fonts as well.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.1 and 2.1.0
+
+ I. IMPORTANT BUG FIXES
+
+ - The `version_info' returned by `freetype-config' in 2.1.0
+ returned an invalid value. It now returns 9:1:3 (2.0.9 returned
+ 9:0:3).
+
+ - Version 2.1.0 couldn't be linked against applications on Win32
+ and Amiga systems due to a new debug function that wasn't
+ properly propagated to the system-specific directory in
+ `builds'.
+
+ - Various MacOS and Mac OS X specific fixes.
+
+ - Fixed a bug in the TrueType charmap validation routines that
+ made version 2.1.0 too restrictive -- many popular fonts have
+ been rejected.
+
+ - There was still a very small difference between the monochrome
+ glyph bitmaps produced by FreeType 1.x and FreeType 2.x with the
+ bytecode interpreter enabled. This was caused by an invalid
+ flag setting in the TrueType glyph loader, making the rasterizer
+ change its drop-out control mode. Now the results should
+ _really_ be completely identical.
+
+ - The TrueType name table loader has been improved to support many
+ popular though buggy Asian fonts. It now ignores empty name
+ entries, invalid pointer offsets and a few other incorrect
+ subtleties. Moreover, name strings are now loaded on demand,
+ which reduces the memory load of many faces (e.g. the ARIAL.TTF
+ font file contains a 10kByte name table with 70 names).
+
+ - Fixed a bug in the Postscript hinter that prevented family blues
+ substitution to happen correctly.
+
+
+ II. NEW FEATURES
+
+ - Three new font drivers in this release:
+
+ * A BDF font driver, contributed by Franco Zappa Nardelli,
+ heavily modified by Werner Lemberg. It also supports
+ anti-aliased bitmaps (using a slightly extended BDF format).
+
+ * A Type42 font driver, contributed by Roberto Alameda. It is
+ still experimental but seems to work relatively well.
+
+ * A PFR font driver, contributed by David Turner himself. It
+ doesn't support PFR hinting -- note that BitStream has at
+ least two patents on this format!
+
+
+ III. MISCELLANEOUS
+
+ - The cache sub-system has been optimized in important ways.
+ Cache hits are now significantly faster. For example, using the
+ CMap cache is about twice faster than calling FT_Get_Char_Index
+ on most platforms. Similarly, using an SBit cache is about five
+ times faster than loading the bitmaps from a bitmap file, and
+ 300 to 500 times faster than generating them from a scalable
+ format.
+
+ Note that you should recompile your sources if you designed a
+ custom cache class for the FT2 Cache subsystem, since the
+ changes performed are source, but not binary, compatible.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.1.0 and 2.0.9
+
+ I. IMPORTANT BUG FIXES
+
+ - The TrueType bytecode interpreter has been fixed to produce
+ _exactly_ the same output as FreeType 1.x. Previous differences
+ were due to slightly distinct fixed-point computation routines
+ used to perform dot products and vector length measurements.
+
+ It seems that native TrueType hinting is _extremely_ sensitive
+ to rounding errors. The required vector computation routines
+ have been optimized and placed within the `ttinterp.c' file.
+
+ - Fixed the parsing of accelerator tables in the PCF font driver.
+
+ - Fixed the Type1 glyph loader routine used to compute the font's
+ maximum advance width.
+
+
+ II. NEW FEATURES
+
+ - The `configure' script used on Unix systems has been modified to
+ check that GNU Make is being used to build the library.
+ Otherwise, it will display a message proposing to use the
+ GNUMAKE environment variable to name it.
+
+ The Unix-specific file README.UNX has been modified accordingly.
+
+
+ III. MISCELLANEOUS
+
+ - The FreeType License in `docs/FTL.TXT' has been updated to
+ include a proposed preferred disclaimer. If you are using
+ FreeType in your products, you are encouraged (but not mandated)
+ to use the following text in your documentation:
+
+ """
+ Portions of this software are copyright © 1996-2002 The
+ FreeType Project (www.freetype.org). All rights reserved.
+ """
+
+ - The default size of the render pool has been reduced to 16kByte.
+ This shouldn't result in any noticeable performance penalty,
+ unless you are using the engine as-is to render very large and
+ complex glyphs.
+
+ - The FreeType 2 redesign has begun. More information can be
+ found at this URL:
+
+ http://www.freetype.org/freetype2/redesign.html
+
+ The following internal changes have been performed within the
+ sources of this release:
+
+ - Many internal types have been renamed to increase
+ consistency. The following should be true, except for
+ public types:
+
+ * All structure types have a name ending in `Rec' (short
+ for `record').
+
+ * A pointer-to-structure type has the same name as the
+ structure, _without_ the `Rec' suffix.
+
+ Example:
+
+ typedef struct FooRec_
+ {
+ ...
+
+ } FooRec, *Foo;
+
+ - Many internal macros have been renamed to increase
+ consistency. The following should be true:
+
+ * All macros have a name beginning with `FT_'. This
+ required a few changes like
+
+ ALLOC => FT_ALLOC
+ FREE => FT_FREE
+ REALLOC => FT_REALLOC
+
+ * All macros are completely UPPERCASE. This required a
+ few changes like:
+
+ READ_Short => FT_READ_SHORT
+ NEXT_Short => FT_NEXT_SHORT
+ GET_ULongLE => FT_GET_ULONG_LE
+ MEM_Set => FT_MEM_SET
+ MEM_Copy => FT_MEM_COPY
+ etc.
+
+ * Whenever possible, all macro names follow the
+ FT_<OBJECT>_<METHOD> pattern. For example
+
+ ACCESS_Frame => FT_FRAME_ENTER
+ FORGET_Frame => FT_FRAME_EXIT
+ EXTRACT_Frame => FT_FRAME_EXTRACT
+ RELEASE_Frame => FT_FRAME_RELEASE
+
+ FILE_Pos => FT_STREAM_POS
+ FILE_Seek => FT_STREAM_SEEK
+ FILE_Read => FT_STREAM_READ
+ FILE_ReadAt => FT_STREAM_READ_AT
+ READ_Fields => FT_STREAM_READ_FIELDS
+
+ - Many internal functions have been renamed to follow the
+ FT_<Object>_<Method> pattern. For example:
+
+ FT_Seek_Stream => FT_Stream_Seek
+ FT_Read_Stream_At => FT_Stream_ReadAt
+ FT_Done_Stream => FT_Stream_Close
+ FT_New_Stream => FT_Stream_Open
+ FT_New_Memory_Stream => FT_Stream_OpenMemory
+ FT_Extract_Frame => FT_Stream_ExtractFrame
+
+ Note that method names do not contain `_'.
+
+ - The FT_ALLOC_ARRAY and FT_REALLOC_ARRAY have been replaced
+ with FT_NEW_ARRAY and FT_RENEW_ARRAY which do not take a
+ type as the fourth argument. Instead, the array element
+ type size is computed automatically from the type of the
+ target pointer used.
+
+ - A new object class, FT_CMap, has been introduced. These
+ internal objects are used to model character maps. This
+ eases the support of additional charmap types within the
+ engine.
+
+ - A new configuration file named `ftstdlib.h' has been added
+ to `include/freetype/config'. It is used to define aliases
+ for _every_ routine of the ISO C library that the font
+ engine uses. Each aliases has a `ft_' prefix
+ (e.g. `ft_strlen' is an alias for `strlen').
+
+ This is used to ease the porting of FreeType 2 to exotic
+ runtime environments where the ISO C Library isn't available
+ (e.g. XFree86 extension modules).
+
+ More details are available in the `ChangeLog' file.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.0.9 and 2.0.8
+
+ I. IMPORTANT BUG FIXES
+
+ - Certain fonts like `foxjump.ttf' contain broken name tables with
+ invalid entries and wild offsets. This caused FreeType to crash
+ when trying to load them.
+
+ The SFNT `name' table loader has been fixed to be able to
+ support these strange fonts.
+
+ Moreover, the code in charge of processing this table has been
+ changed to always favour Windows-formatted entries over other
+ ones. Hence, a font that works on Windows but not on the Mac
+ will load cleanly in FreeType and report accurate values for
+ Family & PostScript names.
+
+ - The CID font driver has been fixed. It unfortunately returned a
+ Postscript Font name with a leading slash, as in
+ `/MunhwaGothic-Regular'.
+
+ - FreeType 2 should now compile fine on AIX 4.3.3 as a shared
+ library.
+
+ - A bug in the Postscript hinter has been found and fixed,
+ removing un-even stem widths at small pixel sizes (like 14-17).
+
+ This improves the quality of a certain number of Postscript
+ fonts.
+
+
+ II. NEW FEATURES
+
+ - A new function named `FT_Library_Version' has been added to
+ return the current library's major, minor, and patch version
+ numbers. This is important since the macros FREETYPE_MAJOR,
+ FREETYPE_MINOR, and FREETYPE_PATCH cannot be used when the
+ library is dynamically linked by a program.
+
+ - Two new APIs have been added: `FT_Get_First_Char' and
+ `FT_Get_Next_Char'.
+
+ Together, these can be used to iterate efficiently over the
+ currently selected charmap of a given face. Read the API
+ reference for more details.
+
+
+ III. MISCELLANEOUS
+
+ - The FreeType sources are under heavy internal re-factoring. As
+ a consequence, we have created a branch named `STABLE' on the
+ CVS to hold all future releases/fixes in the 2.0.x family.
+
+ The HEAD branch now contains the re-factored sources and
+ shouldn't be used for testing or packaging new releases. In
+ case you would like to access the 2.0.9 sources from our CVS
+ repository, use the tag `VER-2-0-9'.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.0.8 and 2.0.7
+
+ I. IMPORTANT BUG FIXES
+
+ - There was a small but nasty bug in `freetype-config.in' which
+ caused the `freetype-config' script to fail on Unix.
+
+ This didn't prevent the installation of the library or even its
+ execution, but caused problems when trying to compile many Unix
+ packages that depend on it.
+
+ - Some TrueType or OpenType fonts embedded in PDF documents do not
+ have a 'cmap', 'post' and 'name' as is required by the
+ specification. FreeType no longer refuses to load such fonts.
+
+ - Various fixes to the PCF font driver.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.0.7 and 2.0.6
+
+ I. IMPORTANT BUG FIXES
+
+ - Fixed two bugs in the Type 1 font driver. The first one
+ resulted in a memory leak in subtle cases. The other one caused
+ FreeType to crash when trying to load `.gsf' files (Ghostscript
+ so-called Postscript fonts).
+
+ (This made _many_ KDE applications crash on certain systems.
+ FreeType _is_ becoming a critical system component on Linux :-)
+
+ - Fixed a memory leak in the CFF font driver.
+
+ - Fixed a memory leak in the PCF font driver.
+
+ - Fixed the Visual C++ project file
+ `builds/win32/visualc/freetype.dsp' since it didn't include the
+ Postscript hinter component, causing errors at build time.
+
+ - Fixed a small rendering bug in the anti-aliased renderer that
+ only occurred when trying to draw thin (less than 1 pixel)
+ strokes.
+
+ - Fixed `builds/unix/freetype2.a4' which is used to generate a
+ valid `freetype2.m4' for use with autoconf.
+
+ - Fixed the OpenVMS Makefiles.
+
+
+ II. MISCELLANEOUS
+
+ - Added `configure' and `install' scripts to the top-level
+ directory. A GNU-style installation is thus now easily possible
+ with
+
+ ./configure <options>
+ make
+ make install
+
+
+======================================================================
+
+CHANGES BETWEEN 2.0.6 and 2.0.5
+
+ I. IMPORTANT BUG FIXES
+
+ - It wasn't possible to load embedded bitmaps when the auto-hinter
+ was used. This is now fixed.
+
+ - The TrueType font driver didn't load some composites properly
+ (the sub-glyphs were slightly shifted, and this was only
+ noticeable when using monochrome rendering).
+
+ - Various fixes to the auto-hinter. They merely improve the
+ output of sans-serif fonts. Note that there are still problems
+ with serifed fonts and composites (accented characters).
+
+ - All scalable font drivers erroneously returned un-fitted glyph
+ advances when hinting was requested. This created problems for
+ a number of layout applications. This is a very old bug that
+ got undetected mainly because most test/demo program perform
+ rounding explicitly or implicitly (through the cache).
+
+ - `FT_Glyph_To_Bitmap' did erroneously modify the source glyph in
+ certain cases.
+
+ - `glnames.py' still contained a bug that made FreeType return
+ invalid names for certain glyphs.
+
+ - The library crashed when loading certain Type 1 fonts like
+ `sadn.pfb' (`Stalingrad Normal'), which appear to contain
+ pathetic font info dictionaries.
+
+ - The TrueType glyph loader is now much more paranoid and checks
+ everything when loading a given glyph image. This was necessary
+ to avoid problems (crashes and/or memory overwrites) with broken
+ fonts that came from a really buggy automatic font converter.
+
+
+ II. IMPORTANT UPDATES AND NEW FEATURES
+
+ - Important updates to the Mac-specific parts of the library.
+
+ - The caching sub-system has been completely re-designed, and its
+ API has evolved (the old one is still supported for backward
+ compatibility).
+
+ The documentation for it is not yet completed, sorry. For now,
+ you are encouraged to continue using the old API. However, the
+ ftview demo program in the ft2demos package has already been
+ updated to use the new caching functions.
+
+ - A new charmap cache is provided too. See `FTC_CMapCache'. This
+ is useful to perform character code -> glyph index translations
+ quickly, without the need for an opened FT_Face.
+
+ - A NEW POSTSCRIPT HINTER module has been added to support native
+ hints in the following formats: PostScript Type 1, PostScript
+ CID, and CFF/CEF.
+
+ Please test! Note that the auto-hinter produces better results
+ for a number of badly-hinted fonts (mostly auto-generated ones)
+ though.
+
+ - A memory debugger is now part of the standard FreeType sources.
+ To enable it, define FT_DEBUG_MEMORY in
+ <freetype/config/ftoption.h>, and recompile the library.
+
+ Additionally, define the _environment_ variable FT_DEBUG_MEMORY
+ and run any program using FreeType. When the library is exited,
+ a summary of memory footprints and possible leaks will be
+ displayed.
+
+ This works transparently with _any_ program that uses FreeType.
+ However, you will need a lot of memory to use this (allocated
+ blocks are never released to the heap to detect double deletes
+ easily).
+
+
+ III. MISCELLANEOUS
+
+ - We are aware of subtle differences between the output of
+ FreeType versions 1 and 2 when it comes to monochrome
+ TrueType-hinted glyphs. These are most probably due to small
+ differences in the monochrome rasterizers and will be worked out
+ in an upcoming release.
+
+ - We have decided to fork the sources in a `stable' branch, and an
+ `unstable' one, since FreeType is becoming a critical component
+ of many Unix systems.
+
+ The next bug-fix releases of the library will be named 2.0.7,
+ 2.0.8, etc., while the `2.1' branch will contain a version of
+ the sources where we will start major reworking of the library's
+ internals, in order to produce FreeType 2.2.0 (or even 3.0) in a
+ more distant future.
+
+ We also hope that this scheme will allow much more frequent
+ releases than in the past.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.0.5 and 2.0.4
+
+ NOTE THAT 2.0.5 DOES NOT CONTAIN THE POSTSCRIPT HINTER. THIS MODULE
+ WILL BE PART OF THE NEXT RELEASE (EITHER 2.0.6 or 2.1)
+
+ - Fixed a bug that made certain glyphs, like `Cacute', `cacute' and
+ `lslash' unavailable from Unicode charmaps of Postscript fonts.
+ This prevented the correct display of Polish text, for example.
+
+ - The kerning table of Type 1 fonts was loaded by FreeType, when its
+ AFM file was attached to its face, but the
+ FT_FACE_FLAG_HAS_KERNING bit flags was not set correctly,
+ preventing FT_Get_Kerning to return meaningful values.
+
+ - Improved SFNT (TrueType & OpenType) charmap support. Slightly
+ better performance, as well as support for the new formats defined
+ by the OpenType 1.3 specification (8, 10, and 12)
+
+ - Fixed a serious typo in `src/base/ftcalc.c' which caused invalid
+ computations in certain rare cases, producing ugly artefacts.
+
+ - The size of the EM square is computed with a more accurate
+ algorithm for Postscript fonts. The old one caused slight errors
+ with embedded fonts found in PDF documents.
+
+ - Fixed a bug in the cache manager that prevented normal LRU
+ behaviour within the cache manager, causing unnecessary reloads
+ (for FT_Face and FT_Size objects only).
+
+ - Added a new function named `FT_Get_Name_Index' to retrieve the
+ glyph index of a given glyph name, when found in a face.
+
+ - Added a new function named `FT_Get_Postscript_Name' to retrieve
+ the `unique' Postscript font name of a given face.
+
+ - Added a new public header size named FT_SIZES_H (or
+ <freetype/ftsizes.h>) providing new FT_Size-management functions:
+ FT_New_Size, FT_Activate_Size, FT_Done_Size.
+
+ - Fixed a reallocation bug that generated a dangling pointer (and
+ possibly memory leaks) with Postscript fonts (in
+ src/psaux/psobjs.c).
+
+ - Many fixes for 16-bit correctness.
+
+ - Removed many pedantic compiler warnings from the sources.
+
+ - Added an Amiga build directory in `builds/amiga'.
+
+
+======================================================================
+
+CHANGES BETWEEN 2.0.4 and 2.0.3
+
+ - Fixed a rather annoying bug that was introduced in 2.0.3. Namely,
+ the font transformation set through FT_Set_Transform was applied
+ twice to auto-hinted glyphs, resulting in incorrectly rotated text
+ output.
+
+ - Fixed _many_ compiler warnings. FT2 should now compile cleanly
+ with Visual C++'s most pedantic warning level (/W4). It already
+ compiled fine with GCC and a few other compilers.
+
+ - Fixed a bug that prevented the linear advance width of composite
+ TrueType glyphs to be correctly returned.
+
+ - Fixed the Visual C++ project files located in
+ `builds/win32/visualc' (previous versions used older names of the
+ library).
+
+ - Many 32-bit constants have an `L' appended to their value, in
+ order to improve the 16-bitness of the code. Someone is actually
+ trying to use FT2 on an Atari ST machine!
+
+ - Updated the `builds/detect.mk' file in order to automatically
+ build FT2 on AIX systems. AIX uses `/usr/sbin/init' instead of
+ `/sbin/init' and wasn't previously detected as a Unix platform by
+ the FreeType build system.
+
+ - Updated the Unix-specific portions of the build system (new
+ libtool version, etc.).
+
+ - The SFNT kerning loader now ensures that the table is sorted
+ (since some problem fonts do not meet this requirement).
+
+
+=======================================================================
+
+CHANGES BETWEEN 2.0.3 and 2.0.2
+
+ I. CHANGES TO THE MODULES / FONT DRIVERS
+
+ - THE AUTO-HINTER HAS BEEN SLIGHTLY IMPROVED, in order to fix
+ several annoying artefacts, mainly:
+
+ - Blue zone alignment of horizontal stems wasn't performed
+ correctly, resulting in artefacts like the `d' being placed
+ one pixel below the `b' in some fonts like Time New Roman.
+
+ - Overshoot thresholding wasn't performed correctly, creating
+ unpleasant artefacts at large character pixel sizes.
+
+ - Composite glyph loading has been simplified. This gets rid
+ of various artefacts where the components of a composite
+ glyphs were not correctly spaced.
+
+ These are the last changes to the current auto-hinting module.
+ A new hinting sub-system is currently in the work in order to
+ support native hints in Type 1 / CFF / OpenType fonts, as well
+ as globally improve rendering.
+
+ - The PCF driver has been fixed. It reported invalid glyph
+ dimensions for the fonts available on Solaris.
+
+ - The Type 1, CID and CFF drivers have been modified to fix the
+ computation of the EM size.
+
+ - The Type 1 driver has been fixed to avoid a dangerous bug that
+ crashed the library with non-conforming fonts (i.e. ones that do
+ not place the .notdef glyph at position 0).
+
+ - The TrueType driver had a rather subtle bug (dangling pointer
+ when loading composite glyphs) that could crash the library in
+ rare occasions!
+
+
+ II. HIGH-LEVEL API CHANGES
+
+ - The error code enumeration values have been changed. An error
+ value is decomposed in a generic error code, and a module
+ number. see <freetype/fterrors.h> for details.
+
+ - A new public header file has been introduced, named
+ FT_TRIGONOMETRY_H (include/freetype/fttrig.h), providing
+ trigonometric functions to compute sines, cosines, arctangents,
+ etc. with 16.16 fixed precision. The implementation is based on
+ the CORDIC algorithm and is very fast while being sufficiently
+ accurate.
+
+
+ III. INTERNALS
+
+ - Added BeOS-specific files in the old build sub-system. Note
+ that no changes were required to compile the library with Jam.
+
+ - The configuration is now capable of automatically detecting
+ 64-bit integers on a set of predefined compilers (GCC, Visual
+ C++, Borland C++) and will use them by default. This provides a
+ small performance boost.
+
+ - A small memory leak that happened when opening 0-sized files
+ (duh!) have been fixed.
+
+ - Fixed bezier stack depth bug in the routines provided by the
+ FT_BBOX_H header file. Also fixed similar bugs in the
+ rasterizers.
+
+ - The outline bounding box code has been rewritten to use direct
+ computations, instead of bezier sub-division, to compute the
+ exact bounding box of glyphs. This is slightly slower but more
+ accurate.
+
+ - The build system has been improved and fixed, mainly to support
+ `make' on Windows 2000 correctly, avoid problems with `make
+ distclean' on non Unix systems, etc.
+
+ - Hexadecimal constants have been suffixed with `U' to avoid
+ problems with certain compilers on 64-bit platforms.
+
+ - A new directory named `src/tools' has been created. It contains
+ Python scripts and simple unit test programs used to develop the
+ library.
+
+ - The DocMaker tool has been moved from `docs' to `src/tools' and
+ has been updated with the following:
+
+ - Now accepts the `--title=XXXX' or `-t XXXX' option from the
+ command line to set the project's name in the generated API
+ reference.
+
+ - Now accepts the `--output=DIR' or `-o DIR' option from the
+ command line to set the output directory for all generated
+ HTML files.
+
+ - Now accepts the `--prefix=XXXX' or `-p XXX' option from the
+ command line to set the file prefix to use for all
+ generated HTML files.
+
+ - Now generates the current time/data on each generated page
+ in order to distinguish between versions.
+
+ DocMaker can be used with other projects now, not only FT2
+ (e.g. MLib, FTLayout, etc.).
+
+
+======================================================================
+
+CHANGES BETWEEN 2.0.2 and 2.0.1
+
+ I. CHANGES TO THE MODULES / FONT DRIVERS
+
+ - THE TRUETYPE BYTECODE INTERPRETER IS NOW TURNED OFF, in order to
+ avoid legal problems with the Apple patents. It seems that we
+ mistakenly turned this option on in previous releases of the
+ build.
+
+ Note that if you want to use the bytecode interpreter in order
+ to get high-quality TrueType rendering, you will need to toggle
+ by hand the definition of the
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER macro in the file
+ `include/freetype/config/ftoption.h'.
+
+ - The CFF driver has been improved by Tom Kacvinsky and Sander van
+ der Wal:
+
+ * Support for `seac' emulation.
+ * Support for `dotsection'.
+ * Support for retrieving glyph names through
+ `FT_Get_Glyph_Name'.
+
+ The first two items are necessary to correctly a large number of
+ Type 1 fonts converted to the CFF formats by Adobe Acrobat.
+
+ - The Type 1 driver was also improved by Tom & others:
+
+ * Better EM size computation.
+ * Better support for synthetic (transformed) fonts.
+ * The Type 1 driver returns the charstrings corresponding to
+ each glyph in the `glyph->control_data' field after a call to
+ `FT_Load_Glyph' (thanks Ha Shao).
+
+ - Various other bugfixes, including the following:
+
+ * Fixed a nasty memory leak in the Type 1 driver.
+ * The autohinter and the pcf driver used static writable data
+ when they shouldn't.
+ * Many casts were added to make the code more 64-bits safe. It
+ also now compiles on Windows XP 64-bits without warnings.
+ * Some incorrect writable statics were removed in the `autohint'
+ and `pcf' drivers. FreeType 2 now compiles on Epoc again.
+
+
+ II. CHANGES TO THE HIGH-LEVEL API
+
+ - The library header files inclusion scheme has been changed. The
+ old scheme looked like:
+
+ #include <freetype/freetype.h>
+ #include <freetype/ftglyph.h>
+ #include <freetype/ftcache.h>
+ #include <freetype/cache/ftimage.h>
+
+ Now you should use:
+
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+ #include FT_GLYPH_H
+ #include FT_CACHE_H
+ #include FT_CACHE_IMAGE_H
+
+ NOTE THAT THE OLD INCLUSION SCHEME WILL STILL WORK WITH THIS
+ RELEASE. HOWEVER, WE DO NOT GUARANTEE THAT THIS WILL STILL BE
+ TRUE IN THE NEXT ONE (A.K.A. FREETYPE 2.1).
+
+ The file <ft2build.h> is used to define the header filename
+ macros. The complete and commented list of macros is available
+ in the API reference under the section name `Header File Macros'
+ in Chapter I.
+
+ For more information, see section I of the following document:
+
+ http://www.freetype.org/
+ freetype2/docs/tutorial/step1.html
+
+ or
+
+ http://freetype.sourceforge.net/
+ freetype2/docs/tutorial/step1.html
+
+ - Many, many comments have been added to the public source file in
+ order to automatically generate the API Reference through the
+ `docmaker.py' Python script.
+
+ The latter has been updated to support the grouping of sections
+ in chapters and better index sort. See:
+
+ http://www.freetype.org/freetype2/docs/reference/ft2-toc.html
+
+
+ III. CHANGES TO THE BUILD PROCESS
+
+ - If you are not building FreeType 2 with its own build system
+ (but with your own Makefiles or project files), you will need to
+ be aware that the build process has changed a little bit.
+
+ You don't need to put the `src' directory in the include path
+ when compiling any FT2 component. Instead, simply put the
+ component's directory in the current include path.
+
+ So, if you were doing something like:
+
+ cc -c -Iinclude -Isrc src/base/ftbase.c
+
+ change the line to:
+
+ cc -c -Iinclude -Isrc/base src/base/ftbase.c
+
+ If you were doing something like:
+
+ cd src/base
+ cc -c -I../../include -I.. ftbase.c
+
+ change it to:
+
+ cd src/base
+ cc -c -I../../include ftbase.c
+
+
+======================================================================
+
+CHANGES BETWEEN 2.0.1 and 2.0
+
+ 2.0.1 introduces a few changes:
+
+ - Fixed many bugs related to the support of CFF / OpenType fonts.
+ These formats are now much better supported though there is
+ still work planned to deal with charset tables and PDF-embedded
+ CFF files that use the old `seac' command.
+
+ - The library could not be compiled in debug mode with a very
+ small number of C compilers whose pre-processors didn't
+ implement the `##' directive correctly (i.e. per se the ANSI C
+ specification!) An elegant fix was found.
+
+ - Added support for the free Borland command-line C++ Builder
+ compiler. Use `make setup bcc32'. Also fixed a few source
+ lines that generated new warnings with BCC32.
+
+ - Fixed a bug in FT_Outline_Get_BBox when computing the extrema of
+ a conic Bezier arc.
+
+ - Updated the INSTALL file to add IDE compilation.
+
+ - Other minor bug fixes, from invalid Type 1 style flags to
+ correct support of synthetic (obliqued) fonts in the
+ auto-hinter, better support for embedded bitmaps in a SFNT font.
+
+ - Fixed some problems with `freetype-config'.
+
+ Finally, the `standard' scheme for including FreeType headers is now
+ gradually changing, but this will be explained in a later release
+ (probably 2.0.2).
+
+ And very special thanks to Tom Kacvinsky and YAMANO-UCHI Hidetoshi
+ for their contributions!
+
+
+======================================================================
+
+CHANGES BETWEEN beta8 and 2.0
+
+ - Changed the default installation path for public headers from
+ `include/freetype' to `include/freetype2'.
+
+ Also added a new `freetype-config' that is automatically generated
+ and installed on Unix and Cygwin systems. The script itself is
+ used to retrieve the current install path, C compilation flags as
+ well as linker flags.
+
+ - Fixed several small bugs:
+
+ * Incorrect max advance width for fixed-pitch Type 1 fonts.
+ * Incorrect glyph names for certain TrueType fonts.
+ * The glyph advance was not copied when FT_Glyph_To_Bitmap was
+ called.
+ * The linearHoriAdvance and linearVertAdvance fields were not
+ correctly returned for glyphs processed by the auto-hinter.
+ * `type1z' renamed back to `type1'; the old `type1' module has
+ been removed.
+
+ - Revamped the build system to make it a lot more generic. This
+ will allow us to re-use nearly un-modified in lots of other
+ projects (including FreeType Layout).
+
+ - Changed `cid' to use `psaux' too.
+
+ - Added the cache sub-system. See <freetype/ftcache.h> as well as
+ the sources in `src/cache'. Note that it compiles but is still
+ untested for now.
+
+ - Updated `docs/docmaker.py', a draft API reference is available at
+ http://www.freetype.org/ft2api.html.
+
+ - Changed `type1' to use `psaux'.
+
+ - Created a new module named `psaux' to hold the Type 1 & Type 2
+ parsing routines. It should be used by `type1', `cid', and `cff'
+ in the future.
+
+ - Fixed an important bug in `FT_Glyph_Get_CBox'.
+
+ - Fixed some compiler warnings that happened since the TrueType
+ bytecode decoder was deactivated by default.
+
+ - Fixed two memory leaks:
+
+ * The memory manager (16 bytes) isn't released in
+ FT_Done_FreeType!
+ * Using custom input streams, the copy of the original stream was
+ never released.
+
+ - Fixed the auto-hinter by performing automatic computation of the
+ `filling direction' of each glyph. This is done through a simple
+ and fast approximation, and seems to work (problems spotted by
+ Werner though). The Arphic fonts are a lot nicer though there are
+ still a lot of things to do to handle Asian fonts correctly.
+
+
+======================================================================
+
+BETA-8 (RELEASE CANDIDATE) CHANGES
+
+ - Deactivated the TrueType bytecode interpreter by default.
+
+ - Deactivated the `src/type1' font driver. Now `src/type1z' is used
+ by default.
+
+ - Updates to the build system. We now compile the library correctly
+ under Unix system through `configure' which is automatically
+ called on the first `make' invocation.
+
+ - Added the auto-hinting module! Fixing some bugs here and there.
+
+ - Found some bugs in the composite loader (seac) of the Type1-based
+ font drivers.
+
+ - Renamed the directory `freetype2/config' to `freetype2/builds' and
+ updated all relevant files.
+
+ - Found a memory leak in the `type1' driver.
+
+ - Incorporated Tom's patches to support flex operators correctly in
+ OpenType/CFF fonts. Now all I need is to support pure CFF and CEF
+ fonts to be done with this driver :-)
+
+ - Added the Windows FNT/FON driver in `src/winfonts'. For now, it
+ always `simulates' a Unicode charmap, so it shouldn't be
+ considered completed right now.
+
+ It is there to be more a proof of concept than anything else
+ anyway. The driver is a single C source file, that compiles to 3
+ Kb of code.
+
+ I'm still working on the PCF/BDF drivers, but I'm too lazy to
+ finish them now.
+
+ - CHANGES TO THE HIGH-LEVEL API
+
+ * FT_Get_Kerning has a new parameter that allows you to select the
+ coordinates of the kerning vector (font units, scaled, scaled +
+ grid-fitted).
+ * The outline functions are now in <freetype/ftoutln.h> and not
+ part of <freetype/freetype.h> anymore.
+ * <freetype/ftmodule.h> now contains declarations for
+ FT_New_Library, FT_Done_Library, FT_Add_Default_Modules.
+ * The so-called convenience functions have moved from `ftoutln.c'
+ to `ftglyph.c', and are thus available with this optional
+ component of the library. They are declared in
+ <freetype/ftglyph.h> now.
+ * Anti-aliased rendering is now the default for FT_Render_Glyph
+ (i.e. corresponds to render_mode == 0 == ft_render_mode_normal).
+ To generate a monochrome bitmap, use ft_render_mode_mono, or the
+ FT_LOAD_MONOCHROME flag in FT_Load_Glyph/FT_Load_Char.
+ FT_LOAD_ANTI_ALIAS is still defined, but values to 0.
+ * <freetype/freetype.h> now include <freetype/config/ftconfig.h>,
+ solving a few headaches :-)
+ * The type FT_GlyphSlotRec has now a `library' field.
+
+ - CHANGES TO THE `ftglyph.h' API
+
+ This API has been severely modified in order to make it simpler,
+ clearer, and more efficient. It certainly now looks like a real
+ `glyph factory' object, and allows client applications to manage
+ (i.e. transform, bbox and render) glyph images without ever
+ knowing their original format.
+
+ - Added support for CID-keyed fonts to the CFF driver. Maybe
+ support for pure CFF + CEF fonts should come in?
+
+ - Cleaned up source code in order to avoid two functions with the
+ same name. Also changed the names of the files in `type1z' from
+ `t1XXXX' to `z1XXXX' in order to avoid any conflicts.
+
+ `make multi' now works well :-)
+
+ Also removed the use of `cidafm' for now, even if the source files
+ are still there. This functionality will certainly go into a
+ specific module.
+
+ - ADDED SUPPORT FOR THE AUTO-HINTER
+
+ It works :-) I have a demo program which simply is a copy of
+ `ftview' that does a `FT_Add_Module(library,
+ &autohinter_module_class)' after library initialization, and Type
+ 1 & OpenType/CFF fonts are now hinted.
+
+ CID fonts are not hinted, as they include no charmap and the
+ auto-hinter doesn't include `generic' global metrics computations
+ yet.
+
+ Now, I need to release this thing to the FreeType 2 source.
+
+ - CHANGES TO THE RENDERER MODULES
+
+ The monochrome and smooth renderers are now in two distinct
+ directories, namely `src/raster1' and `src/smooth'. Note that the
+ old `src/renderer' is now gone.
+
+ I ditched the 5-gray-levels renderers. Basically, it involved a
+ simple #define toggle in 'src/raster1/ftraster.c'.
+
+ FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now
+ select the best renderer available, depending on render mode. If
+ the current renderer for a given glyph image format isn't capable
+ of supporting the render mode, another one will be found in the
+ library's list. This means that client applications do not need
+ to switch or set the renderers themselves (as in the latest
+ change), they'll get what they want automatically. At last.
+
+ Changed the demo programs accordingly.
+
+ - MAJOR INTERNAL REDESIGN:
+
+ A lot of internal modifications have been performed lately on the
+ source in order to provide the following enhancements:
+
+ * More generic module support:
+
+ The FT_Module type is now defined to represent a handle to a
+ given module. The file <freetype/ftmodule.h> contains the
+ FT_Module_Class definition, as well as the module-loading public
+ API.
+
+ The FT_Driver type is still defined, and still represents a
+ pointer to a font driver. Note that FT_Add_Driver is replaced
+ by FT_Add_Module, FT_Get_Driver by FT_Get_Module, etc.
+
+ * Support for generic glyph image types:
+
+ The FT_Renderer type is a pointer to a module used to perform
+ various operations on glyph image.
+
+ Each renderer is capable of handling images in a single format
+ (e.g. ft_glyph_format_outline). Its functions are used to:
+
+ - transform an glyph image
+ - render a glyph image into a bitmap
+ - return the control box (dimensions) of a given glyph image
+
+ The scan converters `ftraster.c' and `ftgrays.c' have been moved
+ to the new directory `src/renderer', and are used to provide two
+ default renderer modules.
+
+ One corresponds to the `standard' scan-converter, the other to
+ the `smooth' one.
+
+ he current renderer can be set through the new function
+ FT_Set_Renderer.
+
+ The old raster-related function FT_Set_Raster, FT_Get_Raster and
+ FT_Set_Raster_Mode have now disappeared, in favor of the new:
+
+ FT_Get_Renderer
+ FT_Set_Renderer
+
+ See the file <freetype/ftrender.h> for more details.
+
+ These changes were necessary to properly support different
+ scalable formats in the future, like bi-color glyphs, etc.
+
+ * Glyph loader object:
+
+ A new internal object, called a 'glyph loader' has been
+ introduced in the base layer. It is used by all scalable format
+ font drivers to load glyphs and composites.
+
+ This object has been created to reduce the code size of each
+ driver, as each one of them basically re-implemented its
+ functionality.
+
+ See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
+ more information.
+
+ * FT_GlyphSlot has new fields:
+
+ In order to support extended features (see below), the
+ FT_GlyphSlot structure has a few new fields:
+
+ linearHoriAdvance:
+
+ This field gives the linearly scaled (i.e. scaled but
+ unhinted) advance width for the glyph, expressed as a 16.16
+ fixed pixel value. This is useful to perform WYSIWYG text.
+
+ linearVertAdvance:
+ This field gives the linearly scaled advance height for the
+ glyph (relevant in vertical glyph layouts only). This is
+ useful to perform WYSIWYG text.
+
+ Note that the two above field replace the removed `metrics2'
+ field in the glyph slot.
+
+ advance:
+ This field is a vector that gives the transformed advance for
+ the glyph. By default, it corresponds to the advance width,
+ unless FT_LOAD_VERTICAL_LAYOUT was specified when calling
+ FT_Load_Glyph or FT_Load_Char.
+
+ bitmap_left:
+ This field gives the distance in integer pixels from the
+ current pen position to the left-most pixel of a glyph image
+ IF IT IS A BITMAP. It is only valid when the `format' field
+ is set to `ft_glyph_format_bitmap', for example, after calling
+ the new function FT_Render_Glyph.
+
+ bitmap_top:
+ This field gives the distance in integer pixels from the
+ current pen position (located on the baseline) to the top-most
+ pixel of the glyph image IF IT IS A BITMAP. Positive values
+ correspond to upwards Y.
+
+ loader:
+ This is a new private field for the glyph slot. Client
+ applications should not touch it.
+
+
+ * Support for transforms and direct rendering in FT_Load_Glyph:
+
+ Most of the functionality found in <freetype/ftglyph.h> has been
+ moved to the core library. Hence, the following:
+
+ - A transform can be specified for a face through
+ FT_Set_Transform. this transform is applied by FT_Load_Glyph
+ to scalable glyph images (i.e. NOT TO BITMAPS) before the
+ function returns, unless the bit flag FT_LOAD_IGNORE_TRANSFORM
+ was set in the load flags.
+
+ - Once a glyph image has been loaded, it can be directly
+ converted to a bitmap by using the new FT_Render_Glyph
+ function. Note that this function takes the glyph image from
+ the glyph slot, and converts it to a bitmap whose properties
+ are returned in `face.glyph.bitmap', `face.glyph.bitmap_left'
+ and `face.glyph.bitmap_top'. The original native image might
+ be lost after the conversion.
+
+ - When using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
+ and FT_Load_Char functions will call FT_Render_Glyph
+ automatically when needed.
+
+ - Reformatted all modules source code in order to get rid of the
+ basic data types redifinitions (i.e. `TT_Int' instead of `FT_Int',
+ `T1_Fixed' instead of `FT_Fixed'). Hence the format-specific
+ prefixes like `TT_', `T1_', `T2_' and `CID_' are only used for
+ relevant structures.
+
+
+======================================================================
+
+OLD CHANGES FOR BETA 7
+
+ - bug-fixed the OpenType/CFF parser. It now loads and displays my
+ two fonts nicely, but I'm pretty certain that more testing is
+ needed :-)
+
+ - fixed the crummy Type 1 hinter, it now handles accented characters
+ correctly (well, the accent is not always well placed, but that's
+ another problem..)
+
+ - added the CID-keyed Type 1 driver in `src/cid'. Works pretty well
+ for only 13 Kb of code ;-) Doesn't read AFM files though, nor the
+ really useful CMAP files..
+
+ - fixed two bugs in the smooth renderer (src/base/ftgrays.c).
+ Thanks to Boris Letocha for spotting them and providing a fix.
+
+ - fixed potential `divide by zero' bugs in ftcalc.c.
+
+ - added source code for the OpenType/CFF driver (still incomplete
+ though..)
+
+ - modified the SFNT driver slightly to perform more robust header
+ checks in TT_Load_SFNT_Header. This prevents certain font files
+ (e.g. some Type 1 Multiple Masters) from being incorrectly
+ `recognized' as TrueType font files..
+
+ - moved a lot of stuff from the TrueType driver to the SFNT module,
+ this allows greater code re-use between font drivers
+ (e.g. TrueType, OpenType, Compact-TrueType, etc..)
+
+ - added a tiny segment cache to the SFNT Charmap 4 decoder, in order
+ to minimally speed it up..
+
+ - added support for Multiple Master fonts in `type1z'. There is
+ also a new file named <freetype/ftmm.h> which defines functions to
+ manage them from client applications.
+
+ The new file `src/base/ftmm.c' is also optional to the engine..
+
+ - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) +
+ small bug fixes in FT_Load_Glyph, the `type1' driver, etc..
+
+ - a minor fix to the Type 1 driver to let them apply the font matrix
+ correctly (used for many oblique fonts..)
+
+ - some fixes for 64-bit systems (mainly changing some FT_TRACE calls
+ to use %p instead of %lx). Thanks to Karl Robillard.
+
+ - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) +
+ added a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be
+ cropped when loaded from a file (maybe I should move the bitmap
+ cropper to the base layer ??).
+
+ - changed the default number of gray levels of the smooth renderer
+ to 256 (instead of the previous 128). Of course, the human eye
+ can't see any difference ;-)
+
+ - removed TT_MAX_SUBGLYPHS, there is no static limit on the number
+ of subglyphs in a TrueType font now..
+
+
+======================================================================
+
+OLD CHANGES 16 May 2000
+
+ - tagged `BETA-6' in the CVS tree. This one is a serious release
+ candidate even though it doesn't incorporate the auto-hinter yet..
+
+ - various obsolete files were removed, and copyright header updated
+
+ - finally updated the standard raster to fix the monochrome
+ rendering bug + re-enable support for 5-gray levels anti-aliasing
+ (suck, suck..)
+
+ - created new header files, and modified sources accordingly:
+
+ <freetype/fttypes.h>
+ - simple FreeType types, without the API
+ <freetype/internal/ftmemory.h>
+ - definition of memory-management macros
+
+ - added the `DSIG' (OpenType Digital Signature) tag to
+ <freetype/tttags.h>
+
+ - light update/cleaning of the build system + changes to the sources
+ in order to get rid of _all_ compiler warnings with three
+ compilers, i.e:
+
+ gcc with `-ansi -pedantic -Wall -W', Visual C++ with `/W3 /WX' and
+ LCC
+
+ IMPORTANT NOTE FOR WIN32-LCC USERS:
+ |
+ | It seems the C pre-processor that comes with LCC is broken, it
+ | doesn't recognize the ANSI standard directives # and ##
+ | correctly when one of the argument is a macro. Also,
+ | something like:
+ |
+ | #define F(x) print##x
+ |
+ | F(("hello"))
+ |
+ | will get incorrectly translated to:
+ |
+ | print "hello")
+ |
+ | by its pre-processor. For this reason, you simply cannot build
+ | FreeType 2 in debug mode with this compiler..
+
+ - yet another massive grunt work. I've changed the definition of
+ the EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These
+ now take an argument, which is the function's return value type.
+
+ This is necessary to compile FreeType as a DLL on Windows and
+ OS/2. Depending on the compiler used, a compiler-specific keyword
+ like __export or __system must be placed before (VisualC++) or
+ after (BorlandC++) the type..
+
+ Of course, this needed a lot of changes throughout the source code
+ to make it compile again... All cleaned up now, apparently..
+
+ Note also that there is a new EXPORT_VAR macro defined to allow
+ the _declaration_ of an exportable public (constant)
+ variable. This is the case of the raster interfaces (see
+ ftraster.h and ftgrays.h), as well as each module's interface (see
+ sfdriver.h, psdriver.h, etc..)
+
+ - new feature: it is now possible to pass extra parameters to font
+ drivers when creating a new face object. For now,
+ this capability is unused. It could however prove to
+ be useful in a near future..
+
+ the FT_Open_Args structure was changes, as well as the internal
+ driver interface (the specific `init_face' module function has
+ now a different signature).
+
+ - updated the tutorial (not finished though).
+
+ - updated the top-level BUILD document
+
+ - fixed a potential memory leak that could occur when loading
+ embedded bitmaps.
+
+ - added the declaration of FT_New_Memory_Face in
+ <freetype/freetype.h>, as it was missing from the public header
+ (the implementation was already in `ftobjs.c').
+
+ - the file <freetype/fterrors.h> has been seriously updated in order
+ to allow the automatic generation of error message tables. See
+ the comments within it for more information.
+
+ - major directory hierarchy re-organisation. This was done for two
+ things:
+
+ * first, to ease the `manual' compilation of the library by
+ requiring at lot less include paths :-)
+
+ * second, to allow external programs to effectively access
+ internal data fields. For example, this can be extremely
+ useful if someone wants to write a font producer or a font
+ manager on top of FreeType.
+
+ Basically, you should now use the 'freetype/' prefix for header
+ inclusion, as in:
+
+ #include <freetype/freetype.h>
+ #include <freetype/ftglyph.h>
+
+ Some new include sub-directories are available:
+
+ a. the `freetype/config' directory, contains two files used to
+ configure the build of the library. Client applications
+ should not need to look at these normally, but they can if
+ they want.
+
+ #include <freetype/config/ftoption.h>
+ #include <freetype/config/ftconfig.h>
+
+ b. the `freetype/internal' directory, contains header files that
+ describes library internals. These are the header files that
+ were previously found in the `src/base' and `src/shared'
+ directories.
+
+
+ As usual, the build system and the demos have been updated to
+ reflect the change..
+
+ Here's a layout of the new directory hierarchy:
+
+ TOP_DIR
+ include/
+ freetype/
+ freetype.h
+ ...
+ config/
+ ftoption.h
+ ftconfig.h
+ ftmodule.h
+
+ internal/
+ ftobjs.h
+ ftstream.h
+ ftcalc.h
+ ...
+
+ src/
+ base/
+ ...
+
+ sfnt/
+ psnames/
+ truetype/
+ type1/
+ type1z/
+
+
+ Compiling a module is now much easier, for example, the following
+ should work when in the TOP_DIR directory on an ANSI build:
+
+ gcc -c -I./include -I./src/base src/base/ftbase.c
+ gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
+ etc..
+
+ (of course, using -Iconfig/<system> if you provide system-specific
+ configuration files).
+
+ - updated the structure of FT_Outline_Funcs in order to allow direct
+ coordinate scaling within the outline decomposition routine (this
+ is important for virtual `on' points with TrueType outlines) +
+ updates to the rasters to support this..
+
+ - updated the OS/2 table loading code in `src/sfnt/ttload.c' in
+ order to support version 2 of the table (see OpenType 1.2 spec)
+
+ - created `include/tttables.h' and `include/t1tables.h' to allow
+ client applications to access some of the SFNT and T1 tables of a
+ face with a procedural interface (see `FT_Get_Sfnt_Table') +
+ updates to internal source files to reflect the change..
+
+ - some cleanups in the source code to get rid of warnings when
+ compiling with the `-Wall -W -ansi -pedantic' options in gcc.
+
+ - debugged and moved the smooth renderer to `src/base/ftgrays.c' and
+ its header to `include/ftgrays.h'
+
+ - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites
+ with up to 80 sub-glyphs !! Thanks to Werner
+
+
+======================================================================
+
+OLD CHANGES - 14-apr-2000
+
+ - fixed a bug in the TrueType glyph loader that prevented the
+ correct loading of some CJK glyphs in mingli.ttf
+
+ - improved the standard Type 1 hinter in `src/type1'
+
+ - fixed two bugs in the experimental Type 1 driver in `src/type1z'
+ to handle the new XFree86 4.0 fonts (and a few other ones..)
+
+ - the smooth renderer is now complete and supports sub-banding to
+ render large glyphs at high speed. However, it is still located
+ in `demos/src/ftgrays.c' and should move to the library itself in
+ the next beta. NOTE: The smooth renderer doesn't compile in
+ stand-alone mode anymore, but this should be fixed RSN..
+
+ - introduced convenience functions to more easily deal with glyph
+ images, see `include/ftglyph.h' for more details, as well as the
+ new demo program named `demos/src/ftstring.c' that demonstrates
+ its use
+
+ - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
+ drivers (this is required by the auto-hinter to improve its
+ results).
+
+ - changed the raster interface, in order to allow client
+ applications to provide their own span-drawing callbacks.
+ However, only the smooth renderer supports this. See
+ `FT_Raster_Params' in the file `include/ftimage.h'.
+
+ - fixed a small bug in FT_MulFix that caused incorrect transform
+ computation!
+
+ - Note: The tutorial is out-of-date.
+
+
+======================================================================
+
+OLD CHANGES - 12-mar-2000
+
+ - changed the layout of configuration files : now, all ANSI
+ configuration files are located in
+ `freetype2/config'. System-specific over-rides can be placed in
+ `freetype2/config/<system>'.
+
+ - moved all configuration macros to `config/ftoption.h'
+
+ - improvements in the Type 1 driver with AFM support
+
+ - changed the fields in the FT_Outline structure : the old `flags'
+ array is re-named `tags', while all ancient flags are encoded into
+ a single unsigned int named `flags'.
+
+ - introduced new flags in FT_Outline.flags (see
+ ft_outline_.... enums in `ftimage.h').
+
+ - changed outline functions to `FT_Outline_<action>' syntax
+
+ - added a smooth anti-alias renderer to the demonstration programs
+
+ - added Mac graphics driver (thanks Just)
+
+ - FT_Open_Face changed in order to received a pointer to a
+ FT_Open_Args descriptor..
+
+ - various cleanups, a few more API functions implemented (see
+ FT_Attach_File)
+
+ - updated some docs
+
+
+======================================================================
+
+OLD CHANGES - 22-feb-2000
+
+ - introduced the `psnames' module. It is used to:
+
+ o convert a Postscript glyph name into the equivalent Unicode
+ character code (used by the Type 1 driver(s) to synthesize on
+ the fly a Unicode charmap).
+
+ o provide an interface to retrieve the Postscript names of the
+ Macintosh, Adobe Standard & Adobe Expert character codes.
+ (the Macintosh names are used by the SFNT-module postscript
+ names support routines, while the other two tables are used by
+ the Type 1 driver(s)).
+
+ - introduced the `type1z' alternate Type 1 driver. This is a (still
+ experimental) driver for the Type 1 format that will ultimately
+ replace the one in `src/type1'. It uses pattern matching to load
+ data from the font, instead of a finite state analyzer. It works
+ much better than the `old' driver with `broken' fonts. It is also
+ much smaller (under 15 Kb).
+
+ - the Type 1 drivers (both in `src/type1' and `src/type1z') are
+ nearly complete. They both provide automatic Unicode charmap
+ synthesis through the `psnames' module. No re-encoding vector is
+ needed. (note that they still leak memory due to some code
+ missing, and I'm getting lazy).
+
+ Trivial AFM support has been added to read kerning information but
+ wasn't exactly tested as it should ;-)
+
+ - The TrueType glyph loader has been seriously rewritten (see the
+ file `src/truetype/ttgload.c'. It is now much, much simpler as
+ well as easier to read, maintain and understand :-) Preliminary
+ versions introduced a memory leak that has been reported by Jack
+ Davis, and is now fixed..
+
+ - introduced the new `ft_glyph_format_plotter', used to represent
+ stroked outlines like Windows `Vector' fonts, and certain Type 1
+ fonts like `Hershey'. The corresponding raster will be written
+ soon.
+
+ - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
+ interface that uses a structure to describe the input stream, the
+ driver (if required), etc..
+
+
+TODO
+
+ - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
+
+ - Add a function like FT_Load_Character(face, char_code, load_flags)
+ that would really embed a call to FT_Get_Char_Index then
+ FT_Load_Glyph to ease developer's work.
+
+ - Update the tutorial!
+
+ - consider adding support for Multiple Master fonts in the Type 1
+ drivers.
+
+ - Test the AFM routines of the Type 1 drivers to check that kerning
+ information is returned correctly.
+
+ - write a decent auto-gridding component !! We need this to release
+ FreeType 2.0 gold !
+
+
+less urgent needs:
+
+ - add a CFF/Type2 driver
+ - add a BDF driver
+ - add a FNT/PCF/HBF driver
+ - add a Speedo driver from the X11 sources
+
+
+======================================================================
+
+OLDER CHANGES - 27-jan-2000
+
+ - updated the `sfnt' module interface to allow several SFNT-based
+ drivers to co-exist peacefully
+
+ - updated the `T1_Face' type to better separate Postscript font
+ content from the rest of the FT_Face structure. Might be used
+ later by the CFF/Type2 driver..
+
+ - added an experimental replacement Type 1 driver featuring advanced
+ (and speedy) pattern matching to retrieve the data from postscript
+ fonts.
+
+ - very minor changes in the implementation of FT_Set_Char_Size and
+ FT_Set_Pixel_Sizes (they now implement default to lighten the font
+ driver's code).
+
+
+======================================================================
+
+OLD MESSAGE
+
+This file summarizes the changes that occurred since the last `beta'
+of FreeType 2. Because the list is important, it has been divided into
+separate sections:
+
+Table Of Contents:
+
+ I High-Level Interface (easier !)
+ II Directory Structure
+ III Glyph Image Formats
+ IV Build System
+ V Portability
+ VI Font Drivers
+
+
+----------------------------------------------------------------------
+
+High-Level Interface:
+
+ The high-level API has been considerably simplified. Here is how:
+
+ - resource objects have disappeared. this means that face objects
+ can now be created with a single function call (see FT_New_Face
+ and FT_Open_Face)
+
+ - when calling either FT_New_Face & FT_Open_Face, a size object
+ and a glyph slot object are automatically created for the face,
+ and can be accessed through `face->glyph' and `face->size' if
+ one really needs to. In most cases, there's no need to call
+ FT_New_Size or FT_New_Glyph.
+
+ - similarly, FT_Load_Glyph now only takes a `face' argument
+ (instead of a glyph slot and a size). Also, its `result'
+ parameter is gone, as the glyph image type is returned in the
+ field `face->glyph.format'
+
+ - the list of available charmaps is directly accessible through
+ `face->charmaps', counting `face->num_charmaps' elements. Each
+ charmap has an 'encoding' field which specifies which known
+ encoding it deals with. Valid values are, for example:
+
+ ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
+ ft_encoding_apple_roman
+ ft_encoding_sjis
+ ft_encoding_adobe_standard
+ ft_encoding_adobe_expert
+
+ other values may be added in the future. Each charmap still
+ holds its `platform_id' and `encoding_id' values in case the
+ encoding is too exotic for the current library
+
+
+----------------------------------------------------------------------
+
+Directory Structure:
+
+ Should seem obvious to most of you:
+
+ freetype/
+ config/ -- configuration sub-makefiles
+ ansi/
+ unix/ -- platform-specific configuration files
+ win32/
+ os2/
+ msdos/
+
+ include/ -- public header files, those to be included
+ directly by client apps
+
+ src/ -- sources of the library
+ base/ -- the base layer
+ sfnt/ -- the sfnt `driver' (see the drivers section
+ below)
+ truetype/ -- the truetype driver
+ type1/ -- the type1 driver
+ shared/ -- some header files shared between drivers
+
+ demos/ -- demos/tools
+
+ docs/ -- documentation (a bit empty for now)
+
+
+----------------------------------------------------------------------
+
+Glyph Image Formats:
+
+ Drivers are now able to register new glyph image formats within the
+ library. For now, the base layer supports of course bitmaps and
+ vector outlines, but one could imagine something different like
+ colored bitmaps, bi-color vectors or whatever else (Metafonts anyone
+ ??).
+
+ See the file `include/ftimage.h'. Note also that the type
+ FT_Raster_Map is gone, and is now replaced by FT_Bitmap, which
+ should encompass all known bitmap types.
+
+ Each new image format must provide at least one `raster', i.e. a
+ module capable of transforming the glyph image into a bitmap. It's
+ also possible to change the default raster used for a given glyph
+ image format.
+
+ The default outline scan-converter now uses 128 levels of grays by
+ default, which tends to smooth many things. Note that the demo
+ programs have been updated significantly in order to display these..
+
+
+----------------------------------------------------------------------
+
+Build system:
+
+ You still need GNU Make to build the library. The build system has
+ been very seriously re-vamped in order to provide things like :
+
+ - automatic host platform detection (reverting to 'config/ansi' if
+ it is not detected, with pseudo-standard compilation flags)
+
+ - the ability to compile from the Makefiles with very different and
+ exotic compilers. Note that linking the library can be difficult
+ for some platforms.
+
+ For example, the file `config/win32/lcclib.bat' is invoked by the
+ build system to create the `.lib' file with LCC-Win32 because its
+ librarian has too many flaws to be invoked directly from the
+ Makefile.
+
+ Here's how it works:
+
+ - the first time you type `make', the build system runs a series of
+ sub-makefiles in order to detect your host platform. It then
+ dumps what it found, and creates a file called `config.mk' in the
+ current directory. This is a sub-Makefile used to define many
+ important Make variables used to build the library.
+
+ - the second time, the build system detects the `config.mk' then use
+ it to build the library. All object files go into 'obj' by
+ default, as well as the library file, but this can easily be
+ changed.
+
+ Note that you can run `make setup' to force another host platform
+ detection even if a `config.mk' is present in the current
+ directory. Another solution is simply to delete the file, then
+ re-run make.
+
+ Finally, the default compiler for all platforms is gcc (for now,
+ this will hopefully changed in the future). You can however specify
+ a different compiler by specifying it after the 'setup' target as
+ in:
+
+ gnumake setup lcc on Win32 to use the LCC compiler
+ gnumake setup visualc on Win32 to use Visual C++
+
+ See the file `config/<system>/detect.mk' for a list of supported
+ compilers for your platforms.
+
+ It should be relatively easy to write new detection rules files and
+ config.mk..
+
+ Finally, to build the demo programs, go to `demos' and launch GNU
+ Make, it will use the `config.mk' in the top directory to build the
+ test programs..
+
+
+----------------------------------------------------------------------
+
+Portability:
+
+ In the previous beta, a single FT_System object was used to
+ encompass all low-level operations like thread synchronisation,
+ memory management and i/o access. This has been greatly simplified:
+
+ - thread synchronisation has been dropped, for the simple reason
+ that the library is already re-entrant, and that if you really
+ need two threads accessing the same FT_Library, you should
+ really synchronize access to it yourself with a simple mutex.
+
+ - memory management is performed through a very simple object
+ called `FT_Memory', which really is a table containing a table
+ of pointers to functions like malloc, realloc and free as well
+ as some user data (closure).
+
+ - resources have disappeared (they created more problems than they
+ solved), and i/o management have been simplified greatly as a
+ result. Streams are defined through FT_Stream objects, which
+ can be either memory-based or disk-based.
+
+ Note that each face has its own stream, which is closed only
+ when the face object is destroyed. Hence, a function like
+ TT_Flush_Face in 1.x cannot be directly supported. However, if
+ you really need something like this, you can easily tailor your
+ own streams to achieve the same feature at a lower level (and
+ use FT_Open_Face instead of FT_New_Face to create the face).
+
+ See the file `include/ftsystem.h' for more details, as well as the
+ implementations found in `config/unix' and `config/ansi'.
+
+
+----------------------------------------------------------------------
+
+Font Drivers:
+
+ The Font Driver interface has been modified in order to support
+ extensions & versioning.
+
+
+ The list of the font drivers that are statically linked to the
+ library at compile time is managed through a new configuration file
+ called `config/<platform>/ftmodule.h'.
+
+ This file is autogenerated when invoking `make modules'. This
+ target will parse all sub-directories of 'src', looking for a
+ `module.mk' rules file, used to describe the driver to the build
+ system.
+
+ Hence, one should call `make modules' each time a font driver is
+ added or removed from the `src' directory.
+
+ Finally, this version provides a `pseudo-driver' in `src/sfnt'.
+ This driver doesn't support font files directly, but provides
+ services used by all TrueType-like font drivers. Hence, its code is
+ shared between the TrueType & OpenType font formats, and possibly
+ more formats to come if we're lucky..
+
+
+----------------------------------------------------------------------
+
+Extensions support:
+
+ The extensions support is inspired by the one found in 1.x.
+
+ Now, each font driver has its own `extension registry', which lists
+ which extensions are available for the font faces managed by the
+ driver.
+
+ Extension ids are now strings, rather than 4-byte tags, as this is
+ usually more readable.
+
+ Each extension has:
+ - some data, associated to each face object
+ - an interface (table of function pointers)
+
+ An extension that is format-specific should simply register itself
+ to the correct font driver. Here is some example code:
+
+ // Registering an extensions
+ //
+ FT_Error FT_Init_XXXX_Extension( FT_Library library )
+ {
+ FT_DriverInterface* tt_driver;
+
+ driver = FT_Get_Driver( library, "truetype" );
+ if (!driver) return FT_Err_Unimplemented_Feature;
+
+ return FT_Register_Extension( driver, &extension_class );
+ }
+
+
+ // Implementing the extensions
+ //
+ FT_Error FT_Proceed_Extension_XXX( FT_Face face )
+ {
+ FT_XXX_Extension ext;
+ FT_XXX_Extension_Interface ext_interface;
+
+ ext = FT_Get_Extension( face, "extensionid", &ext_interface );
+ if (!ext) return error;
+
+ return ext_interface->do_it(ext);
+ }
+
+------------------------------------------------------------------------
+
+Copyright 2000-2011 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:
+
+--- end of CHANGES ---
diff --git a/3party/freetype/docs/CUSTOMIZE b/3party/freetype/docs/CUSTOMIZE
new file mode 100644
index 0000000000..7d7d474ec0
--- /dev/null
+++ b/3party/freetype/docs/CUSTOMIZE
@@ -0,0 +1,150 @@
+How to customize the compilation of the library
+===============================================
+
+ FreeType is highly customizable to fit various needs, and this
+ document describes how it is possible to select options and
+ components at compilation time.
+
+
+I. Configuration macros
+
+ The file found in `include/freetype/config/ftoption.h' contains a
+ list of commented configuration macros that can be toggled by
+ developers to indicate which features should be active while
+ building the library.
+
+ These options range from debug level to availability of certain
+ features, like native TrueType hinting through a bytecode
+ interpreter.
+
+ We invite you to read this file for more information. You can
+ change the file's content to suit your needs, or override it with
+ one of the techniques described below.
+
+
+II. Modules list
+
+ If you use GNU make please edit the top-level file `modules.cfg'.
+ It contains a list of available FreeType modules and extensions to
+ be compiled. Change it to suit your own preferences. Be aware that
+ certain modules depend on others, as described in the file. GNU
+ make uses `modules.cfg' to generate `ftmodule.h' (in the object
+ directory).
+
+ If you don't use GNU make you have to manually edit the file
+ `include/freetype/config/ftmodule.h' (which is *not* used with if
+ compiled with GNU make) to add or remove the drivers and components
+ you want to compile into the library. See `INSTALL.ANY' for more
+ information.
+
+
+III. System interface
+
+ FreeType's default interface to the system (i.e., the parts that
+ deal with memory management and i/o streams) is located in
+ `src/base/ftsystem.c'.
+
+ The current implementation uses standard C library calls to manage
+ memory and to read font files. It is however possible to write
+ custom implementations to suit specific systems.
+
+ To tell the GNU Make-based build system to use a custom system
+ interface, you have to define the environment variable FTSYS_SRC to
+ point to the relevant implementation:
+
+ on Unix:
+
+ ./configure <your options>
+ export FTSYS_SRC=foo/my_ftsystem.c
+ make
+ make install
+
+ on Windows:
+
+ make setup <compiler>
+ set FTSYS_SRC=foo/my_ftsystem.c
+ make
+
+
+IV. Overriding default configuration and module headers
+
+ It is possible to override the default configuration and module
+ headers without changing the original files. There are three ways
+ to do that:
+
+
+ 1. With GNU make
+
+ [This is actually a combination of method 2 and 3.]
+
+ Just put your custom `ftoption.h' file into the objects directory
+ (normally `<topdir>/objs'), which GNU make prefers over the
+ standard location. No action is needed for `ftmodule.h' because
+ it is generated automatically in the objects directory.
+
+
+ 2. Using the C include path
+
+ Use the C include path to ensure that your own versions of the
+ files are used at compile time when the lines
+
+ #include FT_CONFIG_OPTIONS_H
+ #include FT_CONFIG_MODULES_H
+
+ are compiled. Their default values being
+ <freetype/config/ftoption.h> and <freetype/config/ftmodule.h>, you
+ can do something like:
+
+ custom/
+ freetype/
+ config/
+ ftoption.h => custom options header
+ ftmodule.h => custom modules list
+
+ include/ => normal FreeType 2 include
+ freetype/
+ ...
+
+ then change the C include path to always give the path to `custom'
+ before the FreeType 2 `include'.
+
+
+ 3. Redefining FT_CONFIG_OPTIONS_H and FT_CONFIG_MODULES_H
+
+ Another way to do the same thing is to redefine the macros used to
+ name the configuration headers. To do so, you need a custom
+ `ft2build.h' whose content can be as simple as:
+
+ #ifndef __FT2_BUILD_MY_PLATFORM_H__
+ #define __FT2_BUILD_MY_PLATFORM_H__
+
+ #define FT_CONFIG_OPTIONS_H <custom/my-ftoption.h>
+ #define FT_CONFIG_MODULES_H <custom/my-ftmodule.h>
+
+ #include <freetype/config/ftheader.h>
+
+ #endif /* __FT2_BUILD_MY_PLATFORM_H__ */
+
+ Place those files in a separate directory, e.g.,
+
+ custom/
+ ft2build.h => custom version described above
+ my-ftoption.h => custom options header
+ my-ftmodule.h => custom modules list header
+
+ and change the C include path to ensure that `custom' is always
+ placed before the FT2 `include' during compilation.
+
+----------------------------------------------------------------------
+
+Copyright 2003, 2005, 2006 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.
+
+
+--- end of CUSTOMIZE ---
diff --git a/3party/freetype/docs/DEBUG b/3party/freetype/docs/DEBUG
new file mode 100644
index 0000000000..3d6acd3bb0
--- /dev/null
+++ b/3party/freetype/docs/DEBUG
@@ -0,0 +1,202 @@
+Debugging within the FreeType sources
+=====================================
+
+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:
+
+
+ FT_DEBUG_LEVEL_ERROR
+
+ #define this macro if you want to compile the FT_ERROR macro calls
+ to print error messages during program execution. This will not
+ stop the program. Very useful to spot invalid fonts during
+ development and to code workarounds for them.
+
+ FT_DEBUG_LEVEL_TRACE
+
+ #define this macro if you want to compile both macros FT_ERROR and
+ FT_TRACE. This also includes the variants FT_TRACE0, FT_TRACE1,
+ FT_TRACE2, ..., FT_TRACE7.
+
+ The trace macros are used to send debugging messages when an
+ appropriate `debug level' is configured at runtime through the
+ FT2_DEBUG environment variable (more on this later).
+
+ FT_DEBUG_MEMORY
+
+ If this macro is #defined, the FreeType engine is linked with a
+ small but effective debugging memory manager that tracks all
+ allocations and frees that are performed within the font engine.
+
+ When the FT2_DEBUG_MEMORY environment variable is defined at
+ runtime, a call to FT_Done_FreeType will dump memory statistics,
+ including the list of leaked memory blocks with the source locations
+ where these were allocated. It is always a very good idea to define
+ this in development builds. This works with _any_ program linked to
+ FreeType, but requires a big deal of memory (the debugging memory
+ manager never frees the blocks to the heap in order to detect double
+ frees).
+
+ When FT2_DEBUG_MEMORY isn't defined at runtime, the debugging memory
+ manager is ignored, and performance is unaffected.
+
+
+II. Debugging macros
+--------------------
+
+Several macros can be used within the FreeType sources to help debugging
+its code:
+
+
+ 1. FT_ERROR(( ... ))
+
+ This macro is used to send debug messages that indicate relatively
+ serious errors (like broken font files), but will not stop the
+ execution of the running program. Its code is compiled only when
+ either FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined in
+ `ftoption.h'.
+
+ Note that you have to use a printf-like signature, but with double
+ parentheses, like in
+
+ FT_ERROR(( "your %s is not %s\n", "foo", "bar" ));
+
+
+ 2. FT_ASSERT( condition )
+
+ This macro is used to check strong assertions at runtime. If its
+ condition isn't TRUE, the program will abort with a panic message.
+ Its code is compiled when either FT_DEBUG_LEVEL_ERROR or
+ FT_DEBUG_LEVEL_TRACE are defined. You don't need double parentheses
+ here. For example
+
+ FT_ASSERT( ptr != NULL );
+
+
+ 3. FT_TRACE( level, (message...) )
+
+ The FT_TRACE macro is used to send general-purpose debugging
+ messages during program execution. This macro uses an *implicit*
+ macro named FT_COMPONENT used to name the current FreeType component
+ being run.
+
+ The developer should always define FT_COMPONENT as appropriate, for
+ example as in
+
+ #undef FT_COMPONENT
+ #define FT_COMPONENT trace_io
+
+ The value of the FT_COMPONENT macro is an enumeration named
+ trace_XXXX where XXXX is one of the component names defined in the
+ internal file `freetype/internal/fttrace.h'. If you modify FreeType
+ source and insert new trace_XXXX macro, you must register it in
+ fttrace.h. If you insert or remove many trace macros, you can check
+ the undefined or the unused trace macro by src/tools/chktrcmp.py.
+
+ Each such component is assigned a `debug level', ranging from 0
+ to 7, through the use of the FT2_DEBUG environment variable
+ (described below) when a program linked with FreeType starts.
+
+ When FT_TRACE is called, its level is compared to the one of the
+ corresponding component. Messages with trace levels *higher* than
+ the corresponding component level are filtered and never printed.
+
+ This means that trace messages with level 0 are always printed,
+ those with level 2 are only printed when the component level is *at
+ least* 2.
+
+ The second parameter to FT_TRACE must contain parentheses and
+ correspond to a printf-like call, as in
+
+ FT_TRACE( 2, ( "your %s is not %s\n", "foo", "bar" ) )
+
+ The shortcut macros FT_TRACE0, FT_TRACE1, FT_TRACE2, ..., FT_TRACE7
+ can be used with constant level indices, and are much cleaner to
+ use, as in
+
+ FT_TRACE2(( "your %s is not %s\n", "foo", "bar" ));
+
+
+III. Environment variables
+--------------------------
+
+The following environment variables control debugging output and
+behaviour of FreeType at runtime.
+
+
+ FT2_DEBUG
+
+ This variable is only used when FreeType is built with
+ FT_DEBUG_LEVEL_TRACE defined. It contains a list of component level
+ definitions, following this format:
+
+ component1:level1 component2:level2 component3:level3 ...
+
+ where `componentX' is the name of a tracing component, as defined in
+ `fttrace.h', but without the `trace_' prefix. `levelX' is the
+ corresponding level to use at runtime.
+
+ `any' is a special component name that will be interpreted as
+ `any/all components'. For example, the following definitions
+
+ set FT2_DEBUG=any:2 memory:5 io:4 (on Windows)
+ export FT2_DEBUG="any:2 memory:5 io:4" (on Linux with bash)
+
+ both stipulate that all components should have level 2, except for
+ the memory and io components which will be set to trace levels 5 and
+ 4, respectively.
+
+
+ FT2_DEBUG_MEMORY
+
+ This environment variable, when defined, tells FreeType to use a
+ debugging memory manager that will track leaking memory blocks as
+ well as other common errors like double frees. It is also capable
+ of reporting _where_ the leaking blocks were allocated, which
+ considerably saves time when debugging new additions to the library.
+
+ This code is only compiled when FreeType is built with the
+ FT_DEBUG_MEMORY macro #defined in `ftoption.h' though, it will be
+ ignored in other builds.
+
+
+ FT2_ALLOC_TOTAL_MAX
+
+ This variable is ignored if FT2_DEBUG_MEMORY is not defined. It
+ allows you to specify a maximum heap size for all memory allocations
+ performed by FreeType. This is very useful to test the robustness
+ of the font engine and programs that use it in tight memory
+ conditions.
+
+ If it is undefined, or if its value is not strictly positive, then
+ no allocation bounds are checked at runtime.
+
+
+ FT2_ALLOC_COUNT_MAX
+
+ This variable is ignored if FT2_DEBUG_MEMORY is not defined. It
+ allows you to specify a maximum number of memory allocations
+ performed by FreeType before returning the error
+ FT_Err_Out_Of_Memory. This is useful for debugging and testing the
+ engine's robustness.
+
+ If it is undefined, or if its value is not strictly positive, then
+ no allocation bounds are checked at runtime.
+
+------------------------------------------------------------------------
+
+Copyright 2002, 2003, 2004, 2005, 2009 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.
+
+
+--- end of DEBUG ---
diff --git a/3party/freetype/docs/FTL.TXT b/3party/freetype/docs/FTL.TXT
new file mode 100644
index 0000000000..bbaba33f47
--- /dev/null
+++ b/3party/freetype/docs/FTL.TXT
@@ -0,0 +1,169 @@
+ The FreeType Project LICENSE
+ ----------------------------
+
+ 2006-Jan-27
+
+ Copyright 1996-2002, 2006 by
+ David Turner, Robert Wilhelm, and Werner Lemberg
+
+
+
+Introduction
+============
+
+ The FreeType Project is distributed in several archive packages;
+ some of them may contain, in addition to the FreeType font engine,
+ various tools and contributions which rely on, or relate to, the
+ FreeType Project.
+
+ This license applies to all files found in such packages, and
+ which do not fall under their own explicit license. The license
+ affects thus the FreeType font engine, the test programs,
+ documentation and makefiles, at the very least.
+
+ This license was inspired by the BSD, Artistic, and IJG
+ (Independent JPEG Group) licenses, which all encourage inclusion
+ and use of free software in commercial and freeware products
+ alike. As a consequence, its main points are that:
+
+ o We don't promise that this software works. However, we will be
+ interested in any kind of bug reports. (`as is' distribution)
+
+ o You can use this software for whatever you want, in parts or
+ full form, without having to pay us. (`royalty-free' usage)
+
+ o You may not pretend that you wrote this software. If you use
+ it, or only parts of it, in a program, you must acknowledge
+ somewhere in your documentation that you have used the
+ FreeType code. (`credits')
+
+ We specifically permit and encourage the inclusion of this
+ software, with or without modifications, in commercial products.
+ We disclaim all warranties covering The FreeType Project and
+ assume no liability related to The FreeType Project.
+
+
+ Finally, many people asked us for a preferred form for a
+ credit/disclaimer to use in compliance with this license. We thus
+ encourage you to use the following text:
+
+ """
+ Portions of this software are copyright © <year> The FreeType
+ Project (www.freetype.org). All rights reserved.
+ """
+
+ Please replace <year> with the value from the FreeType version you
+ actually use.
+
+
+Legal Terms
+===========
+
+0. Definitions
+--------------
+
+ Throughout this license, the terms `package', `FreeType Project',
+ and `FreeType archive' refer to the set of files originally
+ distributed by the authors (David Turner, Robert Wilhelm, and
+ Werner Lemberg) as the `FreeType Project', be they named as alpha,
+ beta or final release.
+
+ `You' refers to the licensee, or person using the project, where
+ `using' is a generic term including compiling the project's source
+ code as well as linking it to form a `program' or `executable'.
+ This program is referred to as `a program using the FreeType
+ engine'.
+
+ This license applies to all files distributed in the original
+ FreeType Project, including all source code, binaries and
+ documentation, unless otherwise stated in the file in its
+ original, unmodified form as distributed in the original archive.
+ If you are unsure whether or not a particular file is covered by
+ this license, you must contact us to verify this.
+
+ The FreeType Project is copyright (C) 1996-2000 by David Turner,
+ Robert Wilhelm, and Werner Lemberg. All rights reserved except as
+ specified below.
+
+1. No Warranty
+--------------
+
+ THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
+ USE, OF THE FREETYPE PROJECT.
+
+2. Redistribution
+-----------------
+
+ This license grants a worldwide, royalty-free, perpetual and
+ irrevocable right and license to use, execute, perform, compile,
+ display, copy, create derivative works of, distribute and
+ sublicense the FreeType Project (in both source and object code
+ forms) and derivative works thereof for any purpose; and to
+ authorize others to exercise some or all of the rights granted
+ herein, subject to the following conditions:
+
+ o Redistribution of source code must retain this license file
+ (`FTL.TXT') unaltered; any additions, deletions or changes to
+ the original files must be clearly indicated in accompanying
+ documentation. The copyright notices of the unaltered,
+ original files must be preserved in all copies of source
+ files.
+
+ o Redistribution in binary form must provide a disclaimer that
+ states that the software is based in part of the work of the
+ FreeType Team, in the distribution documentation. We also
+ encourage you to put an URL to the FreeType web page in your
+ documentation, though this isn't mandatory.
+
+ These conditions apply to any software derived from or based on
+ the FreeType Project, not just the unmodified files. If you use
+ our work, you must acknowledge us. However, no fee need be paid
+ to us.
+
+3. Advertising
+--------------
+
+ Neither the FreeType authors and contributors nor you shall use
+ the name of the other for commercial, advertising, or promotional
+ purposes without specific prior written permission.
+
+ We suggest, but do not require, that you use one or more of the
+ following phrases to refer to this software in your documentation
+ or advertising materials: `FreeType Project', `FreeType Engine',
+ `FreeType library', or `FreeType Distribution'.
+
+ As you have not signed this license, you are not required to
+ accept it. However, as the FreeType Project is copyrighted
+ material, only this license, or another one contracted with the
+ authors, grants you the right to use, distribute, and modify it.
+ Therefore, by using, distributing, or modifying the FreeType
+ Project, you indicate that you understand and accept all the terms
+ of this license.
+
+4. Contacts
+-----------
+
+ There are two mailing lists related to FreeType:
+
+ o freetype@nongnu.org
+
+ Discusses general use and applications of FreeType, as well as
+ future and wanted additions to the library and distribution.
+ If you are looking for support, start in this list if you
+ haven't found anything to help you in the documentation.
+
+ o freetype-devel@nongnu.org
+
+ Discusses bugs, as well as engine internals, design issues,
+ specific licenses, porting, etc.
+
+ Our home page can be found at
+
+ http://www.freetype.org
+
+
+--- end of FTL.TXT ---
diff --git a/3party/freetype/docs/GPLv2.TXT b/3party/freetype/docs/GPLv2.TXT
new file mode 100644
index 0000000000..b2fe7b6af3
--- /dev/null
+++ b/3party/freetype/docs/GPLv2.TXT
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/3party/freetype/docs/INSTALL b/3party/freetype/docs/INSTALL
new file mode 100644
index 0000000000..50f80517ca
--- /dev/null
+++ b/3party/freetype/docs/INSTALL
@@ -0,0 +1,83 @@
+
+There are several ways to build the FreeType library, depending on
+your system and the level of customization you need. Here is a short
+overview of the documentation available:
+
+
+I. Normal installation and upgrades
+===================================
+
+ 1. Unix Systems (including Mac OS X, Cygwin, and MSys on Windows)
+
+ Please read *both* `UPGRADE.UNIX' and `INSTALL.UNIX' to install or
+ upgrade FreeType 2 on a Unix system. Note that you *need* GNU
+ Make for automatic compilation, since other make tools won't work
+ (this includes BSD Make).
+
+ GNU Make VERSION 3.80 OR NEWER IS NEEDED!
+
+
+ 2. On VMS with the `mms' build tool
+
+ See `INSTALL.VMS' for installation instructions on this platform.
+
+
+ 3. Other systems using GNU Make
+
+ On non-Unix platforms, it is possible to build the library using
+ GNU Make utility. Note that *NO OTHER MAKE TOOL WILL WORK*[1]!
+ This methods supports several compilers on Windows, OS/2, and
+ BeOS, including MinGW, Visual C++, Borland C++, and more.
+
+ Instructions are provided in the file `INSTALL.GNU'.
+
+
+ 4. With an IDE Project File (e.g., for Visual Studio or CodeWarrior)
+
+ We provide a small number of `project files' for various IDEs to
+ automatically build the library as well. Note that these files
+ are not supported and only sporadically maintained by FreeType
+ developers, so don't expect them to work in each release.
+
+ To find them, have a look at the content of the `builds/<system>'
+ directory, where <system> stands for your OS or environment.
+
+
+ 5. From you own IDE, or own Makefiles
+
+ If you want to create your own project file, follow the
+ instructions given in the `INSTALL.ANY' document of this
+ directory.
+
+
+II. Custom builds of the library
+================================
+
+ Customizing the compilation of FreeType is easy, and allows you to
+ select only the components of the font engine that you really need.
+ For more details read the file `CUSTOMIZE'.
+
+
+----------------------------------------------------------------------
+
+[1] make++, a make tool written in Perl, has sufficient support of GNU
+ make extensions to build FreeType. See
+
+ http://makepp.sourceforge.net
+
+ for more information; you need version 1.19 or newer, and you must
+ pass option `--norc-substitution'.
+
+----------------------------------------------------------------------
+
+Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
+by David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used,
+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.
+
+
+--- end of INSTALL ---
diff --git a/3party/freetype/docs/INSTALL.ANY b/3party/freetype/docs/INSTALL.ANY
new file mode 100644
index 0000000000..80f161c64d
--- /dev/null
+++ b/3party/freetype/docs/INSTALL.ANY
@@ -0,0 +1,156 @@
+Instructions on how to build FreeType with your own build tool
+==============================================================
+
+See the file `CUSTOMIZE' to learn how to customize FreeType to
+specific environments.
+
+
+I. Standard procedure
+---------------------
+
+ * DISABLE PRE-COMPILED HEADERS! This is very important for Visual
+ C++, because FreeType uses lines like:
+
+ #include FT_FREETYPE_H
+
+ which are not correctly supported by this compiler while being ISO
+ C compliant!
+
+ * You need to add the directories `freetype2/include' to your
+ include path when compiling the library.
+
+ * FreeType 2 is made of several components; each of them is located
+ in a subdirectory of `freetype2/src'. For example,
+ `freetype2/src/truetype/' contains the TrueType font driver.
+
+ * DO NOT COMPILE ALL C FILES! Rather, compile the following ones.
+
+ -- base components (required)
+
+ src/base/ftsystem.c
+ src/base/ftinit.c
+ src/base/ftdebug.c
+
+ src/base/ftbase.c
+
+ src/base/ftbbox.c -- recommended, see <freetype/ftbbox.h>
+ src/base/ftglyph.c -- recommended, see <freetype/ftglyph.h>
+
+ src/base/ftbdf.c -- optional, see <freetype/ftbdf.h>
+ src/base/ftbitmap.c -- optional, see <freetype/ftbitmap.h>
+ src/base/ftcid.c -- optional, see <freetype/ftcid.h>
+ src/base/ftfstype.c -- optional
+ src/base/ftgasp.c -- optional, see <freetype/ftgasp.h>
+ src/base/ftgxval.c -- optional, see <freetype/ftgxval.h>
+ src/base/ftlcdfil.c -- optional, see <freetype/ftlcdfil.h>
+ src/base/ftmm.c -- optional, see <freetype/ftmm.h>
+ src/base/ftotval.c -- optional, see <freetype/ftotval.h>
+ src/base/ftpatent.c -- optional
+ src/base/ftpfr.c -- optional, see <freetype/ftpfr.h>
+ src/base/ftstroke.c -- optional, see <freetype/ftstroke.h>
+ src/base/ftsynth.c -- optional, see <freetype/ftsynth.h>
+ src/base/fttype1.c -- optional, see <freetype/t1tables.h>
+ src/base/ftwinfnt.c -- optional, see <freetype/ftwinfnt.h>
+ src/base/ftxf86.c -- optional, see <freetype/ftxf86.h>
+
+ src/base/ftmac.c -- only on the Macintosh
+
+ -- font drivers (optional; at least one is needed)
+
+ src/bdf/bdf.c -- BDF font driver
+ src/cff/cff.c -- CFF/OpenType font driver
+ src/cid/type1cid.c -- Type 1 CID-keyed font driver
+ src/pcf/pcf.c -- PCF font driver
+ src/pfr/pfr.c -- PFR/TrueDoc font driver
+ src/sfnt/sfnt.c -- SFNT files support
+ (TrueType & OpenType)
+ src/truetype/truetype.c -- TrueType font driver
+ src/type1/type1.c -- Type 1 font driver
+ src/type42/type42.c -- Type 42 font driver
+ src/winfonts/winfnt.c -- Windows FONT / FNT font driver
+
+ -- rasterizers (optional; at least one is needed for vector
+ formats)
+
+ src/raster/raster.c -- monochrome rasterizer
+ src/smooth/smooth.c -- anti-aliasing rasterizer
+
+ -- auxiliary modules (optional)
+
+ src/autofit/autofit.c -- auto hinting module
+ src/cache/ftcache.c -- cache sub-system (in beta)
+ src/gzip/ftgzip.c -- support for compressed fonts (.gz)
+ src/lzw/ftlzw.c -- support for compressed fonts (.Z)
+ src/bzip2/ftbzip2.c -- support for compressed fonts (.bz2)
+ src/gxvalid/gxvalid.c -- TrueTypeGX/AAT table validation
+ src/otvalid/otvalid.c -- OpenType table validation
+ src/psaux/psaux.c -- PostScript Type 1 parsing
+ src/pshinter/pshinter.c -- PS hinting module
+ src/psnames/psnames.c -- PostScript glyph names support
+
+
+ Notes:
+
+ `ftcache.c' needs `ftglyph.c'
+ `ftfstype.c' needs `fttype1.c'
+ `ftglyph.c' needs `ftbitmap.c'
+ `ftstroke.c' needs `ftglyph.c'
+ `ftsynth.c' needs `ftbitmap.c'
+
+ `cff.c' needs `sfnt.c', `pshinter.c', and `psnames.c'
+ `truetype.c' needs `sfnt.c' and `psnames.c'
+ `type1.c' needs `psaux.c' `pshinter.c', and `psnames.c'
+ `type1cid.c' needs `psaux.c', `pshinter.c', and `psnames.c'
+ `type42.c' needs `truetype.c'
+
+ To use `ftbzip2.c', an application must be linked with a library
+ which implements bzip2 support (and the bzip2 header files must
+ be available also during compilation).
+
+
+ Read the file `CUSTOMIZE' in case you want to compile only a subset
+ of the drivers, renderers, and optional modules; a detailed
+ description of the various base extension is given in the top-level
+ file `modules.cfg'.
+
+ You are done. In case of problems, see the archives of the FreeType
+ development mailing list.
+
+
+II. Support for flat-directory compilation
+------------------------------------------
+
+ It is possible to put all FreeType 2 source files into a single
+ directory, with the *exception* of the `include' hierarchy.
+
+ 1. Copy all files in current directory
+
+ cp freetype2/src/base/*.[hc] .
+ cp freetype2/src/raster1/*.[hc] .
+ cp freetype2/src/smooth/*.[hc] .
+ etc.
+
+ 2. Compile sources
+
+ cc -c -Ifreetype2/include -DFT2_BUILD_LIBRARY ftsystem.c
+ cc -c -Ifreetype2/include -DFT2_BUILD_LIBRARY ftinit.c
+ cc -c -Ifreetype2/include -DFT2_BUILD_LIBRARY ftdebug.c
+ cc -c -Ifreetype2/include -DFT2_BUILD_LIBRARY ftbase.c
+ etc.
+
+ You don't need to define the FT_FLAT_COMPILATION macro (as this
+ was required in previous releases of FreeType 2).
+
+----------------------------------------------------------------------
+
+Copyright 2003, 2005, 2006, 2009, 2010 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.
+
+
+--- end of INSTALL.ANY ---
diff --git a/3party/freetype/docs/INSTALL.CROSS b/3party/freetype/docs/INSTALL.CROSS
new file mode 100644
index 0000000000..3def12c8c5
--- /dev/null
+++ b/3party/freetype/docs/INSTALL.CROSS
@@ -0,0 +1,135 @@
+This document contains instructions on how to cross-build the FreeType
+library on Unix systems, for example, building binaries for Linux/MIPS
+on FreeBSD/i386. Before reading this document, please consult
+INSTALL.UNIX for required tools and the basic self-building procedure.
+
+
+ 1. Required Tools
+ -----------------
+
+ For self-building the FreeType library on a Unix system, GNU Make
+ 3.80 or newer is required. INSTALL.UNIX contains hints how to
+ check the installed `make'.
+
+ The GNU C compiler to cross-build the target system is required.
+ At present, using non-GNU cross compiler is not tested. The cross
+ compiler is expected to be installed with a system prefix. For
+ example, if your building system is FreeBSD/i386 and the target
+ system is Linux/MIPS, the cross compiler should be installed with
+ the name `mips-ip22-linuxelf-gcc'.
+
+ A C compiler for a self-build is required also, to build a tool
+ that is executed during the building procedure. Non-GNU self
+ compilers are acceptable, but such a setup is not tested yet.
+
+
+ 2. Configuration
+ ----------------
+
+ 2.1. Building and target system
+
+ To configure for cross-build, the options `--host=<system>' and
+ `--build=<system>' must be passed to configure. For example, if
+ your building system is FreeBSD/i386 and the target system is
+ Linux/MIPS, say
+
+ ./configure \
+ --build=i386-unknown-freebsd \
+ --host=mips-ip22-linuxelf \
+ [other options]
+
+ It should be noted that `--host=<system>' specifies the system
+ where the built binaries will be executed, not the system where
+ the build actually happens. Older versions of GNU autoconf use
+ the option pair `--host=' and `--target='. This is broken and
+ doesn't work. Similarly, an explicit CC specification like
+
+ env CC=mips-ip22-linux-gcc ./configure
+
+ or
+
+ env CC=/usr/local/mips-ip22-linux/bin/gcc ./configure
+
+ doesn't work either; such a configuration confuses the
+ `configure' script while trying to find the cross and native C
+ compilers.
+
+
+ 2.2. The prefix to install FreeType2
+
+ Setting `--prefix=<prefix>' properly is important. The prefix
+ to install FreeType2 is written into the freetype-config script
+ and freetype2.pc configuration file.
+
+ If the built FreeType 2 library is used as a part of the
+ cross-building system, the prefix is expected to be different
+ from the self-building system. For example, configuration with
+ `--prefix=/usr/local' installs binaries into the system wide
+ `/usr/local' directory which then can't be executed. This
+ causes confusion in configuration of all applications which use
+ FreeType2. Instead, use a prefix to install the cross-build
+ into a separate system tree, for example,
+ `--prefix=/usr/local/mips-ip22-linux/'.
+
+ On the other hand, if the built FreeType2 is used as a part of
+ the target system, the prefix to install should reflect the file
+ system structure of the target system.
+
+
+ 3. Building command
+ -------------------
+
+ If the configuration finishes successfully, invoking GNU make
+ builds FreeType2. Just say
+
+ make
+
+ or
+
+ gmake
+
+ depending on the name the GNU make binary actually has.
+
+
+ 4. Installation
+ ---------------
+
+ Saying
+
+ make install
+
+ as usual to install FreeType2 into the directory tree specified by
+ the argument of the `--prefix' option.
+
+ As noted in section 2.2, FreeType2 is sometimes configured to be
+ installed into the system directory of the target system, and
+ should not be installed in the cross-building system. In such
+ cases, the make variable `DESTDIR' is useful to change the root
+ directory in the installation. For example, after
+
+ make DESTDIR=/mnt/target_system_root/ install
+
+ the built FreeType2 library files are installed into the directory
+ `/mnt/target_system_root/<prefix_in_configure>/lib'.
+
+
+ 5. TODO
+ -------
+
+ Cross building between Cygwin (or MSys) and Unix must be tested.
+
+
+----------------------------------------------------------------------
+
+Copyright 2006, 2008 by suzuki toshiya
+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.
+
+
+--- end of INSTALL.CROSS ---
diff --git a/3party/freetype/docs/INSTALL.GNU b/3party/freetype/docs/INSTALL.GNU
new file mode 100644
index 0000000000..72df50a4ea
--- /dev/null
+++ b/3party/freetype/docs/INSTALL.GNU
@@ -0,0 +1,159 @@
+This document contains instructions how to build the FreeType library
+on non-Unix systems with the help of GNU Make. Note that if you are
+running Cygwin or MSys in Windows, you should follow the instructions
+in the file INSTALL.UNIX instead.
+
+
+ FreeType 2 includes a powerful and flexible build system that allows
+ you to easily compile it on a great variety of platforms from the
+ command line. To do so, just follow these simple instructions.
+
+ 1. Install GNU Make
+ -------------------
+
+ Because GNU Make is the only Make tool supported to compile
+ FreeType 2, you should install it on your machine.
+
+ The FreeType 2 build system relies on many features special to GNU
+ Make.
+
+ NEARLY ALL OTHER MAKE TOOLS FAIL, INCLUDING `BSD MAKE', SO REALLY
+ INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM!
+
+ Note that make++, a make tool written in Perl, supports enough
+ features of GNU make to compile FreeType. See
+
+ http://makepp.sourceforge.net
+
+ for more information; you need version 1.19 or newer, and you must
+ pass option `--norc-substitution'.
+
+ Make sure that you are invoking GNU Make from the command line, by
+ typing something like:
+
+ make -v
+
+ to display its version number.
+
+ VERSION 3.80 OR NEWER IS NEEDED!
+
+
+ 2. Invoke `make'
+ ----------------
+
+ Go to the root directory of FreeType 2, then simply invoke GNU
+ Make from the command line. This will launch the FreeType 2 host
+ platform detection routines. A summary will be displayed, for
+ example, on Win32.
+
+
+ ==============================================================
+ FreeType build system -- automatic system detection
+
+ The following settings are used:
+
+ platform win32
+ compiler gcc
+ configuration directory .\builds\win32
+ configuration rules .\builds\win32\w32-gcc.mk
+
+ If this does not correspond to your system or settings please
+ remove the file 'config.mk' from this directory then read the
+ INSTALL file for help.
+
+ Otherwise, simply type 'make' again to build the library
+ or 'make refdoc' to build the API reference (the latter needs
+ python).
+ =============================================================
+
+
+ If the detected settings correspond to your platform and compiler,
+ skip to step 5. Note that if your platform is completely alien to
+ the build system, the detected platform will be `ansi'.
+
+
+ 3. Configure the build system for a different compiler
+ ------------------------------------------------------
+
+ If the build system correctly detected your platform, but you want
+ to use a different compiler than the one specified in the summary
+ (for most platforms, gcc is the default compiler), invoke GNU Make
+ with
+
+ make setup <compiler>
+
+ Examples:
+
+ to use Visual C++ on Win32, type: `make setup visualc'
+ to use Borland C++ on Win32, type `make setup bcc32'
+ to use Watcom C++ on Win32, type `make setup watcom'
+ to use Intel C++ on Win32, type `make setup intelc'
+ to use LCC-Win32 on Win32, type: `make setup lcc'
+ to use Watcom C++ on OS/2, type `make setup watcom'
+ to use VisualAge C++ on OS/2, type `make setup visualage'
+
+ The <compiler> name to use is platform-dependent. The list of
+ available compilers for your system is available in the file
+ `builds/<system>/detect.mk'.
+
+ If you are satisfied by the new configuration summary, skip to
+ step 5.
+
+
+ 4. Configure the build system for an unknown platform/compiler
+ --------------------------------------------------------------
+
+ The auto-detection/setup phase of the build system copies a file
+ to the current directory under the name `config.mk'.
+
+ For example, on OS/2+gcc, it would simply copy
+ `builds/os2/os2-gcc.mk' to `./config.mk'.
+
+ If for some reason your platform isn't correctly detected, copy
+ manually the configuration sub-makefile to `./config.mk' and go to
+ step 5.
+
+ Note that this file is a sub-Makefile used to specify Make
+ variables for compiler and linker invocation during the build.
+ You can easily create your own version from one of the existing
+ configuration files, then copy it to the current directory under
+ the name `./config.mk'.
+
+
+ 5. Build the library
+ --------------------
+
+ The auto-detection/setup phase should have copied a file in the
+ current directory, called `./config.mk'. This file contains
+ definitions of various Make variables used to invoke the compiler
+ and linker during the build. [It has also generated a file called
+ `ftmodule.h' in the objects directory (which is normally
+ `<toplevel>/objs/'); please read the file `docs/CUSTOMIZE' for
+ customization of FreeType.]
+
+ To launch the build, simply invoke GNU Make again: The top
+ Makefile will detect the configuration file and run the build with
+ it.
+
+
+ Final note
+
+ The build system builds a statically linked library of the font
+ engine in the `objs' directory. It does _not_ support the build
+ of DLLs on Windows and OS/2. If you need these, you have to
+ either use an IDE-specific project file, or follow the
+ instructions in `INSTALL.ANY' to create your own Makefiles.
+
+----------------------------------------------------------------------
+
+Copyright 2003, 2004, 2005, 2006, 2008 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.
+
+
+--- end of INSTALL.GNU ---
diff --git a/3party/freetype/docs/INSTALL.MAC b/3party/freetype/docs/INSTALL.MAC
new file mode 100644
index 0000000000..42bb0d8637
--- /dev/null
+++ b/3party/freetype/docs/INSTALL.MAC
@@ -0,0 +1,32 @@
+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.
+
+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
+
+or, if you use C shell:
+
+ setenv MACOSX_DEPLOYMENT_TARGET 10.2
+
+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.
+
+For classic Mac OS (Mac OS 7, 8, 9) please refer to builds/mac/README.
diff --git a/3party/freetype/docs/INSTALL.UNIX b/3party/freetype/docs/INSTALL.UNIX
new file mode 100644
index 0000000000..5dc0764ef6
--- /dev/null
+++ b/3party/freetype/docs/INSTALL.UNIX
@@ -0,0 +1,96 @@
+This document contains instructions on how to build the FreeType
+library on Unix systems. This also works for emulations like Cygwin
+or MSys on Win32:
+
+
+ 1. Ensure that you are using GNU Make
+ -------------------------------------
+
+ The FreeType build system _exclusively_ works with GNU Make. You
+ will not be able to compile the library with the instructions
+ below using any other alternative (including BSD Make).
+
+ Check that you have GNU make by running the command:
+
+ make -v
+
+ This should dump some text that begins with:
+
+ GNU Make <version number>
+ Copyright (C) <year> Free Software Foundation Inc.
+
+ Note that version 3.80 or higher is *required* or the build will
+ fail.
+
+ It is also fine to have GNU Make under another name (e.g. 'gmake')
+ if you use the GNUMAKE variable as described below.
+
+ As a special exception, 'makepp' can also be used to build
+ FreeType 2. See the file docs/MAKEPP for details.
+
+
+ 2. Regenerate the configure script if needed
+ --------------------------------------------
+
+ This only applies if you are building a git snapshot or checkout,
+ *not* if you grabbed the sources of an official release.
+
+ You need to invoke the `autogen.sh' script in the top-level
+ directory in order to create the `configure' script for your
+ platform. Normally, this simply means typing:
+
+ sh autogen.sh
+
+ In case of problems, you may need to install or upgrade Automake,
+ Autoconf or Libtool. See README.git in the top-level directory
+ for more information.
+
+
+ 3. Build and install the library
+ --------------------------------
+
+ The following should work on all Unix systems where the `make'
+ command invokes GNU Make:
+
+ ./configure [options]
+ make
+ make install (as root)
+
+ The default installation path is `/usr/local'. It can be changed
+ with the `--prefix=<path>' option. Example:
+
+ ./configure --prefix=/usr
+
+ When using a different command to invoke GNU Make, use the GNUMAKE
+ variable. For example, if `gmake' is the command to use on your
+ system, do something like:
+
+ GNUMAKE=gmake ./configure [options]
+ gmake
+ gmake install (as root)
+
+ If this still doesn't work, there must be a problem with your
+ system (e.g., you are using a very old version of GNU Make).
+
+ It is possible to compile FreeType in a different directory.
+ Assuming the FreeType source files in directory `/src/freetype' a
+ compilation in directory `foo' works as follows:
+
+ cd foo
+ /src/freetype/configure [options]
+ make
+ make install
+
+----------------------------------------------------------------------
+
+Copyright 2003, 2004, 2005, 2006, 2007 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.
+
+
+--- end of INSTALL.UNIX ---
diff --git a/3party/freetype/docs/INSTALL.VMS b/3party/freetype/docs/INSTALL.VMS
new file mode 100644
index 0000000000..994e566883
--- /dev/null
+++ b/3party/freetype/docs/INSTALL.VMS
@@ -0,0 +1,62 @@
+How to build the freetype2 library on VMS
+-----------------------------------------
+
+It is actually very straightforward to install the Freetype2 library.
+Just execute vms_make.com from the toplevel directory to build the
+library. This procedure currently accepts the following options:
+
+DEBUG
+ Build the library with debug information and without optimization.
+
+lopts=<value>
+ Options to pass to the link command e.g. lopts=/traceback
+
+ccopt=<value>
+ Options to pass to the C compiler e.g. ccopt=/float=ieee
+
+In case you did download the demos, place them in a separate directory
+sharing the same toplevel as the directory of Freetype2 and follow the
+same instructions as above for the demos from there. The build
+process relies on this to figure the location of the Freetype2 include
+files.
+
+
+To rebuild the sources it is necessary to have MMS/MMK installed on
+the system.
+
+The library is available in the directory
+
+ [.LIB]
+
+To compile applications using FreeType 2 you have to define the
+logical FREETYPE pointing to the directory
+
+ [.INCLUDE.FREETYPE]
+
+i.e., if the directory in which this INSTALL.VMS file is located is
+$disk:[freetype] then define the logical with
+
+ define freetype $disk:[freetype.include.freetype]
+
+This version has been tested with Compaq C V6.2-006 on OpenVMS Alpha
+V7.2-1.
+
+
+ Any problems can be reported to
+
+ Jouk Jansen <joukj@hrem.stm.tudelft.nl> or
+ Martin P.J. Zinser <zinser@zinser.no-ip.info>
+
+------------------------------------------------------------------------
+
+Copyright 2000, 2004 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This file is part of the FreeType project, and may only be used,
+modified, and distributed under the terms of the FreeType project
+license, LICENSE.TXT. By continuing to use, modify, or distribute this
+file you indicate that you have read the license and understand and
+accept it fully.
+
+
+--- end of INSTALL.VMS ---
diff --git a/3party/freetype/docs/LICENSE.TXT b/3party/freetype/docs/LICENSE.TXT
new file mode 100644
index 0000000000..62945c85fe
--- /dev/null
+++ b/3party/freetype/docs/LICENSE.TXT
@@ -0,0 +1,34 @@
+
+The FreeType 2 font engine is copyrighted work and cannot be used
+legally without a software license. In order to make this project
+usable to a vast majority of developers, we distribute it under two
+mutually exclusive open-source licenses.
+
+This means that *you* must choose *one* of the two licenses described
+below, then obey all its terms and conditions when using FreeType 2 in
+any of your projects or products.
+
+ - The FreeType License, found in the file `FTL.TXT', which is similar
+ to the original BSD license *with* an advertising clause that forces
+ you to explicitly cite the FreeType project in your product's
+ documentation. All details are in the license file. This license
+ is suited to products which don't use the GNU General Public
+ License.
+
+ Note that this license is compatible to the GNU General Public
+ License version 3, but not version 2.
+
+ - The GNU General Public License version 2, found in `GPLv2.TXT' (any
+ later version can be used also), for programs which already use the
+ GPL. Note that the FTL is incompatible with GPLv2 due to its
+ advertisement clause.
+
+The contributed BDF and PCF drivers come with a license similar to that
+of the X Window System. It is compatible to the above two licenses (see
+file src/bdf/README and src/pcf/README).
+
+The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
+compatible to the above two licenses.
+
+
+--- end of LICENSE.TXT ---
diff --git a/3party/freetype/docs/MAKEPP b/3party/freetype/docs/MAKEPP
new file mode 100644
index 0000000000..58eaf551df
--- /dev/null
+++ b/3party/freetype/docs/MAKEPP
@@ -0,0 +1,5 @@
+As a special exception, FreeType can also be built with the 'makepp'
+build tool, available from http://makepp.sourceforge.net.
+
+Note, however. that you will need at least version 1.19 and pass the
+option --norc-substitution to have it work correctly.
diff --git a/3party/freetype/docs/PROBLEMS b/3party/freetype/docs/PROBLEMS
new file mode 100644
index 0000000000..40bdc35a67
--- /dev/null
+++ b/3party/freetype/docs/PROBLEMS
@@ -0,0 +1,90 @@
+This file describes various problems that have been encountered in
+compiling, installing and running FreeType 2. Suggestions for
+additions or other improvements to this file are welcome.
+
+----------------------------------------------------------------------
+
+Running Problems
+================
+
+
+* Some Type 1, Multiple Masters, and CID-keyed PostScript fonts aren't
+ handled correctly.
+
+-----
+
+Of course, there might be bugs in FreeType, but some fonts based on
+the PostScript format can't be handled indeed. The reason is that
+FreeType doesn't contain a full PostScript interpreter but applies
+pattern matching instead. In case a font doesn't follow the standard
+structure of the given font format, FreeType fails. A typical example
+is Adobe's `Optima' font family which contains extra code to switch
+between low and high resolution versions of the glyphs.
+
+It might be possible to patch FreeType in some situations, though.
+Please report failing fonts so that we investigate the problem and set
+up a list of such problematic fonts.
+
+
+* Why do identical FreeType versions render differently on different
+ platforms?
+
+-----
+
+Different distributions compile FreeType with different options. The
+developer version of a distribution's FreeType package, which is
+needed to compile your program against FreeType, includes the file
+ftoption.h. Compare each platform's copy of ftoption.h to find the
+differences.
+
+
+----------------------------------------------------------------------
+
+
+Compilation Problems
+====================
+
+
+* I get an `internal compilation error' (ICE) while compiling FreeType
+ 2.2.1 with Intel C++.
+
+ This has been reported for the following compiler version:
+
+ Intel(R) C++ Compiler for 32-bit applications,
+ Version 9.0 Build 20050430Z Package ID: W_CC_P_9.0.019
+
+-----
+
+The best solution is to update the compiler to version
+
+ Intel(R) C++ Compiler for 32-bit applications,
+ Version 9.1 Build 20060323Z Package ID: W_CC_P_9.1.022
+
+or newer. If this isn't feasible, apply the following patch.
+
+
+--- src/cache/ftcbasic.c 20 Mar 2006 12:10:24 -0000 1.20
++++ src/cache/ftcbasic.c.patched 15 May 2006 02:51:02 -0000
+@@ -252,7 +252,7 @@
+ */
+
+ FT_CALLBACK_TABLE_DEF
+- const FTC_IFamilyClassRec ftc_basic_image_family_class =
++ FTC_IFamilyClassRec ftc_basic_image_family_class =
+ {
+ {
+ sizeof ( FTC_BasicFamilyRec ),
+@@ -266,7 +266,7 @@
+
+
+ FT_CALLBACK_TABLE_DEF
+- const FTC_GCacheClassRec ftc_basic_image_cache_class =
++ FTC_GCacheClassRec ftc_basic_image_cache_class =
+ {
+ {
+ ftc_inode_new,
+
+
+----------------------------------------------------------------------
+
+--- end of PROBLEMS ---
diff --git a/3party/freetype/docs/TODO b/3party/freetype/docs/TODO
new file mode 100644
index 0000000000..be60d6f040
--- /dev/null
+++ b/3party/freetype/docs/TODO
@@ -0,0 +1,40 @@
+Here is a list of items that need to be addressed in FreeType 2
+---------------------------------------------------------------
+
+* Implement stem3/counter hints properly in the Postscript hinter.
+
+* Add CIDCMap support to the CID driver.
+
+* Add track kerning support to the PFR driver.
+
+* Add kerning (AFM file) support to the CID driver.
+
+
+Here is a list of bugs which should be handled
+----------------------------------------------
+
+Other bugs have been registered at the savannah bugzilla of FreeType.
+
+* CID driver:
+ Handle the case where a CID font has a top-level font matrix also
+ (see PLRM, 5.11.3, Type 0 CIDFonts). Since CID_FaceInfoRec lacks
+ a font_matrix entry we have to directly apply it to all subfont
+ matrices.
+
+* CID driver:
+ Use top-level font matrix entry for setting the upem value, not the
+ entries in the FDarray. If absent, use 1000.
+
+------------------------------------------------------------------------
+
+Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 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.
+
+
+--- end of TODO ---
diff --git a/3party/freetype/docs/UPGRADE.UNIX b/3party/freetype/docs/UPGRADE.UNIX
new file mode 100644
index 0000000000..48c746d703
--- /dev/null
+++ b/3party/freetype/docs/UPGRADE.UNIX
@@ -0,0 +1,137 @@
+
+SPECIAL NOTE FOR UNIX USERS
+===========================
+
+ If you are installing this release of FreeType on a system that
+ already uses release 2.0.5 (or even an older version), you have to
+ perform a few special steps to ensure that everything goes well.
+
+
+ 1. Enable the TrueType bytecode hinter if you need it
+ -----------------------------------------------------
+
+ See the instructions in the file `TRUETYPE' of this directory.
+
+ Note that FreeType supports TrueType fonts without the bytecode
+ interpreter through its auto-hinter, which now generates relatively
+ good results with most fonts.
+
+
+ 2. Determine the correct installation path
+ ------------------------------------------
+
+ By default, the configure script installs the library in
+ `/usr/local'. However, many Unix distributions now install the
+ library in `/usr', since FreeType is becoming a critical system
+ component.
+
+ If FreeType is already installed on your system, type
+
+ freetype-config --prefix
+
+ on the command line. This should return the installation path
+ (e.g., `/usr' or `/usr/local'). To avoid problems of parallel
+ FreeType versions, use this path for the --prefix option of the
+ configure script.
+
+ Otherwise, simply use `/usr' (or whatever you think is adequate for
+ your installation).
+
+
+ 3. Ensure that you are using GNU Make
+ -------------------------------------
+
+ The FreeType build system _exclusively_ works with GNU Make (as an
+ exception you can use make++ which emulates GNU Make sufficiently;
+ see http://makepp.sourceforge.net). You will not be able to compile
+ the library with the instructions below using any other alternative
+ (including BSD Make).
+
+ Trying to compile the library with a different Make tool prints a
+ message like:
+
+ Sorry, GNU make is required to build FreeType2.
+
+ and the build process is aborted. If this happens, install GNU Make
+ on your system, and use the GNUMAKE environment variable to name it.
+
+
+ 4. Build and install the library
+ --------------------------------
+
+ The following should work on all Unix systems where the `make'
+ command invokes GNU Make:
+
+ ./configure --prefix=<yourprefix>
+ make
+ make install (as root)
+
+ where `<yourprefix>' must be replaced by the prefix returned by the
+ `freetype-config' command.
+
+ When using a different command to invoke GNU Make, use the GNUMAKE
+ variable. For example, if `gmake' is the command to use on your
+ system, do something like:
+
+ GNUMAKE=gmake ./configure --prefix=<yourprefix>
+ gmake
+ gmake install (as root)
+
+
+ 5. Take care of XFree86 version 4
+ ---------------------------------
+
+ Certain Linux distributions install _several_ versions of FreeType
+ on your system. For example, on a fresh Mandrake 8.1 system, you
+ can find the following files:
+
+ /usr/lib/libfreetype.so which links to
+ /usr/lib/libfreetype.6.1.0.so
+
+ and
+
+ /usr/X11R6/lib/libfreetype.so which links to
+ /usr/X11R6/lib/libfreetype.6.0.so
+
+ Note that these files correspond to two distinct versions of the
+ library! It seems that this surprising issue is due to the install
+ scripts of recent XFree86 servers (from 4.1.0) which install their
+ own (dated) version of the library in `/usr/X11R6/lib'.
+
+ In certain _rare_ cases you may experience minor problems if you
+ install this release of the library in `/usr' only, namely, that
+ certain applications do not benefit from the bug fixes and rendering
+ improvements you would expect.
+
+ There are two good ways to deal with this situation:
+
+ - Install the library _twice_, in `/usr' and in `/usr/X11R6' (you
+ have to do that each time you install a new FreeType release
+ though).
+
+ - Change the link in /usr/X11R6/lib/libfreetype.so to point to
+
+ /usr/lib/libfreetype.so,
+
+ and get rid of
+
+ /usr/X11R6/lib/libfreetype.6.0.so
+
+ The FreeType Team is not responsible for this problem, so please
+ contact either the XFree86 development team or your Linux
+ distributor to help clear this issue in case the information given
+ here doesn't help.
+
+------------------------------------------------------------------------
+
+Copyright 2003, 2005 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.
+
+
+---- end of UPGRADE.UNIX ---
diff --git a/3party/freetype/docs/VERSION.DLL b/3party/freetype/docs/VERSION.DLL
new file mode 100644
index 0000000000..8c5992606a
--- /dev/null
+++ b/3party/freetype/docs/VERSION.DLL
@@ -0,0 +1,144 @@
+Due to our use of `libtool' to generate and install the FreeType 2
+libraries on Unix systems, as well as other historical events, it is
+generally very difficult to know precisely which release of the font
+engine is installed on a given system.
+
+This file tries to explain why and to document ways to properly detect
+FreeType on Unix.
+
+
+1. Version and Release numbers
+------------------------------
+
+For each new public release of FreeType 2, there are generally *three*
+distinct `version' numbers to consider:
+
+ * The official FreeType 2 release number, like 2.0.9 or 2.1.3.
+
+ * The libtool (and Unix) specific version number, like 9.2.3. This is
+ what `freetype-config --version' returns.
+
+ * The platform-specific shared object number, used for example when
+ the library is installed as `/usr/lib/libfreetype.so.6.3.2'.
+
+The platform-specific number is, unsurprisingly, platform-specific and
+varies with the operating system you are using (several variants of
+Linux, FreeBSD, Solaris, etc.). You should thus _never_ use it, even
+for simple tests.
+
+The libtool-specific number does not equal the release number but is
+tied to it.
+
+The release number is available at *compile* time through the following
+macros defined in FT_FREETYPE_H:
+
+ - FREETYPE_MAJOR: major release number
+ - FREETYPE_MINOR: minor release number
+ - FREETYPE_PATCH: patch release number
+
+See below for a small autoconf fragment.
+
+The release number is also available at *runtime* through the
+`FT_Library_Version' API. Unfortunately, this one wasn't available or
+working correctly before the 2.1.3 official release.
+
+
+2. History
+----------
+
+The following table gives, for each official release, the corresponding
+libtool number, as well as the shared object number found on _most_
+systems, but not all of them:
+
+
+ release libtool so
+ -------------------------------
+ 2.4.5 13.0.7 6.7.0
+ 2.4.4 12.2.6 6.6.2
+ 2.4.3 12.1.6 6.6.1
+ 2.4.2 12.0.6 6.6.0
+ 2.4.1 11.1.5 6.5.1
+ 2.4.0 11.0.5 6.5.0
+ 2.3.12 10.0.4 6.4.0
+ 2.3.11 9.22.3 6.3.22
+ 2.3.10 9.21.3 6.3.21
+ 2.3.9 9.20.3 6.3.20
+ 2.3.8 9.19.3 6.3.19
+ 2.3.7 9.18.3 6.3.18
+ 2.3.6 9.17.3 6.3.17
+ 2.3.5 9.16.3 6.3.16
+ 2.3.4 9.15.3 6.3.15
+ 2.3.3 9.14.3 6.3.14
+ 2.3.2 9.13.3 6.3.13
+ 2.3.1 9.12.3 6.3.12
+ 2.3.0 9.11.3 6.3.11
+ 2.2.1 9.10.3 6.3.10
+ 2.2.0 9.9.3 6.3.9
+ 2.1.10 9.8.3 6.3.8
+ 2.1.9 9.7.3 6.3.7
+ 2.1.8 9.6.3 6.3.6
+ 2.1.7 9.5.3 6.3.5
+ 2.1.6 9.5.3 6.3.5
+ 2.1.5 9.4.3 6.3.4
+ 2.1.4 9.3.3 6.3.3
+ 2.1.3 9.2.3 6.3.2
+ 2.1.2 9.1.3 6.3.1
+ 2.1.1 9.0.3 ?
+ 2.1.0 8.0.2 ?
+ 2.0.9 9.0.3 ?
+ 2.0.8 8.0.2 ?
+ 2.0.4 7.0.1 ?
+ 2.0.1 6.1.0 ?
+
+The libtool numbers are a bit inconsistent due to the library's history:
+
+ - 2.1.0 was created as a development branch from 2.0.8 (hence the same
+ libtool numbers).
+
+ - 2.0.9 was a bug-fix release of the `stable' branch, and we
+ incorrectly increased its libtool number.
+
+ - 2.1.4 was a development version, however it was stable enough to be
+ the basis of the 2.2.0 release.
+
+
+3. Autoconf Code Fragment
+-------------------------
+
+Lars Clausen contributed the following autoconf fragment to detect which
+version of FreeType is installed on a system. This one tests for a
+version that is at least 2.0.9; you should change it to check against
+other release numbers.
+
+
+ AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS=`freetype-config --cflags`
+ AC_TRY_CPP([
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
+#error Freetype version too low.
+#endif
+ ],
+ [AC_MSG_RESULT(yes)
+ FREETYPE_LIBS=`freetype-config --libs`
+ AC_SUBST(FREETYPE_LIBS)
+ AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
+ CPPFLAGS="$old_CPPFLAGS"],
+ [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
+
+------------------------------------------------------------------------
+
+Copyright 2002-2011 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.
+
+
+--- end of VERSION.DLL ---
diff --git a/3party/freetype/docs/formats.txt b/3party/freetype/docs/formats.txt
new file mode 100644
index 0000000000..827c8947f8
--- /dev/null
+++ b/3party/freetype/docs/formats.txt
@@ -0,0 +1,174 @@
+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
+ 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 MS Windows 3 Developer's Notes
+--- --- WINFNT VECTOR --- --- MS Windows 3 Developer's Notes
+
+
+[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)
+ section 7.4.
+
+ http://www.etsi.org/
+ http://webapp.etsi.org/workprogram/Report_WorkItem.asp?WKI_ID=18799
+
+ (free registration required).
+
+[3] Support is rudimentary currently; some tables are not loaded yet.
+
+[4] See
+
+ THE X WINDOW SYSTEM SERVER: X VERSION 11, RELEASE 5
+ 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
+ documented it for his FontForge font editor:
+
+ http://fontforge.sourceforge.net/pcf-format.html
+
+------------------------------------------------------------------------
+
+Copyright 2004, 2005, 2008, 2009, 2010 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.
+
+
+--- end of formats.txt ---
diff --git a/3party/freetype/docs/raster.txt b/3party/freetype/docs/raster.txt
new file mode 100644
index 0000000000..95d9e24010
--- /dev/null
+++ b/3party/freetype/docs/raster.txt
@@ -0,0 +1,635 @@
+
+ How FreeType's rasterizer work
+
+ by David Turner
+
+ Revised 2007-Feb-01
+
+
+This file is an attempt to explain the internals of the FreeType
+rasterizer. The rasterizer is of quite general purpose and could
+easily be integrated into other programs.
+
+
+ I. Introduction
+
+ II. Rendering Technology
+ 1. Requirements
+ 2. Profiles and Spans
+ a. Sweeping the Shape
+ b. Decomposing Outlines into Profiles
+ c. The Render Pool
+ d. Computing Profiles Extents
+ e. Computing Profiles Coordinates
+ f. Sweeping and Sorting the Spans
+
+
+I. Introduction
+===============
+
+ A rasterizer is a library in charge of converting a vectorial
+ representation of a shape into a bitmap. The FreeType rasterizer
+ has been originally developed to render the glyphs found in
+ TrueType files, made up of segments and second-order Béziers.
+ Meanwhile it has been extended to render third-order Bézier curves
+ also. This document is an explanation of its design and
+ implementation.
+
+ While these explanations start from the basics, a knowledge of
+ common rasterization techniques is assumed.
+
+
+II. Rendering Technology
+========================
+
+1. Requirements
+---------------
+
+ We assume that all scaling, rotating, hinting, etc., has been
+ already done. The glyph is thus described by a list of points in
+ the device space.
+
+ - All point coordinates are in the 26.6 fixed float format. The
+ used orientation is:
+
+
+ ^ y
+ | reference orientation
+ |
+ *----> x
+ 0
+
+
+ `26.6' means that 26 bits are used for the integer part of a
+ value and 6 bits are used for the fractional part.
+ Consequently, the `distance' between two neighbouring pixels is
+ 64 `units' (1 unit = 1/64th of a pixel).
+
+ Note that, for the rasterizer, pixel centers are located at
+ integer coordinates. The TrueType bytecode interpreter,
+ however, assumes that the lower left edge of a pixel (which is
+ taken to be a square with a length of 1 unit) has integer
+ coordinates.
+
+
+ ^ y ^ y
+ | |
+ | (1,1) | (0.5,0.5)
+ +-----------+ +-----+-----+
+ | | | | |
+ | | | | |
+ | | | o-----+-----> x
+ | | | (0,0) |
+ | | | |
+ o-----------+-----> x +-----------+
+ (0,0) (-0.5,-0.5)
+
+ TrueType bytecode interpreter FreeType rasterizer
+
+
+ A pixel line in the target bitmap is called a `scanline'.
+
+ - A glyph is usually made of several contours, also called
+ `outlines'. A contour is simply a closed curve that delimits an
+ outer or inner region of the glyph. It is described by a series
+ of successive points of the points table.
+
+ Each point of the glyph has an associated flag that indicates
+ whether it is `on' or `off' the curve. Two successive `on'
+ points indicate a line segment joining the two points.
+
+ One `off' point amidst two `on' points indicates a second-degree
+ (conic) Bézier parametric arc, defined by these three points
+ (the `off' point being the control point, and the `on' ones the
+ start and end points). Similarly, a third-degree (cubic) Bézier
+ curve is described by four points (two `off' control points
+ between two `on' points).
+
+ Finally, for second-order curves only, two successive `off'
+ points forces the rasterizer to create, during rendering, an
+ `on' point amidst them, at their exact middle. This greatly
+ facilitates the definition of successive Bézier arcs.
+
+ The parametric form of a second-order Bézier curve is:
+
+ P(t) = (1-t)^2*P1 + 2*t*(1-t)*P2 + t^2*P3
+
+ (P1 and P3 are the end points, P2 the control point.)
+
+ The parametric form of a third-order Bézier curve is:
+
+ P(t) = (1-t)^3*P1 + 3*t*(1-t)^2*P2 + 3*t^2*(1-t)*P3 + t^3*P4
+
+ (P1 and P4 are the end points, P2 and P3 the control points.)
+
+ For both formulae, t is a real number in the range [0..1].
+
+ Note that the rasterizer does not use these formulae directly.
+ They exhibit, however, one very useful property of Bézier arcs:
+ Each point of the curve is a weighted average of the control
+ points.
+
+ As all weights are positive and always sum up to 1, whatever the
+ value of t, each arc point lies within the triangle (polygon)
+ defined by the arc's three (four) control points.
+
+ In the following, only second-order curves are discussed since
+ rasterization of third-order curves is completely identical.
+
+ Here some samples for second-order curves.
+
+
+ * # on curve
+ * off curve
+ __---__
+ #-__ _-- -_
+ --__ _- -
+ --__ # \
+ --__ #
+ -#
+ Two `on' points
+ Two `on' points and one `off' point
+ between them
+
+ *
+ # __ Two `on' points with two `off'
+ \ - - points between them. The point
+ \ / \ marked `0' is the middle of the
+ - 0 \ `off' points, and is a `virtual
+ -_ _- # on' point where the curve passes.
+ -- It does not appear in the point
+ * list.
+
+
+2. Profiles and Spans
+---------------------
+
+ The following is a basic explanation of the _kind_ of computations
+ made by the rasterizer to build a bitmap from a vector
+ representation. Note that the actual implementation is slightly
+ different, due to performance tuning and other factors.
+
+ However, the following ideas remain in the same category, and are
+ more convenient to understand.
+
+
+ a. Sweeping the Shape
+
+ The best way to fill a shape is to decompose it into a number of
+ simple horizontal segments, then turn them on in the target
+ bitmap. These segments are called `spans'.
+
+ __---__
+ _-- -_
+ _- -
+ - \
+ / \
+ / \
+ | \
+
+ __---__ Example: filling a shape
+ _----------_ with spans.
+ _--------------
+ ----------------\
+ /-----------------\ This is typically done from the top
+ / \ to the bottom of the shape, in a
+ | | \ movement called a `sweep'.
+ V
+
+ __---__
+ _----------_
+ _--------------
+ ----------------\
+ /-----------------\
+ /-------------------\
+ |---------------------\
+
+
+ In order to draw a span, the rasterizer must compute its
+ coordinates, which are simply the x coordinates of the shape's
+ contours, taken on the y scanlines.
+
+
+ /---/ |---| Note that there are usually
+ /---/ |---| several spans per scanline.
+ | /---/ |---|
+ | /---/_______|---| When rendering this shape to the
+ V /----------------| current scanline y, we must
+ /-----------------| compute the x values of the
+ a /----| |---| points a, b, c, and d.
+ - - - * * - - - - * * - - y -
+ / / b c| |d
+
+
+ /---/ |---|
+ /---/ |---| And then turn on the spans a-b
+ /---/ |---| and c-d.
+ /---/_______|---|
+ /----------------|
+ /-----------------|
+ a /----| |---|
+ - - - ####### - - - - ##### - - y -
+ / / b c| |d
+
+
+ b. Decomposing Outlines into Profiles
+
+ For each scanline during the sweep, we need the following
+ information:
+
+ o The number of spans on the current scanline, given by the
+ number of shape points intersecting the scanline (these are
+ the points a, b, c, and d in the above example).
+
+ o The x coordinates of these points.
+
+ x coordinates are computed before the sweep, in a phase called
+ `decomposition' which converts the glyph into *profiles*.
+
+ Put it simply, a `profile' is a contour's portion that can only
+ be either ascending or descending, i.e., it is monotonic in the
+ vertical direction (we also say y-monotonic). There is no such
+ thing as a horizontal profile, as we shall see.
+
+ Here are a few examples:
+
+
+ this square
+ 1 2
+ ---->---- is made of two
+ | | | |
+ | | profiles | |
+ ^ v ^ + v
+ | | | |
+ | | | |
+ ----<----
+
+ up down
+
+
+ this triangle
+
+ P2 1 2
+
+ |\ is made of two | \
+ ^ | \ \ | \
+ | | \ \ profiles | \ |
+ | | \ v ^ | \ |
+ | \ | | + \ v
+ | \ | | \
+ P1 ---___ \ ---___ \
+ ---_\ ---_ \
+ <--__ P3 up down
+
+
+
+ A more general contour can be made of more than two profiles:
+
+ __ ^
+ / | / ___ / |
+ / | / | / | / |
+ | | / / => | v / /
+ | | | | | | ^ |
+ ^ | |___| | | ^ + | + | + v
+ | | | v | |
+ | | | up |
+ |___________| | down |
+
+ <-- up down
+
+
+ Successive profiles are always joined by horizontal segments
+ that are not part of the profiles themselves.
+
+ For the rasterizer, a profile is simply an *array* that
+ associates one horizontal *pixel* coordinate to each bitmap
+ *scanline* crossed by the contour's section containing the
+ profile. Note that profiles are *oriented* up or down along the
+ glyph's original flow orientation.
+
+ In other graphics libraries, profiles are also called `edges' or
+ `edgelists'.
+
+
+ c. The Render Pool
+
+ FreeType has been designed to be able to run well on _very_
+ light systems, including embedded systems with very few memory.
+
+ A render pool will be allocated once; the rasterizer uses this
+ pool for all its needs by managing this memory directly in it.
+ The algorithms that are used for profile computation make it
+ possible to use the pool as a simple growing heap. This means
+ that this memory management is actually quite easy and faster
+ than any kind of malloc()/free() combination.
+
+ Moreover, we'll see later that the rasterizer is able, when
+ dealing with profiles too large and numerous to lie all at once
+ in the render pool, to immediately decompose recursively the
+ rendering process into independent sub-tasks, each taking less
+ memory to be performed (see `sub-banding' below).
+
+ The render pool doesn't need to be large. A 4KByte pool is
+ enough for nearly all renditions, though nearly 100% slower than
+ a more comfortable 16KByte or 32KByte pool (that was tested with
+ complex glyphs at sizes over 500 pixels).
+
+
+ d. Computing Profiles Extents
+
+ Remember that a profile is an array, associating a _scanline_ to
+ the x pixel coordinate of its intersection with a contour.
+
+ Though it's not exactly how the FreeType rasterizer works, it is
+ convenient to think that we need a profile's height before
+ allocating it in the pool and computing its coordinates.
+
+ The profile's height is the number of scanlines crossed by the
+ y-monotonic section of a contour. We thus need to compute these
+ sections from the vectorial description. In order to do that,
+ we are obliged to compute all (local and global) y extrema of
+ the glyph (minima and maxima).
+
+
+ P2 For instance, this triangle has only
+ two y-extrema, which are simply
+ |\
+ | \ P2.y as a vertical maximum
+ | \ P3.y as a vertical minimum
+ | \
+ | \ P1.y is not a vertical extremum (though
+ | \ it is a horizontal minimum, which we
+ P1 ---___ \ don't need).
+ ---_\
+ P3
+
+
+ Note that the extrema are expressed in pixel units, not in
+ scanlines. The triangle's height is certainly (P3.y-P2.y+1)
+ pixel units, but its profiles' heights are computed in
+ scanlines. The exact conversion is simple:
+
+ - min scanline = FLOOR ( min y )
+ - max scanline = CEILING( max y )
+
+ A problem arises with Bézier Arcs. While a segment is always
+ necessarily y-monotonic (i.e., flat, ascending, or descending),
+ which makes extrema computations easy, the ascent of an arc can
+ vary between its control points.
+
+
+ P2
+ *
+ # on curve
+ * off curve
+ __-x--_
+ _-- -_
+ P1 _- - A non y-monotonic Bézier arc.
+ # \
+ - The arc goes from P1 to P3.
+ \
+ \ P3
+ #
+
+
+ We first need to be able to easily detect non-monotonic arcs,
+ according to their control points. I will state here, without
+ proof, that the monotony condition can be expressed as:
+
+ P1.y <= P2.y <= P3.y for an ever-ascending arc
+
+ P1.y >= P2.y >= P3.y for an ever-descending arc
+
+ with the special case of
+
+ P1.y = P2.y = P3.y where the arc is said to be `flat'.
+
+ As you can see, these conditions can be very easily tested.
+ They are, however, extremely important, as any arc that does not
+ satisfy them necessarily contains an extremum.
+
+ Note also that a monotonic arc can contain an extremum too,
+ which is then one of its `on' points:
+
+
+ P1 P2
+ #---__ * P1P2P3 is ever-descending, but P1
+ -_ is an y-extremum.
+ -
+ ---_ \
+ -> \
+ \ P3
+ #
+
+
+ Let's go back to our previous example:
+
+
+ P2
+ *
+ # on curve
+ * off curve
+ __-x--_
+ _-- -_
+ P1 _- - A non-y-monotonic Bézier arc.
+ # \
+ - Here we have
+ \ P2.y >= P1.y &&
+ \ P3 P2.y >= P3.y (!)
+ #
+
+
+ We need to compute the vertical maximum of this arc to be able
+ to compute a profile's height (the point marked by an `x'). The
+ arc's equation indicates that a direct computation is possible,
+ but we rely on a different technique, which use will become
+ apparent soon.
+
+ Bézier arcs have the special property of being very easily
+ decomposed into two sub-arcs, which are themselves Bézier arcs.
+ Moreover, it is easy to prove that there is at most one vertical
+ extremum on each Bézier arc (for second-degree curves; similar
+ conditions can be found for third-order arcs).
+
+ For instance, the following arc P1P2P3 can be decomposed into
+ two sub-arcs Q1Q2Q3 and R1R2R3:
+
+
+ P2
+ *
+ # on curve
+ * off curve
+
+
+ original Bézier arc P1P2P3.
+ __---__
+ _-- --_
+ _- -_
+ - -
+ / \
+ / \
+ # #
+ P1 P3
+
+
+
+ P2
+ *
+
+
+
+ Q3 Decomposed into two subarcs
+ Q2 R2 Q1Q2Q3 and R1R2R3
+ * __-#-__ *
+ _-- --_
+ _- R1 -_ Q1 = P1 R3 = P3
+ - - Q2 = (P1+P2)/2 R2 = (P2+P3)/2
+ / \
+ / \ Q3 = R1 = (Q2+R2)/2
+ # #
+ Q1 R3 Note that Q2, R2, and Q3=R1
+ are on a single line which is
+ tangent to the curve.
+
+
+ We have then decomposed a non-y-monotonic Bézier curve into two
+ smaller sub-arcs. Note that in the above drawing, both sub-arcs
+ are monotonic, and that the extremum is then Q3=R1. However, in
+ a more general case, only one sub-arc is guaranteed to be
+ monotonic. Getting back to our former example:
+
+
+ Q2
+ *
+
+ __-x--_ R1
+ _-- #_
+ Q1 _- Q3 - R2
+ # \ *
+ -
+ \
+ \ R3
+ #
+
+
+ Here, we see that, though Q1Q2Q3 is still non-monotonic, R1R2R3
+ is ever descending: We thus know that it doesn't contain the
+ extremum. We can then re-subdivide Q1Q2Q3 into two sub-arcs and
+ go on recursively, stopping when we encounter two monotonic
+ subarcs, or when the subarcs become simply too small.
+
+ We will finally find the vertical extremum. Note that the
+ iterative process of finding an extremum is called `flattening'.
+
+
+ e. Computing Profiles Coordinates
+
+ Once we have the height of each profile, we are able to allocate
+ it in the render pool. The next task is to compute coordinates
+ for each scanline.
+
+ In the case of segments, the computation is straightforward,
+ using the Euclidean algorithm (also known as Bresenham).
+ However, for Bézier arcs, the job is a little more complicated.
+
+ We assume that all Béziers that are part of a profile are the
+ result of flattening the curve, which means that they are all
+ y-monotonic (ascending or descending, and never flat). We now
+ have to compute the intersections of arcs with the profile's
+ scanlines. One way is to use a similar scheme to flattening
+ called `stepping'.
+
+
+ Consider this arc, going from P1 to
+ --------------------- P3. Suppose that we need to
+ compute its intersections with the
+ drawn scanlines. As already
+ --------------------- mentioned this can be done
+ directly, but the involved
+ * P2 _---# P3 algorithm is far too slow.
+ ------------- _-- --
+ _-
+ _/ Instead, it is still possible to
+ ---------/----------- use the decomposition property in
+ / the same recursive way, i.e.,
+ | subdivide the arc into subarcs
+ ------|-------------- until these get too small to cross
+ | more than one scanline!
+ |
+ -----|--------------- This is very easily done using a
+ | rasterizer-managed stack of
+ | subarcs.
+ # P1
+
+
+ f. Sweeping and Sorting the Spans
+
+ Once all our profiles have been computed, we begin the sweep to
+ build (and fill) the spans.
+
+ As both the TrueType and Type 1 specifications use the winding
+ fill rule (but with opposite directions), we place, on each
+ scanline, the present profiles in two separate lists.
+
+ One list, called the `left' one, only contains ascending
+ profiles, while the other `right' list contains the descending
+ profiles.
+
+ As each glyph is made of closed curves, a simple geometric
+ property ensures that the two lists contain the same number of
+ elements.
+
+ Creating spans is thus straightforward:
+
+ 1. We sort each list in increasing horizontal order.
+
+ 2. We pair each value of the left list with its corresponding
+ value in the right list.
+
+
+ / / | | For example, we have here
+ / / | | four profiles. Two of
+ >/ / | | | them are ascending (1 &
+ 1// / ^ | | | 2 3), while the two others
+ // // 3| | | v are descending (2 & 4).
+ / //4 | | | On the given scanline,
+ a / /< | | the left list is (1,3),
+ - - - *-----* - - - - *---* - - y - and the right one is
+ / / b c| |d (4,2) (sorted).
+
+ There are then two spans, joining
+ 1 to 4 (i.e. a-b) and 3 to 2
+ (i.e. c-d)!
+
+
+ Sorting doesn't necessarily take much time, as in 99 cases out
+ of 100, the lists' order is kept from one scanline to the next.
+ We can thus implement it with two simple singly-linked lists,
+ sorted by a classic bubble-sort, which takes a minimum amount of
+ time when the lists are already sorted.
+
+ A previous version of the rasterizer used more elaborate
+ structures, like arrays to perform `faster' sorting. It turned
+ out that this old scheme is not faster than the one described
+ above.
+
+ Once the spans have been `created', we can simply draw them in
+ the target bitmap.
+
+------------------------------------------------------------------------
+
+Copyright 2003, 2007 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.
+
+
+--- end of raster.txt ---
+
+Local Variables:
+coding: utf-8
+End:
diff --git a/3party/freetype/docs/reference/.gitignore b/3party/freetype/docs/reference/.gitignore
new file mode 100644
index 0000000000..2d19fc766d
--- /dev/null
+++ b/3party/freetype/docs/reference/.gitignore
@@ -0,0 +1 @@
+*.html
diff --git a/3party/freetype/docs/reference/README b/3party/freetype/docs/reference/README
new file mode 100644
index 0000000000..51b04d6f15
--- /dev/null
+++ b/3party/freetype/docs/reference/README
@@ -0,0 +1,5 @@
+After saying `make refdoc' this directory contains the FreeType API
+reference. You need python to make this target.
+
+This also works with Jam: Just type `jam refdoc' in the main directory.
+
diff --git a/3party/freetype/docs/release b/3party/freetype/docs/release
new file mode 100644
index 0000000000..5e2d51f880
--- /dev/null
+++ b/3party/freetype/docs/release
@@ -0,0 +1,195 @@
+How to prepare a new release
+----------------------------
+
+. include/freetype/freetype.h: Update FREETYPE_MAJOR, FREETYPE_MINOR,
+ and FREETYPE_PATCH.
+
+. Update version numbers in all files where necessary (for example, do
+ a grep for both `2.3.1' and `231' for release 2.3.1).
+
+. builds/unix/configure.raw: Update `version_info'.
+
+. docs/CHANGES: Document differences to last release.
+
+. README: Update.
+
+. docs/VERSION.DLL: Document changed `version_info'.
+
+. ChangeLog: Announce new release (both in the freetype2 and
+ freetype2-demos modules).
+
+. Clone the git archive to another directory with
+
+ git clone -l -s . ../freetype2.test
+
+ or something like this and run
+
+ make distclean; make devel; make
+ make distclean; make devel; make multi
+ make distclean; make devel CC=g++; make CC=g++
+ make distclean; make devel CC=g++; make multi CC=g++
+
+ sh autogen.sh
+ make distclean; ./configure; make
+ make distclean; ./configure CC=g++; make
+
+ in the cloned repository to test compilation with both gcc and g++.
+
+. Test C++ compilation for freetype2-demos too (using `git clone' as
+ above).
+
+. Run src/tools/chktrcmp.py and check that there are no undefined
+ trace_XXXX macros.
+
+. Tag the git repositories (freetype2, freetype2-demos) with
+
+ git tag VER-<version> -m "" -u <committer>
+
+ and push the tags with
+
+ git push --tags
+
+ TODO: Tag the home page CVS on savannah.nongnu.org.
+
+. Say `make dist' in both the freetype2 and freetype2-demos modules
+ to generate the .tar.gz, .tar.bz2, and .zip files.
+
+. Create the doc bundles (freetype-doc-<version>.tar.gz,
+ freetype-doc-<version>.tar.bz2, ftdoc<version>.zip). This is
+ everything below
+
+ freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/freetype2/docs/
+
+ except the `reference' subdirectory. Do *not* use option `-l' from
+ zip!
+
+. Run the following script (with updated `$VERSION', `$SAVANNAH_USER',
+ and $SOURCEFORGE_USER variables) to sign and upload the bundles to
+ both Savannah and SourceForge. The signing code has been taken from
+ the `gnupload' script (part of the automake bundle).
+
+ #!/bin/sh
+
+ VERSION=2.3.11
+ SAVANNAH_USER=wl
+ SOURCEFORGE_USER=wlemb
+
+ #####################################################################
+
+ GPG='/usr/bin/gpg --batch --no-tty'
+
+ version=`echo $VERSION | sed "s/\\.//g"`
+
+ FREETYPE_PACKAGES="freetype-$VERSION.tar.gz \
+ freetype-$VERSION.tar.bz2 \
+ ft$version.zip"
+ FT2DEMOS_PACKAGES="ft2demos-$VERSION.tar.gz \
+ ft2demos-$VERSION.tar.bz2 \
+ ftdmo$version.zip"
+ FTDOC_PACKAGES="freetype-doc-$VERSION.tar.gz \
+ freetype-doc-$VERSION.tar.bz2 \
+ ftdoc$version.zip"
+
+ PACKAGE_LIST="$FREETYPE_PACKAGES \
+ $FT2DEMOS_PACKAGES \
+ $FTDOC_PACKAGES"
+
+ set -e
+ unset passphrase
+
+ PATH=/empty echo -n "Enter GPG passphrase: "
+ stty -echo
+ read -r passphrase
+ stty echo
+ echo
+
+ for f in $PACKAGE_LIST; do
+ if test ! -f $f; then
+ echo "$0: Cannot find \`$f'" 1>&2
+ exit 1
+ else
+ :
+ fi
+ done
+
+ for f in $PACKAGE_LIST; do
+ echo "Signing $f..."
+ rm -f $f.sig
+ echo $passphrase | $GPG --passphrase-fd 0 -ba -o $f.sig $f
+ done
+
+ FREETYPE_SIGNATURES=
+ for i in $FREETYPE_PACKAGES; do
+ FREETYPE_SIGNATURES="$FREETYPE_SIGNATURES $i.sig"
+ done
+
+ FT2DEMOS_SIGNATURES=
+ for i in $FT2DEMOS_PACKAGES; do
+ FT2DEMOS_SIGNATURES="$FT2DEMOS_SIGNATURES $i.sig"
+ done
+
+ FTDOC_SIGNATURES=
+ for i in $FTDOC_PACKAGES; do
+ FTDOC_SIGNATURES="$FTDOC_SIGNATURES $i.sig"
+ done
+
+ SIGNATURE_LIST="$FREETYPE_SIGNATURES \
+ $FT2DEMOS_SIGNATURES \
+ $FTDOC_SIGNATURES"
+
+ scp $PACKAGE_LIST $SIGNATURE_LIST \
+ $SAVANNAH_USER@dl.sv.nongnu.org:/releases/freetype/
+
+ rsync -avP -e ssh $FREETYPE_PACKAGES $FREETYPE_SIGNATURES \
+ $SOURCEFORGE_USER,freetype@frs.sf.net:/home/frs/project/f/fr/freetype/freetype2/$VERSION/
+ rsync -avP -e ssh $FT2DEMOS_PACKAGES $FT2DEMOS_SIGNATURES \
+ $SOURCEFORGE_USER,freetype@frs.sf.net:/home/frs/project/f/fr/freetype/freetype-demos/$VERSION/
+ rsync -avP -e ssh $FTDOC_PACKAGES $FTDOC_SIGNATURES \
+ $SOURCEFORGE_USER,freetype@frs.sf.net:/home/frs/project/f/fr/freetype/freetype-docs/$VERSION/
+
+ # EOF
+
+. While files on savannah.gnu.org are automatically moved to the right
+ directory, it must be done manually on SourceForge. Do that now.
+
+. Update the FreeType release notes on SourceForge.
+
+. Copy the reference files (generated by `make dist') to
+
+ freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/freetype2/docs/reference
+
+ and
+
+ shell.sf.net:/home/groups/f/fr/freetype/htdocs/freetype2/docs/reference
+
+ TODO: Create FreeType home page CVS on savannah.nongnu.org and
+ update it accordingly.
+
+ Write script to automatically do this.
+
+ Mirror FreeType's savannah home page everywhere.
+
+. Update
+
+ freetype.freedesktop.org:/srv/freetype.freedesktop.org/www/index2.html
+
+ and copy it to
+
+ shell.sf.net:/home/groups/f/fr/freetype/htdocs/index2.html
+
+. Announce new release on freetype-announce@nongnu.org and to relevant
+ newsgroups.
+
+----------------------------------------------------------------------
+
+Copyright 2003, 2005, 2006, 2007, 2009 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.
+
+
+--- end of release ---
diff --git a/3party/freetype/freetype.pro b/3party/freetype/freetype.pro
index 41780674fb..dbf794e0a2 100644
--- a/3party/freetype/freetype.pro
+++ b/3party/freetype/freetype.pro
@@ -13,503 +13,93 @@ unix|win32-g++ {
QMAKE_CFLAGS_WARN_ON += -Wno-uninitialized
}
-HEADERS += \
- autofit/afwarp.h \
- autofit/aftypes.h \
- autofit/afpic.h \
- autofit/afmodule.h \
- autofit/afloader.h \
- autofit/aflatin2.h \
- autofit/aflatin.h \
- autofit/afindic.h \
- autofit/afhints.h \
- autofit/afglobal.h \
- autofit/aferrors.h \
- autofit/afdummy.h \
- autofit/afcjk.h \
- autofit/afangles.h \
-
-HEADERS += \
- base/ftbase.h \
- base/basepic.h \
-
-HEADERS += \
- bdf/bdferror.h \
- bdf/bdfdrivr.h \
- bdf/bdf.h \
-
-HEADERS += \
- cache/ftcsbits.h \
- cache/ftcmru.h \
- cache/ftcmanag.h \
- cache/ftcimage.h \
- cache/ftcglyph.h \
- cache/ftcerror.h \
- cache/ftccback.h \
- cache/ftccache.h \
-
-HEADERS += \
- cff/cfftypes.h \
- cff/cfftoken.h \
- cff/cffpic.h \
- cff/cffparse.h \
- cff/cffobjs.h \
- cff/cffload.h \
- cff/cffgload.h \
- cff/cfferrs.h \
- cff/cffdrivr.h \
- cff/cffcmap.h \
-
-HEADERS += \
- cid/cidtoken.h \
- cid/cidriver.h \
- cid/cidparse.h \
- cid/cidobjs.h \
- cid/cidload.h \
- cid/cidgload.h \
- cid/ciderrs.h \
-
-HEADERS +=\
- gxvalid/gxvmorx.h \
- gxvalid/gxvmort.h \
- gxvalid/gxvmod.h \
- gxvalid/gxvfeat.h \
- gxvalid/gxverror.h \
- gxvalid/gxvcommn.h \
- gxvalid/gxvalid.h \
-
-HEADERS += \
- gzip/zutil.h \
- gzip/zlib.h \
- gzip/zconf.h \
- gzip/infutil.h \
- gzip/inftrees.h \
- gzip/inffixed.h \
- gzip/infcodes.h \
- gzip/infblock.h \
-
-HEADERS += \
- custom/ft2build.h\
- custom/ftmodule.h\
- custom/ftoption.h\
- include/freetype/config/ftstdlib.h \
- include/freetype/config/ftoption.h \
- include/freetype/config/ftmodule.h \
- include/freetype/config/ftheader.h \
- include/freetype/config/ftconfig.h \
- include/ft2build.h \
- include/freetype/ttunpat.h \
- include/freetype/tttags.h \
- include/freetype/tttables.h \
- include/freetype/ttnameid.h \
- include/freetype/t1tables.h \
- include/freetype/ftxf86.h \
- include/freetype/ftwinfnt.h \
- include/freetype/fttypes.h \
- include/freetype/fttrigon.h \
- include/freetype/ftsystem.h \
- include/freetype/ftsynth.h \
- include/freetype/ftstroke.h \
- include/freetype/ftsnames.h \
- include/freetype/ftsizes.h \
- include/freetype/ftrender.h \
- include/freetype/ftpfr.h \
- include/freetype/ftoutln.h \
- include/freetype/ftotval.h \
- include/freetype/ftmoderr.h \
- include/freetype/ftmodapi.h \
- include/freetype/ftmm.h \
- include/freetype/ftmac.h \
- include/freetype/ftlzw.h \
- include/freetype/ftlist.h \
- include/freetype/ftlcdfil.h \
- include/freetype/ftincrem.h \
- include/freetype/ftimage.h \
- include/freetype/ftgzip.h \
- include/freetype/ftgxval.h \
- include/freetype/ftglyph.h \
- include/freetype/ftgasp.h \
- include/freetype/fterrors.h \
- include/freetype/fterrdef.h \
- include/freetype/ftcid.h \
- include/freetype/ftchapters.h \
- include/freetype/ftcache.h \
- include/freetype/ftbitmap.h \
- include/freetype/ftbdf.h \
- include/freetype/ftbbox.h \
- include/freetype/ftadvanc.h \
- include/freetype/freetype.h \
- include/freetype/internal/tttypes.h \
- include/freetype/internal/t1types.h \
- include/freetype/internal/sfnt.h \
- include/freetype/internal/pshints.h \
- include/freetype/internal/psaux.h \
- include/freetype/internal/pcftypes.h \
- include/freetype/internal/internal.h \
- include/freetype/internal/ftvalid.h \
- include/freetype/internal/fttrace.h \
- include/freetype/internal/ftstream.h \
- include/freetype/internal/ftserv.h \
- include/freetype/internal/ftrfork.h \
- include/freetype/internal/ftpic.h \
- include/freetype/internal/ftobjs.h \
- include/freetype/internal/ftmemory.h \
- include/freetype/internal/ftgloadr.h \
- include/freetype/internal/ftdriver.h \
- include/freetype/internal/ftdebug.h \
- include/freetype/internal/ftcalc.h \
- include/freetype/internal/autohint.h \
- include/freetype/internal/services/svxf86nm.h \
- include/freetype/internal/services/svwinfnt.h \
- include/freetype/internal/services/svttglyf.h \
- include/freetype/internal/services/svtteng.h \
- include/freetype/internal/services/svttcmap.h \
- include/freetype/internal/services/svsfnt.h \
- include/freetype/internal/services/svpsinfo.h \
- include/freetype/internal/services/svpscmap.h \
- include/freetype/internal/services/svpostnm.h \
- include/freetype/internal/services/svpfr.h \
- include/freetype/internal/services/svotval.h \
- include/freetype/internal/services/svmm.h \
- include/freetype/internal/services/svkern.h \
- include/freetype/internal/services/svgxval.h \
- include/freetype/internal/services/svgldict.h \
- include/freetype/internal/services/svcid.h \
- include/freetype/internal/services/svbdf.h \
-
-HEADERS += \
- lzw/ftzopen.h \
-
-HEADERS += \
- otvalid/otvmod.h \
- otvalid/otvgpos.h \
- otvalid/otverror.h \
- otvalid/otvcommn.h \
- otvalid/otvalid.h \
-
-HEADERS += \
- pcf/pcfutil.h \
- pcf/pcfread.h \
- pcf/pcferror.h \
- pcf/pcfdrivr.h \
- pcf/pcf.h \
-
-HEADERS += \
- pfr/pfrtypes.h \
- pfr/pfrsbit.h \
- pfr/pfrobjs.h \
- pfr/pfrload.h \
- pfr/pfrgload.h \
- pfr/pfrerror.h \
- pfr/pfrdrivr.h \
- pfr/pfrcmap.h \
-
-HEADERS +=\
- psaux/t1decode.h \
- psaux/t1cmap.h \
- psaux/psobjs.h \
- psaux/psconv.h \
- psaux/psauxmod.h \
- psaux/psauxerr.h \
- psaux/afmparse.h \
-
-HEADERS +=\
- pshinter/pshrec.h \
- pshinter/pshpic.h \
- pshinter/pshnterr.h \
- pshinter/pshmod.h \
- pshinter/pshglob.h \
- pshinter/pshalgo.h \
-
-HEADERS +=\
- psnames/pstables.h \
- psnames/pspic.h \
- psnames/psnamerr.h \
- psnames/psmodule.h \
-
-HEADERS +=\
- raster/rastpic.h \
- raster/rasterrs.h \
- raster/ftrend1.h \
- raster/ftraster.h \
- raster/ftmisc.h \
-
-HEADERS +=\
- sfnt/ttsbit.h \
- sfnt/ttpost.h \
- sfnt/ttmtx.h \
- sfnt/ttload.h \
- sfnt/ttkern.h \
- sfnt/ttcmapc.h \
- sfnt/ttcmap.h \
- sfnt/ttbdf.h \
- sfnt/sfobjs.h \
- sfnt/sfntpic.h \
- sfnt/sferrors.h \
- sfnt/sfdriver.h \
-
-HEADERS +=\
- smooth/ftspic.h \
- smooth/ftsmooth.h \
- smooth/ftsmerrs.h \
- smooth/ftgrays.h \
-
-HEADERS +=\
- truetype/ttpload.h \
- truetype/ttpic.h \
- truetype/ttobjs.h \
- truetype/ttinterp.h \
- truetype/ttgxvar.h \
- truetype/ttgload.h \
- truetype/tterrors.h \
- truetype/ttdriver.h \
-
-HEADERS +=\
- type1/t1tokens.h \
- type1/t1parse.h \
- type1/t1objs.h \
- type1/t1load.h \
- type1/t1gload.h \
- type1/t1errors.h \
- type1/t1driver.h \
- type1/t1afm.h \
-
-HEADERS +=\
- type42/t42types.h \
- type42/t42parse.h \
- type42/t42objs.h \
- type42/t42error.h \
- type42/t42drivr.h \
-
-HEADERS +=\
- winfonts/winfnt.h \
- winfonts/fnterrs.h
-
-SOURCES += \
- autofit/autofit.c \
- autofit/afwarp.c \
- autofit/afpic.c \
- autofit/afmodule.c \
- autofit/afloader.c \
- autofit/aflatin2.c \
- autofit/aflatin.c \
- autofit/afindic.c \
- autofit/afhints.c \
- autofit/afglobal.c \
- autofit/afdummy.c \
- autofit/afcjk.c \
- autofit/afangles.c \
-
-SOURCES += \
- base/ftxf86.c \
- base/ftwinfnt.c \
- base/ftutil.c \
- base/fttype1.c \
- base/fttrigon.c \
- base/ftsystem.c \
- base/ftsynth.c \
- base/ftstroke.c \
- base/ftstream.c \
- base/ftsnames.c \
- base/ftrfork.c \
- base/ftpic.c \
- base/ftpfr.c \
- base/ftpatent.c \
- base/ftoutln.c \
- base/ftotval.c \
- base/ftobjs.c \
- base/ftmm.c \
- base/ftmac.c \
- base/ftlcdfil.c \
- base/ftinit.c \
- base/ftgxval.c \
- base/ftglyph.c \
- base/ftgloadr.c \
- base/ftgasp.c \
- base/ftfstype.c \
- base/ftdebug.c \
- base/ftdbgmem.c \
- base/ftcid.c \
- base/ftcalc.c \
- base/ftbitmap.c \
- base/ftbdf.c \
- base/ftbbox.c \
- base/ftbase.c \
- base/ftapi.c \
- base/ftadvanc.c \
- base/basepic.c \
-
-SOURCES += \
- bdf/bdflib.c \
- bdf/bdfdrivr.c \
- bdf/bdf.c \
-
-SOURCES += \
- cache/ftcsbits.c \
- cache/ftcmru.c \
- cache/ftcmanag.c \
- cache/ftcimage.c \
- cache/ftcglyph.c \
- cache/ftccmap.c \
- cache/ftccache.c \
- cache/ftcbasic.c \
- cache/ftcache.c \
-
-SOURCES += \
- cff/cffpic.c \
- cff/cffparse.c \
- cff/cffobjs.c \
- cff/cffload.c \
- cff/cffgload.c \
- cff/cffdrivr.c \
- cff/cffcmap.c \
- cff/cff.c \
-
-SOURCES += \
- cid/cidriver.c \
- cid/cidparse.c \
- cid/cidobjs.c \
- cid/cidload.c \
- cid/cidgload.c \
-
-SOURCES += \
- gxvalid/gxvtrak.c \
- gxvalid/gxvprop.c \
- gxvalid/gxvopbd.c \
- gxvalid/gxvmorx5.c \
- gxvalid/gxvmorx4.c \
- gxvalid/gxvmorx2.c \
- gxvalid/gxvmorx1.c \
- gxvalid/gxvmorx0.c \
- gxvalid/gxvmorx.c \
- gxvalid/gxvmort5.c \
- gxvalid/gxvmort4.c \
- gxvalid/gxvmort2.c \
- gxvalid/gxvmort1.c \
- gxvalid/gxvmort0.c \
- gxvalid/gxvmort.c \
- gxvalid/gxvmod.c \
- gxvalid/gxvlcar.c \
- gxvalid/gxvkern.c \
- gxvalid/gxvjust.c \
- gxvalid/gxvfgen.c \
- gxvalid/gxvfeat.c \
- gxvalid/gxvcommn.c \
- gxvalid/gxvbsln.c \
- gxvalid/gxvalid.c \
-
-SOURCES += \
- gzip/zutil.c \
- gzip/infutil.c \
- gzip/inftrees.c \
- gzip/inflate.c \
- gzip/infcodes.c \
- gzip/infblock.c \
- gzip/ftgzip.c \
- gzip/adler32.c \
-
-SOURCES += \
- lzw/ftzopen.c \
- lzw/ftlzw.c \
-
-SOURCES += \
- otvalid/otvmod.c \
- otvalid/otvmath.c \
- otvalid/otvjstf.c \
- otvalid/otvgsub.c \
- otvalid/otvgpos.c \
- otvalid/otvgdef.c \
- otvalid/otvcommn.c \
- otvalid/otvbase.c \
- otvalid/otvalid.c \
-
-SOURCES += \
- pcf/pcfutil.c \
- pcf/pcfread.c \
- pcf/pcfdrivr.c \
- pcf/pcf.c \
-
-SOURCES += \
- pfr/pfrsbit.c \
- pfr/pfrobjs.c \
- pfr/pfrload.c \
- pfr/pfrgload.c \
- pfr/pfrdrivr.c \
- pfr/pfrcmap.c \
- pfr/pfr.c \
-
-SOURCES += \
- psaux/t1decode.c \
- psaux/t1cmap.c \
- psaux/psobjs.c \
- psaux/psconv.c \
- psaux/psauxmod.c \
- psaux/psaux.c \
- psaux/afmparse.c \
-
-SOURCES += \
- pshinter/pshrec.c \
- pshinter/pshpic.c \
- pshinter/pshmod.c \
- pshinter/pshinter.c \
- pshinter/pshglob.c \
- pshinter/pshalgo.c \
-
-SOURCES += \
- psnames/pspic.c \
- psnames/psnames.c \
- psnames/psmodule.c \
-
-SOURCES += \
- raster/rastpic.c \
- raster/raster.c \
- raster/ftrend1.c \
- raster/ftraster.c \
-
-SOURCES += \
- sfnt/ttsbit0.c \
- sfnt/ttsbit.c \
- sfnt/ttpost.c \
- sfnt/ttmtx.c \
- sfnt/ttload.c \
- sfnt/ttkern.c \
- sfnt/ttcmap.c \
- sfnt/ttbdf.c \
- sfnt/sfobjs.c \
- sfnt/sfntpic.c \
- sfnt/sfnt.c \
- sfnt/sfdriver.c \
-
-SOURCES += \
- smooth/smooth.c \
- smooth/ftspic.c \
- smooth/ftsmooth.c \
- smooth/ftgrays.c \
-
-SOURCES += \
- truetype/ttpload.c \
- truetype/ttpic.c \
- truetype/ttobjs.c \
- truetype/ttinterp.c \
- truetype/ttgxvar.c \
- truetype/ttgload.c \
- truetype/ttdriver.c \
- truetype/truetype.c \
-
-SOURCES += \
- type1/type1.c \
- type1/t1parse.c \
- type1/t1objs.c \
- type1/t1load.c \
- type1/t1gload.c \
- type1/t1driver.c \
- type1/t1afm.c \
-
-SOURCES += \
- type42/type42.c \
- type42/t42parse.c \
- type42/t42objs.c \
- type42/t42drivr.c \
-
SOURCES += \
- winfonts/winfnt.c
+ src/autofit/afangles.c \
+ src/autofit/afcjk.c \
+ src/autofit/afdummy.c \
+ src/autofit/afglobal.c \
+ src/autofit/afhints.c \
+ src/autofit/afindic.c \
+ src/autofit/aflatin.c \
+ src/autofit/afloader.c \
+ src/autofit/afmodule.c \
+ src/base/ftadvanc.c \
+ src/base/ftbitmap.c \
+ src/base/ftcalc.c \
+ src/base/ftgloadr.c \
+ src/base/ftglyph.c \
+ src/base/ftinit.c \
+ src/base/ftobjs.c \
+ src/base/ftoutln.c \
+ src/base/ftstream.c \
+ src/base/ftstroke.c \
+ src/base/ftsystem.c \
+ src/base/fttrigon.c \
+ src/base/ftutil.c \
+ src/bdf/bdfdrivr.c \
+ src/bdf/bdflib.c \
+ src/cache/ftcbasic.c \
+ src/cache/ftccache.c \
+ src/cache/ftccmap.c \
+ src/cache/ftcglyph.c \
+ src/cache/ftcimage.c \
+ src/cache/ftcmanag.c \
+ src/cache/ftcmru.c \
+ src/cache/ftcsbits.c \
+ src/cff/cffcmap.c \
+ src/cff/cffdrivr.c \
+ src/cff/cffgload.c \
+ src/cff/cffload.c \
+ src/cff/cffobjs.c \
+ src/cff/cffparse.c \
+ src/cid/cidriver.c \
+ src/cid/cidgload.c \
+ src/cid/cidload.c \
+ src/cid/cidobjs.c \
+ src/cid/cidparse.c \
+ src/pcf/pcfdrivr.c \
+ src/pcf/pcfread.c \
+ src/pcf/pcfutil.c \
+ src/pfr/pfrcmap.c \
+ src/pfr/pfrdrivr.c \
+ src/pfr/pfrgload.c \
+ src/pfr/pfrload.c \
+ src/pfr/pfrobjs.c \
+ src/pfr/pfrsbit.c \
+ src/psaux/afmparse.c \
+ src/psaux/psauxmod.c \
+ src/psaux/psconv.c \
+ src/psaux/psobjs.c \
+ src/psaux/t1cmap.c \
+ src/psaux/t1decode.c \
+ src/pshinter/pshalgo.c \
+ src/pshinter/pshglob.c \
+ src/pshinter/pshmod.c \
+ src/pshinter/pshrec.c \
+ src/psnames/psmodule.c \
+ src/raster/ftraster.c \
+ src/raster/ftrend1.c \
+ src/sfnt/sfdriver.c \
+ src/sfnt/sfobjs.c \
+ src/sfnt/ttcmap.c \
+ src/sfnt/ttkern.c \
+ src/sfnt/ttload.c \
+ src/sfnt/ttmtx.c \
+ src/sfnt/ttpost.c \
+ src/smooth/ftgrays.c \
+ src/smooth/ftsmooth.c \
+ src/truetype/ttdriver.c \
+ src/truetype/ttgload.c \
+ src/truetype/ttinterp.c \
+ src/truetype/ttobjs.c \
+ src/truetype/ttpload.c \
+ src/type1/t1afm.c \
+ src/type1/t1driver.c \
+ src/type1/t1gload.c \
+ src/type1/t1load.c \
+ src/type1/t1objs.c \
+ src/type1/t1parse.c \
+ src/type42/t42drivr.c \
+ src/type42/t42objs.c \
+ src/type42/t42parse.c \
+ src/winfonts/winfnt.c \
diff --git a/3party/freetype/include/freetype/config/ftconfig.h b/3party/freetype/include/freetype/config/ftconfig.h
index 49c68b3d76..b30489676b 100644
--- a/3party/freetype/include/freetype/config/ftconfig.h
+++ b/3party/freetype/include/freetype/config/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008 by */
+/* Copyright 1996-2004, 2006-2008, 2010-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -35,7 +35,6 @@
/* */
/*************************************************************************/
-
#ifndef __FTCONFIG_H__
#define __FTCONFIG_H__
@@ -128,7 +127,12 @@ FT_BEGIN_HEADER
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
( defined( __MWERKS__ ) && defined( macintosh ) )
/* no Carbon frameworks for 64bit 10.4.x */
+ /* AvailabilityMacros.h is available since Mac OS X 10.2, */
+ /* so guess the system version by maximum errno before inclusion */
+#include <errno.h>
+#ifdef ECANCELED /* defined since 10.2 */
#include "AvailabilityMacros.h"
+#endif
#if defined( __LP64__ ) && \
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
#define DARWIN_NO_CARBON 1
@@ -145,8 +149,6 @@ FT_BEGIN_HEADER
#endif
-#undef FT_MACINTOSH
-
/*************************************************************************/
/* */
@@ -308,9 +310,38 @@ FT_BEGIN_HEADER
/* Provide assembler fragments for performance-critical functions. */
/* These must be defined `static __inline__' with GCC. */
+#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
+#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
+
+ /* documentation is in freetype.h */
+
+ static __inline FT_Int32
+ FT_MulFix_arm( FT_Int32 a,
+ FT_Int32 b )
+ {
+ register FT_Int32 t, t2;
+
+
+ __asm
+ {
+ smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
+ mov a, t, asr #31 /* a = (hi >> 31) */
+ add a, a, #0x8000 /* a += 0x8000 */
+ adds t2, t2, a /* t2 += a */
+ adc t, t, #0 /* t += carry */
+ mov a, t2, lsr #16 /* a = t2 >> 16 */
+ orr a, a, t, lsl #16 /* a |= t << 16 */
+ }
+ return a;
+ }
+
+#endif /* __CC_ARM || __ARMCC__ */
+
+
#ifdef __GNUC__
-#if defined( __arm__ ) && !defined( __thumb__ )
+#if defined( __arm__ ) && !defined( __thumb__ ) && \
+ !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
@@ -322,22 +353,22 @@ FT_BEGIN_HEADER
register FT_Int32 t, t2;
- asm __volatile__ (
- "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
- "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
- "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
- "adds %1, %1, %0\n\t" /* %1 += %0 */
- "adc %2, %2, #0\n\t" /* %2 += carry */
- "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
- "orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
+ __asm__ __volatile__ (
+ "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
+ "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
+ "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
+ "adds %1, %1, %0\n\t" /* %1 += %0 */
+ "adc %2, %2, #0\n\t" /* %2 += carry */
+ "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
+ "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
: "=r"(a), "=&r"(t2), "=&r"(t)
: "r"(a), "r"(b) );
return a;
}
-#endif /* __arm__ && !__thumb__ */
+#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
-#if defined( i386 )
+#if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
@@ -369,6 +400,43 @@ FT_BEGIN_HEADER
#endif /* __GNUC__ */
+
+#ifdef _MSC_VER /* Visual C++ */
+
+#ifdef _M_IX86
+
+#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
+
+ /* documentation is in freetype.h */
+
+ static __inline FT_Int32
+ FT_MulFix_i386( FT_Int32 a,
+ FT_Int32 b )
+ {
+ register FT_Int32 result;
+
+ __asm
+ {
+ mov eax, a
+ mov edx, b
+ imul edx
+ mov ecx, edx
+ sar ecx, 31
+ add ecx, 8000h
+ add eax, ecx
+ adc edx, 0
+ shr eax, 16
+ shl edx, 16
+ add eax, edx
+ mov result, eax
+ }
+ return result;
+ }
+
+#endif /* _M_IX86 */
+
+#endif /* _MSC_VER */
+
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
diff --git a/3party/freetype/include/freetype/config/ftheader.h b/3party/freetype/include/freetype/config/ftheader.h
index b63945dcbd..2a7b8c4e0d 100644
--- a/3party/freetype/include/freetype/config/ftheader.h
+++ b/3party/freetype/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -427,6 +427,19 @@
/*************************************************************************
*
* @macro:
+ * FT_BZIP2_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API which supports bzip2-compressed files.
+ *
+ */
+#define FT_BZIP2_H <freetype/ftbzip2.h>
+
+
+ /*************************************************************************
+ *
+ * @macro:
* FT_WINFONTS_H
*
* @description:
diff --git a/3party/freetype/include/freetype/config/ftoption.h b/3party/freetype/include/freetype/config/ftoption.h
index 8c09be4ec0..e4dc0cba5d 100644
--- a/3party/freetype/include/freetype/config/ftoption.h
+++ b/3party/freetype/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -85,9 +85,9 @@ FT_BEGIN_HEADER
/* */
/* This macro has no impact on the FreeType API, only on its */
/* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
- /* FT_Render_Glyph still generates a bitmap that is 3 times larger than */
- /* the original size; the difference will be that each triplet of */
- /* subpixels has R=G=B. */
+ /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
+ /* the original size in case this macro isn't defined; however, each */
+ /* triplet of subpixels has R=G=B. */
/* */
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
@@ -121,9 +121,7 @@ FT_BEGIN_HEADER
/* performance-critical functions (e.g. FT_MulFix). You should only do */
/* that to verify that the assembler function works properly, or to */
/* execute benchmark tests of the various implementations. */
-#if defined( __arm__ ) && !defined( __thumb__ )
-#define FT_CONFIG_OPTION_NO_ASSEMBLER
-#endif
+/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
/*************************************************************************/
@@ -150,7 +148,7 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
-#define FT_CONFIG_OPTION_USE_LZW
+/*#define FT_CONFIG_OPTION_USE_LZW*/
/*************************************************************************/
@@ -165,7 +163,7 @@ FT_BEGIN_HEADER
/* Define this macro if you want to enable this `feature'. See also */
/* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
/* */
-#undef FT_CONFIG_OPTION_USE_ZLIB
+/*#define FT_CONFIG_OPTION_USE_ZLIB*/
/*************************************************************************/
@@ -191,6 +189,22 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Bzip2-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* `bzip2' program. This is mostly used to parse many of the PCF */
+ /* files that come with XFree86. The implementation uses `libbz2' to */
+ /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */
+ /* Contrary to gzip, bzip2 currently is not included and need to use */
+ /* the system available bzip2 implementation. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_BZIP2 */
+
+
+ /*************************************************************************/
+ /* */
/* DLL export compilation */
/* */
/* When compiling FreeType as a DLL, some systems/compilers need a */
@@ -271,7 +285,7 @@ FT_BEGIN_HEADER
/* able to synthesize a Unicode charmap out of the glyphs found in the */
/* fonts. */
/* */
-#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
+/*#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST*/
/*************************************************************************/
@@ -284,7 +298,7 @@ FT_BEGIN_HEADER
/* */
/* Note that the `FOND' resource isn't checked. */
/* */
-#define FT_CONFIG_OPTION_MAC_FONTS
+/*#define FT_CONFIG_OPTION_MAC_FONTS*/
/*************************************************************************/
@@ -314,10 +328,11 @@ FT_BEGIN_HEADER
/* */
/* Allow the use of FT_Incremental_Interface to load typefaces that */
/* contain no glyph data, but supply it via a callback function. */
- /* This allows FreeType to be used with the PostScript language, using */
- /* the GhostScript interpreter. */
+ /* This is required by clients supporting document formats which */
+ /* supply font data incrementally as the document is parsed, such */
+ /* as the Ghostscript interpreter for the PostScript language. */
/* */
-/* #define FT_CONFIG_OPTION_INCREMENTAL */
+/*#define FT_CONFIG_OPTION_INCREMENTAL*/
/*************************************************************************/
@@ -365,6 +380,39 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Autofitter debugging */
+ /* */
+ /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */
+ /* control the autofitter behaviour for debugging purposes with global */
+ /* boolean variables (consequently, you should *never* enable this */
+ /* while compiling in `release' mode): */
+ /* */
+ /* _af_debug_disable_horz_hints */
+ /* _af_debug_disable_vert_hints */
+ /* _af_debug_disable_blue_hints */
+ /* */
+ /* Additionally, the following functions provide dumps of various */
+ /* internal autofit structures to stdout (using `printf'): */
+ /* */
+ /* af_glyph_hints_dump_points */
+ /* af_glyph_hints_dump_segments */
+ /* af_glyph_hints_dump_edges */
+ /* */
+ /* As an argument, they use another global variable: */
+ /* */
+ /* _af_debug_hints */
+ /* */
+ /* Please have a look at the `ftgrid' demo program to see how those */
+ /* variables and macros should be used. */
+ /* */
+ /* Do not #undef these macros here since the build system might define */
+ /* them for certain configurations only. */
+ /* */
+/* #define FT_DEBUG_AUTOFIT */
+
+
+ /*************************************************************************/
+ /* */
/* Memory Debugging */
/* */
/* FreeType now comes with an integrated memory debugger that is */
@@ -403,7 +451,7 @@ FT_BEGIN_HEADER
/* Position Independent Code */
/* */
/* If this macro is set (which is _not_ the default), FreeType2 will */
- /* avoid creating constants that require address fixups. Instead the */
+ /* avoid creating constants that require address fixups. Instead the */
/* constants will be moved into a struct and additional intialization */
/* code will be used. */
/* */
@@ -428,7 +476,7 @@ FT_BEGIN_HEADER
/* embedded bitmaps in all formats using the SFNT module (namely */
/* TrueType & OpenType). */
/* */
-#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+/*#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS*/
/*************************************************************************/
@@ -457,7 +505,7 @@ FT_BEGIN_HEADER
/* Accessing SFNT names is done through the functions declared in */
/* `freetype/ftsnames.h'. */
/* */
-#define TT_CONFIG_OPTION_SFNT_NAMES
+/*#define TT_CONFIG_OPTION_SFNT_NAMES*/
/*************************************************************************/
@@ -488,8 +536,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
- /* a bytecode interpreter in the TrueType driver. Note that there are */
- /* important patent issues related to the use of the interpreter. */
+ /* a bytecode interpreter in the TrueType driver. */
/* */
/* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */
@@ -497,17 +544,20 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
/* of the TrueType bytecode interpreter is used that doesn't implement */
- /* any of the patented opcodes and algorithms. Note that the */
- /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
+ /* any of the patented opcodes and algorithms. The patents related to */
+ /* TrueType hinting have expired worldwide since May 2010; this option */
+ /* is now deprecated. */
+ /* */
+ /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
+ /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
+ /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
/* */
/* This macro is only useful for a small number of font files (mostly */
@@ -544,7 +594,7 @@ FT_BEGIN_HEADER
/* ... */
/* } */
/* */
-#define TT_CONFIG_OPTION_UNPATENTED_HINTING
+/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
/*************************************************************************/
@@ -573,7 +623,7 @@ FT_BEGIN_HEADER
/* composite flags array which can be used to disambiguate, but old */
/* fonts will not have them. */
/* */
- /* http://partners.adobe.com/asn/developer/opentype/glyf.html */
+ /* http://www.microsoft.com/typography/otspec/glyf.htm */
/* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */
/* */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
@@ -586,7 +636,7 @@ FT_BEGIN_HEADER
/* and avar tables). This has many similarities to Type 1 Multiple */
/* Masters support. */
/* */
-#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
+/*#define TT_CONFIG_OPTION_GX_VAR_SUPPORT*/
/*************************************************************************/
@@ -594,7 +644,7 @@ FT_BEGIN_HEADER
/* Define TT_CONFIG_OPTION_BDF if you want to include support for */
/* an embedded `BDF ' table within SFNT-based bitmap formats. */
/* */
-#define TT_CONFIG_OPTION_BDF
+/*#define TT_CONFIG_OPTION_BDF*/
/*************************************************************************/
@@ -674,6 +724,19 @@ FT_BEGIN_HEADER
/* */
#define AF_CONFIG_OPTION_INDIC
+ /*************************************************************************/
+ /* */
+ /* Compile autofit module with warp hinting. The idea of the warping */
+ /* code is to slightly scale and shift a glyph within a single dimension */
+ /* so that as much of its segments are aligned (more or less) on the */
+ /* grid. To find out the optimal scaling and shifting value, various */
+ /* parameter combinations are tried and scored. */
+ /* */
+ /* This experimental option is only active if the render mode is */
+ /* FT_RENDER_MODE_LIGHT. */
+ /* */
+/* #define AF_CONFIG_OPTION_USE_WARPER */
+
/* */
@@ -687,7 +750,28 @@ FT_BEGIN_HEADER
* is recommended to disable the macro since it reduces the library's code
* size and activates a few memory-saving optimizations as well.
*/
-#define FT_CONFIG_OPTION_OLD_INTERNALS
+/*#define FT_CONFIG_OPTION_OLD_INTERNALS*/
+
+
+ /*
+ * To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
+ * we restrict the number of charmaps in a font. The current API of
+ * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
+ * takes charcode only. To determine the passed value is for cmap_index
+ * or charcode, the possible cmap_index is restricted not to exceed
+ * the minimum possible charcode by a rogue client. It is also very
+ * unlikely that a rogue client is interested in Unicode values 0 to 15.
+ *
+ * NOTE: The original threshold was 4 deduced from popular number of
+ * cmap subtables in UCS-4 TrueType fonts, but now it is not
+ * irregular for OpenType fonts to have more than 4 subtables,
+ * because variation selector subtables are available for Apple
+ * and Microsoft platforms.
+ */
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#define FT_MAX_CHARMAP_CACHEABLE 15
+#endif
/*
diff --git a/3party/freetype/include/freetype/freetype.h b/3party/freetype/include/freetype/freetype.h
index 135a879362..a0a353060e 100644
--- a/3party/freetype/include/freetype/freetype.h
+++ b/3party/freetype/include/freetype/freetype.h
@@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -226,10 +226,16 @@ FT_BEGIN_HEADER
/* Left side bearing for vertical layout. */
/* */
/* vertBearingY :: */
- /* Top side bearing for vertical layout. */
+ /* Top side bearing for vertical layout. Larger positive values */
+ /* mean further below the vertical glyph origin. */
/* */
/* vertAdvance :: */
- /* Advance height for vertical layout. */
+ /* Advance height for vertical layout. Positive values mean the */
+ /* glyph has a positive advance downward. */
+ /* */
+ /* <Note> */
+ /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */
+ /* dimensions of the hinted glyph (in case hinting is applicable). */
/* */
typedef struct FT_Glyph_Metrics_
{
@@ -1053,7 +1059,7 @@ FT_BEGIN_HEADER
/* */
/* It is not possible to autohint such fonts using */
/* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */
- /* @FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING */
+ /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */
/* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */
/* probably never want this except for demonstration purposes. */
/* */
@@ -1477,8 +1483,13 @@ FT_BEGIN_HEADER
/* important to perform correct WYSIWYG layout. */
/* Only relevant for outline glyphs. */
/* */
- /* advance :: This is the transformed advance width for the */
- /* glyph (in 26.6 fractional pixel format). */
+ /* advance :: This shorthand is, depending on */
+ /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */
+ /* advance width for the glyph (in 26.6 */
+ /* fractional pixel format). As specified with */
+ /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */
+ /* `horiAdvance' or the `vertAdvance' value of */
+ /* `metrics' field. */
/* */
/* format :: This field indicates the format of the image */
/* contained in the glyph slot. Typically */
@@ -1743,7 +1754,8 @@ FT_BEGIN_HEADER
/* data :: A pointer to the parameter data. */
/* */
/* <Note> */
- /* The ID and function of parameters are driver-specific. */
+ /* The ID and function of parameters are driver-specific. See the */
+ /* various FT_PARAM_TAG_XXX flags for more information. */
/* */
typedef struct FT_Parameter_
{
@@ -1941,6 +1953,9 @@ FT_BEGIN_HEADER
/* Each new face object created with this function also owns a */
/* default @FT_Size object, accessible as `face->size'. */
/* */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Face. */
+ /* */
FT_EXPORT( FT_Error )
FT_Open_Face( FT_Library library,
const FT_Open_Args* args,
@@ -2008,6 +2023,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Reference_Face */
+ /* */
+ /* <Description> */
+ /* A counter gets initialized to~1 at the time an @FT_Face structure */
+ /* is created. This function increments the counter. @FT_Done_Face */
+ /* then only destroys a face if the counter is~1, otherwise it simply */
+ /* decrements the counter. */
+ /* */
+ /* This function helps in managing life-cycles of structures which */
+ /* reference @FT_Face objects. */
+ /* */
+ /* <Input> */
+ /* face :: A handle to a target face object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Since> */
+ /* 2.4.2 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Reference_Face( FT_Face face );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_Done_Face */
/* */
/* <Description> */
@@ -2020,6 +2062,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Face. */
+ /* */
FT_EXPORT( FT_Error )
FT_Done_Face( FT_Face face );
@@ -2400,13 +2446,7 @@ FT_BEGIN_HEADER
* in fonts. By default, FreeType tries to handle broken fonts also.
*
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
- * Indicates that the font driver should ignore the global advance
- * width defined in the font. By default, that value is used as the
- * advance width for all glyphs when the face has
- * @FT_FACE_FLAG_FIXED_WIDTH set.
- *
- * This flag exists for historical reasons (to support buggy CJK
- * fonts).
+ * Ignored. Deprecated.
*
* FT_LOAD_NO_RECURSE ::
* This flag is only used internally. It merely indicates that the
@@ -2986,7 +3026,7 @@ FT_BEGIN_HEADER
*
* @return:
* The index into the array of character maps within the face to which
- * `charmap' belongs.
+ * `charmap' belongs. If an error occurs, -1 is returned.
*
*/
FT_EXPORT( FT_Int )
@@ -3762,8 +3802,8 @@ FT_BEGIN_HEADER
*
*/
#define FREETYPE_MAJOR 2
-#define FREETYPE_MINOR 3
-#define FREETYPE_PATCH 10
+#define FREETYPE_MINOR 4
+#define FREETYPE_PATCH 5
/*************************************************************************/
@@ -3823,6 +3863,9 @@ FT_BEGIN_HEADER
/* 1~if this is a TrueType font that uses one of the patented */
/* opcodes, 0~otherwise. */
/* */
+ /* <Note> */
+ /* Since May 2010, TrueType hinting is no longer patented. */
+ /* */
/* <Since> */
/* 2.3.5 */
/* */
@@ -3850,6 +3893,9 @@ FT_BEGIN_HEADER
/* an SFNT font, or if the unpatented hinter is not compiled in this */
/* instance of the library. */
/* */
+ /* <Note> */
+ /* Since May 2010, TrueType hinting is no longer patented. */
+ /* */
/* <Since> */
/* 2.3.5 */
/* */
diff --git a/3party/freetype/include/freetype/ftbbox.h b/3party/freetype/include/freetype/ftbbox.h
index 01fe3fb0d1..976691956f 100644
--- a/3party/freetype/include/freetype/ftbbox.h
+++ b/3party/freetype/include/freetype/ftbbox.h
@@ -4,7 +4,7 @@
/* */
/* FreeType exact bbox computation (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2007 by */
+/* Copyright 1996-2001, 2003, 2007, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -73,6 +73,14 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* If the font is tricky and the glyph has been loaded with */
+ /* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get */
+ /* reasonable values for the BBox it is necessary to load the glyph */
+ /* at a large ppem value (so that the hinting instructions can */
+ /* properly shift and scale the subglyphs), then extracting the BBox */
+ /* which can be eventually converted back to font units. */
+ /* */
FT_EXPORT( FT_Error )
FT_Outline_Get_BBox( FT_Outline* outline,
FT_BBox *abbox );
diff --git a/3party/freetype/include/freetype/ftbzip2.h b/3party/freetype/include/freetype/ftbzip2.h
new file mode 100644
index 0000000000..1bf81b15e8
--- /dev/null
+++ b/3party/freetype/include/freetype/ftbzip2.h
@@ -0,0 +1,102 @@
+/***************************************************************************/
+/* */
+/* ftbzip2.h */
+/* */
+/* Bzip2-compressed stream support. */
+/* */
+/* Copyright 2010 by */
+/* Joel Klinghed. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTBZIP2_H__
+#define __FTBZIP2_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
+ /* bzip2 */
+ /* */
+ /* <Title> */
+ /* BZIP2 Streams */
+ /* */
+ /* <Abstract> */
+ /* Using bzip2-compressed font files. */
+ /* */
+ /* <Description> */
+ /* This section contains the declaration of Bzip2-specific functions. */
+ /* */
+ /*************************************************************************/
+
+
+ /************************************************************************
+ *
+ * @function:
+ * FT_Stream_OpenBzip2
+ *
+ * @description:
+ * Open a new stream to parse bzip2-compressed font files. This is
+ * mainly used to support the compressed `*.pcf.bz2' fonts that come
+ * with XFree86.
+ *
+ * @input:
+ * stream ::
+ * The target embedding stream.
+ *
+ * source ::
+ * The source stream.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * The source stream must be opened _before_ calling this function.
+ *
+ * Calling the internal function `FT_Stream_Close' on the new stream will
+ * *not* call `FT_Stream_Close' on the source stream. None of the stream
+ * objects will be released to the heap.
+ *
+ * The stream implementation is very basic and resets the decompression
+ * process each time seeking backwards is needed within the stream.
+ *
+ * In certain builds of the library, bzip2 compression recognition is
+ * automatically handled when calling @FT_New_Face or @FT_Open_Face.
+ * This means that if no font driver is capable of handling the raw
+ * compressed file, the library will try to open a bzip2 compressed stream
+ * from it and re-open the face with it.
+ *
+ * This function may return `FT_Err_Unimplemented_Feature' if your build
+ * of FreeType was not compiled with bzip2 support.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stream_OpenBzip2( FT_Stream stream,
+ FT_Stream source );
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTBZIP2_H__ */
+
+
+/* END */
diff --git a/3party/freetype/include/freetype/ftcache.h b/3party/freetype/include/freetype/ftcache.h
index ed0a15ce69..6af5306228 100644
--- a/3party/freetype/include/freetype/ftcache.h
+++ b/3party/freetype/include/freetype/ftcache.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache subsystem (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,7 +22,6 @@
#include <ft2build.h>
#include FT_GLYPH_H
-#include FT_STROKER_H
FT_BEGIN_HEADER
@@ -57,9 +56,12 @@ FT_BEGIN_HEADER
* interpret them in any way.
*
* Second, the cache calls, only when needed, a client-provided function
- * to convert a @FTC_FaceID into a new @FT_Face object. The latter is
+ * to convert an @FTC_FaceID into a new @FT_Face object. The latter is
* then completely managed by the cache, including its termination
- * through @FT_Done_Face.
+ * through @FT_Done_Face. To monitor termination of face objects, the
+ * finalizer callback in the `generic' field of the @FT_Face object can
+ * be used, which might also be used to store the @FTC_FaceID of the
+ * face.
*
* Clients are free to map face IDs to anything else. The most simple
* usage is to associate them to a (pathname,face_index) pair that is
@@ -212,12 +214,17 @@ FT_BEGIN_HEADER
/* */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ /* these macros are incompatible with LLP64, should not be used */
+
#define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) )
#define FTC_FACE_ID_HASH( i ) \
((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/
/*************************************************************************/
@@ -264,10 +271,10 @@ FT_BEGIN_HEADER
/* reference-counted. A node with a count of~0 might be flushed */
/* out of a full cache whenever a lookup request is performed. */
/* */
- /* If you lookup nodes, you have the ability to `acquire' them, i.e., */
- /* to increment their reference count. This will prevent the node */
- /* from being flushed out of the cache until you explicitly `release' */
- /* it (see @FTC_Node_Unref). */
+ /* If you look up nodes, you have the ability to `acquire' them, */
+ /* i.e., to increment their reference count. This will prevent the */
+ /* node from being flushed out of the cache until you explicitly */
+ /* `release' it (see @FTC_Node_Unref). */
/* */
/* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */
/* */
@@ -698,11 +705,17 @@ FT_BEGIN_HEADER
(d1)->width == (d2)->width && \
(d1)->flags == (d2)->flags )
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+ /* this macro is incompatible with LLP64, should not be used */
+
#define FTC_IMAGE_TYPE_HASH( d ) \
(FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \
( (d)->width << 8 ) ^ (d)->height ^ \
( (d)->flags << 4 ) )
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
/*************************************************************************/
/* */
@@ -738,10 +751,6 @@ FT_BEGIN_HEADER
FTC_ImageCache_New( FTC_Manager manager,
FTC_ImageCache *acache );
- FT_EXPORT( FT_Error )
- FTC_StrokedImageCache_New( FTC_Manager manager,
- FTC_ImageCache * acache,
- FT_Stroker stroker);
/*************************************************************************/
/* */
@@ -950,6 +959,7 @@ FT_BEGIN_HEADER
FTC_SBitCache_New( FTC_Manager manager,
FTC_SBitCache *acache );
+
/*************************************************************************/
/* */
/* <Function> */
@@ -1097,6 +1107,7 @@ FT_BEGIN_HEADER
(f1)->pix_width == (f2)->pix_width && \
(f1)->pix_height == (f2)->pix_height )
+ /* this macro is incompatible with LLP64, should not be used */
#define FTC_FONT_HASH( f ) \
(FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
((f)->pix_width << 8) ^ \
diff --git a/3party/freetype/include/freetype/ftchapters.h b/3party/freetype/include/freetype/ftchapters.h
index 7775a6bb00..6cdf54e495 100644
--- a/3party/freetype/include/freetype/ftchapters.h
+++ b/3party/freetype/include/freetype/ftchapters.h
@@ -98,6 +98,7 @@
/* module_management */
/* gzip */
/* lzw */
+/* bzip2 */
/* lcd_filtering */
/* */
/***************************************************************************/
diff --git a/3party/freetype/include/freetype/fterrdef.h b/3party/freetype/include/freetype/fterrdef.h
index d7ad256bdb..d4e7287f2e 100644
--- a/3party/freetype/include/freetype/fterrdef.h
+++ b/3party/freetype/include/freetype/fterrdef.h
@@ -4,7 +4,7 @@
/* */
/* FreeType error codes (specification). */
/* */
-/* Copyright 2002, 2004, 2006, 2007 by */
+/* Copyright 2002, 2004, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -211,6 +211,8 @@
"argument stack underflow" )
FT_ERRORDEF_( Ignore, 0xA2, \
"ignore" )
+ FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
+ "no Unicode glyph name found" )
/* BDF errors */
@@ -220,19 +222,21 @@
"`FONT' field missing" )
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
"`SIZE' field missing" )
- FT_ERRORDEF_( Missing_Chars_Field, 0xB3, \
+ FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \
+ "`FONTBOUNDINGBOX' field missing" )
+ FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \
"`CHARS' field missing" )
- FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, \
+ FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
"`STARTCHAR' field missing" )
- FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, \
+ FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
"`ENCODING' field missing" )
- FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, \
+ FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
"`BBX' field missing" )
- FT_ERRORDEF_( Bbx_Too_Big, 0xB7, \
+ FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \
"`BBX' too big" )
- FT_ERRORDEF_( Corrupted_Font_Header, 0xB8, \
+ FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \
"Font header corrupted or missing fields" )
- FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xB9, \
+ FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \
"Font glyphs corrupted or missing fields" )
diff --git a/3party/freetype/include/freetype/ftgasp.h b/3party/freetype/include/freetype/ftgasp.h
index 91a769e520..5e978e5c14 100644
--- a/3party/freetype/include/freetype/ftgasp.h
+++ b/3party/freetype/include/freetype/ftgasp.h
@@ -4,7 +4,7 @@
/* */
/* Access of TrueType's `gasp' table (specification). */
/* */
-/* Copyright 2007, 2008 by */
+/* Copyright 2007, 2008, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,19 +62,27 @@
* It is up to the client to decide what to do.
*
* FT_GASP_DO_GRIDFIT ::
- * Grid-fitting and hinting should be performed at the specified ppem.
- * This *really* means TrueType bytecode interpretation.
+ * Grid-fitting and hinting should be performed at the specified ppem.
+ * This *really* means TrueType bytecode interpretation. If this bit
+ * is not set, no hinting gets applied.
*
* FT_GASP_DO_GRAY ::
- * Anti-aliased rendering should be performed at the specified ppem.
+ * Anti-aliased rendering should be performed at the specified ppem.
+ * If not set, do monochrome rendering.
*
* FT_GASP_SYMMETRIC_SMOOTHING ::
- * Smoothing along multiple axes must be used with ClearType.
+ * If set, smoothing along multiple axes must be used with ClearType.
*
* FT_GASP_SYMMETRIC_GRIDFIT ::
* Grid-fitting must be used with ClearType's symmetric smoothing.
*
* @note:
+ * The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be
+ * used for standard font rasterization only. Independently of that,
+ * `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to
+ * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and
+ * `FT_GASP_DO_GRAY' are consequently ignored).
+ *
* `ClearType' is Microsoft's implementation of LCD rendering, partly
* protected by patents.
*
diff --git a/3party/freetype/include/freetype/ftglyph.h b/3party/freetype/include/freetype/ftglyph.h
index cacccf025e..3de69f7aed 100644
--- a/3party/freetype/include/freetype/ftglyph.h
+++ b/3party/freetype/include/freetype/ftglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by */
+/* Copyright 1996-2003, 2006, 2008, 2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -384,6 +384,13 @@ FT_BEGIN_HEADER
/* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */
/* is another name for this constant. */
/* */
+ /* If the font is tricky and the glyph has been loaded with */
+ /* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get */
+ /* reasonable values for the CBox it is necessary to load the glyph */
+ /* at a large ppem value (so that the hinting instructions can */
+ /* properly shift and scale the subglyphs), then extracting the CBox */
+ /* which can be eventually converted back to font units. */
+ /* */
/* Note that the maximum coordinates are exclusive, which means that */
/* one can compute the width and height of the glyph image (be it in */
/* integer or 26.6 pixels) as: */
@@ -468,7 +475,7 @@ FT_BEGIN_HEADER
/* // convert to a bitmap (default render mode + destroying old) */
/* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */
/* { */
- /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT, */
+ /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */
/* 0, 1 ); */
/* if ( error ) // `glyph' unchanged */
/* ... */
diff --git a/3party/freetype/include/freetype/ftimage.h b/3party/freetype/include/freetype/ftimage.h
index 2fcc113ad5..04b5e04f7b 100644
--- a/3party/freetype/include/freetype/ftimage.h
+++ b/3party/freetype/include/freetype/ftimage.h
@@ -5,7 +5,8 @@
/* FreeType glyph image formats and default raster interface */
/* (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -51,10 +52,9 @@ FT_BEGIN_HEADER
/* FT_Pos */
/* */
/* <Description> */
- /* The type FT_Pos is a 32-bit integer used to store vectorial */
- /* coordinates. Depending on the context, these can represent */
- /* distances in integer font units, or 16.16, or 26.6 fixed float */
- /* pixel coordinates. */
+ /* The type FT_Pos is used to store vectorial coordinates. Depending */
+ /* on the context, these can represent distances in integer font */
+ /* units, or 16.16, or 26.6 fixed float pixel coordinates. */
/* */
typedef signed long FT_Pos;
@@ -99,6 +99,20 @@ FT_BEGIN_HEADER
/* */
/* yMax :: The vertical maximum (top-most). */
/* */
+ /* <Note> */
+ /* The bounding box is specified with the coordinates of the lower */
+ /* left and the upper right corner. In PostScript, those values are */
+ /* often called (llx,lly) and (urx,ury), respectively. */
+ /* */
+ /* If `yMin' is negative, this value gives the glyph's descender. */
+ /* Otherwise, the glyph doesn't descend below the baseline. */
+ /* Similarly, if `ymax' is positive, this value gives the glyph's */
+ /* ascender. */
+ /* */
+ /* `xMin' gives the horizontal distance from the glyph's origin to */
+ /* the left edge of the glyph's bounding box. If `xMin' is negative, */
+ /* the glyph extends to the left of the origin. */
+ /* */
typedef struct FT_BBox_
{
FT_Pos xMin, yMin;
@@ -254,6 +268,21 @@ FT_BEGIN_HEADER
/* flow. In all cases, the pitch is an offset to add */
/* to a bitmap pointer in order to go down one row. */
/* */
+ /* Note that `padding' means the alignment of a */
+ /* bitmap to a byte border, and FreeType functions */
+ /* normally align to the smallest possible integer */
+ /* value. */
+ /* */
+ /* For the B/W rasterizer, `pitch' is always an even */
+ /* number. */
+ /* */
+ /* To change the pitch of a bitmap (say, to make it a */
+ /* multiple of 4), use @FT_Bitmap_Convert. */
+ /* Alternatively, you might use callback functions to */
+ /* directly render to the application's surface; see */
+ /* the file `example2.cpp' in the tutorial for a */
+ /* demonstration. */
+ /* */
/* buffer :: A typeless pointer to the bitmap buffer. This */
/* value should be aligned on 32-bit boundaries in */
/* most cases. */
@@ -563,8 +592,8 @@ FT_BEGIN_HEADER
/* FT_Outline_ConicToFunc */
/* */
/* <Description> */
- /* A function pointer type use to describe the signature of a `conic */
- /* to' function during outline walking/decomposition. */
+ /* A function pointer type used to describe the signature of a `conic */
+ /* to' function during outline walking or decomposition. */
/* */
/* A `conic to' is emitted to indicate a second-order Bézier arc in */
/* the outline. */
@@ -596,7 +625,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A function pointer type used to describe the signature of a `cubic */
- /* to' function during outline walking/decomposition. */
+ /* to' function during outline walking or decomposition. */
/* */
/* A `cubic to' is emitted to indicate a third-order Bézier arc. */
/* */
@@ -629,8 +658,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A structure to hold various function pointers used during outline */
- /* decomposition in order to emit segments, conic, and cubic Béziers, */
- /* as well as `move to' and `close to' operations. */
+ /* decomposition in order to emit segments, conic, and cubic Béziers. */
/* */
/* <Fields> */
/* move_to :: The `move to' emitter. */
@@ -657,7 +685,7 @@ FT_BEGIN_HEADER
/* y' = (x << shift) - delta */
/* } */
/* */
- /* Set the value of `shift' and `delta' to~0 to get the original */
+ /* Set the values of `shift' and `delta' to~0 to get the original */
/* point coordinates. */
/* */
typedef struct FT_Outline_Funcs_
diff --git a/3party/freetype/include/freetype/ftincrem.h b/3party/freetype/include/freetype/ftincrem.h
index 96abedea7b..aaf689ff16 100644
--- a/3party/freetype/include/freetype/ftincrem.h
+++ b/3party/freetype/include/freetype/ftincrem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType incremental loading (specification). */
/* */
-/* Copyright 2002, 2003, 2006, 2007, 2008 by */
+/* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -101,7 +101,10 @@ FT_BEGIN_HEADER
* Top bearing, in font units.
*
* advance ::
- * Glyph advance, in font units.
+ * Horizontal component of glyph advance, in font units.
+ *
+ * advance_v ::
+ * Vertical component of glyph advance, in font units.
*
* @note:
* These correspond to horizontal or vertical metrics depending on the
@@ -114,6 +117,7 @@ FT_BEGIN_HEADER
FT_Long bearing_x;
FT_Long bearing_y;
FT_Long advance;
+ FT_Long advance_v; /* since 2.3.12 */
} FT_Incremental_MetricsRec;
diff --git a/3party/freetype/include/freetype/ftlcdfil.h b/3party/freetype/include/freetype/ftlcdfil.h
index c6201b38e9..0b55ebee65 100644
--- a/3party/freetype/include/freetype/ftlcdfil.h
+++ b/3party/freetype/include/freetype/ftlcdfil.h
@@ -5,7 +5,7 @@
/* FreeType API for color filtering of subpixel bitmap glyphs */
/* (specification). */
/* */
-/* Copyright 2006, 2007, 2008 by */
+/* Copyright 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,7 +58,7 @@ FT_BEGIN_HEADER
/****************************************************************************
*
- * @func:
+ * @enum:
* FT_LcdFilter
*
* @description:
@@ -161,6 +161,47 @@ FT_BEGIN_HEADER
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter );
+
+ /**************************************************************************
+ *
+ * @func:
+ * FT_Library_SetLcdFilterWeights
+ *
+ * @description:
+ * Use this function to override the filter weights selected by
+ * @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple
+ * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
+ * 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
+ * FT_LCD_FILTER_LEGACY.
+ *
+ * @input:
+ * library ::
+ * A handle to the target library instance.
+ *
+ * weights ::
+ * A pointer to an array; the function copies the first five bytes and
+ * uses them to specify the filter weights.
+ *
+ * @return:
+ * FreeType error code. 0~means success.
+ *
+ * @note:
+ * Due to *PATENTS* covering subpixel rendering, this function doesn't
+ * do anything except returning `FT_Err_Unimplemented_Feature' if the
+ * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
+ * defined in your build of the library, which should correspond to all
+ * default builds of FreeType.
+ *
+ * This function must be called after @FT_Library_SetLcdFilter to have
+ * any effect.
+ *
+ * @since:
+ * 2.4.0
+ */
+ FT_EXPORT( FT_Error )
+ FT_Library_SetLcdFilterWeights( FT_Library library,
+ unsigned char *weights );
+
/* */
diff --git a/3party/freetype/include/freetype/ftlist.h b/3party/freetype/include/freetype/ftlist.h
index 93b05fc0d6..bb6f7f119d 100644
--- a/3party/freetype/include/freetype/ftlist.h
+++ b/3party/freetype/include/freetype/ftlist.h
@@ -4,7 +4,7 @@
/* */
/* Generic list support for FreeType (specification). */
/* */
-/* Copyright 1996-2001, 2003, 2007 by */
+/* Copyright 1996-2001, 2003, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -255,6 +255,10 @@ FT_BEGIN_HEADER
/* user :: A user-supplied field which is passed as the last */
/* argument to the destructor. */
/* */
+ /* <Note> */
+ /* This function expects that all nodes added by @FT_List_Add or */
+ /* @FT_List_Insert have been dynamically allocated. */
+ /* */
FT_EXPORT( void )
FT_List_Finalize( FT_List list,
FT_List_Destructor destroy,
diff --git a/3party/freetype/include/freetype/ftmodapi.h b/3party/freetype/include/freetype/ftmodapi.h
index 3c9b876dfe..8f2e017947 100644
--- a/3party/freetype/include/freetype/ftmodapi.h
+++ b/3party/freetype/include/freetype/ftmodapi.h
@@ -4,7 +4,7 @@
/* */
/* FreeType modules public interface (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -252,6 +252,33 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
+ /* FT_Reference_Library */
+ /* */
+ /* <Description> */
+ /* A counter gets initialized to~1 at the time an @FT_Library */
+ /* structure is created. This function increments the counter. */
+ /* @FT_Done_Library then only destroys a library if the counter is~1, */
+ /* otherwise it simply decrements the counter. */
+ /* */
+ /* This function helps in managing life-cycles of structures which */
+ /* reference @FT_Library objects. */
+ /* */
+ /* <Input> */
+ /* library :: A handle to a target library object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0~means success. */
+ /* */
+ /* <Since> */
+ /* 2.4.2 */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Reference_Library( FT_Library library );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
/* FT_New_Library */
/* */
/* <Description> */
@@ -263,6 +290,9 @@ FT_BEGIN_HEADER
/* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */
/* instead of @FT_Init_FreeType to initialize the FreeType library. */
/* */
+ /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */
+ /* library instance. */
+ /* */
/* <Input> */
/* memory :: A handle to the original memory object. */
/* */
@@ -272,6 +302,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Library. */
+ /* */
FT_EXPORT( FT_Error )
FT_New_Library( FT_Memory memory,
FT_Library *alibrary );
@@ -292,6 +326,10 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
+ /* <Note> */
+ /* See the discussion of reference counters in the description of */
+ /* @FT_Reference_Library. */
+ /* */
FT_EXPORT( FT_Error )
FT_Done_Library( FT_Library library );
@@ -394,8 +432,8 @@ FT_BEGIN_HEADER
*
* FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
* The library implements a bytecode interpreter that covers
- * the full instruction set of the TrueType virtual machine.
- * See the file `docs/PATENTS' for legal aspects.
+ * the full instruction set of the TrueType virtual machine (this
+ * was governed by patents until May 2010, hence the name).
*
* @since:
* 2.2
diff --git a/3party/freetype/include/freetype/ftmoderr.h b/3party/freetype/include/freetype/ftmoderr.h
index b0115dd0dd..1bf3b384ab 100644
--- a/3party/freetype/include/freetype/ftmoderr.h
+++ b/3party/freetype/include/freetype/ftmoderr.h
@@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 2001, 2002, 2003, 2004, 2005, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -105,24 +105,25 @@
FT_MODERRDEF( Base, 0x000, "base module" )
FT_MODERRDEF( Autofit, 0x100, "autofitter module" )
FT_MODERRDEF( BDF, 0x200, "BDF module" )
- FT_MODERRDEF( Cache, 0x300, "cache module" )
- FT_MODERRDEF( CFF, 0x400, "CFF module" )
- FT_MODERRDEF( CID, 0x500, "CID module" )
- FT_MODERRDEF( Gzip, 0x600, "Gzip module" )
- FT_MODERRDEF( LZW, 0x700, "LZW module" )
- FT_MODERRDEF( OTvalid, 0x800, "OpenType validation module" )
- FT_MODERRDEF( PCF, 0x900, "PCF module" )
- FT_MODERRDEF( PFR, 0xA00, "PFR module" )
- FT_MODERRDEF( PSaux, 0xB00, "PS auxiliary module" )
- FT_MODERRDEF( PShinter, 0xC00, "PS hinter module" )
- FT_MODERRDEF( PSnames, 0xD00, "PS names module" )
- FT_MODERRDEF( Raster, 0xE00, "raster module" )
- FT_MODERRDEF( SFNT, 0xF00, "SFNT module" )
- FT_MODERRDEF( Smooth, 0x1000, "smooth raster module" )
- FT_MODERRDEF( TrueType, 0x1100, "TrueType module" )
- FT_MODERRDEF( Type1, 0x1200, "Type 1 module" )
- FT_MODERRDEF( Type42, 0x1300, "Type 42 module" )
- FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" )
+ FT_MODERRDEF( Bzip2, 0x300, "Bzip2 module" )
+ FT_MODERRDEF( Cache, 0x400, "cache module" )
+ FT_MODERRDEF( CFF, 0x500, "CFF module" )
+ FT_MODERRDEF( CID, 0x600, "CID module" )
+ FT_MODERRDEF( Gzip, 0x700, "Gzip module" )
+ FT_MODERRDEF( LZW, 0x800, "LZW module" )
+ FT_MODERRDEF( OTvalid, 0x900, "OpenType validation module" )
+ FT_MODERRDEF( PCF, 0xA00, "PCF module" )
+ FT_MODERRDEF( PFR, 0xB00, "PFR module" )
+ FT_MODERRDEF( PSaux, 0xC00, "PS auxiliary module" )
+ FT_MODERRDEF( PShinter, 0xD00, "PS hinter module" )
+ FT_MODERRDEF( PSnames, 0xE00, "PS names module" )
+ FT_MODERRDEF( Raster, 0xF00, "raster module" )
+ FT_MODERRDEF( SFNT, 0x1000, "SFNT module" )
+ FT_MODERRDEF( Smooth, 0x1100, "smooth raster module" )
+ FT_MODERRDEF( TrueType, 0x1200, "TrueType module" )
+ FT_MODERRDEF( Type1, 0x1300, "Type 1 module" )
+ FT_MODERRDEF( Type42, 0x1400, "Type 42 module" )
+ FT_MODERRDEF( Winfonts, 0x1500, "Windows FON/FNT module" )
#ifdef FT_MODERR_END_LIST
diff --git a/3party/freetype/include/freetype/ftoutln.h b/3party/freetype/include/freetype/ftoutln.h
index d7d01e8270..1cf3c3f800 100644
--- a/3party/freetype/include/freetype/ftoutln.h
+++ b/3party/freetype/include/freetype/ftoutln.h
@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2003, 2005-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -85,9 +85,8 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Walk over an outline's structure to decompose it into individual */
- /* segments and Bézier arcs. This function is also able to emit */
- /* `move to' and `close to' operations to indicate the start and end */
- /* of new contours in the outline. */
+ /* segments and Bézier arcs. This function also emits `move to' */
+ /* operations to indicate the start of new contours in the outline. */
/* */
/* <Input> */
/* outline :: A pointer to the source target. */
@@ -228,6 +227,9 @@ FT_BEGIN_HEADER
/* <Output> */
/* acbox :: The outline's control box. */
/* */
+ /* <Note> */
+ /* See @FT_Glyph_Get_CBox for a discussion of tricky fonts. */
+ /* */
FT_EXPORT( void )
FT_Outline_Get_CBox( const FT_Outline* outline,
FT_BBox *acbox );
@@ -333,7 +335,7 @@ FT_BEGIN_HEADER
/* handled incorrectly. */
/* */
/* If you need `better' metrics values you should call */
- /* @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox. */
+ /* @FT_Outline_Get_CBox or @FT_Outline_Get_BBox. */
/* */
/* Example call: */
/* */
diff --git a/3party/freetype/include/freetype/ftrender.h b/3party/freetype/include/freetype/ftrender.h
index 41c31eac48..dd0229b815 100644
--- a/3party/freetype/include/freetype/ftrender.h
+++ b/3party/freetype/include/freetype/ftrender.h
@@ -4,7 +4,7 @@
/* */
/* FreeType renderer modules public interface (specification). */
/* */
-/* Copyright 1996-2001, 2005, 2006 by */
+/* Copyright 1996-2001, 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -141,10 +141,6 @@ FT_BEGIN_HEADER
/* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
/* This is a pointer to its raster's class. */
/* */
- /* raster :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
- /* This is a pointer to the corresponding raster */
- /* object, if any. */
- /* */
typedef struct FT_Renderer_Class_
{
FT_Module_Class root;
@@ -216,6 +212,14 @@ FT_BEGIN_HEADER
/* */
/* This doesn't change the current renderer for other formats. */
/* */
+ /* Currently, only the B/W renderer, if compiled with */
+ /* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */
+ /* anti-aliasing mode; this option must be set directly in */
+ /* `ftraster.c' and is undefined by default) accepts a single tag */
+ /* `pal5' to set its gray palette as a character string with */
+ /* 5~elements. Consequently, the third and fourth argument are zero */
+ /* normally. */
+ /* */
FT_EXPORT( FT_Error )
FT_Set_Renderer( FT_Library library,
FT_Renderer renderer,
diff --git a/3party/freetype/include/freetype/ftsnames.h b/3party/freetype/include/freetype/ftsnames.h
index f20b4099da..485e4e162e 100644
--- a/3party/freetype/include/freetype/ftsnames.h
+++ b/3party/freetype/include/freetype/ftsnames.h
@@ -7,7 +7,7 @@
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -160,6 +160,35 @@ FT_BEGIN_HEADER
FT_SfntName *aname );
+ /***************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
+ *
+ * @description:
+ * A constant used as the tag of @FT_Parameter structures to make
+ * FT_Open_Face() ignore preferred family subfamily names in `name'
+ * table since OpenType version 1.4. For backwards compatibility with
+ * legacy systems which has 4-face-per-family restriction.
+ *
+ */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
+
+
+ /***************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
+ *
+ * @description:
+ * A constant used as the tag of @FT_Parameter structures to make
+ * FT_Open_Face() ignore preferred subfamily names in `name' table since
+ * OpenType version 1.4. For backwards compatibility with legacy
+ * systems which has 4-face-per-family restriction.
+ *
+ */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
+
/* */
diff --git a/3party/freetype/include/freetype/ftsystem.h b/3party/freetype/include/freetype/ftsystem.h
index a95b2c76b6..e07460c55d 100644
--- a/3party/freetype/include/freetype/ftsystem.h
+++ b/3party/freetype/include/freetype/ftsystem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType low-level system interface definition (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2005 by */
+/* Copyright 1996-2001, 2002, 2005, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -240,7 +240,8 @@ FT_BEGIN_HEADER
*
* @note:
* This function might be called to perform a seek or skip operation
- * with a `count' of~0.
+ * with a `count' of~0. A non-zero return value then indicates an
+ * error.
*
*/
typedef unsigned long
@@ -301,7 +302,7 @@ FT_BEGIN_HEADER
* The stream's input function.
*
* close ::
- * The stream;s close function.
+ * The stream's close function.
*
* memory ::
* The memory manager to use to preload frames. This is set
diff --git a/3party/freetype/include/freetype/internal/ftmemory.h b/3party/freetype/include/freetype/internal/ftmemory.h
index 2010ca90d7..026aa63eaa 100644
--- a/3party/freetype/include/freetype/internal/ftmemory.h
+++ b/3party/freetype/include/freetype/internal/ftmemory.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007 by */
+/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,15 +58,27 @@ FT_BEGIN_HEADER
/*
- * C++ refuses to handle statements like p = (void*)anything; where `p'
- * is a typed pointer. Since we don't have a `typeof' operator in
- * standard C++, we have to use ugly casts.
+ * C++ refuses to handle statements like p = (void*)anything, with `p' a
+ * typed pointer. Since we don't have a `typeof' operator in standard
+ * C++, we have to use a template to emulate it.
*/
#ifdef __cplusplus
-#define FT_ASSIGNP( p, val ) *((void**)&(p)) = (val)
+
+ extern "C++"
+ template <typename T> inline T*
+ cplusplus_typeof( T*,
+ void *v )
+ {
+ return static_cast <T*> ( v );
+ }
+
+#define FT_ASSIGNP( p, val ) (p) = cplusplus_typeof( (p), (val) )
+
#else
+
#define FT_ASSIGNP( p, val ) (p) = (val)
+
#endif
diff --git a/3party/freetype/include/freetype/internal/ftobjs.h b/3party/freetype/include/freetype/internal/ftobjs.h
index 574cf58296..670eb78a84 100644
--- a/3party/freetype/include/freetype/internal/ftobjs.h
+++ b/3party/freetype/include/freetype/internal/ftobjs.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -311,6 +311,12 @@ FT_BEGIN_HEADER
/* in the case when the unpatented hinter is compiled within the */
/* library. */
/* */
+ /* refcount :: */
+ /* A counter initialized to~1 at the time an @FT_Face structure is */
+ /* created. @FT_Reference_Face increments this counter, and */
+ /* @FT_Done_Face only destroys a face if the counter is~1, */
+ /* otherwise it simply decrements it. */
+ /* */
typedef struct FT_Face_InternalRec_
{
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
@@ -328,6 +334,7 @@ FT_BEGIN_HEADER
#endif
FT_Bool ignore_unpatented_hinter;
+ FT_UInt refcount;
} FT_Face_InternalRec;
@@ -805,10 +812,28 @@ FT_BEGIN_HEADER
/* */
/* debug_hooks :: XXX */
/* */
+ /* lcd_filter :: If subpixel rendering is activated, the */
+ /* selected LCD filter mode. */
+ /* */
+ /* lcd_extra :: If subpixel rendering is activated, the number */
+ /* of extra pixels needed for the LCD filter. */
+ /* */
+ /* lcd_weights :: If subpixel rendering is activated, the LCD */
+ /* filter weights, if any. */
+ /* */
+ /* lcd_filter_func :: If subpixel rendering is activated, the LCD */
+ /* filtering callback function. */
+ /* */
/* pic_container :: Contains global structs and tables, instead */
/* of defining them globallly. */
/* */
-
+ /* refcount :: A counter initialized to~1 at the time an */
+ /* @FT_Library structure is created. */
+ /* @FT_Reference_Library increments this counter, */
+ /* and @FT_Done_Library only destroys a library */
+ /* if the counter is~1, otherwise it simply */
+ /* decrements it. */
+ /* */
typedef struct FT_LibraryRec_
{
FT_Memory memory; /* library's memory manager */
@@ -843,6 +868,8 @@ FT_BEGIN_HEADER
FT_PIC_Container pic_container;
#endif
+ FT_UInt refcount;
+
} FT_LibraryRec;
diff --git a/3party/freetype/include/freetype/internal/ftstream.h b/3party/freetype/include/freetype/internal/ftstream.h
index a91eb72d96..8b185005f5 100644
--- a/3party/freetype/include/freetype/internal/ftstream.h
+++ b/3party/freetype/include/freetype/internal/ftstream.h
@@ -4,7 +4,7 @@
/* */
/* Stream handling (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */
+/* Copyright 1996-2002, 2004-2006, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -292,18 +292,18 @@ FT_BEGIN_HEADER
#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char )
#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte )
-#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_Short )
-#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_UShort )
-#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_Long )
-#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_ULong )
-#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetLong, FT_Long )
-#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
-#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
-
-#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetShortLE, FT_Short )
-#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetShortLE, FT_UShort )
-#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetLongLE, FT_Long )
-#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetLongLE, FT_ULong )
+#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_Short )
+#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetUShort, FT_UShort )
+#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_Long )
+#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetUOffset, FT_ULong )
+#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetULong, FT_Long )
+#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )
+#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetULong, FT_ULong )
+
+#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Short )
+#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UShort )
+#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_Long )
+#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_ULong )
#endif
#define FT_READ_MACRO( func, type, var ) \
@@ -312,17 +312,17 @@ FT_BEGIN_HEADER
#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var )
#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var )
-#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadShort, FT_Short, var )
-#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadShort, FT_UShort, var )
-#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadOffset, FT_Long, var )
-#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadOffset, FT_ULong, var )
-#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadLong, FT_Long, var )
-#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadLong, FT_ULong, var )
+#define FT_READ_SHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_Short, var )
+#define FT_READ_USHORT( var ) FT_READ_MACRO( FT_Stream_ReadUShort, FT_UShort, var )
+#define FT_READ_OFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_Long, var )
+#define FT_READ_UOFF3( var ) FT_READ_MACRO( FT_Stream_ReadUOffset, FT_ULong, var )
+#define FT_READ_LONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_Long, var )
+#define FT_READ_ULONG( var ) FT_READ_MACRO( FT_Stream_ReadULong, FT_ULong, var )
-#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadShortLE, FT_Short, var )
-#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadShortLE, FT_UShort, var )
-#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadLongLE, FT_Long, var )
-#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadLongLE, FT_ULong, var )
+#define FT_READ_SHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_Short, var )
+#define FT_READ_USHORT_LE( var ) FT_READ_MACRO( FT_Stream_ReadUShortLE, FT_UShort, var )
+#define FT_READ_LONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_Long, var )
+#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadULongLE, FT_ULong, var )
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
@@ -431,25 +431,25 @@ FT_BEGIN_HEADER
FT_BASE( FT_Char )
FT_Stream_GetChar( FT_Stream stream );
- /* read a 16-bit big-endian integer from an entered frame */
- FT_BASE( FT_Short )
- FT_Stream_GetShort( FT_Stream stream );
+ /* read a 16-bit big-endian unsigned integer from an entered frame */
+ FT_BASE( FT_UShort )
+ FT_Stream_GetUShort( FT_Stream stream );
- /* read a 24-bit big-endian integer from an entered frame */
- FT_BASE( FT_Long )
- FT_Stream_GetOffset( FT_Stream stream );
+ /* read a 24-bit big-endian unsigned integer from an entered frame */
+ FT_BASE( FT_ULong )
+ FT_Stream_GetUOffset( FT_Stream stream );
- /* read a 32-bit big-endian integer from an entered frame */
- FT_BASE( FT_Long )
- FT_Stream_GetLong( FT_Stream stream );
+ /* read a 32-bit big-endian unsigned integer from an entered frame */
+ FT_BASE( FT_ULong )
+ FT_Stream_GetULong( FT_Stream stream );
- /* read a 16-bit little-endian integer from an entered frame */
- FT_BASE( FT_Short )
- FT_Stream_GetShortLE( FT_Stream stream );
+ /* read a 16-bit little-endian unsigned integer from an entered frame */
+ FT_BASE( FT_UShort )
+ FT_Stream_GetUShortLE( FT_Stream stream );
- /* read a 32-bit little-endian integer from an entered frame */
- FT_BASE( FT_Long )
- FT_Stream_GetLongLE( FT_Stream stream );
+ /* read a 32-bit little-endian unsigned integer from an entered frame */
+ FT_BASE( FT_ULong )
+ FT_Stream_GetULongLE( FT_Stream stream );
/* read a byte from a stream */
@@ -457,30 +457,30 @@ FT_BEGIN_HEADER
FT_Stream_ReadChar( FT_Stream stream,
FT_Error* error );
- /* read a 16-bit big-endian integer from a stream */
- FT_BASE( FT_Short )
- FT_Stream_ReadShort( FT_Stream stream,
- FT_Error* error );
-
- /* read a 24-bit big-endian integer from a stream */
- FT_BASE( FT_Long )
- FT_Stream_ReadOffset( FT_Stream stream,
+ /* read a 16-bit big-endian unsigned integer from a stream */
+ FT_BASE( FT_UShort )
+ FT_Stream_ReadUShort( FT_Stream stream,
FT_Error* error );
+ /* read a 24-bit big-endian unsigned integer from a stream */
+ FT_BASE( FT_ULong )
+ FT_Stream_ReadUOffset( FT_Stream stream,
+ FT_Error* error );
+
/* read a 32-bit big-endian integer from a stream */
- FT_BASE( FT_Long )
- FT_Stream_ReadLong( FT_Stream stream,
- FT_Error* error );
+ FT_BASE( FT_ULong )
+ FT_Stream_ReadULong( FT_Stream stream,
+ FT_Error* error );
- /* read a 16-bit little-endian integer from a stream */
- FT_BASE( FT_Short )
- FT_Stream_ReadShortLE( FT_Stream stream,
- FT_Error* error );
+ /* read a 16-bit little-endian unsigned integer from a stream */
+ FT_BASE( FT_UShort )
+ FT_Stream_ReadUShortLE( FT_Stream stream,
+ FT_Error* error );
- /* read a 32-bit little-endian integer from a stream */
- FT_BASE( FT_Long )
- FT_Stream_ReadLongLE( FT_Stream stream,
- FT_Error* error );
+ /* read a 32-bit little-endian unsigned integer from a stream */
+ FT_BASE( FT_ULong )
+ FT_Stream_ReadULongLE( FT_Stream stream,
+ FT_Error* error );
/* Read a structure from a stream. The structure must be described */
/* by an array of FT_Frame_Field records. */
diff --git a/3party/freetype/include/freetype/internal/fttrace.h b/3party/freetype/include/freetype/internal/fttrace.h
index e9b383a588..fbefdbdf49 100644
--- a/3party/freetype/include/freetype/internal/fttrace.h
+++ b/3party/freetype/include/freetype/internal/fttrace.h
@@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
-/* Copyright 2002, 2004, 2005, 2006, 2007 by */
+/* Copyright 2002, 2004-2007, 2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -135,5 +135,10 @@ FT_TRACE_DEF( gxvtrak )
FT_TRACE_DEF( gxvprop )
FT_TRACE_DEF( gxvlcar )
+ /* autofit components */
+FT_TRACE_DEF( afcjk )
+FT_TRACE_DEF( aflatin )
+FT_TRACE_DEF( aflatin2 )
+FT_TRACE_DEF( afwarp )
/* END */
diff --git a/3party/freetype/include/freetype/internal/pcftypes.h b/3party/freetype/include/freetype/internal/pcftypes.h
deleted file mode 100644
index 382796ffb4..0000000000
--- a/3party/freetype/include/freetype/internal/pcftypes.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* pcftypes.h
-
- FreeType font driver for pcf fonts
-
- Copyright (C) 2000, 2001, 2002 by
- Francesco Zappa Nardelli
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-
-#ifndef __PCFTYPES_H__
-#define __PCFTYPES_H__
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-
-FT_BEGIN_HEADER
-
-
- typedef struct PCF_Public_FaceRec_
- {
- FT_FaceRec root;
- FT_StreamRec gzip_stream;
- FT_Stream gzip_source;
-
- char* charset_encoding;
- char* charset_registry;
-
- } PCF_Public_FaceRec, *PCF_Public_Face;
-
-
-FT_END_HEADER
-
-#endif /* __PCFTYPES_H__ */
-
-
-/* END */
diff --git a/3party/freetype/include/freetype/ttnameid.h b/3party/freetype/include/freetype/ttnameid.h
index cbeac78db1..66aef0432e 100644
--- a/3party/freetype/include/freetype/ttnameid.h
+++ b/3party/freetype/include/freetype/ttnameid.h
@@ -64,7 +64,7 @@ FT_BEGIN_HEADER
* MacOS systems (even if they contain a Microsoft charmap as well).
*
* TT_PLATFORM_ISO ::
- * This value was used to specify Unicode charmaps. It is however
+ * This value was used to specify ISO/IEC 10646 charmaps. It is however
* now deprecated. See @TT_ISO_ID_XXX for a list of corresponding
* `encoding_id' values.
*
diff --git a/3party/freetype/include/freetype/tttables.h b/3party/freetype/include/freetype/tttables.h
index c12b172689..02236c2005 100644
--- a/3party/freetype/include/freetype/tttables.h
+++ b/3party/freetype/include/freetype/tttables.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType tables definitions and interface */
/* (specification only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009 by */
+/* Copyright 1996-2005, 2008-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -557,13 +557,13 @@ FT_BEGIN_HEADER
/* */
typedef enum FT_Sfnt_Tag_
{
- ft_sfnt_head = 0,
- ft_sfnt_maxp = 1,
- ft_sfnt_os2 = 2,
- ft_sfnt_hhea = 3,
- ft_sfnt_vhea = 4,
- ft_sfnt_post = 5,
- ft_sfnt_pclt = 6,
+ ft_sfnt_head = 0, /* TT_Header */
+ ft_sfnt_maxp = 1, /* TT_MaxProfile */
+ ft_sfnt_os2 = 2, /* TT_OS2 */
+ ft_sfnt_hhea = 3, /* TT_HoriHeader */
+ ft_sfnt_vhea = 4, /* TT_VertHeader */
+ ft_sfnt_post = 5, /* TT_Postscript */
+ ft_sfnt_pclt = 6, /* TT_PCLT */
sfnt_max /* internal end mark */
@@ -590,6 +590,9 @@ FT_BEGIN_HEADER
/* error, or if the corresponding table was not found *OR* loaded */
/* from the file. */
/* */
+ /* Use a typecast according to `tag' to access the structure */
+ /* elements. */
+ /* */
/* <Note> */
/* The table is owned by the face object and disappears with it. */
/* */
@@ -684,12 +687,16 @@ FT_BEGIN_HEADER
* The index of an SFNT table. The function returns
* FT_Err_Table_Missing for an invalid value.
*
- * @output:
+ * @inout:
* tag ::
- * The name tag of the SFNT table.
+ * The name tag of the SFNT table. If the value is NULL, `table_index'
+ * is ignored, and `length' returns the number of SFNT tables in the
+ * font.
*
+ * @output:
* length ::
- * The length of the SFNT table.
+ * The length of the SFNT table (or the number of SFNT tables, depending
+ * on `tag').
*
* @return:
* FreeType error code. 0~means success.
diff --git a/3party/freetype/modules.cfg b/3party/freetype/modules.cfg
new file mode 100644
index 0000000000..8d5b6b598f
--- /dev/null
+++ b/3party/freetype/modules.cfg
@@ -0,0 +1,255 @@
+# modules.cfg
+#
+# Copyright 2005, 2006, 2007, 2009, 2010 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.
+#
+#
+# In case you compile the FreeType library with GNU make or makepp, this
+# file controls which components are built into the library. Otherwise,
+# please read this file for information on the various modules and its
+# dependencies, then follow the instructions in the file `docs/INSTALL.ANY'.
+#
+# To deactivate a module, simply comment out the corresponding line. To
+# activate a module, remove the comment character.
+#
+# Note that many modules and components are further controlled with macros
+# in the file `include/freetype/config/ftoption.h'.
+
+
+####
+#### font modules -- at least one is required
+####
+#### The order given here (from top to down) is the order used for testing
+#### font formats in the compiled library.
+####
+
+# TrueType font driver.
+#
+# This driver needs the `sfnt' module.
+FONT_MODULES += truetype
+
+# PostScript Type 1 font driver.
+#
+# This driver needs the `psaux', `pshinter', and `psnames' modules.
+FONT_MODULES += type1
+
+# CFF/OpenType font driver.
+#
+# This driver needs the `sfnt', `pshinter', and `psnames' modules.
+FONT_MODULES += cff
+
+# Type 1 CID-keyed font driver.
+#
+# This driver needs the `psaux', `pshinter', and `psnames' modules.
+FONT_MODULES += cid
+
+# PFR/TrueDoc font driver. See optional extension ftpfr.c below also.
+FONT_MODULES += pfr
+
+# PostScript Type 42 font driver.
+#
+# This driver needs the `truetype' module.
+FONT_MODULES += type42
+
+# Windows FONT/FNT font driver. See optional extension ftwinfnt.c below
+# also.
+FONT_MODULES += winfonts
+
+# PCF font driver.
+FONT_MODULES += pcf
+
+# BDF font driver. See optional extension ftbdf.c below also.
+FONT_MODULES += bdf
+
+# SFNT files support. If used without `truetype' or `cff', it supports
+# bitmap-only fonts within an SFNT wrapper.
+#
+# This driver needs the `psnames' module.
+FONT_MODULES += sfnt
+
+
+####
+#### hinting modules
+####
+
+# FreeType's auto hinter.
+HINTING_MODULES += autofit
+
+# PostScript hinter.
+HINTING_MODULES += pshinter
+
+# The TrueType hinting engine doesn't have a module of its own but is
+# controlled in file include/freetype/config/ftoption.h
+# (TT_CONFIG_OPTION_BYTECODE_INTERPRETER and friends).
+
+
+####
+#### raster modules -- at least one is required for vector font formats
+####
+
+# Monochrome rasterizer.
+RASTER_MODULES += raster
+
+# Anti-aliasing rasterizer.
+RASTER_MODULES += smooth
+
+
+####
+#### auxiliary modules
+####
+
+# 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.
+AUX_MODULES += cache
+
+# TrueType GX/AAT table validation. Needs ftgxval.c below.
+# AUX_MODULES += gxvalid
+
+# Support for streams compressed with gzip (files with suffix .gz).
+#
+# See include/freetype/ftgzip.h for the API.
+AUX_MODULES += gzip
+
+# Support for streams compressed with LZW (files with suffix .Z).
+#
+# See include/freetype/ftlzw.h for the API.
+AUX_MODULES += lzw
+
+# Support for streams compressed with bzip2 (files with suffix .bz2).
+#
+# See include/freetype/ftbzip2.h for the API.
+AUX_MODULES += bzip2
+
+# OpenType table validation. Needs ftotval.c below.
+#
+# AUX_MODULES += otvalid
+
+# Auxiliary PostScript driver component to share common code.
+#
+# This module depends on `psnames'.
+AUX_MODULES += psaux
+
+# Support for PostScript glyph names.
+#
+# This module can be controlled in ftconfig.h
+# (FT_CONFIG_OPTION_POSTSCRIPT_NAMES).
+AUX_MODULES += psnames
+
+
+####
+#### base module extensions
+####
+
+# Exact bounding box calculation.
+#
+# See include/freetype/ftbbox.h for the API.
+BASE_EXTENSIONS += ftbbox.c
+
+# Access BDF-specific strings. Needs BDF font driver.
+#
+# See include/freetype/ftbdf.h for the API.
+BASE_EXTENSIONS += ftbdf.c
+
+# Utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp bitmaps into
+# 8bpp format, and for emboldening of bitmap glyphs.
+#
+# See include/freetype/ftbitmap.h for the API.
+BASE_EXTENSIONS += ftbitmap.c
+
+# Access CID font information.
+#
+# See include/freetype/ftcid.h for the API.
+BASE_EXTENSIONS += ftcid.c
+
+# Access FSType information. Needs fttype1.c.
+#
+# See include/freetype/freetype.h for the API.
+BASE_EXTENSIONS += ftfstype.c
+
+# Support for GASP table queries.
+#
+# See include/freetype/ftgasp.h for the API.
+BASE_EXTENSIONS += ftgasp.c
+
+# Convenience functions to handle glyphs. Needs ftbitmap.c.
+#
+# See include/freetype/ftglyph.h for the API.
+BASE_EXTENSIONS += ftglyph.c
+
+# Interface for gxvalid module.
+#
+# See include/freetype/ftgxval.h for the API.
+BASE_EXTENSIONS += ftgxval.c
+
+# Support for LCD color filtering of subpixel bitmaps.
+#
+# See include/freetype/ftlcdfil.h for the API.
+BASE_EXTENSIONS += ftlcdfil.c
+
+# Multiple Master font interface.
+#
+# See include/freetype/ftmm.h for the API.
+BASE_EXTENSIONS += ftmm.c
+
+# Interface for otvalid module.
+#
+# See include/freetype/ftotval.h for the API.
+BASE_EXTENSIONS += ftotval.c
+
+# Support for FT_Face_CheckTrueTypePatents.
+#
+# See include/freetype/freetype.h for the API.
+BASE_EXTENSIONS += ftpatent.c
+
+# Interface for accessing PFR-specific data. Needs PFR font driver.
+#
+# See include/freetype/ftpfr.h for the API.
+BASE_EXTENSIONS += ftpfr.c
+
+# Path stroker. Needs ftglyph.c.
+#
+# See include/freetype/ftstroke.h for the API.
+BASE_EXTENSIONS += ftstroke.c
+
+# Support for synthetic embolding and slanting of fonts. Needs ftbitmap.c.
+#
+# See include/freetype/ftsynth.h for the API.
+BASE_EXTENSIONS += ftsynth.c
+
+# Interface to access data specific to PostScript Type 1 and Type 2 (CFF)
+# fonts.
+#
+# See include/freetype/t1tables.h for the API.
+BASE_EXTENSIONS += fttype1.c
+
+# Interface for accessing data specific to Windows FNT files. Needs winfnt
+# driver.
+#
+# See include/freetype/ftwinfnt.h for the API.
+BASE_EXTENSIONS += ftwinfnt.c
+
+# Support functions for X11.
+#
+# See include/freetype/ftxf86.h for the API.
+BASE_EXTENSIONS += ftxf86.c
+
+####
+#### The components `ftsystem.c' (for memory allocation and stream I/O
+#### management) and `ftdebug.c' (for emitting debug messages to the user)
+#### are controlled with the following variables.
+####
+#### ftsystem.c: $(FTSYS_SRC)
+#### ftdebug.c: $(FTDEBUG_SRC)
+####
+#### Please refer to docs/CUSTOMIZE for details.
+####
+
+
+# EOF
diff --git a/3party/freetype/objs/.gitignore b/3party/freetype/objs/.gitignore
new file mode 100644
index 0000000000..100d7d8faf
--- /dev/null
+++ b/3party/freetype/objs/.gitignore
@@ -0,0 +1,14 @@
+apinames
+freetype.def
+freetype.lib
+ftexport.sym
+ftmodule.h
+ftoption.h
+libfreetype.la
+.libs
+*.lo
+*.o
+*.a
+debug*/
+release*/
+win32/
diff --git a/3party/freetype/objs/README b/3party/freetype/objs/README
new file mode 100644
index 0000000000..befb63e049
--- /dev/null
+++ b/3party/freetype/objs/README
@@ -0,0 +1,2 @@
+This directory contains all the object files created when building the
+library.
diff --git a/3party/freetype/src/Jamfile b/3party/freetype/src/Jamfile
new file mode 100644
index 0000000000..76ee0f46e6
--- /dev/null
+++ b/3party/freetype/src/Jamfile
@@ -0,0 +1,25 @@
+# FreeType 2 src Jamfile
+#
+# Copyright 2001, 2002 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.
+
+SubDir FT2_TOP $(FT2_SRC_DIR) ;
+
+# The file <freetype/internal/internal.h> is used to define macros that are
+# later used in #include statements. It needs to be parsed in order to
+# record these definitions.
+#
+HDRMACRO [ FT2_SubDir $(FT2_INCLUDE_DIR) internal internal.h ] ;
+
+for xx in $(FT2_COMPONENTS)
+{
+ SubInclude FT2_TOP $(FT2_SRC_DIR) $(xx) ;
+}
+
+# end of src Jamfile
diff --git a/3party/freetype/autofit/Jamfile b/3party/freetype/src/autofit/Jamfile
index 2714765b5b..2714765b5b 100644
--- a/3party/freetype/autofit/Jamfile
+++ b/3party/freetype/src/autofit/Jamfile
diff --git a/3party/freetype/autofit/afangles.c b/3party/freetype/src/autofit/afangles.c
index e2360d157d..790af1779c 100644
--- a/3party/freetype/autofit/afangles.c
+++ b/3party/freetype/src/autofit/afangles.c
@@ -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, 2004, 2005, 2006 by */
+/* Copyright 2003-2006, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -77,7 +77,7 @@
return 1 - 2 * ( delta < 0 );
}
-#endif
+#endif /* 0 */
/*
diff --git a/3party/freetype/autofit/afangles.h b/3party/freetype/src/autofit/afangles.h
index f33f9e108e..f33f9e108e 100644
--- a/3party/freetype/autofit/afangles.h
+++ b/3party/freetype/src/autofit/afangles.h
diff --git a/3party/freetype/autofit/afcjk.c b/3party/freetype/src/autofit/afcjk.c
index bab0c42bad..0acef9c85e 100644
--- a/3party/freetype/autofit/afcjk.c
+++ b/3party/freetype/src/autofit/afcjk.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for CJK script (body). */
/* */
-/* Copyright 2006, 2007, 2008, 2009 by */
+/* Copyright 2006-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,22 +22,38 @@
*
*/
+#include <ft2build.h>
+#include FT_ADVANCES_H
+#include FT_INTERNAL_DEBUG_H
+
#include "aftypes.h"
#include "aflatin.h"
#ifdef AF_CONFIG_OPTION_CJK
+#undef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
+
#include "afcjk.h"
#include "aferrors.h"
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
#include "afwarp.h"
#endif
/*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_afcjk
+
+
+ /*************************************************************************/
/*************************************************************************/
/***** *****/
/***** C J K G L O B A L M E T R I C S *****/
@@ -45,24 +61,504 @@
/*************************************************************************/
/*************************************************************************/
+
+ /* Basically the Latin version with AF_CJKMetrics */
+ /* to replace AF_LatinMetrics. */
+
+ FT_LOCAL_DEF( void )
+ af_cjk_metrics_init_widths( AF_CJKMetrics metrics,
+ FT_Face face,
+ FT_ULong charcode )
+ {
+ /* scan the array of segments in each direction */
+ AF_GlyphHintsRec hints[1];
+
+
+ af_glyph_hints_init( hints, face->memory );
+
+ metrics->axis[AF_DIMENSION_HORZ].width_count = 0;
+ metrics->axis[AF_DIMENSION_VERT].width_count = 0;
+
+ {
+ FT_Error error;
+ FT_UInt glyph_index;
+ int dim;
+ AF_CJKMetricsRec dummy[1];
+ AF_Scaler scaler = &dummy->root.scaler;
+
+
+ glyph_index = FT_Get_Char_Index( face, charcode );
+ if ( glyph_index == 0 )
+ goto Exit;
+
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
+ if ( error || face->glyph->outline.n_points <= 0 )
+ goto Exit;
+
+ FT_ZERO( dummy );
+
+ dummy->units_per_em = metrics->units_per_em;
+
+ scaler->x_scale = 0x10000L;
+ scaler->y_scale = 0x10000L;
+ scaler->x_delta = 0;
+ scaler->y_delta = 0;
+
+ scaler->face = face;
+ scaler->render_mode = FT_RENDER_MODE_NORMAL;
+ scaler->flags = 0;
+
+ af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
+
+ error = af_glyph_hints_reload( hints, &face->glyph->outline );
+ if ( error )
+ goto Exit;
+
+ for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
+ {
+ AF_CJKAxis axis = &metrics->axis[dim];
+ AF_AxisHints axhints = &hints->axis[dim];
+ AF_Segment seg, limit, link;
+ FT_UInt num_widths = 0;
+
+
+ error = af_latin_hints_compute_segments( hints, (AF_Dimension)dim );
+ if ( error )
+ goto Exit;
+
+ af_latin_hints_link_segments( hints, (AF_Dimension)dim );
+
+ seg = axhints->segments;
+ limit = seg + axhints->num_segments;
+
+ for ( ; seg < limit; seg++ )
+ {
+ link = seg->link;
+
+ /* we only consider stem segments there! */
+ if ( link && link->link == seg && link > seg )
+ {
+ FT_Pos dist;
+
+
+ dist = seg->pos - link->pos;
+ if ( dist < 0 )
+ dist = -dist;
+
+ if ( num_widths < AF_CJK_MAX_WIDTHS )
+ axis->widths[num_widths++].org = dist;
+ }
+ }
+
+ af_sort_widths( num_widths, axis->widths );
+ axis->width_count = num_widths;
+ }
+
+ Exit:
+ for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
+ {
+ AF_CJKAxis axis = &metrics->axis[dim];
+ FT_Pos stdw;
+
+
+ stdw = ( axis->width_count > 0 ) ? axis->widths[0].org
+ : AF_LATIN_CONSTANT( metrics, 50 );
+
+ /* let's try 20% of the smallest width */
+ axis->edge_distance_threshold = stdw / 5;
+ axis->standard_width = stdw;
+ axis->extra_light = 0;
+ }
+ }
+
+ af_glyph_hints_done( hints );
+ }
+
+
+#define AF_CJK_MAX_TEST_CHARACTERS 32
+
+
+ /* Each blue zone has two types of fill and unfill, this is, */
+ /* filling the entire glyph square or not. */
+
+ enum
+ {
+ AF_CJK_BLUE_TYPE_FILL,
+ AF_CJK_BLUE_TYPE_UNFILL,
+ AF_CJK_BLUE_TYPE_MAX
+ };
+
+
+ /* Put some common and representative Han Ideographs characters here. */
+ static const FT_ULong af_cjk_hani_blue_chars[AF_CJK_BLUE_MAX]
+ [AF_CJK_BLUE_TYPE_MAX]
+ [AF_CJK_MAX_TEST_CHARACTERS] =
+ {
+ {
+ {
+ 0x4ED6, 0x4EEC, 0x4F60, 0x4F86, 0x5011, 0x5230, 0x548C, 0x5730,
+ 0x5BF9, 0x5C0D, 0x5C31, 0x5E2D, 0x6211, 0x65F6, 0x6642, 0x6703,
+ 0x6765, 0x70BA, 0x80FD, 0x8230, 0x8AAA, 0x8BF4, 0x8FD9, 0x9019,
+ 0x9F4A /* top fill */
+ },
+ {
+ 0x519B, 0x540C, 0x5DF2, 0x613F, 0x65E2, 0x661F, 0x662F, 0x666F,
+ 0x6C11, 0x7167, 0x73B0, 0x73FE, 0x7406, 0x7528, 0x7F6E, 0x8981,
+ 0x8ECD, 0x90A3, 0x914D, 0x91CC, 0x958B, 0x96F7, 0x9732, 0x9762,
+ 0x987E /* top unfill */
+ }
+ },
+ {
+ {
+ 0x4E2A, 0x4E3A, 0x4EBA, 0x4ED6, 0x4EE5, 0x4EEC, 0x4F60, 0x4F86,
+ 0x500B, 0x5011, 0x5230, 0x548C, 0x5927, 0x5BF9, 0x5C0D, 0x5C31,
+ 0x6211, 0x65F6, 0x6642, 0x6709, 0x6765, 0x70BA, 0x8981, 0x8AAA,
+ 0x8BF4 /* bottom fill */
+ },
+ {
+ 0x4E3B, 0x4E9B, 0x56E0, 0x5B83, 0x60F3, 0x610F, 0x7406, 0x751F,
+ 0x7576, 0x770B, 0x7740, 0x7F6E, 0x8005, 0x81EA, 0x8457, 0x88E1,
+ 0x8FC7, 0x8FD8, 0x8FDB, 0x9032, 0x904E, 0x9053, 0x9084, 0x91CC,
+ 0x9762 /* bottom unfill */
+ }
+ },
+#ifndef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
+ { {0x0000}, {0x0000} },
+ { {0x0000}, {0x0000} }
+#else
+ {
+ {
+ 0x4E9B, 0x4EEC, 0x4F60, 0x4F86, 0x5011, 0x5230, 0x548C, 0x5730,
+ 0x5979, 0x5C06, 0x5C07, 0x5C31, 0x5E74, 0x5F97, 0x60C5, 0x6700,
+ 0x6837, 0x6A23, 0x7406, 0x80FD, 0x8AAA, 0x8BF4, 0x8FD9, 0x9019,
+ 0x901A /* left fill */
+ },
+ {
+ 0x5373, 0x5417, 0x5427, 0x542C, 0x5462, 0x54C1, 0x54CD, 0x55CE,
+ 0x5E08, 0x5E2B, 0x6536, 0x65AD, 0x65B7, 0x660E, 0x773C, 0x9593,
+ 0x95F4, 0x9645, 0x9648, 0x9650, 0x9664, 0x9673, 0x968F, 0x969B,
+ 0x96A8 /* left unfill */
+ }
+ },
+ {
+ {
+ 0x4E8B, 0x524D, 0x5B78, 0x5C06, 0x5C07, 0x60C5, 0x60F3, 0x6216,
+ 0x653F, 0x65AF, 0x65B0, 0x6837, 0x6A23, 0x6C11, 0x6C92, 0x6CA1,
+ 0x7136, 0x7279, 0x73B0, 0x73FE, 0x7403, 0x7B2C, 0x7D93, 0x8C01,
+ 0x8D77 /* right fill */
+ },
+ {
+ 0x4F8B, 0x5225, 0x522B, 0x5236, 0x52A8, 0x52D5, 0x5417, 0x55CE,
+ 0x589E, 0x6307, 0x660E, 0x671D, 0x671F, 0x6784, 0x7269, 0x786E,
+ 0x79CD, 0x8ABF, 0x8C03, 0x8CBB, 0x8D39, 0x90A3, 0x90FD, 0x9593,
+ 0x95F4 /* right unfill */
+ }
+ }
+#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
+ };
+
+
+ /* Calculate blue zones for all the CJK_BLUE_XXX's. */
+
+ static void
+ af_cjk_metrics_init_blues( AF_CJKMetrics metrics,
+ FT_Face face,
+ const FT_ULong blue_chars
+ [AF_CJK_BLUE_MAX]
+ [AF_CJK_BLUE_TYPE_MAX]
+ [AF_CJK_MAX_TEST_CHARACTERS] )
+ {
+ FT_Pos fills[AF_CJK_MAX_TEST_CHARACTERS];
+ FT_Pos flats[AF_CJK_MAX_TEST_CHARACTERS];
+
+ FT_Int num_fills;
+ FT_Int num_flats;
+
+ FT_Int bb;
+ AF_CJKBlue blue;
+ FT_Error error;
+ AF_CJKAxis axis;
+ FT_GlyphSlot glyph = face->glyph;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_String* cjk_blue_name[AF_CJK_BLUE_MAX] = {
+ (FT_String*)"top",
+ (FT_String*)"bottom",
+ (FT_String*)"left",
+ (FT_String*)"right"
+ };
+ FT_String* cjk_blue_type_name[AF_CJK_BLUE_TYPE_MAX] = {
+ (FT_String*)"filled",
+ (FT_String*)"unfilled"
+ };
+#endif
+
+
+ /* We compute the blues simply by loading each character from the */
+ /* `blue_chars[blues]' string, then computing its extreme points */
+ /* (depending blue zone type etc.). */
+
+ FT_TRACE5(( "cjk blue zones computation\n" ));
+ FT_TRACE5(( "------------------------------------------------\n" ));
+
+ for ( bb = 0; bb < AF_CJK_BLUE_MAX; bb++ )
+ {
+ FT_Int fill_type;
+ FT_Pos* blue_ref;
+ FT_Pos* blue_shoot;
+
+
+ num_fills = 0;
+ num_flats = 0;
+
+ for ( fill_type = 0; fill_type < AF_CJK_BLUE_TYPE_MAX; fill_type++ )
+ {
+ const FT_ULong* p = blue_chars[bb][fill_type];
+ const FT_ULong* limit = p + AF_CJK_MAX_TEST_CHARACTERS;
+ FT_Bool fill = FT_BOOL(
+ fill_type == AF_CJK_BLUE_TYPE_FILL );
+
+
+ FT_TRACE5(( "cjk blue %s/%s\n", cjk_blue_name[bb],
+ cjk_blue_type_name[fill_type] ));
+
+
+ for ( ; p < limit && *p; p++ )
+ {
+ FT_UInt glyph_index;
+ FT_Pos best_pos; /* same as points.y */
+ FT_Int best_point;
+ FT_Vector* points;
+
+
+ FT_TRACE5(( " U+%lX...", *p ));
+
+ /* load the character in the face -- skip unknown or empty ones */
+ glyph_index = FT_Get_Char_Index( face, *p );
+ if ( glyph_index == 0 )
+ {
+ FT_TRACE5(( "unavailable\n" ));
+ continue;
+ }
+
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
+ if ( error || glyph->outline.n_points <= 0 )
+ {
+ FT_TRACE5(( "no outline\n" ));
+ continue;
+ }
+
+ /* now compute min or max point indices and coordinates */
+ points = glyph->outline.points;
+ best_point = -1;
+ best_pos = 0; /* make compiler happy */
+
+ {
+ FT_Int nn;
+ FT_Int first = 0;
+ FT_Int last = -1;
+
+
+ for ( nn = 0;
+ nn < glyph->outline.n_contours;
+ first = last + 1, nn++ )
+ {
+ FT_Int pp;
+
+
+ last = glyph->outline.contours[nn];
+
+ /* Avoid single-point contours since they are never */
+ /* rasterized. In some fonts, they correspond to mark */
+ /* attachment points which are way outside of the glyph's */
+ /* real outline. */
+ if ( last <= first )
+ continue;
+
+ switch ( bb )
+ {
+ case AF_CJK_BLUE_TOP:
+ for ( pp = first; pp <= last; pp++ )
+ if ( best_point < 0 || points[pp].y > best_pos )
+ {
+ best_point = pp;
+ best_pos = points[pp].y;
+ }
+ break;
+
+ case AF_CJK_BLUE_BOTTOM:
+ for ( pp = first; pp <= last; pp++ )
+ if ( best_point < 0 || points[pp].y < best_pos )
+ {
+ best_point = pp;
+ best_pos = points[pp].y;
+ }
+ break;
+
+ case AF_CJK_BLUE_LEFT:
+ for ( pp = first; pp <= last; pp++ )
+ if ( best_point < 0 || points[pp].x < best_pos )
+ {
+ best_point = pp;
+ best_pos = points[pp].x;
+ }
+ break;
+
+ case AF_CJK_BLUE_RIGHT:
+ for ( pp = first; pp <= last; pp++ )
+ if ( best_point < 0 || points[pp].x > best_pos )
+ {
+ best_point = pp;
+ best_pos = points[pp].x;
+ }
+ break;
+
+ default:
+ ;
+ }
+ }
+ FT_TRACE5(( "best_pos=%5ld\n", best_pos ));
+ }
+
+ if ( fill )
+ fills[num_fills++] = best_pos;
+ else
+ flats[num_flats++] = best_pos;
+ }
+ }
+
+ if ( num_flats == 0 && num_fills == 0 )
+ {
+ /*
+ * we couldn't find a single glyph to compute this blue zone,
+ * we will simply ignore it then
+ */
+ FT_TRACE5(( "empty\n" ));
+ continue;
+ }
+
+ /* we have computed the contents of the `fill' and `flats' tables, */
+ /* now determine the reference position of the blue -- */
+ /* we simply take the median value after a simple sort */
+ af_sort_pos( num_flats, flats );
+ af_sort_pos( num_fills, fills );
+
+ if ( AF_CJK_BLUE_TOP == bb || AF_CJK_BLUE_BOTTOM == bb )
+ axis = &metrics->axis[AF_DIMENSION_VERT];
+ else
+ axis = &metrics->axis[AF_DIMENSION_HORZ];
+
+ blue = & axis->blues[axis->blue_count];
+ blue_ref = & blue->ref.org;
+ blue_shoot = & blue->shoot.org;
+
+ axis->blue_count++;
+ if ( num_flats == 0 )
+ {
+ *blue_ref = fills[num_fills / 2];
+ *blue_shoot = fills[num_fills / 2];
+ }
+ else if ( num_fills == 0 )
+ {
+ *blue_ref = flats[num_flats / 2];
+ *blue_shoot = flats[num_flats / 2];
+ }
+ else
+ {
+ *blue_ref = fills[num_fills / 2];
+ *blue_shoot = flats[num_flats / 2];
+ }
+
+ /* make sure blue_ref >= blue_shoot for top/right or */
+ /* vice versa for bottom/left */
+ if ( *blue_shoot != *blue_ref )
+ {
+ FT_Pos ref = *blue_ref;
+ FT_Pos shoot = *blue_shoot;
+ FT_Bool under_ref = FT_BOOL( shoot < ref );
+
+
+ if ( (AF_CJK_BLUE_TOP == bb || AF_CJK_BLUE_RIGHT == bb) ^ under_ref )
+ *blue_shoot = *blue_ref = ( shoot + ref ) / 2;
+ }
+
+ blue->flags = 0;
+ if ( AF_CJK_BLUE_TOP == bb )
+ blue->flags |= AF_CJK_BLUE_IS_TOP;
+ else if ( AF_CJK_BLUE_RIGHT == bb )
+ blue->flags |= AF_CJK_BLUE_IS_RIGHT;
+
+ FT_TRACE5(( "-- cjk %s bluezone ref = %ld shoot = %ld\n",
+ cjk_blue_name[bb], *blue_ref, *blue_shoot ));
+ }
+
+ return;
+ }
+
+
+ /* Basically the Latin version with type AF_CJKMetrics for metrics. */
+ FT_LOCAL_DEF( void )
+ af_cjk_metrics_check_digits( AF_CJKMetrics metrics,
+ FT_Face face )
+ {
+ FT_UInt i;
+ FT_Bool started = 0, same_width = 1;
+ FT_Fixed advance, old_advance = 0;
+
+
+ /* check whether all ASCII digits have the same advance width; */
+ /* digit `0' is 0x30 in all supported charmaps */
+ for ( i = 0x30; i <= 0x39; i++ )
+ {
+ FT_UInt glyph_index;
+
+
+ glyph_index = FT_Get_Char_Index( face, i );
+ if ( glyph_index == 0 )
+ continue;
+
+ if ( FT_Get_Advance( face, glyph_index,
+ FT_LOAD_NO_SCALE |
+ FT_LOAD_NO_HINTING |
+ FT_LOAD_IGNORE_TRANSFORM,
+ &advance ) )
+ continue;
+
+ if ( started )
+ {
+ if ( advance != old_advance )
+ {
+ same_width = 0;
+ break;
+ }
+ }
+ else
+ {
+ old_advance = advance;
+ started = 1;
+ }
+ }
+
+ metrics->root.digits_have_same_width = same_width;
+ }
+
+
FT_LOCAL_DEF( FT_Error )
- af_cjk_metrics_init( AF_LatinMetrics metrics,
- FT_Face face )
+ af_cjk_metrics_init( AF_CJKMetrics metrics,
+ FT_Face face )
{
FT_CharMap oldmap = face->charmap;
metrics->units_per_em = face->units_per_EM;
- /* TODO are there blues? */
-
if ( FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
face->charmap = NULL;
else
{
- /* latin's version would suffice */
- af_latin_metrics_init_widths( metrics, face, 0x7530 );
- af_latin_metrics_check_digits( metrics, face );
+ af_cjk_metrics_init_widths( metrics, face, 0x7530 );
+ af_cjk_metrics_init_blues( metrics, face, af_cjk_hani_blue_chars );
+ af_cjk_metrics_check_digits( metrics, face );
}
FT_Set_Charmap( face, oldmap );
@@ -72,31 +568,100 @@
static void
- af_cjk_metrics_scale_dim( AF_LatinMetrics metrics,
- AF_Scaler scaler,
- AF_Dimension dim )
+ af_cjk_metrics_scale_dim( AF_CJKMetrics metrics,
+ AF_Scaler scaler,
+ AF_Dimension dim )
{
- AF_LatinAxis axis;
+ FT_Fixed scale;
+ FT_Pos delta;
+ AF_CJKAxis axis;
+ FT_UInt nn;
axis = &metrics->axis[dim];
if ( dim == AF_DIMENSION_HORZ )
{
- axis->scale = scaler->x_scale;
- axis->delta = scaler->x_delta;
+ scale = scaler->x_scale;
+ delta = scaler->x_delta;
}
else
{
- axis->scale = scaler->y_scale;
- axis->delta = scaler->y_delta;
+ scale = scaler->y_scale;
+ delta = scaler->y_delta;
+ }
+
+ if ( axis->org_scale == scale && axis->org_delta == delta )
+ return;
+
+ axis->org_scale = scale;
+ axis->org_delta = delta;
+
+ axis->scale = scale;
+ axis->delta = delta;
+
+ /* scale the blue zones */
+ for ( nn = 0; nn < axis->blue_count; nn++ )
+ {
+ AF_CJKBlue blue = &axis->blues[nn];
+ FT_Pos dist;
+
+
+ blue->ref.cur = FT_MulFix( blue->ref.org, scale ) + delta;
+ blue->ref.fit = blue->ref.cur;
+ blue->shoot.cur = FT_MulFix( blue->shoot.org, scale ) + delta;
+ blue->shoot.fit = blue->shoot.cur;
+ blue->flags &= ~AF_CJK_BLUE_ACTIVE;
+
+ /* a blue zone is only active if it is less than 3/4 pixels tall */
+ dist = FT_MulFix( blue->ref.org - blue->shoot.org, scale );
+ if ( dist <= 48 && dist >= -48 )
+ {
+ FT_Pos delta1, delta2;
+
+
+ blue->ref.fit = FT_PIX_ROUND( blue->ref.cur );
+
+ /* shoot is under shoot for cjk */
+ delta1 = FT_DivFix( blue->ref.fit, scale ) - blue->shoot.org;
+ delta2 = delta1;
+ if ( delta1 < 0 )
+ delta2 = -delta2;
+
+ delta2 = FT_MulFix( delta2, scale );
+
+ FT_TRACE5(( "delta: %d", delta1 ));
+ if ( delta2 < 32 )
+ delta2 = 0;
+#if 0
+ else if ( delta2 < 64 )
+ delta2 = 32 + ( ( ( delta2 - 32 ) + 16 ) & ~31 );
+#endif
+ else
+ delta2 = FT_PIX_ROUND( delta2 );
+ FT_TRACE5(( "/%d\n", delta2 ));
+
+ if ( delta1 < 0 )
+ delta2 = -delta2;
+
+ blue->shoot.fit = blue->ref.fit - delta2;
+
+ FT_TRACE5(( ">> active cjk blue zone %c%d[%ld/%ld]: "
+ "ref: cur=%.2f fit=%.2f shoot: cur=%.2f fit=%.2f\n",
+ ( dim == AF_DIMENSION_HORZ ) ? 'H' : 'V',
+ nn, blue->ref.org, blue->shoot.org,
+ blue->ref.cur / 64.0, blue->ref.fit / 64.0,
+ blue->shoot.cur / 64.0, blue->shoot.fit / 64.0 ));
+
+ blue->flags |= AF_CJK_BLUE_ACTIVE;
+ }
}
}
FT_LOCAL_DEF( void )
- af_cjk_metrics_scale( AF_LatinMetrics metrics,
- AF_Scaler scaler )
+ af_cjk_metrics_scale( AF_CJKMetrics metrics,
+ AF_Scaler scaler )
{
metrics->root.scaler = *scaler;
@@ -329,7 +894,7 @@
AF_AxisHints axis = &hints->axis[dim];
FT_Error error = AF_Err_Ok;
FT_Memory memory = hints->memory;
- AF_LatinAxis laxis = &((AF_LatinMetrics)hints->metrics)->axis[dim];
+ AF_CJKAxis laxis = &((AF_CJKMetrics)hints->metrics)->axis[dim];
AF_Segment segments = axis->segments;
AF_Segment segment_limit = segments + axis->num_segments;
@@ -601,9 +1166,96 @@
}
+ FT_LOCAL_DEF( void )
+ af_cjk_hints_compute_blue_edges( AF_GlyphHints hints,
+ AF_CJKMetrics metrics,
+ AF_Dimension dim )
+ {
+ AF_AxisHints axis = &hints->axis[dim];
+ AF_Edge edge = axis->edges;
+ AF_Edge edge_limit = edge + axis->num_edges;
+ AF_CJKAxis cjk = &metrics->axis[dim];
+ FT_Fixed scale = cjk->scale;
+ FT_Pos best_dist0; /* initial threshold */
+
+
+ /* compute the initial threshold as a fraction of the EM size */
+ best_dist0 = FT_MulFix( metrics->units_per_em / 40, scale );
+
+ if ( best_dist0 > 64 / 2 ) /* maximum 1/2 pixel */
+ best_dist0 = 64 / 2;
+
+ /* compute which blue zones are active, i.e. have their scaled */
+ /* size < 3/4 pixels */
+
+ /* If the distant between an edge and a blue zone is shorter than */
+ /* best_dist0, set the blue zone for the edge. Then search for */
+ /* the blue zone with the smallest best_dist to the edge. */
+
+ for ( ; edge < edge_limit; edge++ )
+ {
+ FT_UInt bb;
+ AF_Width best_blue = NULL;
+ FT_Pos best_dist = best_dist0;
+
+
+ for ( bb = 0; bb < cjk->blue_count; bb++ )
+ {
+ AF_CJKBlue blue = cjk->blues + bb;
+ FT_Bool is_top_right_blue, is_major_dir;
+
+
+ /* skip inactive blue zones (i.e., those that are too small) */
+ if ( !( blue->flags & AF_CJK_BLUE_ACTIVE ) )
+ continue;
+
+ /* if it is a top zone, check for right edges -- if it is a bottom */
+ /* zone, check for left edges */
+ /* */
+ /* of course, that's for TrueType */
+ is_top_right_blue =
+ FT_BOOL( ( ( blue->flags & AF_CJK_BLUE_IS_TOP ) != 0 ) ||
+ ( ( blue->flags & AF_CJK_BLUE_IS_RIGHT ) != 0 ) );
+ is_major_dir = FT_BOOL( edge->dir == axis->major_dir );
+
+ /* if it is a top zone, the edge must be against the major */
+ /* direction; if it is a bottom zone, it must be in the major */
+ /* direction */
+ if ( is_top_right_blue ^ is_major_dir )
+ {
+ FT_Pos dist;
+ AF_Width compare;
+
+
+ /* Compare the edge to the closest blue zone type */
+ if ( FT_ABS( edge->fpos - blue->ref.org ) >
+ FT_ABS( edge->fpos - blue->shoot.org ) )
+ compare = &blue->shoot;
+ else
+ compare = &blue->ref;
+
+ dist = edge->fpos - compare->org;
+ if ( dist < 0 )
+ dist = -dist;
+
+ dist = FT_MulFix( dist, scale );
+ if ( dist < best_dist )
+ {
+ best_dist = dist;
+ best_blue = compare;
+ }
+ }
+ }
+
+ if ( best_blue )
+ edge->blue_edge = best_blue;
+ }
+ }
+
+
FT_LOCAL_DEF( FT_Error )
- af_cjk_hints_init( AF_GlyphHints hints,
- AF_LatinMetrics metrics )
+ af_cjk_hints_init( AF_GlyphHints hints,
+ AF_CJKMetrics metrics )
{
FT_Render_Mode mode;
FT_UInt32 scaler_flags, other_flags;
@@ -623,7 +1275,7 @@
/* compute flags depending on render mode, etc. */
mode = metrics->root.scaler.render_mode;
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )
metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;
#endif
@@ -728,11 +1380,11 @@
AF_Edge_Flags base_flags,
AF_Edge_Flags stem_flags )
{
- AF_LatinMetrics metrics = (AF_LatinMetrics) hints->metrics;
- AF_LatinAxis axis = & metrics->axis[dim];
- FT_Pos dist = width;
- FT_Int sign = 0;
- FT_Int vertical = ( dim == AF_DIMENSION_VERT );
+ AF_CJKMetrics metrics = (AF_CJKMetrics) hints->metrics;
+ AF_CJKAxis axis = & metrics->axis[dim];
+ FT_Pos dist = width;
+ FT_Int sign = 0;
+ FT_Bool vertical = FT_BOOL( dim == AF_DIMENSION_VERT );
FT_UNUSED( base_flags );
FT_UNUSED( stem_flags );
@@ -1025,7 +1677,61 @@
AF_Edge anchor = 0;
FT_Pos delta = 0;
FT_Int skipped = 0;
+ FT_Bool has_last_stem = FALSE;
+ FT_Pos last_stem_pos = 0;
+
+ /* we begin by aligning all stems relative to the blue zone */
+ FT_TRACE5(( "==== cjk hinting %s edges =====\n",
+ dim == AF_DIMENSION_HORZ ? "vertical" : "horizontal" ));
+
+ if ( AF_HINTS_DO_BLUES( hints ) )
+ {
+ for ( edge = edges; edge < edge_limit; edge++ )
+ {
+ AF_Width blue;
+ AF_Edge edge1, edge2;
+
+
+ if ( edge->flags & AF_EDGE_DONE )
+ continue;
+
+ blue = edge->blue_edge;
+ edge1 = NULL;
+ edge2 = edge->link;
+
+ if ( blue )
+ {
+ edge1 = edge;
+ }
+ else if ( edge2 && edge2->blue_edge )
+ {
+ blue = edge2->blue_edge;
+ edge1 = edge2;
+ edge2 = edge;
+ }
+
+ if ( !edge1 )
+ continue;
+
+ FT_TRACE5(( "CJKBLUE: edge %d @%d (opos=%.2f) snapped to (%.2f), "
+ "was (%.2f)\n",
+ edge1-edges, edge1->fpos, edge1->opos / 64.0, blue->fit / 64.0,
+ edge1->pos / 64.0 ));
+
+ edge1->pos = blue->fit;
+ edge1->flags |= AF_EDGE_DONE;
+
+ if ( edge2 && !edge2->blue_edge )
+ {
+ af_cjk_align_linked_edge( hints, dim, edge1, edge2 );
+ edge2->flags |= AF_EDGE_DONE;
+ }
+
+ if ( !anchor )
+ anchor = edge;
+ }
+ }
/* now we align all stem edges. */
for ( edge = edges; edge < edge_limit; edge++ )
@@ -1044,12 +1750,43 @@
continue;
}
+ /* Some CJK characters have so many stems that
+ * the hinter is likely to merge two adjacent ones.
+ * To solve this problem, if either edge of a stem
+ * is too close to the previous one, we avoid
+ * aligning the two edges, but rather interpolate
+ * their locations at the end of this function in
+ * order to preserve the space between the stems.
+ */
+ if ( has_last_stem &&
+ ( edge->pos < last_stem_pos + 64 ||
+ edge2->pos < last_stem_pos + 64 ) )
+ {
+ skipped++;
+ continue;
+ }
+
/* now align the stem */
+ /* this should not happen, but it's better to be safe */
+ if ( edge2->blue_edge )
+ {
+ FT_TRACE5(( "ASSERTION FAILED for edge %d\n", edge2-edges ));
+
+ af_cjk_align_linked_edge( hints, dim, edge2, edge );
+ edge->flags |= AF_EDGE_DONE;
+ continue;
+ }
if ( edge2 < edge )
{
af_cjk_align_linked_edge( hints, dim, edge2, edge );
edge->flags |= AF_EDGE_DONE;
+ /* We rarely reaches here it seems;
+ * usually the two edges belonging
+ * to one stem are marked as DONE together
+ */
+ has_last_stem = TRUE;
+ last_stem_pos = edge->pos;
continue;
}
@@ -1142,6 +1879,8 @@
anchor = edge;
edge->flags |= AF_EDGE_DONE;
edge2->flags |= AF_EDGE_DONE;
+ has_last_stem = TRUE;
+ last_stem_pos = edge2->pos;
}
/* make sure that lowercase m's maintain their symmetry */
@@ -1361,9 +2100,9 @@
FT_LOCAL_DEF( FT_Error )
- af_cjk_hints_apply( AF_GlyphHints hints,
- FT_Outline* outline,
- AF_LatinMetrics metrics )
+ af_cjk_hints_apply( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_CJKMetrics metrics )
{
FT_Error error;
int dim;
@@ -1371,7 +2110,7 @@
FT_UNUSED( metrics );
- error = af_glyph_hints_reload( hints, outline, 0 );
+ error = af_glyph_hints_reload( hints, outline );
if ( error )
goto Exit;
@@ -1381,6 +2120,8 @@
error = af_cjk_hints_detect_features( hints, AF_DIMENSION_HORZ );
if ( error )
goto Exit;
+
+ af_cjk_hints_compute_blue_edges( hints, metrics, AF_DIMENSION_HORZ );
}
if ( AF_HINTS_DO_VERTICAL( hints ) )
@@ -1388,6 +2129,8 @@
error = af_cjk_hints_detect_features( hints, AF_DIMENSION_VERT );
if ( error )
goto Exit;
+
+ af_cjk_hints_compute_blue_edges( hints, metrics, AF_DIMENSION_VERT );
}
/* grid-fit the outline */
@@ -1397,7 +2140,7 @@
( dim == AF_DIMENSION_VERT && AF_HINTS_DO_VERTICAL( hints ) ) )
{
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
if ( dim == AF_DIMENSION_HORZ &&
metrics->root.scaler.render_mode == FT_RENDER_MODE_NORMAL )
{
@@ -1406,11 +2149,13 @@
FT_Pos delta;
- af_warper_compute( &warper, hints, dim, &scale, &delta );
- af_glyph_hints_scale_dim( hints, dim, scale, delta );
+ af_warper_compute( &warper, hints, (AF_Dimension)dim,
+ &scale, &delta );
+ af_glyph_hints_scale_dim( hints, (AF_Dimension)dim,
+ scale, delta );
continue;
}
-#endif /* AF_USE_WARPER */
+#endif /* AF_CONFIG_OPTION_USE_WARPER */
af_cjk_hint_edges( hints, (AF_Dimension)dim );
af_cjk_align_edge_points( hints, (AF_Dimension)dim );
@@ -1441,18 +2186,19 @@
/*************************************************************************/
+ /* this corresponds to Unicode 6.0 */
+
static const AF_Script_UniRangeRec af_cjk_uniranges[] =
{
-#if 0
- AF_UNIRANGE_REC( 0x0100UL, 0xFFFFUL ), /* why this? */
-#endif
AF_UNIRANGE_REC( 0x2E80UL, 0x2EFFUL ), /* CJK Radicals Supplement */
AF_UNIRANGE_REC( 0x2F00UL, 0x2FDFUL ), /* Kangxi Radicals */
+ AF_UNIRANGE_REC( 0x2FF0UL, 0x2FFFUL ), /* Ideographic Description Characters */
AF_UNIRANGE_REC( 0x3000UL, 0x303FUL ), /* CJK Symbols and Punctuation */
AF_UNIRANGE_REC( 0x3040UL, 0x309FUL ), /* Hiragana */
AF_UNIRANGE_REC( 0x30A0UL, 0x30FFUL ), /* Katakana */
AF_UNIRANGE_REC( 0x3100UL, 0x312FUL ), /* Bopomofo */
AF_UNIRANGE_REC( 0x3130UL, 0x318FUL ), /* Hangul Compatibility Jamo */
+ AF_UNIRANGE_REC( 0x3190UL, 0x319FUL ), /* Kanbun */
AF_UNIRANGE_REC( 0x31A0UL, 0x31BFUL ), /* Bopomofo Extended */
AF_UNIRANGE_REC( 0x31C0UL, 0x31EFUL ), /* CJK Strokes */
AF_UNIRANGE_REC( 0x31F0UL, 0x31FFUL ), /* Katakana Phonetic Extensions */
@@ -1461,10 +2207,19 @@
AF_UNIRANGE_REC( 0x3400UL, 0x4DBFUL ), /* CJK Unified Ideographs Extension A */
AF_UNIRANGE_REC( 0x4DC0UL, 0x4DFFUL ), /* Yijing Hexagram Symbols */
AF_UNIRANGE_REC( 0x4E00UL, 0x9FFFUL ), /* CJK Unified Ideographs */
+ AF_UNIRANGE_REC( 0xA960UL, 0xA97FUL ), /* Hangul Jamo Extended-A */
+ AF_UNIRANGE_REC( 0xAC00UL, 0xD7AFUL ), /* Hangul Syllables */
+ AF_UNIRANGE_REC( 0xD7B0UL, 0xD7FFUL ), /* Hangul Jamo Extended-B */
AF_UNIRANGE_REC( 0xF900UL, 0xFAFFUL ), /* CJK Compatibility Ideographs */
+ AF_UNIRANGE_REC( 0xFE10UL, 0xFE1FUL ), /* Vertical forms */
AF_UNIRANGE_REC( 0xFE30UL, 0xFE4FUL ), /* CJK Compatibility Forms */
AF_UNIRANGE_REC( 0xFF00UL, 0xFFEFUL ), /* Halfwidth and Fullwidth Forms */
+ AF_UNIRANGE_REC( 0x1B000UL, 0x1B0FFUL ), /* Kana Supplement */
+ AF_UNIRANGE_REC( 0x1D300UL, 0x1D35FUL ), /* Tai Xuan Hing Symbols */
+ AF_UNIRANGE_REC( 0x1F200UL, 0x1F2FFUL ), /* Enclosed Ideographic Supplement */
AF_UNIRANGE_REC( 0x20000UL, 0x2A6DFUL ), /* CJK Unified Ideographs Extension B */
+ AF_UNIRANGE_REC( 0x2A700UL, 0x2B73FUL ), /* CJK Unified Ideographs Extension C */
+ AF_UNIRANGE_REC( 0x2B740UL, 0x2B81FUL ), /* CJK Unified Ideographs Extension D */
AF_UNIRANGE_REC( 0x2F800UL, 0x2FA1FUL ), /* CJK Compatibility Ideographs Supplement */
AF_UNIRANGE_REC( 0UL, 0UL )
};
@@ -1474,7 +2229,7 @@
AF_SCRIPT_CJK,
af_cjk_uniranges,
- sizeof( AF_LatinMetricsRec ),
+ sizeof( AF_CJKMetricsRec ),
(AF_Script_InitMetricsFunc) af_cjk_metrics_init,
(AF_Script_ScaleMetricsFunc)af_cjk_metrics_scale,
@@ -1496,7 +2251,7 @@
AF_SCRIPT_CJK,
af_cjk_uniranges,
- sizeof( AF_LatinMetricsRec ),
+ sizeof( AF_CJKMetricsRec ),
(AF_Script_InitMetricsFunc) NULL,
(AF_Script_ScaleMetricsFunc)NULL,
diff --git a/3party/freetype/src/autofit/afcjk.h b/3party/freetype/src/autofit/afcjk.h
new file mode 100644
index 0000000000..8416c0d021
--- /dev/null
+++ b/3party/freetype/src/autofit/afcjk.h
@@ -0,0 +1,141 @@
+/***************************************************************************/
+/* */
+/* afcjk.h */
+/* */
+/* Auto-fitter hinting routines for CJK script (specification). */
+/* */
+/* Copyright 2006, 2007, 2011 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 __AFCJK_H__
+#define __AFCJK_H__
+
+#include "afhints.h"
+#include "aflatin.h"
+
+
+FT_BEGIN_HEADER
+
+
+ /* the CJK-specific script class */
+
+ AF_DECLARE_SCRIPT_CLASS(af_cjk_script_class)
+
+ /* CJK (global) metrics management */
+
+ /*
+ * CJK glyphs tend to fill the square. So we have both vertical and
+ * horizontal blue zones. But some glyphs have flat bounding strokes that
+ * leave some space between neighbour glyphs.
+ */
+ enum
+ {
+ AF_CJK_BLUE_TOP,
+ AF_CJK_BLUE_BOTTOM,
+ AF_CJK_BLUE_LEFT,
+ AF_CJK_BLUE_RIGHT,
+
+ AF_CJK_BLUE_MAX
+ };
+
+
+#define AF_CJK_MAX_WIDTHS 16
+#define AF_CJK_MAX_BLUES AF_CJK_BLUE_MAX
+
+
+ enum
+ {
+ AF_CJK_BLUE_ACTIVE = 1 << 0,
+ AF_CJK_BLUE_IS_TOP = 1 << 1,
+ AF_CJK_BLUE_IS_RIGHT = 1 << 2,
+ AF_CJK_BLUE_ADJUSTMENT = 1 << 3, /* used for scale adjustment */
+ /* optimization */
+ AF_CJK_BLUE_FLAG_MAX
+ };
+
+
+ typedef struct AF_CJKBlueRec_
+ {
+ AF_WidthRec ref;
+ AF_WidthRec shoot; /* undershoot */
+ FT_UInt flags;
+
+ } AF_CJKBlueRec, *AF_CJKBlue;
+
+
+ typedef struct AF_CJKAxisRec_
+ {
+ FT_Fixed scale;
+ FT_Pos delta;
+
+ FT_UInt width_count;
+ AF_WidthRec widths[AF_CJK_MAX_WIDTHS];
+ FT_Pos edge_distance_threshold;
+ FT_Pos standard_width;
+ FT_Bool extra_light;
+
+ /* used for horizontal metrics too for CJK */
+ FT_Bool control_overshoot;
+ FT_UInt blue_count;
+ AF_CJKBlueRec blues[AF_CJK_BLUE_MAX];
+
+ FT_Fixed org_scale;
+ FT_Pos org_delta;
+
+ } AF_CJKAxisRec, *AF_CJKAxis;
+
+
+ typedef struct AF_CJKMetricsRec_
+ {
+ AF_ScriptMetricsRec root;
+ FT_UInt units_per_em;
+ AF_CJKAxisRec axis[AF_DIMENSION_MAX];
+
+ } AF_CJKMetricsRec, *AF_CJKMetrics;
+
+
+ FT_LOCAL( FT_Error )
+ af_cjk_metrics_init( AF_CJKMetrics metrics,
+ FT_Face face );
+
+ FT_LOCAL( void )
+ af_cjk_metrics_scale( AF_CJKMetrics metrics,
+ AF_Scaler scaler );
+
+ FT_LOCAL( FT_Error )
+ af_cjk_hints_init( AF_GlyphHints hints,
+ AF_CJKMetrics metrics );
+
+ FT_LOCAL( FT_Error )
+ af_cjk_hints_apply( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_CJKMetrics metrics );
+
+ /* Shared. called from afindic.c */
+ FT_LOCAL( void )
+ af_cjk_metrics_check_digits( AF_CJKMetrics metrics,
+ FT_Face face );
+
+ FT_LOCAL( void )
+ af_cjk_metrics_init_widths( AF_CJKMetrics metrics,
+ FT_Face face,
+ FT_ULong charcode );
+
+
+/* */
+
+FT_END_HEADER
+
+#endif /* __AFCJK_H__ */
+
+
+/* END */
diff --git a/3party/freetype/autofit/afdummy.c b/3party/freetype/src/autofit/afdummy.c
index 42b2fcb216..c71265131e 100644
--- a/3party/freetype/autofit/afdummy.c
+++ b/3party/freetype/src/autofit/afdummy.c
@@ -5,7 +5,7 @@
/* Auto-fitter dummy routines to be used if no hinting should be */
/* performed (body). */
/* */
-/* Copyright 2003, 2004, 2005 by */
+/* Copyright 2003-2005, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,6 +19,7 @@
#include "afdummy.h"
#include "afhints.h"
+#include "aferrors.h"
static FT_Error
@@ -27,7 +28,7 @@
{
af_glyph_hints_rescale( hints,
metrics );
- return 0;
+ return AF_Err_Ok;
}
@@ -38,11 +39,11 @@
FT_UNUSED( hints );
FT_UNUSED( outline );
- return 0;
+ return AF_Err_Ok;
}
- AF_DEFINE_SCRIPT_CLASS(af_dummy_script_class,
+ AF_DEFINE_SCRIPT_CLASS( af_dummy_script_class,
AF_SCRIPT_NONE,
NULL,
diff --git a/3party/freetype/autofit/afdummy.h b/3party/freetype/src/autofit/afdummy.h
index b69ef437fe..95d8f8cf19 100644
--- a/3party/freetype/autofit/afdummy.h
+++ b/3party/freetype/src/autofit/afdummy.h
@@ -5,7 +5,7 @@
/* Auto-fitter dummy routines to be used if no hinting should be */
/* performed (specification). */
/* */
-/* Copyright 2003, 2004, 2005 by */
+/* Copyright 2003-2005, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,7 +29,7 @@ FT_BEGIN_HEADER
* be performed. This is the default for non-latin glyphs!
*/
- AF_DECLARE_SCRIPT_CLASS(af_dummy_script_class)
+ AF_DECLARE_SCRIPT_CLASS( af_dummy_script_class )
/* */
diff --git a/3party/freetype/autofit/aferrors.h b/3party/freetype/src/autofit/aferrors.h
index c2ed5fe2ab..c2ed5fe2ab 100644
--- a/3party/freetype/autofit/aferrors.h
+++ b/3party/freetype/src/autofit/aferrors.h
diff --git a/3party/freetype/autofit/afglobal.c b/3party/freetype/src/autofit/afglobal.c
index ac293619d3..3c5f02ec6e 100644
--- a/3party/freetype/autofit/afglobal.c
+++ b/3party/freetype/src/autofit/afglobal.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter routines to compute global hinting values (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,8 +31,8 @@
#ifndef FT_CONFIG_OPTION_PIC
-/* when updating this table, don't forget to update
- AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
+ /* when updating this table, don't forget to update */
+ /* AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
/* populate this list when you add new scripts */
static AF_ScriptClass const af_script_classes[] =
@@ -47,7 +47,7 @@
NULL /* do not remove */
};
-#endif /* FT_CONFIG_OPTION_PIC */
+#endif /* !FT_CONFIG_OPTION_PIC */
/* index of default script in `af_script_classes' */
#define AF_SCRIPT_LIST_DEFAULT 2
@@ -85,7 +85,7 @@
FT_UInt ss, i;
- /* the value 255 means `uncovered glyph' */
+ /* the value AF_SCRIPT_LIST_NONE means `uncovered glyph' */
FT_MEM_SET( globals->glyph_scripts,
AF_SCRIPT_LIST_NONE,
globals->glyph_count );
@@ -126,9 +126,7 @@
if ( gindex != 0 &&
gindex < (FT_ULong)globals->glyph_count &&
gscripts[gindex] == AF_SCRIPT_LIST_NONE )
- {
gscripts[gindex] = (FT_Byte)ss;
- }
for (;;)
{
@@ -139,9 +137,7 @@
if ( gindex < (FT_ULong)globals->glyph_count &&
gscripts[gindex] == AF_SCRIPT_LIST_NONE )
- {
gscripts[gindex] = (FT_Byte)ss;
- }
}
}
}
@@ -167,8 +163,11 @@
for ( nn = 0; nn < globals->glyph_count; nn++ )
{
- if ( gscripts[nn] == AF_SCRIPT_LIST_NONE )
- gscripts[nn] = AF_SCRIPT_LIST_DEFAULT;
+ if ( ( gscripts[nn] & ~AF_DIGIT ) == AF_SCRIPT_LIST_NONE )
+ {
+ gscripts[nn] &= ~AF_SCRIPT_LIST_NONE;
+ gscripts[nn] |= AF_SCRIPT_LIST_DEFAULT;
+ }
}
}
@@ -183,7 +182,7 @@
{
FT_Error error;
FT_Memory memory;
- AF_FaceGlobals globals;
+ AF_FaceGlobals globals = NULL;
memory = face->memory;
diff --git a/3party/freetype/autofit/afglobal.h b/3party/freetype/src/autofit/afglobal.h
index 2a68e19607..cc6860b260 100644
--- a/3party/freetype/autofit/afglobal.h
+++ b/3party/freetype/src/autofit/afglobal.h
@@ -5,7 +5,7 @@
/* Auto-fitter routines to compute global hinting values */
/* (specification). */
/* */
-/* Copyright 2003, 2004, 2005, 2007, 2009 by */
+/* Copyright 2003-2005, 2007, 2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,8 +17,8 @@
/***************************************************************************/
-#ifndef __AF_GLOBAL_H__
-#define __AF_GLOBAL_H__
+#ifndef __AFGLOBAL_H__
+#define __AFGLOBAL_H__
#include "aftypes.h"
@@ -65,7 +65,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* __AF_GLOBALS_H__ */
+#endif /* __AFGLOBAL_H__ */
/* END */
diff --git a/3party/freetype/autofit/afhints.c b/3party/freetype/src/autofit/afhints.c
index fe38fba995..f51066f02f 100644
--- a/3party/freetype/autofit/afhints.c
+++ b/3party/freetype/src/autofit/afhints.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2003-2007, 2009-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,8 @@
#include FT_INTERNAL_CALC_H
+ /* Get new segment for given axis. */
+
FT_LOCAL_DEF( FT_Error )
af_axis_hints_new_segment( AF_AxisHints axis,
FT_Memory memory,
@@ -61,6 +63,8 @@
}
+ /* Get new edge for given axis, direction, and position. */
+
FT_LOCAL( FT_Error )
af_axis_hints_new_edge( AF_AxisHints axis,
FT_Int fpos,
@@ -125,7 +129,7 @@
}
-#ifdef AF_DEBUG
+#ifdef FT_DEBUG_AUTOFIT
#include FT_CONFIG_STANDARD_LIBRARY_H
@@ -160,6 +164,9 @@
#define AF_INDEX_NUM( ptr, base ) ( (ptr) ? ( (ptr) - (base) ) : -1 )
+#ifdef __cplusplus
+ extern "C" {
+#endif
void
af_glyph_hints_dump_points( AF_GlyphHints hints )
{
@@ -169,20 +176,20 @@
printf( "Table of points:\n" );
- printf( " [ index | xorg | yorg | xscale | yscale "
- "| xfit | yfit | flags ]\n" );
+ printf( " [ index | xorg | yorg | xscale | yscale"
+ " | xfit | yfit | flags ]\n" );
for ( point = points; point < limit; point++ )
{
- printf( " [ %5d | %5d | %5d | %-5.2f | %-5.2f "
- "| %-5.2f | %-5.2f | %c%c%c%c%c%c ]\n",
+ printf( " [ %5d | %5d | %5d | %6.2f | %6.2f"
+ " | %5.2f | %5.2f | %c%c%c%c%c%c ]\n",
point - points,
point->fx,
point->fy,
- point->ox/64.0,
- point->oy/64.0,
- point->x/64.0,
- point->y/64.0,
+ point->ox / 64.0,
+ point->oy / 64.0,
+ point->x / 64.0,
+ point->y / 64.0,
( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' ',
( point->flags & AF_FLAG_INFLECTION ) ? 'i' : ' ',
( point->flags & AF_FLAG_EXTREMA_X ) ? '<' : ' ',
@@ -192,6 +199,9 @@
}
printf( "\n" );
}
+#ifdef __cplusplus
+ }
+#endif
static const char*
@@ -222,7 +232,11 @@
}
- /* A function to dump the array of linked segments. */
+ /* Dump the array of linked segments. */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
void
af_glyph_hints_dump_segments( AF_GlyphHints hints )
{
@@ -240,11 +254,11 @@
printf ( "Table of %s segments:\n",
dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" );
printf ( " [ index | pos | dir | link | serif |"
- " height | extra | flags ]\n" );
+ " height | extra | flags ]\n" );
for ( seg = segments; seg < limit; seg++ )
{
- printf ( " [ %5d | %5.2g | %5s | %4d | %5d | %5d | %5d | %s ]\n",
+ printf ( " [ %5d | %5.2g | %5s | %4d | %5d | %6d | %5d | %11s ]\n",
seg - segments,
dimension == AF_DIMENSION_HORZ ? (int)seg->first->ox / 64.0
: (int)seg->first->oy / 64.0,
@@ -253,13 +267,84 @@
AF_INDEX_NUM( seg->serif, segments ),
seg->height,
seg->height - ( seg->max_coord - seg->min_coord ),
- af_edge_flags_to_string( seg->flags ) );
+ af_edge_flags_to_string( (AF_Edge_Flags)seg->flags ) );
}
printf( "\n" );
}
}
+#ifdef __cplusplus
+ }
+#endif
+
+
+ /* Fetch number of segments. */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+ FT_Error
+ af_glyph_hints_get_num_segments( AF_GlyphHints hints,
+ FT_Int dimension,
+ FT_Int* num_segments )
+ {
+ AF_Dimension dim;
+ AF_AxisHints axis;
+
+
+ dim = ( dimension == 0 ) ? AF_DIMENSION_HORZ : AF_DIMENSION_VERT;
+
+ axis = &hints->axis[dim];
+ *num_segments = axis->num_segments;
+
+ return AF_Err_Ok;
+ }
+#ifdef __cplusplus
+ }
+#endif
+
+
+ /* Fetch offset of segments into user supplied offset array. */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+ FT_Error
+ af_glyph_hints_get_segment_offset( AF_GlyphHints hints,
+ FT_Int dimension,
+ FT_Int idx,
+ FT_Pos* offset )
+ {
+ AF_Dimension dim;
+ AF_AxisHints axis;
+ AF_Segment seg;
+
+
+ if ( !offset )
+ return AF_Err_Invalid_Argument;
+
+ dim = ( dimension == 0 ) ? AF_DIMENSION_HORZ : AF_DIMENSION_VERT;
+
+ axis = &hints->axis[dim];
+
+ if ( idx < 0 || idx >= axis->num_segments )
+ return AF_Err_Invalid_Argument;
+
+ seg = &axis->segments[idx];
+ *offset = (dim == AF_DIMENSION_HORZ) ? seg->first->ox
+ : seg->first->oy;
+
+ return AF_Err_Ok;
+ }
+#ifdef __cplusplus
+ }
+#endif
+
+ /* Dump the array of linked edges. */
+#ifdef __cplusplus
+ extern "C" {
+#endif
void
af_glyph_hints_dump_edges( AF_GlyphHints hints )
{
@@ -276,17 +361,17 @@
/*
* note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
- * since they have constant a X coordinate.
+ * since they have a constant X coordinate.
*/
printf ( "Table of %s edges:\n",
dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" );
printf ( " [ index | pos | dir | link |"
- " serif | blue | opos | pos | flags ]\n" );
+ " serif | blue | opos | pos | flags ]\n" );
for ( edge = edges; edge < limit; edge++ )
{
printf ( " [ %5d | %5.2g | %5s | %4d |"
- " %5d | %c | %5.2f | %5.2f | %s ]\n",
+ " %5d | %c | %5.2f | %5.2f | %11s ]\n",
edge - edges,
(int)edge->opos / 64.0,
af_dir_str( (AF_Direction)edge->dir ),
@@ -295,16 +380,23 @@
edge->blue_edge ? 'y' : 'n',
edge->opos / 64.0,
edge->pos / 64.0,
- af_edge_flags_to_string( edge->flags ) );
+ af_edge_flags_to_string( (AF_Edge_Flags)edge->flags ) );
}
printf( "\n" );
}
}
+#ifdef __cplusplus
+ }
+#endif
-#else /* !AF_DEBUG */
+#else /* !FT_DEBUG_AUTOFIT */
/* these empty stubs are only used to link the `ftgrid' test program */
- /* when debugging is disabled */
+ /* if debugging is disabled */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
void
af_glyph_hints_dump_points( AF_GlyphHints hints )
@@ -320,16 +412,49 @@
}
+ FT_Error
+ af_glyph_hints_get_num_segments( AF_GlyphHints hints,
+ FT_Int dimension,
+ FT_Int* num_segments )
+ {
+ FT_UNUSED( hints );
+ FT_UNUSED( dimension );
+ FT_UNUSED( num_segments );
+
+ return 0;
+ }
+
+
+ FT_Error
+ af_glyph_hints_get_segment_offset( AF_GlyphHints hints,
+ FT_Int dimension,
+ FT_Int idx,
+ FT_Pos* offset )
+ {
+ FT_UNUSED( hints );
+ FT_UNUSED( dimension );
+ FT_UNUSED( idx );
+ FT_UNUSED( offset );
+
+ return 0;
+ }
+
+
void
af_glyph_hints_dump_edges( AF_GlyphHints hints )
{
FT_UNUSED( hints );
}
-#endif /* !AF_DEBUG */
+#ifdef __cplusplus
+ }
+#endif
+#endif /* !FT_DEBUG_AUTOFIT */
+
+
+ /* Compute the direction value of a given vector. */
- /* compute the direction value of a given vector */
FT_LOCAL_DEF( AF_Direction )
af_direction_compute( FT_Pos dx,
FT_Pos dy )
@@ -369,6 +494,8 @@
}
}
+ /* return no direction if arm lengths differ too much */
+ /* (value 14 is heuristic) */
ss *= 14;
if ( FT_ABS( ll ) <= FT_ABS( ss ) )
dir = AF_DIR_NONE;
@@ -377,120 +504,6 @@
}
- /* compute all inflex points in a given glyph */
-
- static void
- af_glyph_hints_compute_inflections( AF_GlyphHints hints )
- {
- AF_Point* contour = hints->contours;
- AF_Point* contour_limit = contour + hints->num_contours;
-
-
- /* do each contour separately */
- for ( ; contour < contour_limit; contour++ )
- {
- AF_Point point = contour[0];
- AF_Point first = point;
- AF_Point start = point;
- AF_Point end = point;
- AF_Point before;
- AF_Point after;
- FT_Pos in_x, in_y, out_x, out_y;
- AF_Angle orient_prev, orient_cur;
- FT_Int finished = 0;
-
-
- /* compute first segment in contour */
- first = point;
-
- start = end = first;
- do
- {
- end = end->next;
- if ( end == first )
- goto Skip;
-
- in_x = end->fx - start->fx;
- in_y = end->fy - start->fy;
-
- } while ( in_x == 0 && in_y == 0 );
-
- /* extend the segment start whenever possible */
- before = start;
- do
- {
- do
- {
- start = before;
- before = before->prev;
- if ( before == first )
- goto Skip;
-
- out_x = start->fx - before->fx;
- out_y = start->fy - before->fy;
-
- } while ( out_x == 0 && out_y == 0 );
-
- orient_prev = ft_corner_orientation( in_x, in_y, out_x, out_y );
-
- } while ( orient_prev == 0 );
-
- first = start;
-
- in_x = out_x;
- in_y = out_y;
-
- /* now process all segments in the contour */
- do
- {
- /* first, extend current segment's end whenever possible */
- after = end;
- do
- {
- do
- {
- end = after;
- after = after->next;
- if ( after == first )
- finished = 1;
-
- out_x = after->fx - end->fx;
- out_y = after->fy - end->fy;
-
- } while ( out_x == 0 && out_y == 0 );
-
- orient_cur = ft_corner_orientation( in_x, in_y, out_x, out_y );
-
- } while ( orient_cur == 0 );
-
- if ( ( orient_prev + orient_cur ) == 0 )
- {
- /* we have an inflection point here */
- do
- {
- start->flags |= AF_FLAG_INFLECTION;
- start = start->next;
-
- } while ( start != end );
-
- start->flags |= AF_FLAG_INFLECTION;
- }
-
- start = end;
- end = after;
-
- orient_prev = orient_cur;
- in_x = out_x;
- in_y = out_y;
-
- } while ( !finished );
-
- Skip:
- ;
- }
- }
-
-
FT_LOCAL_DEF( void )
af_glyph_hints_init( AF_GlyphHints hints,
FT_Memory memory )
@@ -511,7 +524,7 @@
/*
* note that we don't need to free the segment and edge
- * buffers, since they are really within the hints->points array
+ * buffers since they are really within the hints->points array
*/
for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
{
@@ -522,8 +535,8 @@
axis->max_segments = 0;
FT_FREE( axis->segments );
- axis->num_edges = 0;
- axis->max_edges = 0;
+ axis->num_edges = 0;
+ axis->max_edges = 0;
FT_FREE( axis->edges );
}
@@ -540,6 +553,8 @@
}
+ /* Reset metrics. */
+
FT_LOCAL_DEF( void )
af_glyph_hints_rescale( AF_GlyphHints hints,
AF_ScriptMetrics metrics )
@@ -549,10 +564,12 @@
}
+ /* Recompute all AF_Point in AF_GlyphHints from the definitions */
+ /* in a source outline. */
+
FT_LOCAL_DEF( FT_Error )
af_glyph_hints_reload( AF_GlyphHints hints,
- FT_Outline* outline,
- FT_Bool get_inflections )
+ FT_Outline* outline )
{
FT_Error error = AF_Err_Ok;
AF_Point points;
@@ -572,12 +589,12 @@
hints->axis[1].num_segments = 0;
hints->axis[1].num_edges = 0;
- /* first of all, reallocate the contours array when necessary */
+ /* first of all, reallocate the contours array if necessary */
new_max = (FT_UInt)outline->n_contours;
old_max = hints->max_contours;
if ( new_max > old_max )
{
- new_max = ( new_max + 3 ) & ~3;
+ new_max = ( new_max + 3 ) & ~3; /* round up to a multiple of 4 */
if ( FT_RENEW_ARRAY( hints->contours, old_max, new_max ) )
goto Exit;
@@ -594,7 +611,7 @@
old_max = hints->max_points;
if ( new_max > old_max )
{
- new_max = ( new_max + 2 + 7 ) & ~7;
+ new_max = ( new_max + 2 + 7 ) & ~7; /* round up to a multiple of 8 */
if ( FT_RENEW_ARRAY( hints->points, old_max, new_max ) )
goto Exit;
@@ -639,13 +656,11 @@
{
FT_Vector* vec = outline->points;
char* tag = outline->tags;
- AF_Point first = points;
AF_Point end = points + outline->contours[0];
AF_Point prev = end;
FT_Int contour_index = 0;
- FT_UNUSED( first );
for ( point = points; point < point_limit; point++, vec++, tag++ )
{
point->fx = (FT_Short)vec->x;
@@ -662,7 +677,7 @@
point->flags = AF_FLAG_CUBIC;
break;
default:
- point->flags = 0;
+ point->flags = AF_FLAG_NONE;
}
point->prev = prev;
@@ -673,15 +688,14 @@
{
if ( ++contour_index < outline->n_contours )
{
- first = point + 1;
- end = points + outline->contours[contour_index];
- prev = end;
+ end = points + outline->contours[contour_index];
+ prev = end;
}
}
}
}
- /* set-up the contours array */
+ /* set up the contours array */
{
AF_Point* contour = hints->contours;
AF_Point* contour_limit = contour + hints->num_contours;
@@ -729,6 +743,8 @@
in_dir = af_direction_compute( out_x, out_y );
point->out_dir = (FT_Char)in_dir;
+ /* check for weak points */
+
if ( point->flags & ( AF_FLAG_CONIC | AF_FLAG_CUBIC ) )
{
Is_Weak_Point:
@@ -752,16 +768,13 @@
}
}
- /* compute inflection points -- */
- /* disabled due to no longer perceived benefits */
- if ( 0 && get_inflections )
- af_glyph_hints_compute_inflections( hints );
-
Exit:
return error;
}
+ /* Store the hinted outline in an FT_Outline structure. */
+
FT_LOCAL_DEF( void )
af_glyph_hints_save( AF_GlyphHints hints,
FT_Outline* outline )
@@ -794,6 +807,9 @@
****************************************************************/
+ /* Align all points of an edge to the same coordinate value, */
+ /* either horizontally or vertically. */
+
FT_LOCAL_DEF( void )
af_glyph_hints_align_edge_points( AF_GlyphHints hints,
AF_Dimension dim )
@@ -827,7 +843,6 @@
break;
point = point->next;
-
}
}
}
@@ -867,8 +882,8 @@
****************************************************************/
- /* hint the strong points -- this is equivalent to the TrueType `IP' */
- /* hinting instruction */
+ /* Hint the strong points -- this is equivalent to the TrueType `IP' */
+ /* hinting instruction. */
FT_LOCAL_DEF( void )
af_glyph_hints_align_strong_points( AF_GlyphHints hints,
@@ -950,11 +965,12 @@
max = edge_limit - edges;
#if 1
- /* for small edge counts, a linear search is better */
+ /* for a small number of edges, a linear search is better */
if ( max <= 8 )
{
FT_PtrDist nn;
+
for ( nn = 0; nn < max; nn++ )
if ( edges[nn].fpos >= u )
break;
@@ -986,6 +1002,7 @@
}
}
+ /* point is not on an edge */
{
AF_Edge before = edges + min - 1;
AF_Edge after = edges + min + 0;
@@ -1021,6 +1038,10 @@
****************************************************************/
+ /* Shift the original coordinates of all points between `p1' and */
+ /* `p2' to get hinted coordinates, using the same difference as */
+ /* given by `ref'. */
+
static void
af_iup_shift( AF_Point p1,
AF_Point p2,
@@ -1029,6 +1050,7 @@
AF_Point p;
FT_Pos delta = ref->u - ref->v;
+
if ( delta == 0 )
return;
@@ -1040,6 +1062,13 @@
}
+ /* Interpolate the original coordinates of all points between `p1' and */
+ /* `p2' to get hinted coordinates, using `ref1' and `ref2' as the */
+ /* reference points. The `u' and `v' members are the current and */
+ /* original coordinate values, respectively. */
+ /* */
+ /* Details can be found in the TrueType bytecode specification. */
+
static void
af_iup_interp( AF_Point p1,
AF_Point p2,
@@ -1108,6 +1137,9 @@
}
+ /* Hint the weak points -- this is equivalent to the TrueType `IUP' */
+ /* hinting instruction. */
+
FT_LOCAL_DEF( void )
af_glyph_hints_align_weak_points( AF_GlyphHints hints,
AF_Dimension dim )
@@ -1173,17 +1205,18 @@
for (;;)
{
- FT_ASSERT( point <= end_point &&
+ FT_ASSERT( point <= end_point &&
( point->flags & touch_flag ) != 0 );
- /* skip any touched neighbhours */
- while ( point < end_point && ( point[1].flags & touch_flag ) != 0 )
+ /* skip any touched neighbours */
+ while ( point < end_point &&
+ ( point[1].flags & touch_flag ) != 0 )
point++;
last_touched = point;
/* find the next touched point, if any */
- point ++;
+ point++;
for (;;)
{
if ( point > end_point )
@@ -1203,9 +1236,8 @@
EndContour:
/* special case: only one point was touched */
if ( last_touched == first_touched )
- {
af_iup_shift( first_point, end_point, first_touched );
- }
+
else /* interpolate the last part */
{
if ( last_touched < end_point )
@@ -1235,7 +1267,9 @@
}
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
+
+ /* Apply (small) warp scale and warp delta for given dimension. */
FT_LOCAL_DEF( void )
af_glyph_hints_scale_dim( AF_GlyphHints hints,
@@ -1260,6 +1294,6 @@
}
}
-#endif /* AF_USE_WARPER */
+#endif /* AF_CONFIG_OPTION_USE_WARPER */
/* END */
diff --git a/3party/freetype/autofit/afhints.h b/3party/freetype/src/autofit/afhints.h
index 675826835a..1c52e0de7e 100644
--- a/3party/freetype/autofit/afhints.h
+++ b/3party/freetype/src/autofit/afhints.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines (specification). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 2003-2008, 2010-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -25,10 +25,10 @@
FT_BEGIN_HEADER
- /*
- * The definition of outline glyph hints. These are shared by all
- * script analysis routines (until now).
- */
+ /*
+ * The definition of outline glyph hints. These are shared by all
+ * script analysis routines (until now).
+ */
typedef enum AF_Dimension_
{
@@ -55,6 +55,151 @@ FT_BEGIN_HEADER
} AF_Direction;
+ /*
+ * The following explanations are mostly taken from the article
+ *
+ * Real-Time Grid Fitting of Typographic Outlines
+ *
+ * by David Turner and Werner Lemberg
+ *
+ * http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
+ *
+ *
+ * Segments
+ *
+ * `af_{cjk,latin,...}_hints_compute_segments' are the functions to
+ * find segments in an outline. A segment is a series of consecutive
+ * points that are approximately aligned along a coordinate axis. The
+ * analysis to do so is specific to a script.
+ *
+ * A segment must have at least two points, except in the case of
+ * `fake' segments that are generated to hint metrics appropriately,
+ * and which consist of a single point.
+ *
+ *
+ * Edges
+ *
+ * As soon as segments are defined, the auto-hinter groups them into
+ * edges. An edge corresponds to a single position on the main
+ * dimension that collects one or more segments (allowing for a small
+ * threshold).
+ *
+ * The auto-hinter first tries to grid fit edges, then to align
+ * segments on the edges unless it detects that they form a serif.
+ *
+ * `af_{cjk,latin,...}_hints_compute_edges' are the functions to find
+ * edges; they are specific to a script.
+ *
+ *
+ * A H
+ * | |
+ * | |
+ * | |
+ * | |
+ * C | | F
+ * +------<-----+ +-----<------+
+ * | B G |
+ * | |
+ * | |
+ * +--------------->------------------+
+ * D E
+ *
+ *
+ * Stems
+ *
+ * Segments need to be `linked' to other ones in order to detect stems.
+ * A stem is made of two segments that face each other in opposite
+ * directions and that are sufficiently close to each other. Using
+ * vocabulary from the TrueType specification, stem segments form a
+ * `black distance'.
+ *
+ * In the above ASCII drawing, the horizontal segments are BC, DE, and
+ * FG; the vertical segments are AB, CD, EF, and GH.
+ *
+ * Each segment has at most one `best' candidate to form a black
+ * distance, or no candidate at all. Notice that two distinct segments
+ * can have the same candidate, which frequently means a serif.
+ *
+ * A stem is recognized by the following condition:
+ *
+ * best segment_1 = segment_2 && best segment_2 = segment_1
+ *
+ * The best candidate is stored in field `link' in structure
+ * `AF_Segment'.
+ *
+ * Stems are detected by `af_{cjk,latin,...}_hint_edges'.
+ *
+ * In the above ASCII drawing, the best candidate for both AB and CD is
+ * GH, while the best candidate for GH is AB. Similarly, the best
+ * candidate for EF and GH is AB, while the best candidate for AB is
+ * GH.
+ *
+ *
+ * Serifs
+ *
+ * On the opposite, a serif has
+ *
+ * best segment_1 = segment_2 && best segment_2 != segment_1
+ *
+ * where segment_1 corresponds to the serif segment (CD and EF in the
+ * above ASCII drawing).
+ *
+ * The best candidate is stored in field `serif' in structure
+ * `AF_Segment' (and `link' is set to NULL).
+ *
+ * Serifs are detected by `af_{cjk,latin,...}_hint_edges'.
+ *
+ *
+ * Touched points
+ *
+ * A point is called `touched' if it has been processed somehow by the
+ * auto-hinter. It basically means that it shouldn't be moved again
+ * (or moved only under certain constraints to preserve the already
+ * applied processing).
+ *
+ *
+ * Flat and round segments
+ *
+ * Segments are `round' or `flat', depending on the series of points
+ * that define them. A segment is round if the next and previous point
+ * of an extremum (which can be either a single point or sequence of
+ * points) are both conic or cubic control points. Otherwise, a
+ * segment with an extremum is flat.
+ *
+ *
+ * Strong Points
+ *
+ * Experience has shown that points which are not part of an edge need
+ * to be interpolated linearly between their two closest edges, even if
+ * these are not part of the contour of those particular points.
+ * Typical candidates for this are
+ *
+ * - angle points (i.e., points where the `in' and `out' direction
+ * differ greatly)
+ *
+ * - inflection points (i.e., where the `in' and `out' angles are the
+ * same, but the curvature changes sign)
+ *
+ * `af_glyph_hints_align_strong_points' is the function which takes
+ * care of such situations; it is equivalent to the TrueType `IP'
+ * hinting instruction.
+ *
+ *
+ * Weak Points
+ *
+ * Other points in the outline must be interpolated using the
+ * coordinates of their previous and next unfitted contour neighbours.
+ * These are called `weak points' and are touched by the function
+ * `af_glyph_hints_align_weak_points', equivalent to the TrueType `IUP'
+ * hinting instruction. Typical candidates are control points and
+ * points on the contour without a major direction.
+ *
+ * The major effect is to reduce possible distortion caused by
+ * alignment of edges and strong points, thus weak points are processed
+ * after strong points.
+ */
+
+
/* point hint flags */
typedef enum AF_Flags_
{
@@ -137,9 +282,8 @@ FT_BEGIN_HEADER
FT_Pos score; /* used during stem matching */
FT_Pos len; /* used during stem matching */
- AF_Point first; /* first point in edge segment */
- AF_Point last; /* last point in edge segment */
- AF_Point* contour; /* ptr to first point of segment's contour */
+ AF_Point first; /* first point in edge segment */
+ AF_Point last; /* last point in edge segment */
} AF_SegmentRec;
@@ -155,32 +299,31 @@ FT_BEGIN_HEADER
FT_Fixed scale; /* used to speed up interpolation between edges */
AF_Width blue_edge; /* non-NULL if this is a blue edge */
- AF_Edge link;
- AF_Edge serif;
- FT_Short num_linked;
-
- FT_Int score;
+ AF_Edge link; /* link edge */
+ AF_Edge serif; /* primary edge for serifs */
+ FT_Short num_linked; /* number of linked edges */
+ FT_Int score; /* used during stem matching */
- AF_Segment first;
- AF_Segment last;
+ AF_Segment first; /* first segment in edge */
+ AF_Segment last; /* last segment in edge */
} AF_EdgeRec;
typedef struct AF_AxisHintsRec_
{
- FT_Int num_segments;
- FT_Int max_segments;
- AF_Segment segments;
+ FT_Int num_segments; /* number of used segments */
+ FT_Int max_segments; /* number of allocated segments */
+ AF_Segment segments; /* segments array */
#ifdef AF_SORT_SEGMENTS
FT_Int mid_segments;
#endif
- FT_Int num_edges;
- FT_Int max_edges;
- AF_Edge edges;
+ FT_Int num_edges; /* number of used edges */
+ FT_Int max_edges; /* number of allocated edges */
+ AF_Edge edges; /* edges array */
- AF_Direction major_dir;
+ AF_Direction major_dir; /* either vertical or horizontal */
} AF_AxisHintsRec, *AF_AxisHints;
@@ -195,15 +338,13 @@ FT_BEGIN_HEADER
FT_Fixed y_scale;
FT_Pos y_delta;
- FT_Pos edge_distance_threshold;
+ FT_Int max_points; /* number of allocated points */
+ FT_Int num_points; /* number of used points */
+ AF_Point points; /* points array */
- FT_Int max_points;
- FT_Int num_points;
- AF_Point points;
-
- FT_Int max_contours;
- FT_Int num_contours;
- AF_Point* contours;
+ FT_Int max_contours; /* number of allocated contours */
+ FT_Int num_contours; /* number of used contours */
+ AF_Point* contours; /* contours array */
AF_AxisHintsRec axis[AF_DIMENSION_MAX];
@@ -214,7 +355,7 @@ FT_BEGIN_HEADER
FT_Pos xmin_delta; /* used for warping */
FT_Pos xmax_delta;
-
+
} AF_GlyphHintsRec;
@@ -222,7 +363,7 @@ FT_BEGIN_HEADER
#define AF_HINTS_TEST_OTHER( h, f ) ( (h)->other_flags & (f) )
-#ifdef AF_DEBUG
+#ifdef FT_DEBUG_AUTOFIT
#define AF_HINTS_DO_HORIZONTAL( h ) \
( !_af_debug_disable_horz_hints && \
@@ -237,7 +378,7 @@ FT_BEGIN_HEADER
#define AF_HINTS_DO_BLUES( h ) ( !_af_debug_disable_blue_hints )
-#else /* !AF_DEBUG */
+#else /* !FT_DEBUG_AUTOFIT */
#define AF_HINTS_DO_HORIZONTAL( h ) \
!AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_HORIZONTAL )
@@ -250,7 +391,7 @@ FT_BEGIN_HEADER
#define AF_HINTS_DO_BLUES( h ) 1
-#endif /* !AF_DEBUG */
+#endif /* !FT_DEBUG_AUTOFIT */
FT_LOCAL( AF_Direction )
@@ -274,20 +415,13 @@ FT_BEGIN_HEADER
af_glyph_hints_init( AF_GlyphHints hints,
FT_Memory memory );
-
-
- /*
- * recompute all AF_Point in a AF_GlyphHints from the definitions
- * in a source outline
- */
FT_LOCAL( void )
af_glyph_hints_rescale( AF_GlyphHints hints,
AF_ScriptMetrics metrics );
FT_LOCAL( FT_Error )
af_glyph_hints_reload( AF_GlyphHints hints,
- FT_Outline* outline,
- FT_Bool get_inflections );
+ FT_Outline* outline );
FT_LOCAL( void )
af_glyph_hints_save( AF_GlyphHints hints,
@@ -305,7 +439,7 @@ FT_BEGIN_HEADER
af_glyph_hints_align_weak_points( AF_GlyphHints hints,
AF_Dimension dim );
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
FT_LOCAL( void )
af_glyph_hints_scale_dim( AF_GlyphHints hints,
AF_Dimension dim,
diff --git a/3party/freetype/autofit/afindic.c b/3party/freetype/src/autofit/afindic.c
index 1d9e9eafba..c232cff783 100644
--- a/3party/freetype/autofit/afindic.c
+++ b/3party/freetype/src/autofit/afindic.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for Indic scripts (body). */
/* */
-/* Copyright 2007 by */
+/* Copyright 2007, 2011 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, */
@@ -27,23 +27,42 @@
#include "afcjk.h"
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
#include "afwarp.h"
#endif
static FT_Error
- af_indic_metrics_init( AF_LatinMetrics metrics,
- FT_Face face )
+ af_indic_metrics_init( AF_CJKMetrics metrics,
+ FT_Face face )
{
- /* use CJK routines */
- return af_cjk_metrics_init( metrics, face );
+ /* skip blue zone init in CJK routines */
+ FT_CharMap oldmap = face->charmap;
+
+
+ metrics->units_per_em = face->units_per_EM;
+
+ if ( FT_Select_Charmap( face, FT_ENCODING_UNICODE ) )
+ face->charmap = NULL;
+ else
+ {
+ af_cjk_metrics_init_widths( metrics, face, 0x7530 );
+#if 0
+ /* either need indic specific blue_chars[] or just skip blue zones */
+ af_cjk_metrics_init_blues( metrics, face, af_cjk_blue_chars );
+#endif
+ af_cjk_metrics_check_digits( metrics, face );
+ }
+
+ FT_Set_Charmap( face, oldmap );
+
+ return AF_Err_Ok;
}
static void
- af_indic_metrics_scale( AF_LatinMetrics metrics,
- AF_Scaler scaler )
+ af_indic_metrics_scale( AF_CJKMetrics metrics,
+ AF_Scaler scaler )
{
/* use CJK routines */
af_cjk_metrics_scale( metrics, scaler );
@@ -51,8 +70,8 @@
static FT_Error
- af_indic_hints_init( AF_GlyphHints hints,
- AF_LatinMetrics metrics )
+ af_indic_hints_init( AF_GlyphHints hints,
+ AF_CJKMetrics metrics )
{
/* use CJK routines */
return af_cjk_hints_init( hints, metrics );
@@ -60,9 +79,9 @@
static FT_Error
- af_indic_hints_apply( AF_GlyphHints hints,
- FT_Outline* outline,
- AF_LatinMetrics metrics)
+ af_indic_hints_apply( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_CJKMetrics metrics )
{
/* use CJK routines */
return af_cjk_hints_apply( hints, outline, metrics );
@@ -84,6 +103,12 @@
AF_UNIRANGE_REC( 0x0100UL, 0xFFFFUL ), /* why this? */
#endif
AF_UNIRANGE_REC( 0x0900UL, 0x0DFFUL), /* Indic Range */
+ AF_UNIRANGE_REC( 0x0F00UL, 0x0FFFUL), /* Tibetan */
+ AF_UNIRANGE_REC( 0x1900UL, 0x194FUL), /* Limbu */
+ AF_UNIRANGE_REC( 0x1B80UL, 0x1BBFUL), /* Sundanese */
+ AF_UNIRANGE_REC( 0x1C80UL, 0x1CDFUL), /* Meetei Mayak */
+ AF_UNIRANGE_REC( 0xA800UL, 0xA82FUL), /* Syloti Nagri */
+ AF_UNIRANGE_REC( 0x11800UL, 0x118DFUL), /* Sharada */
AF_UNIRANGE_REC( 0UL, 0UL)
};
@@ -92,7 +117,7 @@
AF_SCRIPT_INDIC,
af_indic_uniranges,
- sizeof( AF_LatinMetricsRec ),
+ sizeof( AF_CJKMetricsRec ),
(AF_Script_InitMetricsFunc) af_indic_metrics_init,
(AF_Script_ScaleMetricsFunc)af_indic_metrics_scale,
@@ -114,7 +139,7 @@
AF_SCRIPT_INDIC,
af_indic_uniranges,
- sizeof( AF_LatinMetricsRec ),
+ sizeof( AF_CJKMetricsRec ),
(AF_Script_InitMetricsFunc) NULL,
(AF_Script_ScaleMetricsFunc)NULL,
diff --git a/3party/freetype/autofit/afindic.h b/3party/freetype/src/autofit/afindic.h
index 662a982200..662a982200 100644
--- a/3party/freetype/autofit/afindic.h
+++ b/3party/freetype/src/autofit/afindic.h
diff --git a/3party/freetype/autofit/aflatin.c b/3party/freetype/src/autofit/aflatin.c
index 394fb9789b..54fcf7f0aa 100644
--- a/3party/freetype/autofit/aflatin.c
+++ b/3party/freetype/src/autofit/aflatin.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for latin script (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,17 +18,28 @@
#include <ft2build.h>
#include FT_ADVANCES_H
+#include FT_INTERNAL_DEBUG_H
#include "aflatin.h"
#include "aferrors.h"
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
#include "afwarp.h"
#endif
/*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_aflatin
+
+
+ /*************************************************************************/
/*************************************************************************/
/***** *****/
/***** L A T I N G L O B A L M E T R I C S *****/
@@ -36,6 +47,10 @@
/*************************************************************************/
/*************************************************************************/
+
+ /* Find segments and links, compute all stem widths, and initialize */
+ /* standard width and height for the glyph with given charcode. */
+
FT_LOCAL_DEF( void )
af_latin_metrics_init_widths( AF_LatinMetrics metrics,
FT_Face face,
@@ -69,15 +84,19 @@
FT_ZERO( dummy );
dummy->units_per_em = metrics->units_per_em;
- scaler->x_scale = scaler->y_scale = 0x10000L;
- scaler->x_delta = scaler->y_delta = 0;
+
+ scaler->x_scale = 0x10000L;
+ scaler->y_scale = 0x10000L;
+ scaler->x_delta = 0;
+ scaler->y_delta = 0;
+
scaler->face = face;
scaler->render_mode = FT_RENDER_MODE_NORMAL;
scaler->flags = 0;
af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
- error = af_glyph_hints_reload( hints, &face->glyph->outline, 0 );
+ error = af_glyph_hints_reload( hints, &face->glyph->outline );
if ( error )
goto Exit;
@@ -115,7 +134,7 @@
dist = -dist;
if ( num_widths < AF_LATIN_MAX_WIDTHS )
- axis->widths[ num_widths++ ].org = dist;
+ axis->widths[num_widths++].org = dist;
}
}
@@ -161,6 +180,9 @@
};
+ /* Find all blue zones. Flat segments give the reference points, */
+ /* round segments the overshoot positions. */
+
static void
af_latin_metrics_init_blues( AF_LatinMetrics metrics,
FT_Face face )
@@ -177,11 +199,11 @@
/* we compute the blues simply by loading each character from the */
- /* 'af_latin_blue_chars[blues]' string, then compute its top-most or */
+ /* `af_latin_blue_chars[blues]' string, then finding its top-most or */
/* bottom-most points (depending on `AF_IS_TOP_BLUE') */
- AF_LOG(( "blue zones computation\n" ));
- AF_LOG(( "------------------------------------------------\n" ));
+ FT_TRACE5(( "blue zones computation\n" ));
+ FT_TRACE5(( "------------------------------------------------\n" ));
for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )
{
@@ -191,7 +213,7 @@
FT_Pos* blue_shoot;
- AF_LOG(( "blue %3d: ", bb ));
+ FT_TRACE5(( "blue %3d: ", bb ));
num_flats = 0;
num_rounds = 0;
@@ -199,13 +221,13 @@
for ( ; p < limit && *p; p++ )
{
FT_UInt glyph_index;
- FT_Pos best_y; /* same as points.y */
+ FT_Pos best_y; /* same as points.y */
FT_Int best_point, best_first, best_last;
FT_Vector* points;
FT_Bool round = 0;
- AF_LOG(( "'%c'", *p ));
+ FT_TRACE5(( "'%c'", *p ));
/* load the character in the face -- skip unknown or empty ones */
glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p );
@@ -229,7 +251,9 @@
FT_Int last = -1;
- for ( nn = 0; nn < glyph->outline.n_contours; first = last+1, nn++ )
+ for ( nn = 0;
+ nn < glyph->outline.n_contours;
+ first = last + 1, nn++ )
{
FT_Int old_best_point = best_point;
FT_Int pp;
@@ -241,7 +265,7 @@
/* In some fonts, they correspond to mark attachment points */
/* which are way outside of the glyph's real outline. */
if ( last <= first )
- continue;
+ continue;
if ( AF_LATIN_IS_TOP_BLUE( bb ) )
{
@@ -268,7 +292,7 @@
best_last = last;
}
}
- AF_LOG(( "%5d", best_y ));
+ FT_TRACE5(( "%5d", best_y ));
}
/* now check whether the point belongs to a straight or round */
@@ -311,12 +335,12 @@
} while ( next != best_point );
- /* now, set the `round' flag depending on the segment's kind */
+ /* now set the `round' flag depending on the segment's kind */
round = FT_BOOL(
FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_CURVE_TAG_ON ||
FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_CURVE_TAG_ON );
- AF_LOG(( "%c ", round ? 'r' : 'f' ));
+ FT_TRACE5(( "%c ", round ? 'r' : 'f' ));
}
if ( round )
@@ -325,7 +349,7 @@
flats[num_flats++] = best_y;
}
- AF_LOG(( "\n" ));
+ FT_TRACE5(( "\n" ));
if ( num_flats == 0 && num_rounds == 0 )
{
@@ -333,7 +357,7 @@
* we couldn't find a single glyph to compute this blue zone,
* we will simply ignore it then
*/
- AF_LOG(( "empty\n" ));
+ FT_TRACE5(( "empty\n" ));
continue;
}
@@ -343,9 +367,9 @@
af_sort_pos( num_rounds, rounds );
af_sort_pos( num_flats, flats );
- blue = & axis->blues[axis->blue_count];
- blue_ref = & blue->ref.org;
- blue_shoot = & blue->shoot.org;
+ blue = &axis->blues[axis->blue_count];
+ blue_ref = &blue->ref.org;
+ blue_shoot = &blue->shoot.org;
axis->blue_count++;
@@ -376,7 +400,8 @@
if ( AF_LATIN_IS_TOP_BLUE( bb ) ^ over_ref )
- *blue_shoot = *blue_ref = ( shoot + ref ) / 2;
+ *blue_ref =
+ *blue_shoot = ( shoot + ref ) / 2;
}
blue->flags = 0;
@@ -391,27 +416,30 @@
if ( bb == AF_LATIN_BLUE_SMALL_TOP )
blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;
- AF_LOG(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
+ FT_TRACE5(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
}
+ FT_TRACE5(( "\n" ));
+
return;
}
+ /* Check whether all ASCII digits have the same advance width. */
+
FT_LOCAL_DEF( void )
af_latin_metrics_check_digits( AF_LatinMetrics metrics,
FT_Face face )
{
- FT_UInt i;
- FT_Bool started = 0, same_width = 1;
+ FT_UInt i;
+ FT_Bool started = 0, same_width = 1;
+ FT_Fixed advance, old_advance = 0;
- /* check whether all ASCII digits have the same advance width; */
- /* digit `0' is 0x30 in all supported charmaps */
+ /* digit `0' is 0x30 in all supported charmaps */
for ( i = 0x30; i <= 0x39; i++ )
{
- FT_UInt glyph_index;
- FT_Fixed advance, old_advance = 0;
+ FT_UInt glyph_index;
glyph_index = FT_Get_Char_Index( face, i );
@@ -444,6 +472,8 @@
}
+ /* Initialize global metrics. */
+
FT_LOCAL_DEF( FT_Error )
af_latin_metrics_init( AF_LatinMetrics metrics,
FT_Face face )
@@ -458,6 +488,7 @@
FT_ENCODING_APPLE_ROMAN,
FT_ENCODING_ADOBE_STANDARD,
FT_ENCODING_ADOBE_LATIN_1,
+
FT_ENCODING_NONE /* end of list */
};
@@ -485,6 +516,9 @@
}
+ /* Adjust scaling value, then scale and shift widths */
+ /* and blue zones (if applicable) for given dimension. */
+
static void
af_latin_metrics_scale_dim( AF_LatinMetrics metrics,
AF_Scaler scaler,
@@ -550,9 +584,7 @@
else
#endif
if ( dim == AF_DIMENSION_VERT )
- {
scale = FT_MulDiv( scale, fitted, scaled );
- }
}
}
}
@@ -571,7 +603,7 @@
metrics->root.scaler.y_delta = delta;
}
- /* scale the standard widths */
+ /* scale the widths */
for ( nn = 0; nn < axis->width_count; nn++ )
{
AF_Width width = axis->widths + nn;
@@ -582,7 +614,7 @@
}
/* an extra-light axis corresponds to a standard width that is */
- /* smaller than 0.75 pixels */
+ /* smaller than 5/8 pixels */
axis->extra_light =
(FT_Bool)( FT_MulFix( axis->standard_width, scale ) < 32 + 8 );
@@ -605,9 +637,17 @@
dist = FT_MulFix( blue->ref.org - blue->shoot.org, scale );
if ( dist <= 48 && dist >= -48 )
{
- FT_Pos delta1, delta2;
+#if 0
+ FT_Pos delta1;
+#endif
+ FT_Pos delta2;
+
+ /* use discrete values for blue zone widths */
+#if 0
+
+ /* generic, original code */
delta1 = blue->shoot.org - blue->ref.org;
delta2 = delta1;
if ( delta1 < 0 )
@@ -628,6 +668,28 @@
blue->ref.fit = FT_PIX_ROUND( blue->ref.cur );
blue->shoot.fit = blue->ref.fit + delta2;
+#else
+
+ /* simplified version due to abs(dist) <= 48 */
+ delta2 = dist;
+ if ( dist < 0 )
+ delta2 = -delta2;
+
+ if ( delta2 < 32 )
+ delta2 = 0;
+ else if ( delta < 48 )
+ delta2 = 32;
+ else
+ delta2 = 64;
+
+ if ( dist < 0 )
+ delta2 = -delta2;
+
+ blue->ref.fit = FT_PIX_ROUND( blue->ref.cur );
+ blue->shoot.fit = blue->ref.fit - delta2;
+
+#endif
+
blue->flags |= AF_LATIN_BLUE_ACTIVE;
}
}
@@ -635,6 +697,8 @@
}
+ /* Scale global values in both directions. */
+
FT_LOCAL_DEF( void )
af_latin_metrics_scale( AF_LatinMetrics metrics,
AF_Scaler scaler )
@@ -655,18 +719,21 @@
/*************************************************************************/
/*************************************************************************/
+
+ /* Walk over all contours and compute its segments. */
+
FT_LOCAL_DEF( FT_Error )
af_latin_hints_compute_segments( AF_GlyphHints hints,
AF_Dimension dim )
{
- AF_AxisHints axis = &hints->axis[dim];
- FT_Memory memory = hints->memory;
- FT_Error error = AF_Err_Ok;
- AF_Segment segment = NULL;
- AF_SegmentRec seg0;
- AF_Point* contour = hints->contours;
- AF_Point* contour_limit = contour + hints->num_contours;
- AF_Direction major_dir, segment_dir;
+ AF_AxisHints axis = &hints->axis[dim];
+ FT_Memory memory = hints->memory;
+ FT_Error error = AF_Err_Ok;
+ AF_Segment segment = NULL;
+ AF_SegmentRec seg0;
+ AF_Point* contour = hints->contours;
+ AF_Point* contour_limit = contour + hints->num_contours;
+ AF_Direction major_dir, segment_dir;
FT_ZERO( &seg0 );
@@ -762,7 +829,7 @@
/* a segment is round if either its first or last point */
/* is a control point */
if ( ( segment->first->flags | point->flags ) &
- AF_FLAG_CONTROL )
+ AF_FLAG_CONTROL )
segment->flags |= AF_EDGE_ROUND;
/* compute segment size */
@@ -808,7 +875,6 @@
min_pos = max_pos = point->u;
segment->first = point;
segment->last = point;
- segment->contour = contour;
on_edge = 1;
}
@@ -874,6 +940,8 @@
}
+ /* Link segments to form stems and serifs. */
+
FT_LOCAL_DEF( void )
af_latin_hints_link_segments( AF_GlyphHints hints,
AF_Dimension dim )
@@ -899,51 +967,56 @@
if ( seg1->dir != axis->major_dir || seg1->first == seg1->last )
continue;
+ /* search for stems having opposite directions, */
+ /* with seg1 to the `left' of seg2 */
for ( seg2 = segments; seg2 < segment_limit; seg2++ )
- if ( seg1->dir + seg2->dir == 0 && seg2->pos > seg1->pos )
- {
- FT_Pos pos1 = seg1->pos;
- FT_Pos pos2 = seg2->pos;
- FT_Pos dist = pos2 - pos1;
+ {
+ FT_Pos pos1 = seg1->pos;
+ FT_Pos pos2 = seg2->pos;
- if ( dist < 0 )
- dist = -dist;
+ if ( seg1->dir + seg2->dir == 0 && pos2 > pos1 )
+ {
+ /* compute distance between the two segments */
+ FT_Pos dist = pos2 - pos1;
+ FT_Pos min = seg1->min_coord;
+ FT_Pos max = seg1->max_coord;
+ FT_Pos len, score;
- {
- FT_Pos min = seg1->min_coord;
- FT_Pos max = seg1->max_coord;
- FT_Pos len, score;
+ if ( min < seg2->min_coord )
+ min = seg2->min_coord;
- if ( min < seg2->min_coord )
- min = seg2->min_coord;
+ if ( max > seg2->max_coord )
+ max = seg2->max_coord;
- if ( max > seg2->max_coord )
- max = seg2->max_coord;
+ /* compute maximum coordinate difference of the two segments */
+ len = max - min;
+ if ( len >= len_threshold )
+ {
+ /* small coordinate differences cause a higher score, and */
+ /* segments with a greater distance cause a higher score also */
+ score = dist + len_score / len;
- len = max - min;
- if ( len >= len_threshold )
+ /* and we search for the smallest score */
+ /* of the sum of the two values */
+ if ( score < seg1->score )
{
- score = dist + len_score / len;
-
- if ( score < seg1->score )
- {
- seg1->score = score;
- seg1->link = seg2;
- }
+ seg1->score = score;
+ seg1->link = seg2;
+ }
- if ( score < seg2->score )
- {
- seg2->score = score;
- seg2->link = seg1;
- }
+ if ( score < seg2->score )
+ {
+ seg2->score = score;
+ seg2->link = seg1;
}
}
}
+ }
}
- /* now, compute the `serif' segments */
+ /* now compute the `serif' segments, cf. explanations in `afhints.h' */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
seg2 = seg1->link;
@@ -960,6 +1033,8 @@
}
+ /* Link segments to edges, using feature analysis for selection. */
+
FT_LOCAL_DEF( FT_Error )
af_latin_hints_compute_edges( AF_GlyphHints hints,
AF_Dimension dim )
@@ -973,7 +1048,9 @@
AF_Segment segment_limit = segments + axis->num_segments;
AF_Segment seg;
+#if 0
AF_Direction up_dir;
+#endif
FT_Fixed scale;
FT_Pos edge_distance_threshold;
FT_Pos segment_length_threshold;
@@ -984,11 +1061,13 @@
scale = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale
: hints->y_scale;
+#if 0
up_dir = ( dim == AF_DIMENSION_HORZ ) ? AF_DIR_UP
: AF_DIR_RIGHT;
+#endif
/*
- * We ignore all segments that are less than 1 pixels in length,
+ * We ignore all segments that are less than 1 pixel in length
* to avoid many problems with serif fonts. We compute the
* corresponding threshold in font units.
*/
@@ -999,20 +1078,21 @@
/*********************************************************************/
/* */
- /* We will begin by generating a sorted table of edges for the */
- /* current direction. To do so, we simply scan each segment and try */
- /* to find an edge in our table that corresponds to its position. */
+ /* We begin by generating a sorted table of edges for the current */
+ /* direction. To do so, we simply scan each segment and try to find */
+ /* an edge in our table that corresponds to its position. */
/* */
/* If no edge is found, we create and insert a new edge in the */
/* sorted table. Otherwise, we simply add the segment to the edge's */
- /* list which will be processed in the second step to compute the */
+ /* list which gets processed in the second step to compute the */
/* edge's properties. */
/* */
- /* Note that the edges table is sorted along the segment/edge */
+ /* Note that the table of edges is sorted along the segment/edge */
/* position. */
/* */
/*********************************************************************/
+ /* assure that edge distance threshold is at most 0.25px */
edge_distance_threshold = FT_MulFix( laxis->edge_distance_threshold,
scale );
if ( edge_distance_threshold > 64 / 4 )
@@ -1023,7 +1103,7 @@
for ( seg = segments; seg < segment_limit; seg++ )
{
- AF_Edge found = 0;
+ AF_Edge found = NULL;
FT_Int ee;
@@ -1072,9 +1152,10 @@
edge->first = seg;
edge->last = seg;
- edge->fpos = seg->pos;
edge->dir = seg->dir;
- edge->opos = edge->pos = FT_MulFix( seg->pos, scale );
+ edge->fpos = seg->pos;
+ edge->opos = FT_MulFix( seg->pos, scale );
+ edge->pos = edge->opos;
seg->edge_next = seg;
}
else
@@ -1091,9 +1172,9 @@
/*********************************************************************/
/* */
/* Good, we will now compute each edge's properties according to */
- /* segments found on its position. Basically, these are: */
+ /* the segments found on its position. Basically, these are */
/* */
- /* - edge's main direction */
+ /* - the edge's main direction */
/* - stem edge, serif edge or both (which defaults to stem then) */
/* - rounded edge, straight or both (which defaults to straight) */
/* - link for edge */
@@ -1126,13 +1207,15 @@
} while ( seg != edge->first );
}
- /* now, compute each edge properties */
+ /* now compute each edge properties */
for ( edge = edges; edge < edge_limit; edge++ )
{
FT_Int is_round = 0; /* does it contain round segments? */
FT_Int is_straight = 0; /* does it contain straight segments? */
+#if 0
FT_Pos ups = 0; /* number of upwards segments */
FT_Pos downs = 0; /* number of downwards segments */
+#endif
seg = edge->first;
@@ -1148,11 +1231,13 @@
else
is_straight++;
+#if 0
/* check for segment direction */
if ( seg->dir == up_dir )
- ups += seg->max_coord-seg->min_coord;
+ ups += seg->max_coord - seg->min_coord;
else
- downs += seg->max_coord-seg->min_coord;
+ downs += seg->max_coord - seg->min_coord;
+#endif
/* check for links -- if seg->serif is set, then seg->link must */
/* be ignored */
@@ -1228,7 +1313,7 @@
edge->dir = 0; /* both up and down! */
#endif
- /* gets rid of serifs if link is set */
+ /* get rid of serifs if link is set */
/* XXX: This gets rid of many unpleasant artefacts! */
/* Example: the `c' in cour.pfa at size 13 */
@@ -1242,6 +1327,8 @@
}
+ /* Detect segments and edges for given dimension. */
+
FT_LOCAL_DEF( FT_Error )
af_latin_hints_detect_features( AF_GlyphHints hints,
AF_Dimension dim )
@@ -1256,18 +1343,21 @@
error = af_latin_hints_compute_edges( hints, dim );
}
+
return error;
}
+ /* Compute all edges which lie within blue zones. */
+
FT_LOCAL_DEF( void )
af_latin_hints_compute_blue_edges( AF_GlyphHints hints,
AF_LatinMetrics metrics )
{
- AF_AxisHints axis = &hints->axis[ AF_DIMENSION_VERT ];
+ AF_AxisHints axis = &hints->axis[AF_DIMENSION_VERT];
AF_Edge edge = axis->edges;
AF_Edge edge_limit = edge + axis->num_edges;
- AF_LatinAxis latin = &metrics->axis[ AF_DIMENSION_VERT ];
+ AF_LatinAxis latin = &metrics->axis[AF_DIMENSION_VERT];
FT_Fixed scale = latin->scale;
@@ -1283,8 +1373,10 @@
/* compute the initial threshold as a fraction of the EM size */
+ /* (the value 40 is heuristic) */
best_dist = FT_MulFix( metrics->units_per_em / 40, scale );
+ /* assure a minimum distance of 0.5px */
if ( best_dist > 64 / 2 )
best_dist = 64 / 2;
@@ -1294,7 +1386,7 @@
FT_Bool is_top_blue, is_major_dir;
- /* skip inactive blue zones (i.e., those that are too small) */
+ /* skip inactive blue zones (i.e., those that are too large) */
if ( !( blue->flags & AF_LATIN_BLUE_ACTIVE ) )
continue;
@@ -1322,12 +1414,13 @@
if ( dist < best_dist )
{
best_dist = dist;
- best_blue = & blue->ref;
+ best_blue = &blue->ref;
}
- /* now, compare it to the overshoot position if the edge is */
- /* rounded, and if the edge is over the reference position of a */
- /* top zone, or under the reference position of a bottom zone */
+ /* now compare it to the overshoot position and check whether */
+ /* the edge is rounded, and whether the edge is over the */
+ /* reference position of a top zone, or under the reference */
+ /* position of a bottom zone */
if ( edge->flags & AF_EDGE_ROUND && dist != 0 )
{
FT_Bool is_under_ref = FT_BOOL( edge->fpos < blue->ref.org );
@@ -1335,7 +1428,6 @@
if ( is_top_blue ^ is_under_ref )
{
- blue = latin->blues + bb;
dist = edge->fpos - blue->shoot.org;
if ( dist < 0 )
dist = -dist;
@@ -1344,7 +1436,7 @@
if ( dist < best_dist )
{
best_dist = dist;
- best_blue = & blue->shoot;
+ best_blue = &blue->shoot;
}
}
}
@@ -1357,6 +1449,8 @@
}
+ /* Initalize hinting engine. */
+
static FT_Error
af_latin_hints_init( AF_GlyphHints hints,
AF_LatinMetrics metrics )
@@ -1370,7 +1464,7 @@
/*
* correct x_scale and y_scale if needed, since they may have
- * been modified `af_latin_metrics_scale_dim' above
+ * been modified by `af_latin_metrics_scale_dim' above
*/
hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale;
hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta;
@@ -1380,7 +1474,7 @@
/* compute flags depending on render mode, etc. */
mode = metrics->root.scaler.render_mode;
-#if 0 /* #ifdef AF_USE_WARPER */
+#if 0 /* #ifdef AF_CONFIG_OPTION_USE_WARPER */
if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )
{
metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;
@@ -1417,14 +1511,14 @@
* In `light' hinting 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 ||
+ ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )
scaler_flags |= AF_SCALER_FLAG_NO_HORIZONTAL;
hints->scaler_flags = scaler_flags;
hints->other_flags = other_flags;
- return 0;
+ return AF_Err_Ok;
}
@@ -1436,8 +1530,8 @@
/*************************************************************************/
/*************************************************************************/
- /* snap a given width in scaled coordinates to one of the */
- /* current standard widths */
+ /* Snap a given width in scaled coordinates to one of the */
+ /* current standard widths. */
static FT_Pos
af_latin_snap_width( AF_Width widths,
@@ -1484,7 +1578,9 @@
}
- /* compute the snapped width of a given stem */
+ /* Compute the snapped width of a given stem, ignoring very thin ones. */
+ /* There is a lot of voodoo in this function; changing the hard-coded */
+ /* parameters influence the whole hinting process. */
static FT_Pos
af_latin_compute_stem_width( AF_GlyphHints hints,
@@ -1501,7 +1597,7 @@
if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) ||
- axis->extra_light )
+ axis->extra_light )
return width;
if ( dist < 0 )
@@ -1516,11 +1612,12 @@
/* smooth hinting process: very lightly quantize the stem width */
/* leave the widths of serifs alone */
-
- if ( ( stem_flags & AF_EDGE_SERIF ) && vertical && ( dist < 3 * 64 ) )
+ if ( ( stem_flags & AF_EDGE_SERIF ) &&
+ vertical &&
+ ( dist < 3 * 64 ) )
goto Done_Width;
- else if ( ( base_flags & AF_EDGE_ROUND ) )
+ else if ( base_flags & AF_EDGE_ROUND )
{
if ( dist < 80 )
dist = 64;
@@ -1534,21 +1631,18 @@
/* compare to standard width */
- if ( axis->width_count > 0 )
- {
- delta = dist - axis->widths[0].cur;
+ delta = dist - axis->widths[0].cur;
- if ( delta < 0 )
- delta = -delta;
+ if ( delta < 0 )
+ delta = -delta;
- if ( delta < 40 )
- {
- dist = axis->widths[0].cur;
- if ( dist < 48 )
- dist = 48;
+ if ( delta < 40 )
+ {
+ dist = axis->widths[0].cur;
+ if ( dist < 48 )
+ dist = 48;
- goto Done_Width;
- }
+ goto Done_Width;
}
if ( dist < 3 * 64 )
@@ -1575,6 +1669,7 @@
else
{
/* strong hinting process: snap the stem width to integer pixels */
+
FT_Pos org_dist = dist;
@@ -1649,7 +1744,7 @@
}
- /* align one stem edge relative to the previous stem edge */
+ /* Align one stem edge relative to the previous stem edge. */
static void
af_latin_align_linked_edge( AF_GlyphHints hints,
@@ -1667,13 +1762,16 @@
stem_edge->pos = base_edge->pos + fitted_width;
- AF_LOG(( "LINK: edge %d (opos=%.2f) linked to (%.2f), "
- "dist was %.2f, now %.2f\n",
- stem_edge-hints->axis[dim].edges, stem_edge->opos / 64.0,
- stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 ));
+ FT_TRACE5(( " LINK: edge %d (opos=%.2f) linked to (%.2f),"
+ " dist was %.2f, now %.2f\n",
+ stem_edge-hints->axis[dim].edges, stem_edge->opos / 64.0,
+ stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 ));
}
+ /* Shift the coordinates of the `serif' edge by the same amount */
+ /* as the corresponding `base' edge has been moved already. */
+
static void
af_latin_align_serif_edge( AF_GlyphHints hints,
AF_Edge base,
@@ -1681,7 +1779,7 @@
{
FT_UNUSED( hints );
- serif->pos = base->pos + (serif->opos - base->opos);
+ serif->pos = base->pos + ( serif->opos - base->opos );
}
@@ -1696,6 +1794,8 @@
/*************************************************************************/
+ /* The main grid-fitting routine. */
+
FT_LOCAL_DEF( void )
af_latin_hint_edges( AF_GlyphHints hints,
AF_Dimension dim )
@@ -1705,10 +1805,13 @@
AF_Edge edge_limit = edges + axis->num_edges;
FT_PtrDist n_edges;
AF_Edge edge;
- AF_Edge anchor = 0;
+ AF_Edge anchor = NULL;
FT_Int has_serifs = 0;
+ FT_TRACE5(("%s edge hinting\n", dim == AF_DIMENSION_VERT ? "horizontal"
+ : "vertical"));
+
/* we begin by aligning all stems relative to the blue zone */
/* if needed -- that's only for horizontal edges */
@@ -1717,7 +1820,7 @@
for ( edge = edges; edge < edge_limit; edge++ )
{
AF_Width blue;
- AF_Edge edge1, edge2;
+ AF_Edge edge1, edge2; /* these edges form the stem to check */
if ( edge->flags & AF_EDGE_DONE )
@@ -1728,9 +1831,9 @@
edge2 = edge->link;
if ( blue )
- {
edge1 = edge;
- }
+
+ /* flip edges if the other stem is aligned to a blue zone */
else if ( edge2 && edge2->blue_edge )
{
blue = edge2->blue_edge;
@@ -1741,10 +1844,10 @@
if ( !edge1 )
continue;
- AF_LOG(( "BLUE: edge %d (opos=%.2f) snapped to (%.2f), "
- "was (%.2f)\n",
- edge1-edges, edge1->opos / 64.0, blue->fit / 64.0,
- edge1->pos / 64.0 ));
+ FT_TRACE5(( " BLUE: edge %d (opos=%.2f) snapped to (%.2f),"
+ " was (%.2f)\n",
+ edge1 - edges, edge1->opos / 64.0, blue->fit / 64.0,
+ edge1->pos / 64.0 ));
edge1->pos = blue->fit;
edge1->flags |= AF_EDGE_DONE;
@@ -1760,8 +1863,8 @@
}
}
- /* now we will align all stem edges, trying to maintain the */
- /* relative order of stems in the glyph */
+ /* now we align all other stem edges, trying to maintain the */
+ /* relative order of stems in the glyph */
for ( edge = edges; edge < edge_limit; edge++ )
{
AF_Edge edge2;
@@ -1783,7 +1886,7 @@
/* this should not happen, but it's better to be safe */
if ( edge2->blue_edge )
{
- AF_LOG(( "ASSERTION FAILED for edge %d\n", edge2-edges ));
+ FT_TRACE5(( " ASSERTION FAILED for edge %d\n", edge2-edges ));
af_latin_align_linked_edge( hints, dim, edge2, edge );
edge->flags |= AF_EDGE_DONE;
@@ -1792,6 +1895,8 @@
if ( !anchor )
{
+ /* if we reach this if clause, no stem has been aligned yet */
+
FT_Pos org_len, org_center, cur_len;
FT_Pos cur_pos1, error1, error2, u_off, d_off;
@@ -1801,10 +1906,19 @@
hints, dim, org_len,
(AF_Edge_Flags)edge->flags,
(AF_Edge_Flags)edge2->flags );
+
+ /* some voodoo to specially round edges for small stem widths; */
+ /* the idea is to align the center of a stem, then shifting */
+ /* the stem edges to suitable positions */
if ( cur_len <= 64 )
- u_off = d_off = 32;
+ {
+ /* width <= 1px */
+ u_off = 32;
+ d_off = 32;
+ }
else
{
+ /* 1px < width < 1.5px */
u_off = 38;
d_off = 26;
}
@@ -1812,7 +1926,6 @@
if ( cur_len < 96 )
{
org_center = edge->opos + ( org_len >> 1 );
-
cur_pos1 = FT_PIX_ROUND( org_center );
error1 = org_center - ( cur_pos1 - u_off );
@@ -1834,11 +1947,11 @@
else
edge->pos = FT_PIX_ROUND( edge->opos );
- AF_LOG(( "ANCHOR: edge %d (opos=%.2f) and %d (opos=%.2f) "
- "snapped to (%.2f) (%.2f)\n",
- edge-edges, edge->opos / 64.0,
- edge2-edges, edge2->opos / 64.0,
- edge->pos / 64.0, edge2->pos / 64.0 ));
+ FT_TRACE5(( " ANCHOR: edge %d (opos=%.2f) and %d (opos=%.2f)"
+ " snapped to (%.2f) (%.2f)\n",
+ edge - edges, edge->opos / 64.0,
+ edge2 - edges, edge2->opos / 64.0,
+ edge->pos / 64.0, edge2->pos / 64.0 ));
anchor = edge;
edge->flags |= AF_EDGE_DONE;
@@ -1856,12 +1969,18 @@
org_center = org_pos + ( org_len >> 1 );
cur_len = af_latin_compute_stem_width(
- hints, dim, org_len,
- (AF_Edge_Flags)edge->flags,
- (AF_Edge_Flags)edge2->flags );
+ hints, dim, org_len,
+ (AF_Edge_Flags)edge->flags,
+ (AF_Edge_Flags)edge2->flags );
if ( edge2->flags & AF_EDGE_DONE )
+ {
+ FT_TRACE5(( " ADJUST: edge %d (pos=%.2f) moved to %.2f\n",
+ edge - edges, edge->pos / 64.0,
+ ( edge2->pos - cur_len ) / 64.0 ));
+
edge->pos = edge2->pos - cur_len;
+ }
else if ( cur_len < 96 )
{
@@ -1871,7 +1990,10 @@
cur_pos1 = FT_PIX_ROUND( org_center );
if (cur_len <= 64 )
- u_off = d_off = 32;
+ {
+ u_off = 32;
+ d_off = 32;
+ }
else
{
u_off = 38;
@@ -1894,11 +2016,11 @@
edge->pos = cur_pos1 - cur_len / 2;
edge2->pos = cur_pos1 + cur_len / 2;
- AF_LOG(( "STEM: %d (opos=%.2f) to %d (opos=%.2f) "
- "snapped to (%.2f) and (%.2f)\n",
- edge-edges, edge->opos / 64.0,
- edge2-edges, edge2->opos / 64.0,
- edge->pos / 64.0, edge2->pos / 64.0 ));
+ FT_TRACE5(( " STEM: %d (opos=%.2f) to %d (opos=%.2f)"
+ " snapped to (%.2f) and (%.2f)\n",
+ edge - edges, edge->opos / 64.0,
+ edge2 - edges, edge2->opos / 64.0,
+ edge->pos / 64.0, edge2->pos / 64.0 ));
}
else
{
@@ -1911,24 +2033,24 @@
(AF_Edge_Flags)edge->flags,
(AF_Edge_Flags)edge2->flags );
- cur_pos1 = FT_PIX_ROUND( org_pos );
- delta1 = cur_pos1 + ( cur_len >> 1 ) - org_center;
+ cur_pos1 = FT_PIX_ROUND( org_pos );
+ delta1 = cur_pos1 + ( cur_len >> 1 ) - org_center;
if ( delta1 < 0 )
delta1 = -delta1;
- cur_pos2 = FT_PIX_ROUND( org_pos + org_len ) - cur_len;
- delta2 = cur_pos2 + ( cur_len >> 1 ) - org_center;
+ cur_pos2 = FT_PIX_ROUND( org_pos + org_len ) - cur_len;
+ delta2 = cur_pos2 + ( cur_len >> 1 ) - org_center;
if ( delta2 < 0 )
delta2 = -delta2;
edge->pos = ( delta1 < delta2 ) ? cur_pos1 : cur_pos2;
edge2->pos = edge->pos + cur_len;
- AF_LOG(( "STEM: %d (opos=%.2f) to %d (opos=%.2f) "
- "snapped to (%.2f) and (%.2f)\n",
- edge-edges, edge->opos / 64.0,
- edge2-edges, edge2->opos / 64.0,
- edge->pos / 64.0, edge2->pos / 64.0 ));
+ FT_TRACE5(( " STEM: %d (opos=%.2f) to %d (opos=%.2f)"
+ " snapped to (%.2f) and (%.2f)\n",
+ edge - edges, edge->opos / 64.0,
+ edge2 - edges, edge2->opos / 64.0,
+ edge->pos / 64.0, edge2->pos / 64.0 ));
}
edge->flags |= AF_EDGE_DONE;
@@ -1936,8 +2058,8 @@
if ( edge > edges && edge->pos < edge[-1].pos )
{
- AF_LOG(( "BOUND: %d (pos=%.2f) to (%.2f)\n",
- edge-edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));
+ FT_TRACE5(( " BOUND: %d (pos=%.2f) to (%.2f)\n",
+ edge - edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));
edge->pos = edge[-1].pos;
}
}
@@ -2031,18 +2153,19 @@
if ( delta < 64 + 16 )
{
af_latin_align_serif_edge( hints, edge->serif, edge );
- AF_LOG(( "SERIF: edge %d (opos=%.2f) serif to %d (opos=%.2f) "
- "aligned to (%.2f)\n",
- edge-edges, edge->opos / 64.0,
- edge->serif - edges, edge->serif->opos / 64.0,
- edge->pos / 64.0 ));
+ FT_TRACE5(( " SERIF: edge %d (opos=%.2f) serif to %d (opos=%.2f)"
+ " aligned to (%.2f)\n",
+ edge - edges, edge->opos / 64.0,
+ edge->serif - edges, edge->serif->opos / 64.0,
+ edge->pos / 64.0 ));
}
else if ( !anchor )
{
- AF_LOG(( "SERIF_ANCHOR: edge %d (opos=%.2f) snapped to (%.2f)\n",
- edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
edge->pos = FT_PIX_ROUND( edge->opos );
anchor = edge;
+ FT_TRACE5(( " SERIF_ANCHOR: edge %d (opos=%.2f)"
+ " snapped to (%.2f)\n",
+ edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
}
else
{
@@ -2067,18 +2190,21 @@
FT_MulDiv( edge->opos - before->opos,
after->pos - before->pos,
after->opos - before->opos );
- AF_LOG(( "SERIF_LINK1: edge %d (opos=%.2f) snapped to (%.2f) "
- "from %d (opos=%.2f)\n",
- edge-edges, edge->opos / 64.0,
- edge->pos / 64.0, before - edges,
- before->opos / 64.0 ));
+
+ FT_TRACE5(( " SERIF_LINK1: edge %d (opos=%.2f) snapped to (%.2f)"
+ " from %d (opos=%.2f)\n",
+ edge - edges, edge->opos / 64.0,
+ edge->pos / 64.0,
+ before - edges, before->opos / 64.0 ));
}
else
{
edge->pos = anchor->pos +
( ( edge->opos - anchor->opos + 16 ) & ~31 );
- AF_LOG(( "SERIF_LINK2: edge %d (opos=%.2f) snapped to (%.2f)\n",
- edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
+
+ FT_TRACE5(( " SERIF_LINK2: edge %d (opos=%.2f)"
+ " snapped to (%.2f)\n",
+ edge - edges, edge->opos / 64.0, edge->pos / 64.0 ));
}
}
@@ -2093,9 +2219,13 @@
edge->pos = edge[1].pos;
}
}
+
+ FT_TRACE5(( "\n" ));
}
+ /* Apply the complete hinting algorithm to a latin glyph. */
+
static FT_Error
af_latin_hints_apply( AF_GlyphHints hints,
FT_Outline* outline,
@@ -2105,14 +2235,14 @@
int dim;
- error = af_glyph_hints_reload( hints, outline, 1 );
+ error = af_glyph_hints_reload( hints, outline );
if ( error )
goto Exit;
/* analyze glyph outline */
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
if ( metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT ||
- AF_HINTS_DO_HORIZONTAL( hints ) )
+ AF_HINTS_DO_HORIZONTAL( hints ) )
#else
if ( AF_HINTS_DO_HORIZONTAL( hints ) )
#endif
@@ -2134,17 +2264,19 @@
/* grid-fit the outline */
for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
{
-#ifdef AF_USE_WARPER
- if ( ( dim == AF_DIMENSION_HORZ &&
- metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT ) )
+#ifdef AF_CONFIG_OPTION_USE_WARPER
+ if ( dim == AF_DIMENSION_HORZ &&
+ metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT )
{
AF_WarperRec warper;
FT_Fixed scale;
FT_Pos delta;
- af_warper_compute( &warper, hints, dim, &scale, &delta );
- af_glyph_hints_scale_dim( hints, dim, scale, delta );
+ af_warper_compute( &warper, hints, (AF_Dimension)dim,
+ &scale, &delta );
+ af_glyph_hints_scale_dim( hints, (AF_Dimension)dim,
+ scale, delta );
continue;
}
#endif
@@ -2209,7 +2341,7 @@
};
- AF_DEFINE_SCRIPT_CLASS(af_latin_script_class,
+ AF_DEFINE_SCRIPT_CLASS(af_latin_script_class,
AF_SCRIPT_LATIN,
af_latin_uniranges,
diff --git a/3party/freetype/autofit/aflatin.h b/3party/freetype/src/autofit/aflatin.h
index 660b10c83f..c5c2d13f8d 100644
--- a/3party/freetype/autofit/aflatin.h
+++ b/3party/freetype/src/autofit/aflatin.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for latin script (specification). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2003-2007, 2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,8 +30,8 @@ FT_BEGIN_HEADER
AF_DECLARE_SCRIPT_CLASS(af_latin_script_class)
-/* constants are given with units_per_em == 2048 in mind */
-#define AF_LATIN_CONSTANT( metrics, c ) \
+ /* constants are given with units_per_em == 2048 in mind */
+#define AF_LATIN_CONSTANT( metrics, c ) \
( ( (c) * (FT_Long)( (AF_LatinMetrics)(metrics) )->units_per_em ) / 2048 )
@@ -76,10 +76,10 @@ FT_BEGIN_HEADER
enum
{
- AF_LATIN_BLUE_ACTIVE = 1 << 0,
- AF_LATIN_BLUE_TOP = 1 << 1,
- AF_LATIN_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */
- /* optimization */
+ AF_LATIN_BLUE_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */
+ AF_LATIN_BLUE_TOP = 1 << 1, /* result of AF_LATIN_IS_TOP_BLUE */
+ AF_LATIN_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */
+ /* optimization */
AF_LATIN_BLUE_FLAG_MAX
};
@@ -98,14 +98,13 @@ FT_BEGIN_HEADER
FT_Fixed scale;
FT_Pos delta;
- FT_UInt width_count;
- AF_WidthRec widths[AF_LATIN_MAX_WIDTHS];
- FT_Pos edge_distance_threshold;
- FT_Pos standard_width;
- FT_Bool extra_light;
+ FT_UInt width_count; /* number of used widths */
+ AF_WidthRec widths[AF_LATIN_MAX_WIDTHS]; /* widths array */
+ FT_Pos edge_distance_threshold; /* used for creating edges */
+ FT_Pos standard_width; /* the default stem thickness */
+ FT_Bool extra_light; /* is standard width very light? */
/* ignored for horizontal metrics */
- FT_Bool control_overshoot;
FT_UInt blue_count;
AF_LatinBlueRec blues[AF_LATIN_BLUE_MAX];
diff --git a/3party/freetype/autofit/aflatin2.c b/3party/freetype/src/autofit/aflatin2.c
index 5e2ad48c40..23558b8790 100644
--- a/3party/freetype/autofit/aflatin2.c
+++ b/3party/freetype/src/autofit/aflatin2.c
@@ -1,10 +1,10 @@
/***************************************************************************/
/* */
-/* aflatin.c */
+/* aflatin2.c */
/* */
/* Auto-fitter hinting routines for latin script (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,13 +23,24 @@
#include "aferrors.h"
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
#include "afwarp.h"
#endif
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_aflatin2
+
+
FT_LOCAL_DEF( FT_Error )
af_latin2_hints_compute_segments( AF_GlyphHints hints,
- AF_Dimension dim );
+ AF_Dimension dim );
FT_LOCAL_DEF( void )
af_latin2_hints_link_segments( AF_GlyphHints hints,
@@ -45,8 +56,8 @@
FT_LOCAL_DEF( void )
af_latin2_metrics_init_widths( AF_LatinMetrics metrics,
- FT_Face face,
- FT_ULong charcode )
+ FT_Face face,
+ FT_ULong charcode )
{
/* scan the array of segments in each direction */
AF_GlyphHintsRec hints[1];
@@ -84,7 +95,7 @@
af_glyph_hints_rescale( hints, (AF_ScriptMetrics)dummy );
- error = af_glyph_hints_reload( hints, &face->glyph->outline, 0 );
+ error = af_glyph_hints_reload( hints, &face->glyph->outline );
if ( error )
goto Exit;
@@ -156,7 +167,8 @@
#define AF_LATIN_MAX_TEST_CHARACTERS 12
- static const char af_latin2_blue_chars[AF_LATIN_MAX_BLUES][AF_LATIN_MAX_TEST_CHARACTERS+1] =
+ static const char af_latin2_blue_chars[AF_LATIN_MAX_BLUES]
+ [AF_LATIN_MAX_TEST_CHARACTERS+1] =
{
"THEZOCQS",
"HEZLOCUS",
@@ -169,7 +181,7 @@
static void
af_latin2_metrics_init_blues( AF_LatinMetrics metrics,
- FT_Face face )
+ FT_Face face )
{
FT_Pos flats [AF_LATIN_MAX_TEST_CHARACTERS];
FT_Pos rounds[AF_LATIN_MAX_TEST_CHARACTERS];
@@ -182,12 +194,12 @@
FT_GlyphSlot glyph = face->glyph;
- /* we compute the blues simply by loading each character from the */
+ /* we compute the blues simply by loading each character from the */
/* 'af_latin2_blue_chars[blues]' string, then compute its top-most or */
- /* bottom-most points (depending on `AF_IS_TOP_BLUE') */
+ /* bottom-most points (depending on `AF_IS_TOP_BLUE') */
- AF_LOG(( "blue zones computation\n" ));
- AF_LOG(( "------------------------------------------------\n" ));
+ FT_TRACE5(( "blue zones computation\n" ));
+ FT_TRACE5(( "------------------------------------------------\n" ));
for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )
{
@@ -197,7 +209,7 @@
FT_Pos* blue_shoot;
- AF_LOG(( "blue %3d: ", bb ));
+ FT_TRACE5(( "blue %3d: ", bb ));
num_flats = 0;
num_rounds = 0;
@@ -210,7 +222,7 @@
FT_Bool round;
- AF_LOG(( "'%c'", *p ));
+ FT_TRACE5(( "'%c'", *p ));
/* load the character in the face -- skip unknown or empty ones */
glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p );
@@ -273,7 +285,7 @@
best_last = last;
}
}
- AF_LOG(( "%5d", best_y ));
+ FT_TRACE5(( "%5d", best_y ));
}
/* now check whether the point belongs to a straight or round */
@@ -321,7 +333,7 @@
FT_CURVE_TAG( glyph->outline.tags[start] ) != FT_CURVE_TAG_ON ||
FT_CURVE_TAG( glyph->outline.tags[ end ] ) != FT_CURVE_TAG_ON );
- AF_LOG(( "%c ", round ? 'r' : 'f' ));
+ FT_TRACE5(( "%c ", round ? 'r' : 'f' ));
}
if ( round )
@@ -330,7 +342,7 @@
flats[num_flats++] = best_y;
}
- AF_LOG(( "\n" ));
+ FT_TRACE5(( "\n" ));
if ( num_flats == 0 && num_rounds == 0 )
{
@@ -338,7 +350,7 @@
* we couldn't find a single glyph to compute this blue zone,
* we will simply ignore it then
*/
- AF_LOG(( "empty\n" ));
+ FT_TRACE5(( "empty\n" ));
continue;
}
@@ -396,7 +408,7 @@
if ( bb == AF_LATIN_BLUE_SMALL_TOP )
blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;
- AF_LOG(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
+ FT_TRACE5(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
}
return;
@@ -407,16 +419,16 @@
af_latin2_metrics_check_digits( AF_LatinMetrics metrics,
FT_Face face )
{
- FT_UInt i;
- FT_Bool started = 0, same_width = 1;
+ FT_UInt i;
+ FT_Bool started = 0, same_width = 1;
+ FT_Fixed advance, old_advance = 0;
/* check whether all ASCII digits have the same advance width; */
/* digit `0' is 0x30 in all supported charmaps */
for ( i = 0x30; i <= 0x39; i++ )
{
- FT_UInt glyph_index;
- FT_Fixed advance, old_advance;
+ FT_UInt glyph_index;
glyph_index = FT_Get_Char_Index( face, i );
@@ -451,7 +463,7 @@
FT_LOCAL_DEF( FT_Error )
af_latin2_metrics_init( AF_LatinMetrics metrics,
- FT_Face face )
+ FT_Face face )
{
FT_Error error = AF_Err_Ok;
FT_CharMap oldmap = face->charmap;
@@ -492,8 +504,8 @@
static void
af_latin2_metrics_scale_dim( AF_LatinMetrics metrics,
- AF_Scaler scaler,
- AF_Dimension dim )
+ AF_Scaler scaler,
+ AF_Dimension dim )
{
FT_Fixed scale;
FT_Pos delta;
@@ -545,9 +557,13 @@
FT_Pos fitted = ( scaled + 40 ) & ~63;
#if 1
- if ( scaled != fitted ) {
+ if ( scaled != fitted )
+ {
scale = FT_MulDiv( scale, fitted, scaled );
- AF_LOG(( "== scaled x-top = %.2g fitted = %.2g, scaling = %.4g\n", scaled/64.0, fitted/64.0, (fitted*1.0)/scaled ));
+ FT_TRACE5(( "== scaled x-top = %.2g"
+ " fitted = %.2g, scaling = %.4g\n",
+ scaled / 64.0, fitted / 64.0,
+ ( fitted * 1.0 ) / scaled ));
}
#endif
}
@@ -578,7 +594,7 @@
}
/* an extra-light axis corresponds to a standard width that is */
- /* smaller than 0.75 pixels */
+ /* smaller than 5/8 pixels */
axis->extra_light =
(FT_Bool)( FT_MulFix( axis->standard_width, scale ) < 32 + 8 );
@@ -623,9 +639,11 @@
blue->ref.fit = FT_PIX_ROUND( blue->ref.cur );
blue->shoot.fit = blue->ref.fit + delta2;
- AF_LOG(( ">> activating blue zone %d: ref.cur=%.2g ref.fit=%.2g shoot.cur=%.2g shoot.fit=%.2g\n",
- nn, blue->ref.cur/64.0, blue->ref.fit/64.0,
- blue->shoot.cur/64.0, blue->shoot.fit/64.0 ));
+ FT_TRACE5(( ">> activating blue zone %d:"
+ " ref.cur=%.2g ref.fit=%.2g"
+ " shoot.cur=%.2g shoot.fit=%.2g\n",
+ nn, blue->ref.cur / 64.0, blue->ref.fit / 64.0,
+ blue->shoot.cur / 64.0, blue->shoot.fit / 64.0 ));
blue->flags |= AF_LATIN_BLUE_ACTIVE;
}
@@ -636,7 +654,7 @@
FT_LOCAL_DEF( void )
af_latin2_metrics_scale( AF_LatinMetrics metrics,
- AF_Scaler scaler )
+ AF_Scaler scaler )
{
metrics->root.scaler.render_mode = scaler->render_mode;
metrics->root.scaler.face = scaler->face;
@@ -658,7 +676,7 @@
FT_LOCAL_DEF( FT_Error )
af_latin2_hints_compute_segments( AF_GlyphHints hints,
- AF_Dimension dim )
+ AF_Dimension dim )
{
AF_AxisHints axis = &hints->axis[dim];
FT_Memory memory = hints->memory;
@@ -778,7 +796,6 @@
segment->dir = first->out_dir;
segment->first = first;
segment->last = point;
- segment->contour = contour;
segment->pos = (FT_Short)(( min_u + max_u ) >> 1);
segment->min_coord = (FT_Short) min_v;
segment->max_coord = (FT_Short) max_v;
@@ -916,7 +933,7 @@
FT_LOCAL_DEF( void )
af_latin2_hints_link_segments( AF_GlyphHints hints,
- AF_Dimension dim )
+ AF_Dimension dim )
{
AF_AxisHints axis = &hints->axis[dim];
AF_Segment segments = axis->segments;
@@ -1016,7 +1033,7 @@
FT_LOCAL_DEF( FT_Error )
af_latin2_hints_compute_edges( AF_GlyphHints hints,
- AF_Dimension dim )
+ AF_Dimension dim )
{
AF_AxisHints axis = &hints->axis[dim];
FT_Error error = AF_Err_Ok;
@@ -1136,7 +1153,8 @@
/* insert a new edge in the list and */
/* sort according to the position */
- error = af_axis_hints_new_edge( axis, seg->pos, seg->dir, memory, &edge );
+ error = af_axis_hints_new_edge( axis, seg->pos, seg->dir,
+ memory, &edge );
if ( error )
goto Exit;
@@ -1204,8 +1222,10 @@
{
FT_Int is_round = 0; /* does it contain round segments? */
FT_Int is_straight = 0; /* does it contain straight segments? */
+#if 0
FT_Pos ups = 0; /* number of upwards segments */
FT_Pos downs = 0; /* number of downwards segments */
+#endif
seg = edge->first;
@@ -1221,11 +1241,13 @@
else
is_straight++;
+#if 0
/* check for segment direction */
if ( seg->dir == up_dir )
ups += seg->max_coord-seg->min_coord;
else
downs += seg->max_coord-seg->min_coord;
+#endif
/* check for links -- if seg->serif is set, then seg->link must */
/* be ignored */
@@ -1317,7 +1339,7 @@
FT_LOCAL_DEF( FT_Error )
af_latin2_hints_detect_features( AF_GlyphHints hints,
- AF_Dimension dim )
+ AF_Dimension dim )
{
FT_Error error;
@@ -1335,7 +1357,7 @@
FT_LOCAL_DEF( void )
af_latin2_hints_compute_blue_edges( AF_GlyphHints hints,
- AF_LatinMetrics metrics )
+ AF_LatinMetrics metrics )
{
AF_AxisHints axis = &hints->axis[ AF_DIMENSION_VERT ];
AF_Edge edge = axis->edges;
@@ -1441,7 +1463,7 @@
static FT_Error
af_latin2_hints_init( AF_GlyphHints hints,
- AF_LatinMetrics metrics )
+ AF_LatinMetrics metrics )
{
FT_Render_Mode mode;
FT_UInt32 scaler_flags, other_flags;
@@ -1462,7 +1484,7 @@
/* compute flags depending on render mode, etc. */
mode = metrics->root.scaler.render_mode;
-#if 0 /* #ifdef AF_USE_WARPER */
+#if 0 /* #ifdef AF_CONFIG_OPTION_USE_WARPER */
if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )
{
metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;
@@ -1523,8 +1545,8 @@
static FT_Pos
af_latin2_snap_width( AF_Width widths,
- FT_Int count,
- FT_Pos width )
+ FT_Int count,
+ FT_Pos width )
{
int n;
FT_Pos best = 64 + 32 + 2;
@@ -1570,10 +1592,10 @@
static FT_Pos
af_latin2_compute_stem_width( AF_GlyphHints hints,
- AF_Dimension dim,
- FT_Pos width,
- AF_Edge_Flags base_flags,
- AF_Edge_Flags stem_flags )
+ AF_Dimension dim,
+ FT_Pos width,
+ AF_Edge_Flags base_flags,
+ AF_Edge_Flags stem_flags )
{
AF_LatinMetrics metrics = (AF_LatinMetrics) hints->metrics;
AF_LatinAxis axis = & metrics->axis[dim];
@@ -1738,9 +1760,9 @@
static void
af_latin2_align_linked_edge( AF_GlyphHints hints,
- AF_Dimension dim,
- AF_Edge base_edge,
- AF_Edge stem_edge )
+ AF_Dimension dim,
+ AF_Edge base_edge,
+ AF_Edge stem_edge )
{
FT_Pos dist = stem_edge->opos - base_edge->opos;
@@ -1752,17 +1774,17 @@
stem_edge->pos = base_edge->pos + fitted_width;
- AF_LOG(( "LINK: edge %d (opos=%.2f) linked to (%.2f), "
- "dist was %.2f, now %.2f\n",
- stem_edge-hints->axis[dim].edges, stem_edge->opos / 64.0,
- stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 ));
+ FT_TRACE5(( "LINK: edge %d (opos=%.2f) linked to (%.2f), "
+ "dist was %.2f, now %.2f\n",
+ stem_edge-hints->axis[dim].edges, stem_edge->opos / 64.0,
+ stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 ));
}
static void
af_latin2_align_serif_edge( AF_GlyphHints hints,
- AF_Edge base,
- AF_Edge serif )
+ AF_Edge base,
+ AF_Edge serif )
{
FT_UNUSED( hints );
@@ -1783,7 +1805,7 @@
FT_LOCAL_DEF( void )
af_latin2_hint_edges( AF_GlyphHints hints,
- AF_Dimension dim )
+ AF_Dimension dim )
{
AF_AxisHints axis = &hints->axis[dim];
AF_Edge edges = axis->edges;
@@ -1795,7 +1817,8 @@
- AF_LOG(( "==== hinting %s edges =====\n", dim == AF_DIMENSION_HORZ ? "vertical" : "horizontal" ));
+ FT_TRACE5(( "==== hinting %s edges =====\n",
+ dim == AF_DIMENSION_HORZ ? "vertical" : "horizontal" ));
/* we begin by aligning all stems relative to the blue zone */
/* if needed -- that's only for horizontal edges */
@@ -1829,10 +1852,10 @@
if ( !edge1 )
continue;
- AF_LOG(( "BLUE: edge %d (opos=%.2f) snapped to (%.2f), "
- "was (%.2f)\n",
- edge1-edges, edge1->opos / 64.0, blue->fit / 64.0,
- edge1->pos / 64.0 ));
+ FT_TRACE5(( "BLUE: edge %d (opos=%.2f) snapped to (%.2f), "
+ "was (%.2f)\n",
+ edge1-edges, edge1->opos / 64.0, blue->fit / 64.0,
+ edge1->pos / 64.0 ));
edge1->pos = blue->fit;
edge1->flags |= AF_EDGE_DONE;
@@ -1877,7 +1900,7 @@
/* this should not happen, but it's better to be safe */
if ( edge2->blue_edge )
{
- AF_LOG(( "ASSERTION FAILED for edge %d\n", edge2-edges ));
+ FT_TRACE5(( "ASSERTION FAILED for edge %d\n", edge2-edges ));
af_latin2_align_linked_edge( hints, dim, edge2, edge );
edge->flags |= AF_EDGE_DONE;
@@ -1928,11 +1951,11 @@
else
edge->pos = FT_PIX_ROUND( edge->opos );
- AF_LOG(( "ANCHOR: edge %d (opos=%.2f) and %d (opos=%.2f) "
- "snapped to (%.2f) (%.2f)\n",
- edge-edges, edge->opos / 64.0,
- edge2-edges, edge2->opos / 64.0,
- edge->pos / 64.0, edge2->pos / 64.0 ));
+ FT_TRACE5(( "ANCHOR: edge %d (opos=%.2f) and %d (opos=%.2f)"
+ " snapped to (%.2f) (%.2f)\n",
+ edge-edges, edge->opos / 64.0,
+ edge2-edges, edge2->opos / 64.0,
+ edge->pos / 64.0, edge2->pos / 64.0 ));
anchor = edge;
edge->flags |= AF_EDGE_DONE;
@@ -1944,7 +1967,7 @@
anchor_drift = ( (anchor->pos - anchor->opos) +
(edge2->pos - edge2->opos)) >> 1;
- AF_LOG(( "DRIFT: %.2f\n", anchor_drift/64.0 ));
+ FT_TRACE5(( "DRIFT: %.2f\n", anchor_drift/64.0 ));
}
else
{
@@ -1964,12 +1987,13 @@
org_left = org_pos + ((org_len - cur_len) >> 1);
org_right = org_pos + ((org_len + cur_len) >> 1);
- AF_LOG(( "ALIGN: left=%.2f right=%.2f ", org_left/64.0, org_right/64.0 ));
+ FT_TRACE5(( "ALIGN: left=%.2f right=%.2f ",
+ org_left / 64.0, org_right / 64.0 ));
cur_center = org_center;
if ( edge2->flags & AF_EDGE_DONE )
{
- AF_LOG(( "\n" ));
+ FT_TRACE5(( "\n" ));
edge->pos = edge2->pos - cur_len;
}
else
@@ -1984,14 +2008,14 @@
/* note: don't even try to fit tiny stems */
if ( cur_len < 32 )
{
- AF_LOG(( "tiny stem\n" ));
+ FT_TRACE5(( "tiny stem\n" ));
goto AlignStem;
}
/* if the span is within a single pixel, don't touch it */
if ( FT_PIX_FLOOR(org_left) == FT_PIX_CEIL(org_right) )
{
- AF_LOG(( "single pixel stem\n" ));
+ FT_TRACE5(( "single pixel stem\n" ));
goto AlignStem;
}
@@ -2014,14 +2038,14 @@
delta = FT_ABS(fit - org);
displacements[count] = fit - org;
scores[count++] = delta;
- AF_LOG(( "dispA=%.2f (%d) ", (fit - org)/64.0, delta ));
+ FT_TRACE5(( "dispA=%.2f (%d) ", (fit - org) / 64.0, delta ));
org = frac_right;
fit = (org <= 32) ? 16 : 48;
delta = FT_ABS(fit - org);
displacements[count] = fit - org;
scores[count++] = delta;
- AF_LOG(( "dispB=%.2f (%d) ", (fit - org)/64.0, delta ));
+ FT_TRACE5(( "dispB=%.2f (%d) ", (fit - org) / 64.0, delta ));
}
}
@@ -2031,7 +2055,7 @@
delta = FT_ABS(fit - org);
displacements[count] = fit - org;
scores[count++] = delta;
- AF_LOG(( "dispC=%.2f (%d) ", (fit - org)/64.0, delta ));
+ FT_TRACE5(( "dispC=%.2f (%d) ", (fit - org) / 64.0, delta ));
/* snapping the right edge to the grid */
org = org_right;
@@ -2039,7 +2063,7 @@
delta = FT_ABS(fit - org);
displacements[count] = fit - org;
scores[count++] = delta;
- AF_LOG(( "dispD=%.2f (%d) ", (fit - org)/64.0, delta ));
+ FT_TRACE5(( "dispD=%.2f (%d) ", (fit - org) / 64.0, delta ));
/* now find the best displacement */
{
@@ -2058,27 +2082,28 @@
cur_center = org_center + best_disp;
}
- AF_LOG(( "\n" ));
+ FT_TRACE5(( "\n" ));
}
AlignStem:
edge->pos = cur_center - (cur_len >> 1);
edge2->pos = edge->pos + cur_len;
- AF_LOG(( "STEM1: %d (opos=%.2f) to %d (opos=%.2f) "
- "snapped to (%.2f) and (%.2f), org_len = %.2f cur_len=%.2f\n",
- edge-edges, edge->opos / 64.0,
- edge2-edges, edge2->opos / 64.0,
- edge->pos / 64.0, edge2->pos / 64.0,
- org_len / 64.0, cur_len / 64.0 ));
+ FT_TRACE5(( "STEM1: %d (opos=%.2f) to %d (opos=%.2f)"
+ " snapped to (%.2f) and (%.2f),"
+ " org_len=%.2f cur_len=%.2f\n",
+ edge-edges, edge->opos / 64.0,
+ edge2-edges, edge2->opos / 64.0,
+ edge->pos / 64.0, edge2->pos / 64.0,
+ org_len / 64.0, cur_len / 64.0 ));
edge->flags |= AF_EDGE_DONE;
edge2->flags |= AF_EDGE_DONE;
if ( edge > edges && edge->pos < edge[-1].pos )
{
- AF_LOG(( "BOUND: %d (pos=%.2f) to (%.2f)\n",
- edge-edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));
+ FT_TRACE5(( "BOUND: %d (pos=%.2f) to (%.2f)\n",
+ edge-edges, edge->pos / 64.0, edge[-1].pos / 64.0 ));
edge->pos = edge[-1].pos;
}
}
@@ -2178,16 +2203,17 @@
if ( delta < 64 + 16 )
{
af_latin2_align_serif_edge( hints, edge->serif, edge );
- AF_LOG(( "SERIF: edge %d (opos=%.2f) serif to %d (opos=%.2f) "
- "aligned to (%.2f)\n",
- edge-edges, edge->opos / 64.0,
- edge->serif - edges, edge->serif->opos / 64.0,
- edge->pos / 64.0 ));
+ FT_TRACE5(( "SERIF: edge %d (opos=%.2f) serif to %d (opos=%.2f)"
+ " aligned to (%.2f)\n",
+ edge-edges, edge->opos / 64.0,
+ edge->serif - edges, edge->serif->opos / 64.0,
+ edge->pos / 64.0 ));
}
else if ( !anchor )
{
- AF_LOG(( "SERIF_ANCHOR: edge %d (opos=%.2f) snapped to (%.2f)\n",
- edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
+ FT_TRACE5(( "SERIF_ANCHOR: edge %d (opos=%.2f)"
+ " snapped to (%.2f)\n",
+ edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
edge->pos = FT_PIX_ROUND( edge->opos );
anchor = edge;
}
@@ -2214,15 +2240,19 @@
FT_MulDiv( edge->opos - before->opos,
after->pos - before->pos,
after->opos - before->opos );
- AF_LOG(( "SERIF_LINK1: edge %d (opos=%.2f) snapped to (%.2f) from %d (opos=%.2f)\n",
- edge-edges, edge->opos / 64.0, edge->pos / 64.0, before - edges, before->opos / 64.0 ));
+ FT_TRACE5(( "SERIF_LINK1: edge %d (opos=%.2f) snapped to (%.2f)"
+ " from %d (opos=%.2f)\n",
+ edge-edges, edge->opos / 64.0, edge->pos / 64.0,
+ before - edges, before->opos / 64.0 ));
}
else
{
- edge->pos = anchor->pos + (( edge->opos - anchor->opos + 16) & ~31);
+ edge->pos = anchor->pos +
+ ( ( edge->opos - anchor->opos + 16 ) & ~31 );
- AF_LOG(( "SERIF_LINK2: edge %d (opos=%.2f) snapped to (%.2f)\n",
- edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
+ FT_TRACE5(( "SERIF_LINK2: edge %d (opos=%.2f)"
+ " snapped to (%.2f)\n",
+ edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
}
}
@@ -2242,19 +2272,19 @@
static FT_Error
af_latin2_hints_apply( AF_GlyphHints hints,
- FT_Outline* outline,
- AF_LatinMetrics metrics )
+ FT_Outline* outline,
+ AF_LatinMetrics metrics )
{
FT_Error error;
int dim;
- error = af_glyph_hints_reload( hints, outline, 1 );
+ error = af_glyph_hints_reload( hints, outline );
if ( error )
goto Exit;
/* analyze glyph outline */
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
if ( metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT ||
AF_HINTS_DO_HORIZONTAL( hints ) )
#else
@@ -2278,7 +2308,7 @@
/* grid-fit the outline */
for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
{
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
if ( ( dim == AF_DIMENSION_HORZ &&
metrics->root.scaler.render_mode == FT_RENDER_MODE_LIGHT ) )
{
@@ -2320,7 +2350,7 @@
static const AF_Script_UniRangeRec af_latin2_uniranges[] =
{
- AF_UNIRANGE_REC( 32UL, 127UL ), /* XXX: TODO: Add new Unicode ranges here! */
+ AF_UNIRANGE_REC( 32UL, 127UL ), /* TODO: Add new Unicode ranges here! */
AF_UNIRANGE_REC( 160UL, 255UL ),
AF_UNIRANGE_REC( 0UL, 0UL )
};
diff --git a/3party/freetype/autofit/aflatin2.h b/3party/freetype/src/autofit/aflatin2.h
index 925c6214db..925c6214db 100644
--- a/3party/freetype/autofit/aflatin2.h
+++ b/3party/freetype/src/autofit/aflatin2.h
diff --git a/3party/freetype/autofit/afloader.c b/3party/freetype/src/autofit/afloader.c
index 6dd9f2a314..966a0df73d 100644
--- a/3party/freetype/autofit/afloader.c
+++ b/3party/freetype/src/autofit/afloader.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter glyph loading routines (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003-2009, 2011 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 "aferrors.h"
+ /* Initialize glyph loader. */
+
FT_LOCAL_DEF( FT_Error )
af_loader_init( AF_Loader loader,
FT_Memory memory )
@@ -29,13 +31,15 @@
FT_ZERO( loader );
af_glyph_hints_init( &loader->hints, memory );
-#ifdef AF_DEBUG
+#ifdef FT_DEBUG_AUTOFIT
_af_debug_hints = &loader->hints;
#endif
return FT_GlyphLoader_New( memory, &loader->gloader );
}
+ /* Reset glyph loader and compute globals if necessary. */
+
FT_LOCAL_DEF( FT_Error )
af_loader_reset( AF_Loader loader,
FT_Face face )
@@ -64,6 +68,8 @@
}
+ /* Finalize glyph loader. */
+
FT_LOCAL_DEF( void )
af_loader_done( AF_Loader loader )
{
@@ -72,7 +78,7 @@
loader->face = NULL;
loader->globals = NULL;
-#ifdef AF_DEBUG
+#ifdef FT_DEBUG_AUTOFIT
_af_debug_hints = NULL;
#endif
FT_GlyphLoader_Done( loader->gloader );
@@ -80,6 +86,10 @@
}
+ /* Load a single glyph component. This routine calls itself */
+ /* recursively, if necessary, and does the main work of */
+ /* `af_loader_load_glyph.' */
+
static FT_Error
af_loader_load_g( AF_Loader loader,
AF_Scaler scaler,
@@ -169,8 +179,8 @@
&gloader->current.outline,
metrics );
- /* we now need to hint the metrics according to the change in */
- /* width/positioning that occurred during the hinting process */
+ /* 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 )
{
FT_Pos old_rsb, old_lsb, new_lsb;
@@ -265,7 +275,7 @@
gloader->current.num_subglyphs = num_subglyphs;
num_base_subgs = gloader->base.num_subglyphs;
- /* now, read each subglyph independently */
+ /* now read each subglyph independently */
for ( nn = 0; nn < num_subglyphs; nn++ )
{
FT_Vector pp1, pp2;
@@ -305,7 +315,7 @@
num_points = gloader->base.outline.n_points;
num_new_points = num_points - num_base_points;
- /* now perform the transform required for this subglyph */
+ /* now perform the transformation required for this subglyph */
if ( subglyph->flags & ( FT_SUBGLYPH_FLAG_SCALE |
FT_SUBGLYPH_FLAG_XY_SCALE |
@@ -444,7 +454,7 @@
#endif
slot->metrics.vertAdvance = FT_MulFix( slot->metrics.vertAdvance,
- metrics->scaler.y_scale );
+ metrics->scaler.y_scale );
slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
slot->metrics.vertAdvance = FT_PIX_ROUND( slot->metrics.vertAdvance );
@@ -459,15 +469,13 @@
slot->format = FT_GLYPH_FORMAT_OUTLINE;
}
-#ifdef DEBUG_HINTER
- af_debug_hinter = hinter;
-#endif
-
Exit:
return error;
}
+ /* Load a glyph. */
+
FT_LOCAL_DEF( FT_Error )
af_loader_load_glyph( AF_Loader loader,
FT_Face face,
diff --git a/3party/freetype/autofit/afloader.h b/3party/freetype/src/autofit/afloader.h
index fa67c10ffe..3f91e1a225 100644
--- a/3party/freetype/autofit/afloader.h
+++ b/3party/freetype/src/autofit/afloader.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter glyph loading routines (specification). */
/* */
-/* Copyright 2003, 2004, 2005 by */
+/* Copyright 2003-2005, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,8 +16,8 @@
/***************************************************************************/
-#ifndef __AF_LOADER_H__
-#define __AF_LOADER_H__
+#ifndef __AFLOADER_H__
+#define __AFLOADER_H__
#include "afhints.h"
#include "afglobal.h"
@@ -67,7 +67,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* __AF_LOADER_H__ */
+#endif /* __AFLOADER_H__ */
/* END */
diff --git a/3party/freetype/autofit/afmodule.c b/3party/freetype/src/autofit/afmodule.c
index ec2d707c9f..20b6218382 100644
--- a/3party/freetype/autofit/afmodule.c
+++ b/3party/freetype/src/autofit/afmodule.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter module implementation (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006 by */
+/* Copyright 2003-2006, 2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,8 +20,7 @@
#include "afloader.h"
#include "afpic.h"
-#ifdef AF_DEBUG
- int _af_debug;
+#ifdef FT_DEBUG_AUTOFIT
int _af_debug_disable_horz_hints;
int _af_debug_disable_vert_hints;
int _af_debug_disable_blue_hints;
@@ -67,14 +66,15 @@
}
- FT_DEFINE_AUTOHINTER_SERVICE(af_autofitter_service,
+ FT_DEFINE_AUTOHINTER_SERVICE(
+ af_autofitter_service,
NULL,
NULL,
NULL,
- (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph
- )
+ (FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph )
- FT_DEFINE_MODULE(autofit_module_class,
+ FT_DEFINE_MODULE(
+ autofit_module_class,
FT_MODULE_HINTER,
sizeof ( FT_AutofitterRec ),
@@ -87,8 +87,7 @@
(FT_Module_Constructor)af_autofitter_init,
(FT_Module_Destructor) af_autofitter_done,
- (FT_Module_Requester) NULL
- )
+ (FT_Module_Requester) NULL )
/* END */
diff --git a/3party/freetype/autofit/afmodule.h b/3party/freetype/src/autofit/afmodule.h
index d9792399b6..d9792399b6 100644
--- a/3party/freetype/autofit/afmodule.h
+++ b/3party/freetype/src/autofit/afmodule.h
diff --git a/3party/freetype/autofit/afpic.c b/3party/freetype/src/autofit/afpic.c
index 76822c301a..3aefbc51ce 100644
--- a/3party/freetype/autofit/afpic.c
+++ b/3party/freetype/src/autofit/afpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for autofit module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010, 2011 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,7 +24,8 @@
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from afmodule.c */
- void FT_Init_Class_af_autofitter_service( FT_Library, FT_AutoHinter_ServiceRec*);
+ void FT_Init_Class_af_autofitter_service( FT_Library,
+ FT_AutoHinter_ServiceRec* );
/* forward declaration of PIC init functions from script classes */
#include "aflatin.h"
@@ -34,10 +35,12 @@
#include "afindic.h"
void
- autofit_module_class_pic_free( FT_Library library )
+ autofit_module_class_pic_free( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Memory memory = library->memory;
+
+
if ( pic_container->autofit )
{
FT_FREE( pic_container->autofit );
@@ -45,43 +48,54 @@
}
}
+
FT_Error
- autofit_module_class_pic_init( FT_Library library )
+ autofit_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_UInt ss;
- FT_Error error = FT_Err_Ok;
- AFModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_UInt ss;
+ FT_Error error = AF_Err_Ok;
+ AFModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->autofit = container;
- /* initialize pointer table - this is how the module usually expects this data */
+ /* initialize pointer table - */
+ /* this is how the module usually expects this data */
for ( ss = 0 ; ss < AF_SCRIPT_CLASSES_REC_COUNT ; ss++ )
{
- container->af_script_classes[ss] = &container->af_script_classes_rec[ss];
+ container->af_script_classes[ss] =
+ &container->af_script_classes_rec[ss];
}
- container->af_script_classes[AF_SCRIPT_CLASSES_COUNT-1] = NULL;
+ container->af_script_classes[AF_SCRIPT_CLASSES_COUNT - 1] = NULL;
/* add call to initialization function when you add new scripts */
ss = 0;
- FT_Init_Class_af_dummy_script_class(&container->af_script_classes_rec[ss++]);
+ FT_Init_Class_af_dummy_script_class(
+ &container->af_script_classes_rec[ss++] );
#ifdef FT_OPTION_AUTOFIT2
- FT_Init_Class_af_latin2_script_class(&container->af_script_classes_rec[ss++]);
+ FT_Init_Class_af_latin2_script_class(
+ &container->af_script_classes_rec[ss++] );
#endif
- FT_Init_Class_af_latin_script_class(&container->af_script_classes_rec[ss++]);
- FT_Init_Class_af_cjk_script_class(&container->af_script_classes_rec[ss++]);
- FT_Init_Class_af_indic_script_class(&container->af_script_classes_rec[ss++]);
+ FT_Init_Class_af_latin_script_class(
+ &container->af_script_classes_rec[ss++] );
+ FT_Init_Class_af_cjk_script_class(
+ &container->af_script_classes_rec[ss++] );
+ FT_Init_Class_af_indic_script_class(
+ &container->af_script_classes_rec[ss++] );
+
+ FT_Init_Class_af_autofitter_service(
+ library, &container->af_autofitter_service );
- FT_Init_Class_af_autofitter_service(library, &container->af_autofitter_service);
+/* Exit: */
-/*Exit:*/
- if(error)
- autofit_module_class_pic_free(library);
+ if ( error )
+ autofit_module_class_pic_free( library );
return error;
}
diff --git a/3party/freetype/autofit/afpic.h b/3party/freetype/src/autofit/afpic.h
index 80e62d39a9..c1632e76e9 100644
--- a/3party/freetype/autofit/afpic.h
+++ b/3party/freetype/src/autofit/afpic.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for autofit module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2011 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,24 +33,29 @@ FT_BEGIN_HEADER
#include "aftypes.h"
-/* increase these when you add new scripts, and update autofit_module_class_pic_init */
+ /* increase these when you add new scripts, */
+ /* and update autofit_module_class_pic_init */
#ifdef FT_OPTION_AUTOFIT2
- #define AF_SCRIPT_CLASSES_COUNT 6
+#define AF_SCRIPT_CLASSES_COUNT 6
#else
- #define AF_SCRIPT_CLASSES_COUNT 5
+#define AF_SCRIPT_CLASSES_COUNT 5
#endif
-#define AF_SCRIPT_CLASSES_REC_COUNT (AF_SCRIPT_CLASSES_COUNT-1)
+#define AF_SCRIPT_CLASSES_REC_COUNT ( AF_SCRIPT_CLASSES_COUNT - 1 )
typedef struct AFModulePIC_
{
- AF_ScriptClass af_script_classes[AF_SCRIPT_CLASSES_COUNT];
- AF_ScriptClassRec af_script_classes_rec[AF_SCRIPT_CLASSES_REC_COUNT];
- FT_AutoHinter_ServiceRec af_autofitter_service;
+ AF_ScriptClass af_script_classes[AF_SCRIPT_CLASSES_COUNT];
+ AF_ScriptClassRec af_script_classes_rec[AF_SCRIPT_CLASSES_REC_COUNT];
+ FT_AutoHinter_ServiceRec af_autofitter_service;
+
} AFModulePIC;
-#define GET_PIC(lib) ((AFModulePIC*)((lib)->pic_container.autofit))
-#define AF_SCRIPT_CLASSES_GET (GET_PIC(FT_FACE_LIBRARY(globals->face))->af_script_classes)
-#define AF_AF_AUTOFITTER_SERVICE_GET (GET_PIC(library)->af_autofitter_service)
+#define GET_PIC( lib ) \
+ ( (AFModulePIC*)((lib)->pic_container.autofit) )
+#define AF_SCRIPT_CLASSES_GET \
+ ( GET_PIC( FT_FACE_LIBRARY(globals->face) )->af_script_classes )
+#define AF_AF_AUTOFITTER_SERVICE_GET \
+ ( GET_PIC( library )->af_autofitter_service )
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/3party/freetype/autofit/aftypes.h b/3party/freetype/src/autofit/aftypes.h
index 5574f0c302..44997d1e22 100644
--- a/3party/freetype/autofit/aftypes.h
+++ b/3party/freetype/src/autofit/aftypes.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter types (specification only). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003-2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -53,26 +53,16 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
-#define xxAF_USE_WARPER /* only define to use warp hinting */
-#define xxAF_DEBUG
-
-#ifdef AF_DEBUG
+#ifdef FT_DEBUG_AUTOFIT
#include FT_CONFIG_STANDARD_LIBRARY_H
-#define AF_LOG( x ) do { if ( _af_debug ) printf x; } while ( 0 )
-
-extern int _af_debug;
extern int _af_debug_disable_horz_hints;
extern int _af_debug_disable_vert_hints;
extern int _af_debug_disable_blue_hints;
extern void* _af_debug_hints;
-#else /* !AF_DEBUG */
-
-#define AF_LOG( x ) do { } while ( 0 ) /* nothing */
-
-#endif /* !AF_DEBUG */
+#endif /* FT_DEBUG_AUTOFIT */
/*************************************************************************/
@@ -159,36 +149,11 @@ extern void* _af_debug_hints;
FT_END_STMNT
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** O U T L I N E S *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
/* opaque handle to glyph-specific hints -- see `afhints.h' for more
* details
*/
typedef struct AF_GlyphHintsRec_* AF_GlyphHints;
- /* This structure is used to model an input glyph outline to
- * the auto-hinter. The latter will set the `hints' field
- * depending on the glyph's script.
- */
- typedef struct AF_OutlineRec_
- {
- FT_Face face;
- FT_Outline outline;
- FT_UInt outline_resolution;
-
- FT_Int advance;
- FT_UInt metrics_resolution;
-
- AF_GlyphHints hints;
-
- } AF_OutlineRec;
-
/*************************************************************************/
/*************************************************************************/
@@ -241,7 +206,7 @@ extern void* _af_debug_hints;
/*************************************************************************/
/*
- * The list of know scripts. Each different script corresponds to the
+ * The list of known scripts. Each different script corresponds to the
* following information:
*
* - A set of Unicode ranges to test whether the face supports the
@@ -342,55 +307,57 @@ extern void* _af_debug_hints;
} AF_ScriptClassRec;
-/* Declare and define vtables for classes */
+
+ /* Declare and define vtables for classes */
#ifndef FT_CONFIG_OPTION_PIC
-#define AF_DECLARE_SCRIPT_CLASS(script_class) \
- FT_CALLBACK_TABLE const AF_ScriptClassRec \
+#define AF_DECLARE_SCRIPT_CLASS( script_class ) \
+ FT_CALLBACK_TABLE const AF_ScriptClassRec \
script_class;
-#define AF_DEFINE_SCRIPT_CLASS(script_class, script_, ranges, m_size, \
- m_init, m_scale, m_done, h_init, h_apply) \
- FT_CALLBACK_TABLE_DEF const AF_ScriptClassRec \
- script_class = \
- { \
- script_, \
- ranges, \
- \
- m_size, \
- \
- m_init, \
- m_scale, \
- m_done, \
- \
- h_init, \
- h_apply \
+#define AF_DEFINE_SCRIPT_CLASS( script_class, script_, ranges, m_size, \
+ m_init, m_scale, m_done, h_init, h_apply ) \
+ FT_CALLBACK_TABLE_DEF const AF_ScriptClassRec \
+ script_class = \
+ { \
+ script_, \
+ ranges, \
+ \
+ m_size, \
+ \
+ m_init, \
+ m_scale, \
+ m_done, \
+ \
+ h_init, \
+ h_apply \
};
-#else
-
-#define AF_DECLARE_SCRIPT_CLASS(script_class) \
- FT_LOCAL(void) \
- FT_Init_Class_##script_class(AF_ScriptClassRec* ac);
-
-#define AF_DEFINE_SCRIPT_CLASS(script_class, script_, ranges, m_size, \
- m_init, m_scale, m_done, h_init, h_apply) \
- FT_LOCAL_DEF(void) \
- FT_Init_Class_##script_class(AF_ScriptClassRec* ac) \
- { \
- ac->script = script_; \
- ac->script_uni_ranges = ranges; \
- \
- ac->script_metrics_size = m_size; \
- \
- ac->script_metrics_init = m_init; \
- ac->script_metrics_scale = m_scale; \
- ac->script_metrics_done = m_done; \
- \
- ac->script_hints_init = h_init; \
- ac->script_hints_apply = h_apply; \
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define AF_DECLARE_SCRIPT_CLASS( script_class ) \
+ FT_LOCAL( void ) \
+ FT_Init_Class_##script_class( AF_ScriptClassRec* ac );
+
+#define AF_DEFINE_SCRIPT_CLASS( script_class, script_, ranges, m_size, \
+ m_init, m_scale, m_done, h_init, h_apply ) \
+ FT_LOCAL_DEF( void ) \
+ FT_Init_Class_##script_class( AF_ScriptClassRec* ac ) \
+ { \
+ ac->script = script_; \
+ ac->script_uni_ranges = ranges; \
+ \
+ ac->script_metrics_size = m_size; \
+ \
+ ac->script_metrics_init = m_init; \
+ ac->script_metrics_scale = m_scale; \
+ ac->script_metrics_done = m_done; \
+ \
+ ac->script_hints_init = h_init; \
+ ac->script_hints_apply = h_apply; \
}
-#endif
+
+#endif /* FT_CONFIG_OPTION_PIC */
/* */
diff --git a/3party/freetype/autofit/afwarp.c b/3party/freetype/src/autofit/afwarp.c
index f5bb9b18ad..d0d4850bdc 100644
--- a/3party/freetype/autofit/afwarp.c
+++ b/3party/freetype/src/autofit/afwarp.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter warping algorithm (body). */
/* */
-/* Copyright 2006, 2007 by */
+/* Copyright 2006, 2007, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,10 +16,30 @@
/***************************************************************************/
+ /*
+ * The idea of the warping code is to slightly scale and shift a glyph
+ * within a single dimension so that as much of its segments are aligned
+ * (more or less) on the grid. To find out the optimal scaling and
+ * shifting value, various parameter combinations are tried and scored.
+ */
+
#include "afwarp.h"
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_afwarp
+
+ /* The weights cover the range 0/64 - 63/64 of a pixel. Obviously, */
+ /* values around a half pixel (which means exactly between two grid */
+ /* lines) gets the worst weight. */
#if 1
static const AF_WarpScore
af_warper_weights[64] =
@@ -43,6 +63,11 @@
#endif
+ /* Score segments for a given `scale' and `delta' in the range */
+ /* `xx1' to `xx2', and store the best result in `warper'. If */
+ /* the new best score is equal to the old one, prefer the */
+ /* value with a smaller distortion (around `base_distort'). */
+
static void
af_warper_compute_line_best( AF_Warper warper,
FT_Fixed scale,
@@ -82,12 +107,12 @@
if ( idx_min < 0 || idx_min > idx_max || idx_max > 64 )
{
- AF_LOG(( "invalid indices:\n"
- " min=%d max=%d, xx1=%ld xx2=%ld,\n"
- " x1min=%ld x1max=%ld, x2min=%ld x2max=%ld\n",
- idx_min, idx_max, xx1, xx2,
- warper->x1min, warper->x1max,
- warper->x2min, warper->x2max ));
+ FT_TRACE5(( "invalid indices:\n"
+ " min=%d max=%d, xx1=%ld xx2=%ld,\n"
+ " x1min=%ld x1max=%ld, x2min=%ld x2max=%ld\n",
+ idx_min, idx_max, xx1, xx2,
+ warper->x1min, warper->x1max,
+ warper->x2min, warper->x2max ));
return;
}
}
@@ -100,6 +125,7 @@
FT_Int idx;
+ /* score the length of the segments for the given range */
for ( idx = idx_min; idx <= idx_max; idx++, y++ )
scores[idx] += af_warper_weights[y & 63] * len;
}
@@ -115,9 +141,9 @@
AF_WarpScore distort = base_distort + ( idx - idx0 );
- if ( score > warper->best_score ||
+ if ( score > warper->best_score ||
( score == warper->best_score &&
- distort < warper->best_distort ) )
+ distort < warper->best_distort ) )
{
warper->best_score = score;
warper->best_distort = distort;
@@ -129,6 +155,9 @@
}
+ /* Compute optimal scaling and delta values for a given glyph and */
+ /* dimension. */
+
FT_LOCAL_DEF( void )
af_warper_compute( AF_Warper warper,
AF_GlyphHints hints,
@@ -215,6 +244,7 @@
warper->t1 = AF_WARPER_FLOOR( warper->x1 );
warper->t2 = AF_WARPER_CEIL( warper->x2 );
+ /* examine a half pixel wide range around the maximum coordinates */
warper->x1min = warper->x1 & ~31;
warper->x1max = warper->x1min + 32;
warper->x2min = warper->x2 & ~31;
@@ -234,10 +264,12 @@
warper->x2min = warper->x2;
}
+ /* examine (at most) a pixel wide range around the natural width */
warper->wmin = warper->x2min - warper->x1max;
warper->wmax = warper->x2max - warper->x1min;
#if 1
+ /* some heuristics to reduce the number of widths to be examined */
{
int margin = 16;
@@ -273,6 +305,8 @@
FT_Pos xx1, xx2;
+ /* compute min and max positions for given width, */
+ /* assuring that they stay within the coordinate ranges */
xx1 = warper->x1;
xx2 = warper->x2;
if ( w >= warper->w0 )
@@ -304,6 +338,7 @@
else
base_distort += xx2 - warper->x2;
+ /* give base distortion a greater weight while scoring */
base_distort *= 10;
new_scale = org_scale + FT_DivFix( w - warper->w0, X2 - X1 );
@@ -329,10 +364,11 @@
}
}
-#else /* !AF_USE_WARPER */
+#else /* !AF_CONFIG_OPTION_USE_WARPER */
-char af_warper_dummy = 0; /* make compiler happy */
+ /* ANSI C doesn't like empty source files */
+ typedef int _af_warp_dummy;
-#endif /* !AF_USE_WARPER */
+#endif /* !AF_CONFIG_OPTION_USE_WARPER */
/* END */
diff --git a/3party/freetype/autofit/afwarp.h b/3party/freetype/src/autofit/afwarp.h
index 7343fdd5ef..7343fdd5ef 100644
--- a/3party/freetype/autofit/afwarp.h
+++ b/3party/freetype/src/autofit/afwarp.h
diff --git a/3party/freetype/autofit/autofit.c b/3party/freetype/src/autofit/autofit.c
index 83b613e79b..3883a0a706 100644
--- a/3party/freetype/autofit/autofit.c
+++ b/3party/freetype/src/autofit/autofit.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter module (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2003-2007, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,7 +34,7 @@
#include "afloader.c"
#include "afmodule.c"
-#ifdef AF_USE_WARPER
+#ifdef AF_CONFIG_OPTION_USE_WARPER
#include "afwarp.c"
#endif
diff --git a/3party/freetype/src/autofit/module.mk b/3party/freetype/src/autofit/module.mk
new file mode 100644
index 0000000000..6ec60912ab
--- /dev/null
+++ b/3party/freetype/src/autofit/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 auto-fitter module definition
+#
+
+
+# Copyright 2003, 2004, 2005, 2006 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.
+
+
+FTMODULE_H_COMMANDS += AUTOFIT_MODULE
+
+define AUTOFIT_MODULE
+$(OPEN_DRIVER) FT_Module_Class, autofit_module_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)autofit $(ECHO_DRIVER_DESC)automatic hinting module$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/autofit/rules.mk b/3party/freetype/src/autofit/rules.mk
new file mode 100644
index 0000000000..b76bb79ab4
--- /dev/null
+++ b/3party/freetype/src/autofit/rules.mk
@@ -0,0 +1,79 @@
+#
+# FreeType 2 auto-fitter module configuration rules
+#
+
+
+# Copyright 2003, 2004, 2005, 2006, 2007, 2011 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.
+
+
+# AUTOF driver directory
+#
+AUTOF_DIR := $(SRC_DIR)/autofit
+
+
+# compilation flags for the driver
+#
+AUTOF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(AUTOF_DIR))
+
+
+# AUTOF driver sources (i.e., C files)
+#
+AUTOF_DRV_SRC := $(AUTOF_DIR)/afangles.c \
+ $(AUTOF_DIR)/afcjk.c \
+ $(AUTOF_DIR)/afdummy.c \
+ $(AUTOF_DIR)/afglobal.c \
+ $(AUTOF_DIR)/afhints.c \
+ $(AUTOF_DIR)/afindic.c \
+ $(AUTOF_DIR)/aflatin.c \
+ $(AUTOF_DIR)/afloader.c \
+ $(AUTOF_DIR)/afmodule.c \
+ $(AUTOF_DIR)/afpic.c \
+ $(AUTOF_DIR)/afwarp.c
+
+# AUTOF driver headers
+#
+AUTOF_DRV_H := $(AUTOF_DRV_SRC:%c=%h) \
+ $(AUTOF_DIR)/aferrors.h \
+ $(AUTOF_DIR)/aftypes.h
+
+
+# AUTOF driver object(s)
+#
+# AUTOF_DRV_OBJ_M is used during `multi' builds.
+# AUTOF_DRV_OBJ_S is used during `single' builds.
+#
+AUTOF_DRV_OBJ_M := $(AUTOF_DRV_SRC:$(AUTOF_DIR)/%.c=$(OBJ_DIR)/%.$O)
+AUTOF_DRV_OBJ_S := $(OBJ_DIR)/autofit.$O
+
+# AUTOF driver source file for single build
+#
+AUTOF_DRV_SRC_S := $(AUTOF_DIR)/autofit.c
+
+
+# AUTOF driver - single object
+#
+$(AUTOF_DRV_OBJ_S): $(AUTOF_DRV_SRC_S) $(AUTOF_DRV_SRC) \
+ $(FREETYPE_H) $(AUTOF_DRV_H)
+ $(AUTOF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(AUTOF_DRV_SRC_S))
+
+
+# AUTOF driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(AUTOF_DIR)/%.c $(FREETYPE_H) $(AUTOF_DRV_H)
+ $(AUTOF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(AUTOF_DRV_OBJ_S)
+DRV_OBJS_M += $(AUTOF_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/base/Jamfile b/3party/freetype/src/base/Jamfile
index 832e8b8424..832e8b8424 100644
--- a/3party/freetype/base/Jamfile
+++ b/3party/freetype/src/base/Jamfile
diff --git a/3party/freetype/base/basepic.c b/3party/freetype/src/base/basepic.c
index c0bccb6959..c0bccb6959 100644
--- a/3party/freetype/base/basepic.c
+++ b/3party/freetype/src/base/basepic.c
diff --git a/3party/freetype/base/basepic.h b/3party/freetype/src/base/basepic.h
index bb17745769..bb17745769 100644
--- a/3party/freetype/base/basepic.h
+++ b/3party/freetype/src/base/basepic.h
diff --git a/3party/freetype/base/ftadvanc.c b/3party/freetype/src/base/ftadvanc.c
index 8ab7fcb927..8ab7fcb927 100644
--- a/3party/freetype/base/ftadvanc.c
+++ b/3party/freetype/src/base/ftadvanc.c
diff --git a/3party/freetype/base/ftapi.c b/3party/freetype/src/base/ftapi.c
index 8914d1f4e9..8914d1f4e9 100644
--- a/3party/freetype/base/ftapi.c
+++ b/3party/freetype/src/base/ftapi.c
diff --git a/3party/freetype/base/ftbase.c b/3party/freetype/src/base/ftbase.c
index 6a27ea95a6..6a27ea95a6 100644
--- a/3party/freetype/base/ftbase.c
+++ b/3party/freetype/src/base/ftbase.c
diff --git a/3party/freetype/base/ftbase.h b/3party/freetype/src/base/ftbase.h
index 9cae85da9e..6375613b2d 100644
--- a/3party/freetype/base/ftbase.h
+++ b/3party/freetype/src/base/ftbase.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType private functions used in base module (specification). */
/* */
-/* Copyright 2008 by */
+/* Copyright 2008, 2010 by */
/* David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,7 +29,7 @@ FT_BEGIN_HEADER
/* Assume the stream is sfnt-wrapped PS Type1 or sfnt-wrapped CID-keyed */
/* font, and try to load a face specified by the face_index. */
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL( FT_Error )
open_face_PS_from_sfnt_stream( FT_Library library,
FT_Stream stream,
FT_Long face_index,
@@ -40,7 +40,7 @@ FT_BEGIN_HEADER
/* Create a new FT_Face given a buffer and a driver name. */
/* From ftmac.c. */
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL( FT_Error )
open_face_from_buffer( FT_Library library,
FT_Byte* base,
FT_ULong size,
@@ -49,6 +49,17 @@ FT_BEGIN_HEADER
FT_Face *aface );
+#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
+ /* Mac OS X/Darwin kernel often changes recommended method to access */
+ /* the resource fork and older methods makes the kernel issue the */
+ /* warning of deprecated method. To calm it down, the methods based */
+ /* on Darwin VFS should be grouped and skip the rest methods after */
+ /* the case the resource is opened but found to lack a font in it. */
+ FT_LOCAL( FT_Bool )
+ raccess_rule_by_darwin_vfs( FT_UInt rule_index );
+#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
+
+
FT_END_HEADER
#endif /* __FTBASE_H__ */
diff --git a/3party/freetype/base/ftbbox.c b/3party/freetype/src/base/ftbbox.c
index 8136ccc1e9..4b8e9112fe 100644
--- a/3party/freetype/base/ftbbox.c
+++ b/3party/freetype/src/base/ftbbox.c
@@ -4,7 +4,7 @@
/* */
/* FreeType bbox computation (body). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2006 by */
+/* Copyright 1996-2001, 2002, 2004, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -140,7 +140,7 @@
/* */
/* <Description> */
/* This function is used as a `conic_to' emitter during */
- /* FT_Raster_Decompose(). It checks a conic Bezier curve with the */
+ /* FT_Outline_Decompose(). It checks a conic Bezier curve with the */
/* current bounding box, and computes its extrema if necessary to */
/* update it. */
/* */
@@ -507,7 +507,7 @@
/* */
/* <Description> */
/* This function is used as a `cubic_to' emitter during */
- /* FT_Raster_Decompose(). It checks a cubic Bezier curve with the */
+ /* FT_Outline_Decompose(). It checks a cubic Bezier curve with the */
/* current bounding box, and computes its extrema if necessary to */
/* update it. */
/* */
diff --git a/3party/freetype/base/ftbdf.c b/3party/freetype/src/base/ftbdf.c
index d29adf09dd..d29adf09dd 100644
--- a/3party/freetype/base/ftbdf.c
+++ b/3party/freetype/src/base/ftbdf.c
diff --git a/3party/freetype/base/ftbitmap.c b/3party/freetype/src/base/ftbitmap.c
index 46fcce6136..22ec337526 100644
--- a/3party/freetype/base/ftbitmap.c
+++ b/3party/freetype/src/base/ftbitmap.c
@@ -105,7 +105,7 @@
int new_pitch;
FT_UInt bpp;
FT_Int i, width, height;
- unsigned char* buffer;
+ unsigned char* buffer = NULL;
width = bitmap->width;
diff --git a/3party/freetype/base/ftcalc.c b/3party/freetype/src/base/ftcalc.c
index 3892fabfe9..3892fabfe9 100644
--- a/3party/freetype/base/ftcalc.c
+++ b/3party/freetype/src/base/ftcalc.c
diff --git a/3party/freetype/base/ftcid.c b/3party/freetype/src/base/ftcid.c
index 733aae1475..733aae1475 100644
--- a/3party/freetype/base/ftcid.c
+++ b/3party/freetype/src/base/ftcid.c
diff --git a/3party/freetype/base/ftdbgmem.c b/3party/freetype/src/base/ftdbgmem.c
index 677f242080..12fed04bb9 100644
--- a/3party/freetype/base/ftdbgmem.c
+++ b/3party/freetype/src/base/ftdbgmem.c
@@ -47,7 +47,7 @@
typedef struct FT_MemTableRec_* FT_MemTable;
-#define FT_MEM_VAL( addr ) ((FT_ULong)(FT_Pointer)( addr ))
+#define FT_MEM_VAL( addr ) ((FT_PtrDist)(FT_Pointer)( addr ))
/*
* This structure holds statistics for a single allocation/release
@@ -275,7 +275,7 @@
for ( i = 0; i < table->size; i++ )
{
FT_MemNode node, next, *pnode;
- FT_ULong hash;
+ FT_PtrDist hash;
node = table->buckets[i];
@@ -430,7 +430,7 @@
ft_mem_table_get_nodep( FT_MemTable table,
FT_Byte* address )
{
- FT_ULong hash;
+ FT_PtrDist hash;
FT_MemNode *pnode, node;
@@ -989,7 +989,7 @@
#else /* !FT_DEBUG_MEMORY */
/* ANSI C doesn't like empty source files */
- static const FT_Byte _debug_mem_dummy = 0;
+ typedef int _debug_mem_dummy;
#endif /* !FT_DEBUG_MEMORY */
diff --git a/3party/freetype/base/ftdebug.c b/3party/freetype/src/base/ftdebug.c
index 2adbeabeb2..2adbeabeb2 100644
--- a/3party/freetype/base/ftdebug.c
+++ b/3party/freetype/src/base/ftdebug.c
diff --git a/3party/freetype/base/ftfstype.c b/3party/freetype/src/base/ftfstype.c
index d0ef7b7c1b..d0ef7b7c1b 100644
--- a/3party/freetype/base/ftfstype.c
+++ b/3party/freetype/src/base/ftfstype.c
diff --git a/3party/freetype/base/ftgasp.c b/3party/freetype/src/base/ftgasp.c
index 8485d29259..8485d29259 100644
--- a/3party/freetype/base/ftgasp.c
+++ b/3party/freetype/src/base/ftgasp.c
diff --git a/3party/freetype/base/ftgloadr.c b/3party/freetype/src/base/ftgloadr.c
index ac0010ddd8..8483450192 100644
--- a/3party/freetype/base/ftgloadr.c
+++ b/3party/freetype/src/base/ftgloadr.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -69,7 +69,7 @@
FT_GlyphLoader_New( FT_Memory memory,
FT_GlyphLoader *aloader )
{
- FT_GlyphLoader loader;
+ FT_GlyphLoader loader = NULL;
FT_Error error;
diff --git a/3party/freetype/base/ftglyph.c b/3party/freetype/src/base/ftglyph.c
index ef61d45df2..b22050800b 100644
--- a/3party/freetype/base/ftglyph.c
+++ b/3party/freetype/src/base/ftglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -282,7 +282,7 @@
{
FT_Memory memory = library->memory;
FT_Error error;
- FT_Glyph glyph;
+ FT_Glyph glyph = NULL;
*aglyph = 0;
@@ -372,7 +372,7 @@
if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
clazz = FT_BITMAP_GLYPH_CLASS_GET;
- /* it it is an outline too */
+ /* if it is an outline */
else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
clazz = FT_OUTLINE_GLYPH_CLASS_GET;
@@ -515,6 +515,10 @@
const FT_Glyph_Class* clazz;
+#ifdef FT_CONFIG_OPTION_PIC
+ FT_Library library = FT_GLYPH( glyph )->library;
+#endif
+
/* check argument */
if ( !the_glyph )
diff --git a/3party/freetype/base/ftgxval.c b/3party/freetype/src/base/ftgxval.c
index 32662bed87..aeeb8ce4fc 100644
--- a/3party/freetype/base/ftgxval.c
+++ b/3party/freetype/src/base/ftgxval.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating TrueTyepGX/AAT tables (body). */
/* */
-/* Copyright 2004, 2005, 2006 by */
+/* Copyright 2004, 2005, 2006, 2010 by */
/* Masatake YAMATO, Redhat K.K, */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -73,9 +73,14 @@
FT_TrueTypeGX_Free( FT_Face face,
FT_Bytes table )
{
- FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_Memory memory;
+ if ( !face )
+ return;
+
+ memory = FT_FACE_MEMORY( face );
+
FT_FREE( table );
}
@@ -119,7 +124,13 @@
FT_ClassicKern_Free( FT_Face face,
FT_Bytes table )
{
- FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_Memory memory;
+
+
+ if ( !face )
+ return;
+
+ memory = FT_FACE_MEMORY( face );
FT_FREE( table );
diff --git a/3party/freetype/base/ftinit.c b/3party/freetype/src/base/ftinit.c
index ef13503869..305177a7e1 100644
--- a/3party/freetype/base/ftinit.c
+++ b/3party/freetype/src/base/ftinit.c
@@ -98,7 +98,8 @@
#undef FT_USE_MODULE
#define FT_USE_MODULE( type, x ) MODULE_CLASS_##x,
- enum {
+ enum
+ {
#include FT_CONFIG_MODULES_H
FT_NUM_MODULE_CLASSES
};
@@ -115,7 +116,7 @@
FT_Module_Class** classes;
FT_Memory memory;
FT_UInt i;
- BasePIC* pic_container = library->pic_container.base;
+ BasePIC* pic_container = (BasePIC*)library->pic_container.base;
if ( !pic_container->default_module_classes )
return;
@@ -145,7 +146,7 @@
FT_Module_Class** classes;
FT_Module_Class* clazz;
FT_UInt i;
- BasePIC* pic_container = library->pic_container.base;
+ BasePIC* pic_container = (BasePIC*)library->pic_container.base;
memory = library->memory;
pic_container->default_module_classes = 0;
diff --git a/3party/freetype/base/ftlcdfil.c b/3party/freetype/src/base/ftlcdfil.c
index 80640111c4..0da4ba160e 100644
--- a/3party/freetype/base/ftlcdfil.c
+++ b/3party/freetype/src/base/ftlcdfil.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for color filtering of subpixel bitmap glyphs (body). */
/* */
-/* Copyright 2006, 2008, 2009 by */
+/* Copyright 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -267,18 +267,31 @@
FT_EXPORT_DEF( FT_Error )
- FT_Library_SetLcdFilter( FT_Library library,
- FT_LcdFilter filter )
+ FT_Library_SetLcdFilterWeights( FT_Library library,
+ unsigned char *weights )
+ {
+ if ( !library || !weights )
+ return FT_Err_Invalid_Argument;
+
+ ft_memcpy( library->lcd_weights, weights, 5 );
+
+ return FT_Err_Ok;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Library_SetLcdFilter( FT_Library library,
+ FT_LcdFilter filter )
{
static const FT_Byte light_filter[5] =
- { 0, 85, 86, 85, 0 };
+ { 0x00, 0x55, 0x56, 0x55, 0x00 };
/* the values here sum up to a value larger than 256, */
/* providing a cheap gamma correction */
static const FT_Byte default_filter[5] =
{ 0x10, 0x40, 0x70, 0x40, 0x10 };
- if ( library == NULL )
+ if ( !library )
return FT_Err_Invalid_Argument;
switch ( filter )
@@ -330,12 +343,24 @@
}
library->lcd_filter = filter;
- return 0;
+
+ return FT_Err_Ok;
}
#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
FT_EXPORT_DEF( FT_Error )
+ FT_Library_SetLcdFilterWeights( FT_Library library,
+ unsigned char *weights )
+ {
+ FT_UNUSED( library );
+ FT_UNUSED( weights );
+
+ return FT_Err_Unimplemented_Feature;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter )
{
diff --git a/3party/freetype/base/ftmac.c b/3party/freetype/src/base/ftmac.c
index 63f927d57d..63f927d57d 100644
--- a/3party/freetype/base/ftmac.c
+++ b/3party/freetype/src/base/ftmac.c
diff --git a/3party/freetype/base/ftmm.c b/3party/freetype/src/base/ftmm.c
index 0307729811..0307729811 100644
--- a/3party/freetype/base/ftmm.c
+++ b/3party/freetype/src/base/ftmm.c
diff --git a/3party/freetype/base/ftobjs.c b/3party/freetype/src/base/ftobjs.c
index 421540c8dc..c627c0b5b6 100644
--- a/3party/freetype/base/ftobjs.c
+++ b/3party/freetype/src/base/ftobjs.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -28,7 +28,6 @@
#include FT_TRUETYPE_TABLES_H
#include FT_TRUETYPE_TAGS_H
#include FT_TRUETYPE_IDS_H
-#include FT_OUTLINE_H
#include FT_SERVICE_SFNT_H
#include FT_SERVICE_POSTSCRIPT_NAME_H
@@ -37,7 +36,9 @@
#include FT_SERVICE_KERNING_H
#include FT_SERVICE_TRUETYPE_ENGINE_H
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
#include "ftbase.h"
+#endif
#define GRID_FIT_METRICS
@@ -129,7 +130,7 @@
{
FT_Error error;
FT_Memory memory;
- FT_Stream stream;
+ FT_Stream stream = NULL;
*astream = 0;
@@ -140,7 +141,7 @@
if ( !args )
return FT_Err_Invalid_Argument;
- memory = library->memory;
+ memory = library->memory;
if ( FT_NEW( stream ) )
goto Exit;
@@ -227,11 +228,11 @@
static FT_Error
ft_glyphslot_init( FT_GlyphSlot slot )
{
- FT_Driver driver = slot->face->driver;
- FT_Driver_Class clazz = driver->clazz;
- FT_Memory memory = driver->root.memory;
- FT_Error error = FT_Err_Ok;
- FT_Slot_Internal internal;
+ FT_Driver driver = slot->face->driver;
+ FT_Driver_Class clazz = driver->clazz;
+ FT_Memory memory = driver->root.memory;
+ FT_Error error = FT_Err_Ok;
+ FT_Slot_Internal internal = NULL;
slot->library = driver->root.library;
@@ -373,7 +374,7 @@
FT_Driver driver;
FT_Driver_Class clazz;
FT_Memory memory;
- FT_GlyphSlot slot;
+ FT_GlyphSlot slot = NULL;
if ( !face || !face->driver )
@@ -559,6 +560,7 @@
FT_Library library;
FT_Bool autohint = FALSE;
FT_Module hinter;
+ TT_Face ttface = (TT_Face)face;
if ( !face || !face->size || !face->glyph )
@@ -599,7 +601,8 @@
* - Then, auto-hint if FT_LOAD_FORCE_AUTOHINT is set or if we don't
* have a native font hinter.
*
- * - Otherwise, auto-hint for LIGHT hinting mode.
+ * - Otherwise, auto-hint for LIGHT hinting mode or if there isn't
+ * any hinting bytecode in the TrueType/OpenType font.
*
* - Exception: The font is `tricky' and requires the native hinter to
* load properly.
@@ -624,8 +627,13 @@
FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags );
- if ( mode == FT_RENDER_MODE_LIGHT ||
- face->internal->ignore_unpatented_hinter )
+ /* the check for `num_locations' assures that we actually */
+ /* test for instructions in a TTF and not in a CFF-based OTF */
+ if ( mode == FT_RENDER_MODE_LIGHT ||
+ face->internal->ignore_unpatented_hinter ||
+ ( FT_IS_SFNT( face ) &&
+ ttface->num_locations &&
+ ttface->max_profile.maxSizeOfInstructions == 0 ) )
autohint = TRUE;
}
}
@@ -708,8 +716,8 @@
}
/* compute the linear advance in 16.16 pixels */
- if ( ( load_flags & FT_LOAD_LINEAR_DESIGN ) == 0 &&
- ( FT_IS_SCALABLE( face ) ) )
+ if ( ( load_flags & FT_LOAD_LINEAR_DESIGN ) == 0 &&
+ ( FT_IS_SCALABLE( face ) ) )
{
FT_Size_Metrics* metrics = &face->size->metrics;
@@ -739,11 +747,30 @@
renderer, slot,
&internal->transform_matrix,
&internal->transform_delta );
+ else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
+ {
+ /* apply `standard' transformation if no renderer is available */
+ if ( &internal->transform_matrix )
+ FT_Outline_Transform( &slot->outline,
+ &internal->transform_matrix );
+
+ if ( &internal->transform_delta )
+ FT_Outline_Translate( &slot->outline,
+ internal->transform_delta.x,
+ internal->transform_delta.y );
+ }
+
/* transform advance */
FT_Vector_Transform( &slot->advance, &internal->transform_matrix );
}
}
+ FT_TRACE5(( " x advance: %d\n" , slot->advance.x ));
+ FT_TRACE5(( " y advance: %d\n" , slot->advance.y ));
+
+ FT_TRACE5(( " linear x advance: %d\n" , slot->linearHoriAdvance ));
+ FT_TRACE5(( " linear y advance: %d\n" , slot->linearVertAdvance ));
+
/* do we need to render the image now? */
if ( !error &&
slot->format != FT_GLYPH_FORMAT_BITMAP &&
@@ -970,6 +997,14 @@
( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&
cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) )
{
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - first > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "find_unicode_charmap: UCS-4 cmap is found "
+ "at too late position (%d)\n", cur - first ));
+ continue;
+ }
+#endif
face->charmap = cur[0];
return FT_Err_Ok;
}
@@ -984,6 +1019,14 @@
{
if ( cur[0]->encoding == FT_ENCODING_UNICODE )
{
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - first > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "find_unicode_charmap: UCS-2 cmap is found "
+ "at too late position (%d)\n", cur - first ));
+ continue;
+ }
+#endif
face->charmap = cur[0];
return FT_Err_Ok;
}
@@ -1025,7 +1068,17 @@
if ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&
cur[0]->encoding_id == TT_APPLE_ID_VARIANT_SELECTOR &&
FT_Get_CMap_Format( cur[0] ) == 14 )
+ {
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - first > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "find_unicode_charmap: UVS cmap is found "
+ "at too late position (%d)\n", cur - first ));
+ continue;
+ }
+#endif
return cur[0];
+ }
}
return NULL;
@@ -1236,7 +1289,7 @@
{
FT_Error error;
FT_Memory memory;
- FT_Stream stream;
+ FT_Stream stream = NULL;
if ( !library )
@@ -1411,7 +1464,7 @@
FT_ULong offset, length;
FT_Long pos;
FT_Bool is_sfnt_cid;
- FT_Byte* sfnt_ps;
+ FT_Byte* sfnt_ps = NULL;
FT_UNUSED( num_params );
FT_UNUSED( params );
@@ -1478,7 +1531,7 @@
{
FT_Error error = FT_Err_Cannot_Open_Resource;
FT_Memory memory = library->memory;
- FT_Byte* pfb_data;
+ FT_Byte* pfb_data = NULL;
int i, type, flags;
FT_Long len;
FT_Long pfb_len, pfb_pos, pfb_lenpos;
@@ -1526,11 +1579,26 @@
goto Exit;
if ( FT_READ_USHORT( flags ) )
goto Exit;
- rlen -= 2; /* the flags are part of the resource */
+ FT_TRACE3(( "POST fragment[%d]: offsets=0x%08x, rlen=0x%08x, flags=0x%04x\n",
+ i, offsets[i], rlen, flags ));
+
+ /* postpone the check of rlen longer than buffer until FT_Stream_Read() */
+ if ( ( flags >> 8 ) == 0 ) /* Comment, should not be loaded */
+ continue;
+
+ /* 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
+ rlen = 0;
+
if ( ( flags >> 8 ) == type )
len += rlen;
else
{
+ 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 );
@@ -1539,6 +1607,8 @@
if ( ( flags >> 8 ) == 5 ) /* End of font mark */
break;
+ if ( pfb_pos + 6 > pfb_len + 2 )
+ goto Exit2;
pfb_data[pfb_pos++] = 0x80;
type = flags >> 8;
@@ -1552,13 +1622,23 @@
pfb_data[pfb_pos++] = 0;
}
+ error = FT_Err_Cannot_Open_Resource;
+ if ( pfb_pos > pfb_len || pfb_pos + rlen > pfb_len )
+ goto Exit2;
+
error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen );
+ if ( error )
+ goto Exit2;
pfb_pos += rlen;
}
+ if ( pfb_pos + 2 > pfb_len + 2 )
+ goto Exit2;
pfb_data[pfb_pos++] = 0x80;
pfb_data[pfb_pos++] = 3;
+ 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 );
@@ -1593,7 +1673,7 @@
FT_Face *aface )
{
FT_Memory memory = library->memory;
- FT_Byte* sfnt_data;
+ FT_Byte* sfnt_data = NULL;
FT_Error error;
FT_Long flag_offset;
FT_Long rlen;
@@ -1777,6 +1857,7 @@
char * file_names[FT_RACCESS_N_RULES];
FT_Long offsets[FT_RACCESS_N_RULES];
FT_Error errors[FT_RACCESS_N_RULES];
+ FT_Bool is_darwin_vfs, vfs_rfork_has_no_font = FALSE; /* not tested */
FT_Open_Args args2;
FT_Stream stream2 = 0;
@@ -1787,6 +1868,15 @@
for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
{
+ is_darwin_vfs = raccess_rule_by_darwin_vfs( i );
+ if ( is_darwin_vfs && vfs_rfork_has_no_font )
+ {
+ FT_TRACE3(( "Skip rule %d: darwin vfs resource fork"
+ " is already checked and"
+ " no font is found\n", i ));
+ continue;
+ }
+
if ( errors[i] )
{
FT_TRACE3(( "Error[%d] has occurred in rule %d\n", errors[i], i ));
@@ -1800,6 +1890,9 @@
i, args2.pathname, offsets[i] ));
error = FT_Stream_New( library, &args2, &stream2 );
+ if ( is_darwin_vfs && error == FT_Err_Cannot_Open_Stream )
+ vfs_rfork_has_no_font = TRUE;
+
if ( error )
{
FT_TRACE3(( "failed\n" ));
@@ -1814,6 +1907,8 @@
if ( !error )
break;
+ else if ( is_darwin_vfs )
+ vfs_rfork_has_no_font = TRUE;
}
for (i = 0; i < FT_RACCESS_N_RULES; i++)
@@ -1893,9 +1988,9 @@
FT_Error error;
FT_Driver driver;
FT_Memory memory;
- FT_Stream stream = 0;
- FT_Face face = 0;
- FT_ListNode node = 0;
+ FT_Stream stream = NULL;
+ FT_Face face = NULL;
+ FT_ListNode node = NULL;
FT_Bool external_stream;
FT_Module* cur;
FT_Module* limit;
@@ -2119,6 +2214,8 @@
internal->transform_delta.x = 0;
internal->transform_delta.y = 0;
+
+ internal->refcount = 1;
}
if ( aface )
@@ -2207,6 +2304,17 @@
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Error )
+ FT_Reference_Face( FT_Face face )
+ {
+ face->internal->refcount++;
+
+ return FT_Err_Ok;
+ }
+
+
+ /* documentation is in freetype.h */
+
+ FT_EXPORT_DEF( FT_Error )
FT_Done_Face( FT_Face face )
{
FT_Error error;
@@ -2218,22 +2326,29 @@
error = FT_Err_Invalid_Face_Handle;
if ( face && face->driver )
{
- driver = face->driver;
- memory = driver->root.memory;
-
- /* find face in driver's list */
- node = FT_List_Find( &driver->faces_list, face );
- if ( node )
+ face->internal->refcount--;
+ if ( face->internal->refcount > 0 )
+ error = FT_Err_Ok;
+ else
{
- /* remove face object from the driver's list */
- FT_List_Remove( &driver->faces_list, node );
- FT_FREE( node );
+ driver = face->driver;
+ memory = driver->root.memory;
- /* now destroy the object proper */
- destroy_face( memory, face, driver );
- error = FT_Err_Ok;
+ /* find face in driver's list */
+ node = FT_List_Find( &driver->faces_list, face );
+ if ( node )
+ {
+ /* remove face object from the driver's list */
+ FT_List_Remove( &driver->faces_list, node );
+ FT_FREE( node );
+
+ /* now destroy the object proper */
+ destroy_face( memory, face, driver );
+ error = FT_Err_Ok;
+ }
}
}
+
return error;
}
@@ -2879,6 +2994,15 @@
{
if ( cur[0]->encoding == encoding )
{
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - face->charmaps > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "FT_Select_Charmap: requested charmap is found (%d), "
+ "but in too late position to cache\n",
+ cur - face->charmaps ));
+ continue;
+ }
+#endif
face->charmap = cur[0];
return 0;
}
@@ -2913,6 +3037,15 @@
{
if ( cur[0] == charmap )
{
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - face->charmaps > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "FT_Set_Charmap: requested charmap is found (%d), "
+ "but in too late position to cache\n",
+ cur - face->charmaps ));
+ continue;
+ }
+#endif
face->charmap = cur[0];
return 0;
}
@@ -2929,12 +3062,24 @@
FT_Int i;
+ if ( !charmap || !charmap->face )
+ return -1;
+
for ( i = 0; i < charmap->face->num_charmaps; i++ )
if ( charmap->face->charmaps[i] == charmap )
break;
FT_ASSERT( i < charmap->face->num_charmaps );
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( i > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "FT_Get_Charmap_Index: requested charmap is found (%d), "
+ "but in too late position to cache\n",
+ i ));
+ return -i;
+ }
+#endif
return i;
}
@@ -3009,7 +3154,7 @@
FT_Error error = FT_Err_Ok;
FT_Face face;
FT_Memory memory;
- FT_CMap cmap;
+ FT_CMap cmap = NULL;
if ( clazz == NULL || charmap == NULL || charmap->face == NULL )
@@ -3073,7 +3218,7 @@
}
result = cmap->clazz->char_index( cmap, (FT_UInt32)charcode );
}
- return result;
+ return result;
}
@@ -3087,14 +3232,14 @@
FT_UInt gindex = 0;
- if ( face && face->charmap )
+ if ( face && face->charmap && face->num_glyphs )
{
gindex = FT_Get_Char_Index( face, 0 );
- if ( gindex == 0 )
+ if ( gindex == 0 || gindex >= (FT_UInt)face->num_glyphs )
result = FT_Get_Next_Char( face, 0, &gindex );
}
- if ( agindex )
+ if ( agindex )
*agindex = gindex;
return result;
@@ -3112,13 +3257,16 @@
FT_UInt gindex = 0;
- if ( face && face->charmap )
+ if ( face && face->charmap && face->num_glyphs )
{
FT_UInt32 code = (FT_UInt32)charcode;
FT_CMap cmap = FT_CMAP( face->charmap );
- gindex = cmap->clazz->char_next( cmap, &code );
+ do {
+ gindex = cmap->clazz->char_next( cmap, &code );
+ } while ( gindex >= (FT_UInt)face->num_glyphs );
+
result = ( gindex == 0 ) ? 0 : code;
}
@@ -3623,7 +3771,7 @@
FT_Library library = module->library;
FT_Memory memory = library->memory;
FT_Error error;
- FT_ListNode node;
+ FT_ListNode node = NULL;
if ( FT_NEW( node ) )
@@ -3639,7 +3787,7 @@
/* allocate raster object if needed */
if ( clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
- clazz->raster_class->raster_new )
+ clazz->raster_class->raster_new )
{
error = clazz->raster_class->raster_new( memory, &render->raster );
if ( error )
@@ -3680,7 +3828,8 @@
/* release raster object, if any */
- if ( render->raster )
+ if ( render->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
+ render->raster )
render->clazz->raster_class->raster_done( render->raster );
/* remove from list */
@@ -3744,6 +3893,7 @@
error = set_mode( renderer, parameters->tag, parameters->data );
if ( error )
break;
+ parameters++;
}
}
@@ -3820,7 +3970,7 @@
FT_Library library;
- if ( !slot )
+ if ( !slot || !slot->face )
return FT_Err_Invalid_Argument;
library = FT_FACE_LIBRARY( slot->face );
@@ -4007,7 +4157,8 @@
FT_Renderer renderer = FT_RENDERER( module );
- if ( renderer->raster )
+ if ( renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
+ renderer->raster )
renderer->clazz->raster_class->raster_done( renderer->raster );
}
@@ -4163,10 +4314,21 @@
/* documentation is in ftmodapi.h */
FT_EXPORT_DEF( FT_Error )
+ FT_Reference_Library( FT_Library library )
+ {
+ library->refcount++;
+
+ return FT_Err_Ok;
+ }
+
+
+ /* documentation is in ftmodapi.h */
+
+ FT_EXPORT_DEF( FT_Error )
FT_New_Library( FT_Memory memory,
FT_Library *alibrary )
{
- FT_Library library = 0;
+ FT_Library library = NULL;
FT_Error error;
@@ -4202,6 +4364,8 @@
library->version_minor = FREETYPE_MINOR;
library->version_patch = FREETYPE_PATCH;
+ library->refcount = 1;
+
/* That's ok now */
*alibrary = library;
@@ -4258,40 +4422,64 @@
if ( !library )
return FT_Err_Invalid_Library_Handle;
+ library->refcount--;
+ if ( library->refcount > 0 )
+ goto Exit;
+
memory = library->memory;
/* Discard client-data */
if ( library->generic.finalizer )
library->generic.finalizer( library );
- /* Close all faces in the library. If we don't do
- * this, we can have some subtle memory leaks.
+ /*
+ * Close all faces in the library. If we don't do this, we can have
+ * some subtle memory leaks.
+ *
* Example:
*
* - the cff font driver uses the pshinter module in cff_size_done
* - if the pshinter module is destroyed before the cff font driver,
* opened FT_Face objects managed by the driver are not properly
* destroyed, resulting in a memory leak
+ *
+ * Some faces are dependent on other faces, like Type42 faces that
+ * depend on TrueType faces synthesized internally.
+ *
+ * The order of drivers should be specified in driver_name[].
*/
{
- FT_UInt n;
+ FT_UInt m, n;
+ const char* driver_name[] = { "type42", NULL };
- for ( n = 0; n < library->num_modules; n++ )
+ for ( m = 0;
+ m < sizeof ( driver_name ) / sizeof ( driver_name[0] );
+ m++ )
{
- FT_Module module = library->modules[n];
- FT_List faces;
+ for ( n = 0; n < library->num_modules; n++ )
+ {
+ FT_Module module = library->modules[n];
+ const char* module_name = module->clazz->module_name;
+ FT_List faces;
- if ( ( module->clazz->module_flags & FT_MODULE_FONT_DRIVER ) == 0 )
- continue;
+ if ( driver_name[m] &&
+ ft_strcmp( module_name, driver_name[m] ) != 0 )
+ continue;
- faces = &FT_DRIVER(module)->faces_list;
- while ( faces->head )
- {
- FT_Done_Face( FT_FACE( faces->head->data ) );
- if ( faces->head )
- FT_TRACE0(( "FT_Done_Library: failed to free some faces\n" ));
+ if ( ( module->clazz->module_flags & FT_MODULE_FONT_DRIVER ) == 0 )
+ continue;
+
+ FT_TRACE7(( "FT_Done_Library: close faces for %s\n", module_name ));
+
+ faces = &FT_DRIVER( module )->faces_list;
+ while ( faces->head )
+ {
+ FT_Done_Face( FT_FACE( faces->head->data ) );
+ if ( faces->head )
+ FT_TRACE0(( "FT_Done_Library: failed to free some faces\n" ));
+ }
}
}
}
@@ -4333,6 +4521,8 @@
#endif
FT_FREE( library );
+
+ Exit:
return FT_Err_Ok;
}
@@ -4445,6 +4635,8 @@
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+ /* documentation is in freetype.h */
+
FT_EXPORT_DEF( FT_Error )
FT_Get_SubGlyph_Info( FT_GlyphSlot glyph,
FT_UInt sub_index,
@@ -4457,7 +4649,8 @@
FT_Error error = FT_Err_Invalid_Argument;
- if ( glyph != NULL &&
+ if ( glyph &&
+ glyph->subglyphs &&
glyph->format == FT_GLYPH_FORMAT_COMPOSITE &&
sub_index < glyph->num_subglyphs )
{
diff --git a/3party/freetype/base/ftotval.c b/3party/freetype/src/base/ftotval.c
index 20ed686eee..694fd2b87a 100644
--- a/3party/freetype/base/ftotval.c
+++ b/3party/freetype/src/base/ftotval.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating OpenType tables (body). */
/* */
-/* Copyright 2004, 2006, 2008 by */
+/* Copyright 2004, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -74,9 +74,14 @@
FT_OpenType_Free( FT_Face face,
FT_Bytes table )
{
- FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_Memory memory;
+ if ( !face )
+ return;
+
+ memory = FT_FACE_MEMORY( face );
+
FT_FREE( table );
}
diff --git a/3party/freetype/base/ftoutln.c b/3party/freetype/src/base/ftoutln.c
index 49ef82e27d..356b156116 100644
--- a/3party/freetype/base/ftoutln.c
+++ b/3party/freetype/src/base/ftoutln.c
@@ -4,7 +4,7 @@
/* */
/* FreeType outline management (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -304,9 +304,9 @@
*anoutline = null_outline;
- if ( FT_NEW_ARRAY( anoutline->points, numPoints * 2L ) ||
- FT_NEW_ARRAY( anoutline->tags, numPoints ) ||
- FT_NEW_ARRAY( anoutline->contours, numContours ) )
+ if ( FT_NEW_ARRAY( anoutline->points, numPoints ) ||
+ FT_NEW_ARRAY( anoutline->tags, numPoints ) ||
+ FT_NEW_ARRAY( anoutline->contours, numContours ) )
goto Fail;
anoutline->n_points = (FT_UShort)numPoints;
@@ -990,7 +990,8 @@
int i;
FT_Pos ray_y[3];
- FT_Orientation result[3];
+ FT_Orientation result[3] =
+ { FT_ORIENTATION_NONE, FT_ORIENTATION_NONE, FT_ORIENTATION_NONE };
if ( !outline || outline->n_points <= 0 )
diff --git a/3party/freetype/base/ftpatent.c b/3party/freetype/src/base/ftpatent.c
index 236d9a674c..501cab52ca 100644
--- a/3party/freetype/base/ftpatent.c
+++ b/3party/freetype/src/base/ftpatent.c
@@ -5,7 +5,7 @@
/* FreeType API for checking patented TrueType bytecode instructions */
/* (body). */
/* */
-/* Copyright 2007, 2008 by David Turner. */
+/* Copyright 2007, 2008, 2010 by David Turner. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -114,7 +114,7 @@
FT_ULong tag )
{
FT_Stream stream = face->stream;
- FT_Error error = FT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Service_SFNT_Table service;
FT_Bool result = FALSE;
@@ -124,13 +124,14 @@
if ( service )
{
FT_UInt i = 0;
- FT_ULong tag_i = 0, offset_i, length_i;
+ FT_ULong tag_i = 0, offset_i = 0, length_i = 0;
+
for ( i = 0; !error && tag_i != tag ; i++ )
error = service->table_info( face, i,
&tag_i, &offset_i, &length_i );
- if ( error ||
+ if ( error ||
FT_STREAM_SEEK( offset_i ) )
goto Exit;
diff --git a/3party/freetype/base/ftpfr.c b/3party/freetype/src/base/ftpfr.c
index f9592bb1bb..3a0f92d07a 100644
--- a/3party/freetype/base/ftpfr.c
+++ b/3party/freetype/src/base/ftpfr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing PFR-specific data (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2008 by */
+/* Copyright 2002, 2003, 2004, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,10 +24,11 @@
static FT_Service_PfrMetrics
ft_pfr_check( FT_Face face )
{
- FT_Service_PfrMetrics service;
+ FT_Service_PfrMetrics service = NULL;
- FT_FACE_LOOKUP_SERVICE( face, service, PFR_METRICS );
+ if ( face )
+ FT_FACE_LOOKUP_SERVICE( face, service, PFR_METRICS );
return service;
}
diff --git a/3party/freetype/base/ftpic.c b/3party/freetype/src/base/ftpic.c
index d5271a9726..d5271a9726 100644
--- a/3party/freetype/base/ftpic.c
+++ b/3party/freetype/src/base/ftpic.c
diff --git a/3party/freetype/base/ftrfork.c b/3party/freetype/src/base/ftrfork.c
index 133c2de057..4e7d510a57 100644
--- a/3party/freetype/base/ftrfork.c
+++ b/3party/freetype/src/base/ftrfork.c
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (body). */
/* */
-/* Copyright 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
@@ -159,8 +159,8 @@
FT_Long tag_internal, rpos;
FT_Memory memory = library->memory;
FT_Long temp;
- FT_Long *offsets_internal;
- FT_RFork_Ref *ref;
+ FT_Long *offsets_internal = NULL;
+ FT_RFork_Ref *ref = NULL;
error = FT_Stream_Seek( stream, map_offset );
@@ -349,6 +349,42 @@
const char *insertion );
+ typedef enum FT_RFork_Rule_ {
+ FT_RFork_Rule_invalid = -2,
+ FT_RFork_Rule_uknown, /* -1 */
+ FT_RFork_Rule_apple_double,
+ FT_RFork_Rule_apple_single,
+ FT_RFork_Rule_darwin_ufs_export,
+ FT_RFork_Rule_darwin_newvfs,
+ FT_RFork_Rule_darwin_hfsplus,
+ FT_RFork_Rule_vfat,
+ FT_RFork_Rule_linux_cap,
+ FT_RFork_Rule_linux_double,
+ FT_RFork_Rule_linux_netatalk
+ } FT_RFork_Rule;
+
+ /* For fast translation between rule index and rule type,
+ * the macros FT_RFORK_xxx should be kept consistent with
+ * the raccess_guess_funcs table
+ */
+ typedef struct raccess_guess_rec_ {
+ raccess_guess_func func;
+ FT_RFork_Rule type;
+ } raccess_guess_rec;
+
+ static raccess_guess_rec raccess_guess_table[FT_RACCESS_N_RULES] =
+ {
+ { raccess_guess_apple_double, FT_RFork_Rule_apple_double, },
+ { raccess_guess_apple_single, FT_RFork_Rule_apple_single, },
+ { raccess_guess_darwin_ufs_export, FT_RFork_Rule_darwin_ufs_export, },
+ { raccess_guess_darwin_newvfs, FT_RFork_Rule_darwin_newvfs, },
+ { raccess_guess_darwin_hfsplus, FT_RFork_Rule_darwin_hfsplus, },
+ { raccess_guess_vfat, FT_RFork_Rule_vfat, },
+ { raccess_guess_linux_cap, FT_RFork_Rule_linux_cap, },
+ { raccess_guess_linux_double, FT_RFork_Rule_linux_double, },
+ { raccess_guess_linux_netatalk, FT_RFork_Rule_linux_netatalk, },
+ };
+
FT_BASE_DEF( void )
FT_Raccess_Guess( FT_Library library,
FT_Stream stream,
@@ -360,19 +396,6 @@
FT_Long i;
- raccess_guess_func funcs[FT_RACCESS_N_RULES] =
- {
- raccess_guess_apple_double,
- raccess_guess_apple_single,
- raccess_guess_darwin_ufs_export,
- raccess_guess_darwin_newvfs,
- raccess_guess_darwin_hfsplus,
- raccess_guess_vfat,
- raccess_guess_linux_cap,
- raccess_guess_linux_double,
- raccess_guess_linux_netatalk,
- };
-
for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
{
new_names[i] = NULL;
@@ -384,14 +407,41 @@
if ( errors[i] )
continue ;
- errors[i] = (funcs[i])( library, stream, base_name,
- &(new_names[i]), &(offsets[i]) );
+ errors[i] = (raccess_guess_table[i].func)( library,
+ stream, base_name,
+ &(new_names[i]),
+ &(offsets[i]) );
}
return;
}
+ static FT_RFork_Rule
+ raccess_get_rule_type_from_rule_index( FT_UInt rule_index )
+ {
+ if ( rule_index >= FT_RACCESS_N_RULES )
+ return FT_RFork_Rule_invalid;
+
+ return raccess_guess_table[rule_index].type;
+ }
+
+
+ FT_LOCAL_DEF( FT_Bool )
+ raccess_rule_by_darwin_vfs( FT_UInt rule_index )
+ {
+ switch( raccess_get_rule_type_from_rule_index( rule_index ) )
+ {
+ case FT_RFork_Rule_darwin_newvfs:
+ case FT_RFork_Rule_darwin_hfsplus:
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+ }
+
+
static FT_Error
raccess_guess_apple_double( FT_Library library,
FT_Stream stream,
@@ -477,7 +527,7 @@
Only meaningful on systems with hfs+ drivers (or Macs).
*/
FT_Error error;
- char* newpath;
+ char* newpath = NULL;
FT_Memory memory;
FT_Long base_file_len = ft_strlen( base_file_name );
@@ -513,7 +563,7 @@
Only meaningful on systems with Mac OS X (> 10.1).
*/
FT_Error error;
- char* newpath;
+ char* newpath = NULL;
FT_Memory memory;
FT_Long base_file_len = ft_strlen( base_file_name );
@@ -751,7 +801,7 @@
const char *original_name,
const char *insertion )
{
- char* new_name;
+ char* new_name = NULL;
const char* tmp;
const char* slash;
size_t new_length;
diff --git a/3party/freetype/base/ftsnames.c b/3party/freetype/src/base/ftsnames.c
index 3447888ca2..3447888ca2 100644
--- a/3party/freetype/base/ftsnames.c
+++ b/3party/freetype/src/base/ftsnames.c
diff --git a/3party/freetype/base/ftstream.c b/3party/freetype/src/base/ftstream.c
index b638599dbc..fc2868e8da 100644
--- a/3party/freetype/base/ftstream.c
+++ b/3party/freetype/src/base/ftstream.c
@@ -4,7 +4,7 @@
/* */
/* I/O stream support (body). */
/* */
-/* Copyright 2000-2001, 2002, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 2000-2002, 2004-2006, 2008-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -246,6 +246,18 @@
/* allocate the frame in memory */
FT_Memory memory = stream->memory;
+
+ /* simple sanity check */
+ if ( count > stream->size )
+ {
+ FT_ERROR(( "FT_Stream_EnterFrame:"
+ " frame size (%lu) larger than stream size (%lu)\n",
+ count, stream->size ));
+
+ error = FT_Err_Invalid_Stream_Operation;
+ goto Exit;
+ }
+
#ifdef FT_DEBUG_MEMORY
/* assume _ft_debug_file and _ft_debug_lineno are already set */
stream->base = (unsigned char*)ft_mem_qalloc( memory, count, &error );
@@ -275,7 +287,7 @@
{
/* check current and new position */
if ( stream->pos >= stream->size ||
- stream->pos + count > stream->size )
+ stream->size - stream->pos < count )
{
FT_ERROR(( "FT_Stream_EnterFrame:"
" invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\n",
@@ -342,8 +354,8 @@
}
- FT_BASE_DEF( FT_Short )
- FT_Stream_GetShort( FT_Stream stream )
+ FT_BASE_DEF( FT_UShort )
+ FT_Stream_GetUShort( FT_Stream stream )
{
FT_Byte* p;
FT_Short result;
@@ -354,15 +366,15 @@
result = 0;
p = stream->cursor;
if ( p + 1 < stream->limit )
- result = FT_NEXT_SHORT( p );
+ result = FT_NEXT_USHORT( p );
stream->cursor = p;
return result;
}
- FT_BASE_DEF( FT_Short )
- FT_Stream_GetShortLE( FT_Stream stream )
+ FT_BASE_DEF( FT_UShort )
+ FT_Stream_GetUShortLE( FT_Stream stream )
{
FT_Byte* p;
FT_Short result;
@@ -373,15 +385,15 @@
result = 0;
p = stream->cursor;
if ( p + 1 < stream->limit )
- result = FT_NEXT_SHORT_LE( p );
+ result = FT_NEXT_USHORT_LE( p );
stream->cursor = p;
return result;
}
- FT_BASE_DEF( FT_Long )
- FT_Stream_GetOffset( FT_Stream stream )
+ FT_BASE_DEF( FT_ULong )
+ FT_Stream_GetUOffset( FT_Stream stream )
{
FT_Byte* p;
FT_Long result;
@@ -392,14 +404,14 @@
result = 0;
p = stream->cursor;
if ( p + 2 < stream->limit )
- result = FT_NEXT_OFF3( p );
+ result = FT_NEXT_UOFF3( p );
stream->cursor = p;
return result;
}
- FT_BASE_DEF( FT_Long )
- FT_Stream_GetLong( FT_Stream stream )
+ FT_BASE_DEF( FT_ULong )
+ FT_Stream_GetULong( FT_Stream stream )
{
FT_Byte* p;
FT_Long result;
@@ -410,14 +422,14 @@
result = 0;
p = stream->cursor;
if ( p + 3 < stream->limit )
- result = FT_NEXT_LONG( p );
+ result = FT_NEXT_ULONG( p );
stream->cursor = p;
return result;
}
- FT_BASE_DEF( FT_Long )
- FT_Stream_GetLongLE( FT_Stream stream )
+ FT_BASE_DEF( FT_ULong )
+ FT_Stream_GetULongLE( FT_Stream stream )
{
FT_Byte* p;
FT_Long result;
@@ -428,7 +440,7 @@
result = 0;
p = stream->cursor;
if ( p + 3 < stream->limit )
- result = FT_NEXT_LONG_LE( p );
+ result = FT_NEXT_ULONG_LE( p );
stream->cursor = p;
return result;
}
@@ -471,8 +483,8 @@
}
- FT_BASE_DEF( FT_Short )
- FT_Stream_ReadShort( FT_Stream stream,
+ FT_BASE_DEF( FT_UShort )
+ FT_Stream_ReadUShort( FT_Stream stream,
FT_Error* error )
{
FT_Byte reads[2];
@@ -499,7 +511,7 @@
}
if ( p )
- result = FT_NEXT_SHORT( p );
+ result = FT_NEXT_USHORT( p );
}
else
goto Fail;
@@ -510,7 +522,7 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
- FT_ERROR(( "FT_Stream_ReadShort:"
+ FT_ERROR(( "FT_Stream_ReadUShort:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -518,8 +530,8 @@
}
- FT_BASE_DEF( FT_Short )
- FT_Stream_ReadShortLE( FT_Stream stream,
+ FT_BASE_DEF( FT_UShort )
+ FT_Stream_ReadUShortLE( FT_Stream stream,
FT_Error* error )
{
FT_Byte reads[2];
@@ -546,7 +558,7 @@
}
if ( p )
- result = FT_NEXT_SHORT_LE( p );
+ result = FT_NEXT_USHORT_LE( p );
}
else
goto Fail;
@@ -557,7 +569,7 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
- FT_ERROR(( "FT_Stream_ReadShortLE:"
+ FT_ERROR(( "FT_Stream_ReadUShortLE:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -565,8 +577,8 @@
}
- FT_BASE_DEF( FT_Long )
- FT_Stream_ReadOffset( FT_Stream stream,
+ FT_BASE_DEF( FT_ULong )
+ FT_Stream_ReadUOffset( FT_Stream stream,
FT_Error* error )
{
FT_Byte reads[3];
@@ -593,7 +605,7 @@
}
if ( p )
- result = FT_NEXT_OFF3( p );
+ result = FT_NEXT_UOFF3( p );
}
else
goto Fail;
@@ -604,7 +616,7 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
- FT_ERROR(( "FT_Stream_ReadOffset:"
+ FT_ERROR(( "FT_Stream_ReadUOffset:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -612,8 +624,8 @@
}
- FT_BASE_DEF( FT_Long )
- FT_Stream_ReadLong( FT_Stream stream,
+ FT_BASE_DEF( FT_ULong )
+ FT_Stream_ReadULong( FT_Stream stream,
FT_Error* error )
{
FT_Byte reads[4];
@@ -640,7 +652,7 @@
}
if ( p )
- result = FT_NEXT_LONG( p );
+ result = FT_NEXT_ULONG( p );
}
else
goto Fail;
@@ -651,7 +663,7 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
- FT_ERROR(( "FT_Stream_ReadLong:"
+ FT_ERROR(( "FT_Stream_ReadULong:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
@@ -659,8 +671,8 @@
}
- FT_BASE_DEF( FT_Long )
- FT_Stream_ReadLongLE( FT_Stream stream,
+ FT_BASE_DEF( FT_ULong )
+ FT_Stream_ReadULongLE( FT_Stream stream,
FT_Error* error )
{
FT_Byte reads[4];
@@ -687,7 +699,7 @@
}
if ( p )
- result = FT_NEXT_LONG_LE( p );
+ result = FT_NEXT_ULONG_LE( p );
}
else
goto Fail;
@@ -698,7 +710,7 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
- FT_ERROR(( "FT_Stream_ReadLongLE:"
+ FT_ERROR(( "FT_Stream_ReadULongLE:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
diff --git a/3party/freetype/base/ftstroke.c b/3party/freetype/src/base/ftstroke.c
index 0978b0ed94..cd4bf04339 100644
--- a/3party/freetype/base/ftstroke.c
+++ b/3party/freetype/src/base/ftstroke.c
@@ -4,7 +4,7 @@
/* */
/* FreeType path stroker (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 2002-2006, 2008-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -704,7 +704,6 @@
FT_Fixed miter_limit;
FT_Fixed radius;
- FT_Bool valid;
FT_StrokeBorderRec borders[2];
FT_Library library;
@@ -719,7 +718,7 @@
{
FT_Error error;
FT_Memory memory;
- FT_Stroker stroker;
+ FT_Stroker stroker = NULL;
if ( !library )
@@ -979,7 +978,8 @@
thcos = FT_Cos( theta );
sigma = FT_MulFix( stroker->miter_limit, thcos );
- if ( sigma >= 0x10000L )
+ /* FT_Sin(x) = 0 for x <= 57 */
+ if ( sigma >= 0x10000L || ft_pos_abs( theta ) <= 57 )
miter = FALSE;
if ( miter ) /* this is a miter (broken angle) */
@@ -1360,7 +1360,7 @@
phi1 = (angle_mid + angle_in ) / 2;
phi2 = (angle_mid + angle_out ) / 2;
length1 = FT_DivFix( stroker->radius, FT_Cos( theta1 ) );
- length2 = FT_DivFix( stroker->radius, FT_Cos(theta2) );
+ length2 = FT_DivFix( stroker->radius, FT_Cos( theta2 ) );
for ( side = 0; side <= 1; side++ )
{
@@ -1735,13 +1735,10 @@
}
else
{
- /* if both first and last points are conic, */
- /* start at their middle and record its position */
- /* for closure */
+ /* if both first and last points are conic, */
+ /* start at their middle */
v_start.x = ( v_start.x + v_last.x ) / 2;
v_start.y = ( v_start.y + v_last.y ) / 2;
-
- v_last = v_start;
}
point--;
tags--;
diff --git a/3party/freetype/base/ftsynth.c b/3party/freetype/src/base/ftsynth.c
index 326d8e73e4..d4ec0da570 100644
--- a/3party/freetype/base/ftsynth.c
+++ b/3party/freetype/src/base/ftsynth.c
@@ -4,7 +4,7 @@
/* */
/* FreeType synthesizing code for emboldening and slanting (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -90,7 +90,7 @@
if ( slot->format != FT_GLYPH_FORMAT_OUTLINE &&
- slot->format != FT_GLYPH_FORMAT_BITMAP )
+ slot->format != FT_GLYPH_FORMAT_BITMAP )
return;
/* some reasonable strength */
@@ -100,15 +100,15 @@
if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
{
- error = FT_Outline_Embolden( &slot->outline, xstr );
/* ignore error */
+ (void)FT_Outline_Embolden( &slot->outline, xstr );
/* this is more than enough for most glyphs; if you need accurate */
/* values, you have to call FT_Outline_Get_CBox */
xstr = xstr * 2;
ystr = xstr;
}
- else if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
+ else /* slot->format == FT_GLYPH_FORMAT_BITMAP */
{
/* round to full pixels */
xstr &= ~63;
diff --git a/3party/freetype/base/ftsystem.c b/3party/freetype/src/base/ftsystem.c
index 4d06d6db5c..66c5d76a9d 100644
--- a/3party/freetype/base/ftsystem.c
+++ b/3party/freetype/src/base/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001, 2002, 2006, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -192,7 +192,9 @@
/* count :: The number of bytes to read from the stream. */
/* */
/* <Return> */
- /* The number of bytes actually read. */
+ /* The number of bytes actually read. If `count' is zero (this is, */
+ /* the function is used for seeking), a non-zero return value */
+ /* indicates an error. */
/* */
FT_CALLBACK_DEF( unsigned long )
ft_ansi_stream_io( FT_Stream stream,
@@ -203,6 +205,9 @@
FT_FILE* file;
+ if ( !count && offset > stream->size )
+ return 1;
+
file = STREAM_FILE( stream );
if ( stream->pos != offset )
@@ -224,6 +229,13 @@
if ( !stream )
return FT_Err_Invalid_Stream_Handle;
+ stream->descriptor.pointer = NULL;
+ stream->pathname.pointer = (char*)filepathname;
+ stream->base = 0;
+ stream->pos = 0;
+ stream->read = NULL;
+ stream->close = NULL;
+
file = ft_fopen( filepathname, "rb" );
if ( !file )
{
@@ -235,12 +247,16 @@
ft_fseek( file, 0, SEEK_END );
stream->size = ft_ftell( file );
+ if ( !stream->size )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " opened `%s' but zero-sized\n", filepathname ));
+ ft_fclose( file );
+ return FT_Err_Cannot_Open_Stream;
+ }
ft_fseek( file, 0, SEEK_SET );
stream->descriptor.pointer = file;
- stream->pathname.pointer = (char*)filepathname;
- stream->pos = 0;
-
stream->read = ft_ansi_stream_io;
stream->close = ft_ansi_stream_close;
diff --git a/3party/freetype/base/fttrigon.c b/3party/freetype/src/base/fttrigon.c
index fdf433ab86..fdf433ab86 100644
--- a/3party/freetype/base/fttrigon.c
+++ b/3party/freetype/src/base/fttrigon.c
diff --git a/3party/freetype/base/fttype1.c b/3party/freetype/src/base/fttype1.c
index 3975584db8..3975584db8 100644
--- a/3party/freetype/base/fttype1.c
+++ b/3party/freetype/src/base/fttype1.c
diff --git a/3party/freetype/base/ftutil.c b/3party/freetype/src/base/ftutil.c
index 5f77be557a..5f77be557a 100644
--- a/3party/freetype/base/ftutil.c
+++ b/3party/freetype/src/base/ftutil.c
diff --git a/3party/freetype/base/ftwinfnt.c b/3party/freetype/src/base/ftwinfnt.c
index bc2e90e1f6..bc2e90e1f6 100644
--- a/3party/freetype/base/ftwinfnt.c
+++ b/3party/freetype/src/base/ftwinfnt.c
diff --git a/3party/freetype/base/ftxf86.c b/3party/freetype/src/base/ftxf86.c
index a4bf767dfa..a4bf767dfa 100644
--- a/3party/freetype/base/ftxf86.c
+++ b/3party/freetype/src/base/ftxf86.c
diff --git a/3party/freetype/src/base/rules.mk b/3party/freetype/src/base/rules.mk
new file mode 100644
index 0000000000..10f578abc8
--- /dev/null
+++ b/3party/freetype/src/base/rules.mk
@@ -0,0 +1,96 @@
+#
+# FreeType 2 base layer configuration rules
+#
+
+
+# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
+
+
+# It sets the following variables which are used by the master Makefile
+# after the call:
+#
+# BASE_OBJ_S: The single-object base layer.
+# BASE_OBJ_M: A list of all objects for a multiple-objects build.
+# BASE_EXT_OBJ: A list of base layer extensions, i.e., components found
+# in `freetype/src/base' which are not compiled within the
+# base layer proper.
+
+
+BASE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SRC_DIR)/base)
+
+
+# Base layer sources
+#
+# ftsystem, ftinit, and ftdebug are handled by freetype.mk
+#
+# All files listed here should be included in `ftbase.c' (for a `single'
+# build).
+#
+BASE_SRC := $(BASE_DIR)/ftadvanc.c \
+ $(BASE_DIR)/ftcalc.c \
+ $(BASE_DIR)/ftdbgmem.c \
+ $(BASE_DIR)/ftgloadr.c \
+ $(BASE_DIR)/ftobjs.c \
+ $(BASE_DIR)/ftoutln.c \
+ $(BASE_DIR)/ftrfork.c \
+ $(BASE_DIR)/ftsnames.c \
+ $(BASE_DIR)/ftstream.c \
+ $(BASE_DIR)/fttrigon.c \
+ $(BASE_DIR)/ftutil.c
+
+
+ifneq ($(ftmac_c),)
+ BASE_SRC += $(BASE_DIR)/$(ftmac_c)
+endif
+
+BASE_H := $(BASE_DIR)/ftbase.h
+
+# Base layer `extensions' sources
+#
+# An extension is added to the library file as a separate object. It is
+# then linked to the final executable only if one of its symbols is used by
+# the application.
+#
+BASE_EXT_SRC := $(patsubst %,$(BASE_DIR)/%,$(BASE_EXTENSIONS))
+
+# Default extensions objects
+#
+BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_DIR)/%.c=$(OBJ_DIR)/%.$O)
+
+
+# Base layer object(s)
+#
+# BASE_OBJ_M is used during `multi' builds (each base source file compiles
+# to a single object file).
+#
+# BASE_OBJ_S is used during `single' builds (the whole base layer is
+# compiled as a single object file using ftbase.c).
+#
+BASE_OBJ_M := $(BASE_SRC:$(BASE_DIR)/%.c=$(OBJ_DIR)/%.$O)
+BASE_OBJ_S := $(OBJ_DIR)/ftbase.$O
+
+# Base layer root source file for single build
+#
+BASE_SRC_S := $(BASE_DIR)/ftbase.c
+
+
+# Base layer - single object build
+#
+$(BASE_OBJ_S): $(BASE_SRC_S) $(BASE_SRC) $(FREETYPE_H) $(BASE_H)
+ $(BASE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(BASE_SRC_S))
+
+
+# Multiple objects build + extensions
+#
+$(OBJ_DIR)/%.$O: $(BASE_DIR)/%.c $(FREETYPE_H) $(BASE_H)
+ $(BASE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# EOF
diff --git a/3party/freetype/bdf/Jamfile b/3party/freetype/src/bdf/Jamfile
index da23ccd0ad..da23ccd0ad 100644
--- a/3party/freetype/bdf/Jamfile
+++ b/3party/freetype/src/bdf/Jamfile
diff --git a/3party/freetype/bdf/README b/3party/freetype/src/bdf/README
index e3f2ae3861..b761aba2b2 100644
--- a/3party/freetype/bdf/README
+++ b/3party/freetype/src/bdf/README
@@ -13,7 +13,7 @@ This code implements a BDF driver for the FreeType library, following the
Adobe Specification V 2.2. The specification of the BDF font format is
available from Adobe's web site:
- http://partners.adobe.com/asn/developer/PDFS/TN/5005.BDF_Spec.pdf
+ http://partners.adobe.com/public/developer/en/font/5005.BDF_Spec.pdf
Many good bitmap fonts in bdf format come with XFree86 (www.XFree86.org).
They do not define vertical metrics, because the X Consortium BDF
@@ -119,7 +119,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*** Portions of the driver (that is, bdflib.c and bdf.h):
Copyright 2000 Computing Research Labs, New Mexico State University
-Copyright 2001-2002 Francesco Zappa Nardelli
+Copyright 2001-2002, 2011 Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
diff --git a/3party/freetype/bdf/bdf.c b/3party/freetype/src/bdf/bdf.c
index f95fb76225..f95fb76225 100644
--- a/3party/freetype/bdf/bdf.c
+++ b/3party/freetype/src/bdf/bdf.c
diff --git a/3party/freetype/bdf/bdf.h b/3party/freetype/src/bdf/bdf.h
index 561b4158a5..561b4158a5 100644
--- a/3party/freetype/bdf/bdf.h
+++ b/3party/freetype/src/bdf/bdf.h
diff --git a/3party/freetype/bdf/bdfdrivr.c b/3party/freetype/src/bdf/bdfdrivr.c
index 631ec460e7..47d0eae89f 100644
--- a/3party/freetype/bdf/bdfdrivr.c
+++ b/3party/freetype/src/bdf/bdfdrivr.c
@@ -30,6 +30,7 @@ THE SOFTWARE.
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_OBJECTS_H
#include FT_BDF_H
+#include FT_TRUETYPE_IDS_H
#include FT_SERVICE_BDF_H
#include FT_SERVICE_XFREE86_NAME_H
@@ -540,14 +541,15 @@ THE SOFTWARE.
charmap.face = FT_FACE( face );
charmap.encoding = FT_ENCODING_NONE;
- charmap.platform_id = 0;
- charmap.encoding_id = 0;
+ /* initial platform/encoding should indicate unset status? */
+ charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
+ charmap.encoding_id = TT_APPLE_ID_DEFAULT;
if ( unicode_charmap )
{
charmap.encoding = FT_ENCODING_UNICODE;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
}
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
@@ -571,8 +573,8 @@ THE SOFTWARE.
charmap.face = FT_FACE( face );
charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
- charmap.platform_id = 7;
- charmap.encoding_id = 0;
+ charmap.platform_id = TT_PLATFORM_ADOBE;
+ charmap.encoding_id = TT_ADOBE_ID_STANDARD;
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
diff --git a/3party/freetype/bdf/bdfdrivr.h b/3party/freetype/src/bdf/bdfdrivr.h
index db7093bb45..db7093bb45 100644
--- a/3party/freetype/bdf/bdfdrivr.h
+++ b/3party/freetype/src/bdf/bdfdrivr.h
diff --git a/3party/freetype/bdf/bdferror.h b/3party/freetype/src/bdf/bdferror.h
index b27fa333bb..b27fa333bb 100644
--- a/3party/freetype/bdf/bdferror.h
+++ b/3party/freetype/src/bdf/bdferror.h
diff --git a/3party/freetype/bdf/bdflib.c b/3party/freetype/src/bdf/bdflib.c
index 5fa5868c71..21b8d9d40e 100644
--- a/3party/freetype/bdf/bdflib.c
+++ b/3party/freetype/src/bdf/bdflib.c
@@ -1,6 +1,6 @@
/*
* Copyright 2000 Computing Research Labs, New Mexico State University
- * Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+ * Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
* Francesco Zappa Nardelli
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -470,6 +470,11 @@
}
+ /* An empty string for empty fields. */
+
+ static const char empty[1] = { 0 }; /* XXX eliminate this */
+
+
static char *
_bdf_list_join( _bdf_list_t* list,
int c,
@@ -494,18 +499,14 @@
if ( i + 1 < list->used )
dp[j++] = (char)c;
}
- dp[j] = 0;
+ if ( dp != empty )
+ dp[j] = 0;
*alen = j;
return dp;
}
- /* An empty string for empty fields. */
-
- static const char empty[1] = { 0 }; /* XXX eliminate this */
-
-
static FT_Error
_bdf_list_split( _bdf_list_t* list,
char* separators,
@@ -648,8 +649,9 @@
{
if ( refill )
{
- bytes = (ptrdiff_t)FT_Stream_TryRead( stream, (FT_Byte*)buf + cursor,
- (FT_ULong)(buf_size - cursor) );
+ bytes = (ptrdiff_t)FT_Stream_TryRead(
+ stream, (FT_Byte*)buf + cursor,
+ (FT_ULong)( buf_size - cursor ) );
avail = cursor + bytes;
cursor = 0;
refill = 0;
@@ -719,6 +721,10 @@
{
error = (*cb)( buf + start, end - start, lineno,
(void*)&cb, client_data );
+ /* Redo if we have encountered CHARS without properties. */
+ if ( error == -1 )
+ error = (*cb)( buf + start, end - start, lineno,
+ (void*)&cb, client_data );
if ( error )
break;
}
@@ -1371,7 +1377,8 @@
/* If the property happens to be a comment, then it doesn't need */
/* to be added to the internal hash table. */
- if ( ft_memcmp( name, "COMMENT", 7 ) != 0 ) {
+ if ( ft_memcmp( name, "COMMENT", 7 ) != 0 )
+ {
/* Add the property to the font property table. */
error = hash_insert( fp->name,
font->props_used,
@@ -1867,6 +1874,9 @@
error = BDF_Err_Invalid_File_Format;
Exit:
+ if ( error && ( p->flags & _BDF_GLYPH ) )
+ FT_FREE( p->glyph_name );
+
return error;
}
@@ -2077,6 +2087,14 @@
/* Check for the start of the properties. */
if ( ft_memcmp( line, "STARTPROPERTIES", 15 ) == 0 )
{
+ if ( !( p->flags & _BDF_FONT_BBX ) )
+ {
+ /* Missing the FONTBOUNDINGBOX field. */
+ FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONTBOUNDINGBOX" ));
+ error = BDF_Err_Missing_Fontboundingbox_Field;
+ goto Exit;
+ }
+
error = _bdf_list_split( &p->list, (char *)" +", line, linelen );
if ( error )
goto Exit;
@@ -2095,7 +2113,7 @@
/* Check for the FONTBOUNDINGBOX field. */
if ( ft_memcmp( line, "FONTBOUNDINGBOX", 15 ) == 0 )
{
- if ( !(p->flags & _BDF_SIZE ) )
+ if ( !( p->flags & _BDF_SIZE ) )
{
/* Missing the SIZE field. */
FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "SIZE" ));
@@ -2139,6 +2157,9 @@
goto Exit;
}
+ /* Allowing multiple `FONT' lines (which is invalid) doesn't hurt... */
+ FT_FREE( p->font->name );
+
if ( FT_NEW_ARRAY( p->font->name, slen + 1 ) )
goto Exit;
FT_MEM_COPY( p->font->name, s, slen + 1 );
@@ -2208,6 +2229,45 @@
goto Exit;
}
+ /* Check for the CHARS field -- font properties are optional */
+ if ( ft_memcmp( line, "CHARS", 5 ) == 0 )
+ {
+ char nbuf[128];
+
+
+ if ( !( p->flags & _BDF_FONT_BBX ) )
+ {
+ /* Missing the FONTBOUNDINGBOX field. */
+ FT_ERROR(( "_bdf_parse_start: " ERRMSG1, lineno, "FONTBOUNDINGBOX" ));
+ error = BDF_Err_Missing_Fontboundingbox_Field;
+ goto Exit;
+ }
+
+ /* Add the two standard X11 properties which are required */
+ /* for compiling fonts. */
+ p->font->font_ascent = p->font->bbx.ascent;
+ ft_sprintf( nbuf, "%hd", p->font->bbx.ascent );
+ error = _bdf_add_property( p->font, (char *)"FONT_ASCENT", nbuf );
+ if ( error )
+ goto Exit;
+ FT_TRACE2(( "_bdf_parse_properties: " ACMSG1, p->font->bbx.ascent ));
+
+ p->font->font_descent = p->font->bbx.descent;
+ ft_sprintf( nbuf, "%hd", p->font->bbx.descent );
+ error = _bdf_add_property( p->font, (char *)"FONT_DESCENT", nbuf );
+ if ( error )
+ goto Exit;
+ FT_TRACE2(( "_bdf_parse_properties: " ACMSG2, p->font->bbx.descent ));
+
+ p->font->modified = 1;
+
+ *next = _bdf_parse_glyphs;
+
+ /* A special return value. */
+ error = -1;
+ goto Exit;
+ }
+
error = BDF_Err_Invalid_File_Format;
Exit:
@@ -2229,7 +2289,7 @@
bdf_font_t* *font )
{
unsigned long lineno = 0; /* make compiler happy */
- _bdf_parse_t *p;
+ _bdf_parse_t *p = NULL;
FT_Memory memory = extmemory;
FT_Error error = BDF_Err_Ok;
@@ -2344,7 +2404,8 @@
/* Make sure the comments are NULL terminated if they exist. */
memory = p->font->memory;
- if ( p->font->comments_len > 0 ) {
+ if ( p->font->comments_len > 0 )
+ {
if ( FT_RENEW_ARRAY( p->font->comments,
p->font->comments_len,
p->font->comments_len + 1 ) )
@@ -2448,8 +2509,8 @@
hash_free( &(font->proptbl), memory );
/* Free up the user defined properties. */
- for (prop = font->user_props, i = 0;
- i < font->nuser_props; i++, prop++ )
+ for ( prop = font->user_props, i = 0;
+ i < font->nuser_props; i++, prop++ )
{
FT_FREE( prop->name );
if ( prop->format == BDF_ATOM )
diff --git a/3party/freetype/src/bdf/module.mk b/3party/freetype/src/bdf/module.mk
new file mode 100644
index 0000000000..fe06ae8e06
--- /dev/null
+++ b/3party/freetype/src/bdf/module.mk
@@ -0,0 +1,34 @@
+#
+# FreeType 2 BDF module definition
+#
+
+# Copyright 2001, 2002, 2006 by
+# Francesco Zappa Nardelli
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+
+FTMODULE_H_COMMANDS += BDF_DRIVER
+
+define BDF_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, bdf_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)bdf $(ECHO_DRIVER_DESC)bdf bitmap fonts$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/bdf/rules.mk b/3party/freetype/src/bdf/rules.mk
new file mode 100644
index 0000000000..6ff1614dde
--- /dev/null
+++ b/3party/freetype/src/bdf/rules.mk
@@ -0,0 +1,81 @@
+#
+# FreeType 2 bdf driver configuration rules
+#
+
+
+# Copyright (C) 2001, 2002, 2003, 2008 by
+# Francesco Zappa Nardelli
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+
+
+
+# bdf driver directory
+#
+BDF_DIR := $(SRC_DIR)/bdf
+
+
+BDF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(BDF_DIR))
+
+
+# bdf driver sources (i.e., C files)
+#
+BDF_DRV_SRC := $(BDF_DIR)/bdflib.c \
+ $(BDF_DIR)/bdfdrivr.c
+
+
+# bdf driver headers
+#
+BDF_DRV_H := $(BDF_DIR)/bdf.h \
+ $(BDF_DIR)/bdfdrivr.h \
+ $(BDF_DIR)/bdferror.h
+
+# bdf driver object(s)
+#
+# BDF_DRV_OBJ_M is used during `multi' builds
+# BDF_DRV_OBJ_S is used during `single' builds
+#
+BDF_DRV_OBJ_M := $(BDF_DRV_SRC:$(BDF_DIR)/%.c=$(OBJ_DIR)/%.$O)
+BDF_DRV_OBJ_S := $(OBJ_DIR)/bdf.$O
+
+# bdf driver source file for single build
+#
+BDF_DRV_SRC_S := $(BDF_DIR)/bdf.c
+
+
+# bdf driver - single object
+#
+$(BDF_DRV_OBJ_S): $(BDF_DRV_SRC_S) $(BDF_DRV_SRC) $(FREETYPE_H) $(BDF_DRV_H)
+ $(BDF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(BDF_DRV_SRC_S))
+
+
+# bdf driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(BDF_DIR)/%.c $(FREETYPE_H) $(BDF_DRV_H)
+ $(BDF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(BDF_DRV_OBJ_S)
+DRV_OBJS_M += $(BDF_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/src/bzip2/Jamfile b/3party/freetype/src/bzip2/Jamfile
new file mode 100644
index 0000000000..3da986dce6
--- /dev/null
+++ b/3party/freetype/src/bzip2/Jamfile
@@ -0,0 +1,19 @@
+# FreeType 2 src/bzip2 Jamfile
+#
+# Copyright 2010 by
+# Joel Klinghed
+#
+# Based on src/lzw/Jamfile, Copyright 2004, 2006 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.
+
+SubDir FT2_TOP $(FT2_SRC_DIR) bzip2 ;
+
+Library $(FT2_LIB) : ftbzip2.c ;
+
+# end of src/bzip2 Jamfile
diff --git a/3party/freetype/src/bzip2/ftbzip2.c b/3party/freetype/src/bzip2/ftbzip2.c
new file mode 100644
index 0000000000..e443dc85e8
--- /dev/null
+++ b/3party/freetype/src/bzip2/ftbzip2.c
@@ -0,0 +1,510 @@
+/***************************************************************************/
+/* */
+/* ftbzip2.c */
+/* */
+/* FreeType support for .bz2 compressed files. */
+/* */
+/* This optional component relies on libbz2. It should mainly be used to */
+/* parse compressed PCF fonts, as found with many X11 server */
+/* distributions. */
+/* */
+/* Copyright 2010 by */
+/* Joel Klinghed. */
+/* */
+/* Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 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. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_MEMORY_H
+#include FT_INTERNAL_STREAM_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_BZIP2_H
+#include FT_CONFIG_STANDARD_LIBRARY_H
+
+
+#include FT_MODULE_ERRORS_H
+
+#undef __FTERRORS_H__
+
+#define FT_ERR_PREFIX Bzip2_Err_
+#define FT_ERR_BASE FT_Mod_Err_Bzip2
+
+#include FT_ERRORS_H
+
+
+#ifdef FT_CONFIG_OPTION_USE_BZIP2
+
+#ifdef FT_CONFIG_OPTION_PIC
+#error "bzip2 code does not support PIC yet"
+#endif
+
+#define BZ_NO_STDIO /* Do not need FILE */
+#include <bzlib.h>
+
+
+/***************************************************************************/
+/***************************************************************************/
+/***** *****/
+/***** B Z I P 2 M E M O R Y M A N A G E M E N T *****/
+/***** *****/
+/***************************************************************************/
+/***************************************************************************/
+
+ /* it is better to use FreeType memory routines instead of raw
+ 'malloc/free' */
+
+ typedef void *(* alloc_func)(void*, int, int);
+ typedef void (* free_func)(void*, void*);
+
+ static void*
+ ft_bzip2_alloc( FT_Memory memory,
+ int items,
+ int size )
+ {
+ FT_ULong sz = (FT_ULong)size * items;
+ FT_Error error;
+ FT_Pointer p = NULL;
+
+
+ (void)FT_ALLOC( p, sz );
+ return p;
+ }
+
+
+ static void
+ ft_bzip2_free( FT_Memory memory,
+ void* address )
+ {
+ FT_MEM_FREE( address );
+ }
+
+
+/***************************************************************************/
+/***************************************************************************/
+/***** *****/
+/***** B Z I P 2 F I L E D E S C R I P T O R *****/
+/***** *****/
+/***************************************************************************/
+/***************************************************************************/
+
+#define FT_BZIP2_BUFFER_SIZE 4096
+
+ typedef struct FT_BZip2FileRec_
+ {
+ FT_Stream source; /* parent/source stream */
+ FT_Stream stream; /* embedding stream */
+ FT_Memory memory; /* memory allocator */
+ bz_stream bzstream; /* bzlib input stream */
+
+ FT_Byte input[FT_BZIP2_BUFFER_SIZE]; /* input read buffer */
+
+ FT_Byte buffer[FT_BZIP2_BUFFER_SIZE]; /* output buffer */
+ FT_ULong pos; /* position in output */
+ FT_Byte* cursor;
+ FT_Byte* limit;
+
+ } FT_BZip2FileRec, *FT_BZip2File;
+
+
+ /* check and skip .bz2 header - we don't support `transparent' compression */
+ static FT_Error
+ ft_bzip2_check_header( FT_Stream stream )
+ {
+ FT_Error error = Bzip2_Err_Ok;
+ FT_Byte head[4];
+
+
+ if ( FT_STREAM_SEEK( 0 ) ||
+ FT_STREAM_READ( head, 4 ) )
+ goto Exit;
+
+ /* head[0] && head[1] are the magic numbers; */
+ /* head[2] is the version, and head[3] the blocksize */
+ if ( head[0] != 0x42 ||
+ head[1] != 0x5a ||
+ head[2] != 0x68 ) /* only support bzip2 (huffman) */
+ {
+ error = Bzip2_Err_Invalid_File_Format;
+ goto Exit;
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ static FT_Error
+ ft_bzip2_file_init( FT_BZip2File zip,
+ FT_Stream stream,
+ FT_Stream source )
+ {
+ bz_stream* bzstream = &zip->bzstream;
+ FT_Error error = Bzip2_Err_Ok;
+
+
+ zip->stream = stream;
+ zip->source = source;
+ zip->memory = stream->memory;
+
+ zip->limit = zip->buffer + FT_BZIP2_BUFFER_SIZE;
+ zip->cursor = zip->limit;
+ zip->pos = 0;
+
+ /* check .bz2 header */
+ {
+ stream = source;
+
+ error = ft_bzip2_check_header( stream );
+ if ( error )
+ goto Exit;
+
+ if ( FT_STREAM_SEEK( 0 ) )
+ goto Exit;
+ }
+
+ /* initialize bzlib */
+ bzstream->bzalloc = (alloc_func)ft_bzip2_alloc;
+ bzstream->bzfree = (free_func) ft_bzip2_free;
+ bzstream->opaque = zip->memory;
+
+ bzstream->avail_in = 0;
+ bzstream->next_in = (char*)zip->buffer;
+
+ if ( BZ2_bzDecompressInit( bzstream, 0, 0 ) != BZ_OK ||
+ bzstream->next_in == NULL )
+ error = Bzip2_Err_Invalid_File_Format;
+
+ Exit:
+ return error;
+ }
+
+
+ static void
+ ft_bzip2_file_done( FT_BZip2File zip )
+ {
+ bz_stream* bzstream = &zip->bzstream;
+
+
+ BZ2_bzDecompressEnd( bzstream );
+
+ /* clear the rest */
+ bzstream->bzalloc = NULL;
+ bzstream->bzfree = NULL;
+ bzstream->opaque = NULL;
+ bzstream->next_in = NULL;
+ bzstream->next_out = NULL;
+ bzstream->avail_in = 0;
+ bzstream->avail_out = 0;
+
+ zip->memory = NULL;
+ zip->source = NULL;
+ zip->stream = NULL;
+ }
+
+
+ static FT_Error
+ ft_bzip2_file_reset( FT_BZip2File zip )
+ {
+ FT_Stream stream = zip->source;
+ FT_Error error;
+
+
+ if ( !FT_STREAM_SEEK( 0 ) )
+ {
+ bz_stream* bzstream = &zip->bzstream;
+
+
+ BZ2_bzDecompressEnd( bzstream );
+
+ bzstream->avail_in = 0;
+ bzstream->next_in = (char*)zip->input;
+ bzstream->avail_out = 0;
+ bzstream->next_out = (char*)zip->buffer;
+
+ zip->limit = zip->buffer + FT_BZIP2_BUFFER_SIZE;
+ zip->cursor = zip->limit;
+ zip->pos = 0;
+
+ BZ2_bzDecompressInit( bzstream, 0, 0 );
+ }
+
+ return error;
+ }
+
+
+ static FT_Error
+ ft_bzip2_file_fill_input( FT_BZip2File zip )
+ {
+ bz_stream* bzstream = &zip->bzstream;
+ FT_Stream stream = zip->source;
+ FT_ULong size;
+
+
+ if ( stream->read )
+ {
+ size = stream->read( stream, stream->pos, zip->input,
+ FT_BZIP2_BUFFER_SIZE );
+ if ( size == 0 )
+ return Bzip2_Err_Invalid_Stream_Operation;
+ }
+ else
+ {
+ size = stream->size - stream->pos;
+ if ( size > FT_BZIP2_BUFFER_SIZE )
+ size = FT_BZIP2_BUFFER_SIZE;
+
+ if ( size == 0 )
+ return Bzip2_Err_Invalid_Stream_Operation;
+
+ FT_MEM_COPY( zip->input, stream->base + stream->pos, size );
+ }
+ stream->pos += size;
+
+ bzstream->next_in = (char*)zip->input;
+ bzstream->avail_in = size;
+
+ return Bzip2_Err_Ok;
+ }
+
+
+ static FT_Error
+ ft_bzip2_file_fill_output( FT_BZip2File zip )
+ {
+ bz_stream* bzstream = &zip->bzstream;
+ FT_Error error = Bzip2_Err_Ok;
+
+
+ zip->cursor = zip->buffer;
+ bzstream->next_out = (char*)zip->cursor;
+ bzstream->avail_out = FT_BZIP2_BUFFER_SIZE;
+
+ while ( bzstream->avail_out > 0 )
+ {
+ int err;
+
+
+ if ( bzstream->avail_in == 0 )
+ {
+ error = ft_bzip2_file_fill_input( zip );
+ if ( error )
+ break;
+ }
+
+ err = BZ2_bzDecompress( bzstream );
+
+ if ( err == BZ_STREAM_END )
+ {
+ zip->limit = (FT_Byte*)bzstream->next_out;
+ if ( zip->limit == zip->cursor )
+ error = Bzip2_Err_Invalid_Stream_Operation;
+ break;
+ }
+ else if ( err != BZ_OK )
+ {
+ error = Bzip2_Err_Invalid_Stream_Operation;
+ break;
+ }
+ }
+
+ return error;
+ }
+
+
+ /* fill output buffer; `count' must be <= FT_BZIP2_BUFFER_SIZE */
+ static FT_Error
+ ft_bzip2_file_skip_output( FT_BZip2File zip,
+ FT_ULong count )
+ {
+ FT_Error error = Bzip2_Err_Ok;
+ FT_ULong delta;
+
+
+ for (;;)
+ {
+ delta = (FT_ULong)( zip->limit - zip->cursor );
+ if ( delta >= count )
+ delta = count;
+
+ zip->cursor += delta;
+ zip->pos += delta;
+
+ count -= delta;
+ if ( count == 0 )
+ break;
+
+ error = ft_bzip2_file_fill_output( zip );
+ if ( error )
+ break;
+ }
+
+ return error;
+ }
+
+
+ static FT_ULong
+ ft_bzip2_file_io( FT_BZip2File zip,
+ FT_ULong pos,
+ FT_Byte* buffer,
+ FT_ULong count )
+ {
+ FT_ULong result = 0;
+ FT_Error error;
+
+
+ /* Reset inflate stream if we're seeking backwards. */
+ /* Yes, that is not too efficient, but it saves memory :-) */
+ if ( pos < zip->pos )
+ {
+ error = ft_bzip2_file_reset( zip );
+ if ( error )
+ goto Exit;
+ }
+
+ /* skip unwanted bytes */
+ if ( pos > zip->pos )
+ {
+ error = ft_bzip2_file_skip_output( zip, (FT_ULong)( pos - zip->pos ) );
+ if ( error )
+ goto Exit;
+ }
+
+ if ( count == 0 )
+ goto Exit;
+
+ /* now read the data */
+ for (;;)
+ {
+ FT_ULong delta;
+
+
+ delta = (FT_ULong)( zip->limit - zip->cursor );
+ if ( delta >= count )
+ delta = count;
+
+ FT_MEM_COPY( buffer, zip->cursor, delta );
+ buffer += delta;
+ result += delta;
+ zip->cursor += delta;
+ zip->pos += delta;
+
+ count -= delta;
+ if ( count == 0 )
+ break;
+
+ error = ft_bzip2_file_fill_output( zip );
+ if ( error )
+ break;
+ }
+
+ Exit:
+ return result;
+ }
+
+
+/***************************************************************************/
+/***************************************************************************/
+/***** *****/
+/***** B Z E M B E D D I N G S T R E A M *****/
+/***** *****/
+/***************************************************************************/
+/***************************************************************************/
+
+ static void
+ ft_bzip2_stream_close( FT_Stream stream )
+ {
+ FT_BZip2File zip = (FT_BZip2File)stream->descriptor.pointer;
+ FT_Memory memory = stream->memory;
+
+
+ if ( zip )
+ {
+ /* finalize bzip file descriptor */
+ ft_bzip2_file_done( zip );
+
+ FT_FREE( zip );
+
+ stream->descriptor.pointer = NULL;
+ }
+ }
+
+
+ static FT_ULong
+ ft_bzip2_stream_io( FT_Stream stream,
+ FT_ULong pos,
+ FT_Byte* buffer,
+ FT_ULong count )
+ {
+ FT_BZip2File zip = (FT_BZip2File)stream->descriptor.pointer;
+
+
+ return ft_bzip2_file_io( zip, pos, buffer, count );
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stream_OpenBzip2( FT_Stream stream,
+ FT_Stream source )
+ {
+ FT_Error error;
+ FT_Memory memory = source->memory;
+ FT_BZip2File zip = NULL;
+
+
+ /*
+ * check the header right now; this prevents allocating unnecessary
+ * objects when we don't need them
+ */
+ error = ft_bzip2_check_header( source );
+ if ( error )
+ goto Exit;
+
+ FT_ZERO( stream );
+ stream->memory = memory;
+
+ if ( !FT_QNEW( zip ) )
+ {
+ error = ft_bzip2_file_init( zip, stream, source );
+ if ( error )
+ {
+ FT_FREE( zip );
+ goto Exit;
+ }
+
+ stream->descriptor.pointer = zip;
+ }
+
+ stream->size = 0x7FFFFFFFL; /* don't know the real size! */
+ stream->pos = 0;
+ stream->base = 0;
+ stream->read = ft_bzip2_stream_io;
+ stream->close = ft_bzip2_stream_close;
+
+ Exit:
+ return error;
+ }
+
+#else /* !FT_CONFIG_OPTION_USE_BZIP2 */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stream_OpenBzip2( FT_Stream stream,
+ FT_Stream source )
+ {
+ FT_UNUSED( stream );
+ FT_UNUSED( source );
+
+ return Bzip2_Err_Unimplemented_Feature;
+ }
+
+#endif /* !FT_CONFIG_OPTION_USE_BZIP2 */
+
+
+/* END */
diff --git a/3party/freetype/src/bzip2/rules.mk b/3party/freetype/src/bzip2/rules.mk
new file mode 100644
index 0000000000..0ff2628b4a
--- /dev/null
+++ b/3party/freetype/src/bzip2/rules.mk
@@ -0,0 +1,63 @@
+#
+# FreeType 2 BZIP2 support configuration rules
+#
+
+# Copyright 2010 by
+# Joel Klinghed.
+#
+# Based on src/lzw/rules.mk, Copyright 2004-2006 by
+# Albert Chin-A-Young.
+#
+# 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.
+
+
+# BZIP2 driver directory
+#
+BZIP2_DIR := $(SRC_DIR)/bzip2
+
+
+# compilation flags for the driver
+#
+BZIP2_COMPILE := $(FT_COMPILE)
+
+
+# BZIP2 support sources (i.e., C files)
+#
+BZIP2_DRV_SRC := $(BZIP2_DIR)/ftbzip2.c
+
+# BZIP2 driver object(s)
+#
+# BZIP2_DRV_OBJ_M is used during `multi' builds
+# BZIP2_DRV_OBJ_S is used during `single' builds
+#
+BZIP2_DRV_OBJ_M := $(OBJ_DIR)/ftbzip2.$O
+BZIP2_DRV_OBJ_S := $(OBJ_DIR)/ftbzip2.$O
+
+# BZIP2 support source file for single build
+#
+BZIP2_DRV_SRC_S := $(BZIP2_DIR)/ftbzip2.c
+
+
+# BZIP2 support - single object
+#
+$(BZIP2_DRV_OBJ_S): $(BZIP2_DRV_SRC_S) $(BZIP2_DRV_SRC) $(FREETYPE_H) $(BZIP2_DRV_H)
+ $(BZIP2_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(BZIP2_DRV_SRC_S))
+
+
+# BZIP2 support - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(BZIP2_DIR)/%.c $(FREETYPE_H) $(BZIP2_DRV_H)
+ $(BZIP2_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(BZIP2_DRV_OBJ_S)
+DRV_OBJS_M += $(BZIP2_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/cache/Jamfile b/3party/freetype/src/cache/Jamfile
index 340cff7742..340cff7742 100644
--- a/3party/freetype/cache/Jamfile
+++ b/3party/freetype/src/cache/Jamfile
diff --git a/3party/freetype/cache/ftcache.c b/3party/freetype/src/cache/ftcache.c
index d41e91e5ec..d41e91e5ec 100644
--- a/3party/freetype/cache/ftcache.c
+++ b/3party/freetype/src/cache/ftcache.c
diff --git a/3party/freetype/cache/ftcbasic.c b/3party/freetype/src/cache/ftcbasic.c
index dd38347ad3..09d793ecf2 100644
--- a/3party/freetype/cache/ftcbasic.c
+++ b/3party/freetype/src/cache/ftcbasic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType basic cache interface (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,7 @@
#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
#include FT_CACHE_H
#include "ftcglyph.h"
@@ -233,61 +234,12 @@
return error;
}
- FT_Stroker g_stroker = 0;
-
- FT_CALLBACK_DEF( FT_Error )
- ftc_stroked_family_load_glyph( FTC_Family ftcfamily,
- FT_UInt gindex,
- FTC_Cache cache,
- FT_Glyph *aglyph )
- {
- FTC_BasicFamily family = (FTC_BasicFamily)ftcfamily;
- FT_Error error;
- FTC_Scaler scaler = &family->attrs.scaler;
- FT_Face face;
- FT_Size size;
-
-
- /* we will now load the glyph image */
- error = FTC_Manager_LookupSize( cache->manager,
- scaler,
- &size );
- if ( !error )
- {
- face = size->face;
-
- error = FT_Load_Glyph( face, gindex, family->attrs.load_flags );
- if ( !error )
- {
- if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP ||
- face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
- {
- /* ok, copy and stroke it */
- FT_Glyph glyph;
-
- error = FT_Get_Glyph( face->glyph, &glyph );
- error = FT_Glyph_Stroke(&glyph, g_stroker, 1);
- error = FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_NORMAL, 0, 1);
- if ( !error )
- {
- *aglyph = glyph;
- goto Exit;
- }
- }
- else
- error = FTC_Err_Invalid_Argument;
- }
- }
-
- Exit:
- return error;
- }
-
FT_CALLBACK_DEF( FT_Bool )
ftc_basic_gnode_compare_faceid( FTC_Node ftcgnode,
FT_Pointer ftcface_id,
- FTC_Cache cache )
+ FTC_Cache cache,
+ FT_Bool* list_changed )
{
FTC_GNode gnode = (FTC_GNode)ftcgnode;
FTC_FaceID face_id = (FTC_FaceID)ftcface_id;
@@ -295,6 +247,8 @@
FT_Bool result;
+ if ( list_changed )
+ *list_changed = FALSE;
result = FT_BOOL( family->attrs.scaler.face_id == face_id );
if ( result )
{
@@ -355,6 +309,7 @@
(FTC_GCache*)acache );
}
+
/* documentation is in ftcache.h */
FT_EXPORT_DEF( FT_Error )
@@ -367,7 +322,7 @@
FTC_BasicQueryRec query;
FTC_Node node = 0; /* make compiler happy */
FT_Error error;
- FT_UInt32 hash;
+ FT_PtrDist hash;
/* some argument checks are delayed to FTC_Cache_Lookup */
@@ -463,7 +418,7 @@
FTC_BasicQueryRec query;
FTC_Node node = 0; /* make compiler happy */
FT_Error error;
- FT_UInt32 hash;
+ FT_PtrDist hash;
/* some argument checks are delayed to FTC_Cache_Lookup */
@@ -663,45 +618,6 @@
ftc_basic_family_load_bitmap
};
- FT_CALLBACK_TABLE_DEF
- const FTC_IFamilyClassRec ftc_stroked_image_family_class =
- {
- {
- sizeof ( FTC_BasicFamilyRec ),
- ftc_basic_family_compare,
- ftc_basic_family_init,
- 0, /* FTC_MruNode_ResetFunc */
- 0 /* FTC_MruNode_DoneFunc */
- },
- ftc_stroked_family_load_glyph
- };
-
- FT_CALLBACK_TABLE_DEF
- const FTC_GCacheClassRec ftc_stroked_cache_class =
- {
- {
- ftc_inode_new,
- ftc_inode_weight,
- ftc_gnode_compare,
- ftc_basic_gnode_compare_faceid,
- ftc_inode_free,
-
- sizeof ( FTC_GCacheRec ),
- ftc_gcache_init,
- ftc_gcache_done
- },
- (FTC_MruListClass)&ftc_stroked_image_family_class
- };
-
-
- FT_EXPORT_DEF( FT_Error )
- FTC_StrokedImageCache_New(FTC_Manager manager,
- FTC_ImageCache * acache,
- FT_Stroker stroker)
- {
- g_stroker = stroker;
- return FTC_GCache_New( manager, &ftc_stroked_cache_class, (FTC_GCache*)acache);
- }
FT_CALLBACK_TABLE_DEF
const FTC_GCacheClassRec ftc_basic_sbit_cache_class =
@@ -744,7 +660,7 @@
FT_Error error;
FTC_BasicQueryRec query;
FTC_Node node = 0; /* make compiler happy */
- FT_UInt32 hash;
+ FT_PtrDist hash;
if ( anode )
@@ -841,7 +757,7 @@
FT_Error error;
FTC_BasicQueryRec query;
FTC_Node node = 0; /* make compiler happy */
- FT_UInt32 hash;
+ FT_PtrDist hash;
if ( anode )
@@ -922,7 +838,7 @@
if ( !desc )
- return FT_Err_Invalid_Argument;
+ return FTC_Err_Invalid_Argument;
ftc_image_type_from_old_desc( &type0, desc );
diff --git a/3party/freetype/cache/ftccache.c b/3party/freetype/src/cache/ftccache.c
index 463addd99b..f01c403f82 100644
--- a/3party/freetype/cache/ftccache.c
+++ b/3party/freetype/src/cache/ftccache.c
@@ -4,7 +4,8 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, */
+/* 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -32,7 +33,7 @@
#define FTC_HASH_MIN_LOAD 1
#define FTC_HASH_SUB_LOAD ( FTC_HASH_MAX_LOAD - FTC_HASH_MIN_LOAD )
-/* this one _must_ be a power of 2! */
+ /* this one _must_ be a power of 2! */
#define FTC_HASH_INITIAL_SIZE 8
@@ -83,6 +84,25 @@
(FTC_MruNode)node );
}
+
+ /* get a top bucket for specified hash from cache,
+ * body for FTC_NODE__TOP_FOR_HASH( cache, hash )
+ */
+ FT_LOCAL_DEF( FTC_Node* )
+ ftc_get_top_node_for_hash( FTC_Cache cache,
+ FT_PtrDist hash )
+ {
+ FTC_Node* pnode;
+ FT_UInt idx;
+
+
+ idx = (FT_UInt)( hash & cache->mask );
+ if ( idx < cache->p )
+ idx = (FT_UInt)( hash & ( 2 * cache->mask + 1 ) );
+ pnode = cache->buckets + idx;
+ return pnode;
+ }
+
#endif /* !FTC_INLINE */
@@ -96,9 +116,9 @@
for (;;)
{
FTC_Node node, *pnode;
- FT_UFast p = cache->p;
- FT_UFast mask = cache->mask;
- FT_UFast count = mask + p + 1; /* number of buckets */
+ FT_UFast p = cache->p;
+ FT_UFast mask = cache->mask;
+ FT_UFast count = mask + p + 1; /* number of buckets */
/* do we need to shrink the buckets array? */
@@ -117,7 +137,8 @@
/* if we can't expand the array, leave immediately */
- if ( FT_RENEW_ARRAY( cache->buckets, (mask+1)*2, (mask+1)*4 ) )
+ if ( FT_RENEW_ARRAY( cache->buckets,
+ ( mask + 1 ) * 2, ( mask + 1 ) * 4 ) )
break;
}
@@ -191,7 +212,9 @@
cache->slack -= FTC_HASH_MAX_LOAD;
cache->p = p;
}
- else /* the hash table is balanced */
+
+ /* otherwise, the hash table is balanced */
+ else
break;
}
}
@@ -202,15 +225,8 @@
ftc_node_hash_unlink( FTC_Node node0,
FTC_Cache cache )
{
- FTC_Node *pnode;
- FT_UInt idx;
-
-
- idx = (FT_UInt)( node0->hash & cache->mask );
- if ( idx < cache->p )
- idx = (FT_UInt)( node0->hash & ( 2 * cache->mask + 1 ) );
+ FTC_Node *pnode = FTC_NODE__TOP_FOR_HASH( cache, node0->hash );
- pnode = cache->buckets + idx;
for (;;)
{
@@ -242,16 +258,9 @@
ftc_node_hash_link( FTC_Node node,
FTC_Cache cache )
{
- FTC_Node *pnode;
- FT_UInt idx;
+ FTC_Node *pnode = FTC_NODE__TOP_FOR_HASH( cache, node->hash );
- idx = (FT_UInt)( node->hash & cache->mask );
- if ( idx < cache->p )
- idx = (FT_UInt)( node->hash & (2 * cache->mask + 1 ) );
-
- pnode = cache->buckets + idx;
-
node->link = *pnode;
*pnode = node;
@@ -346,7 +355,7 @@
static void
FTC_Cache_Clear( FTC_Cache cache )
{
- if ( cache )
+ if ( cache && cache->buckets )
{
FTC_Manager manager = cache->manager;
FT_UFast i;
@@ -410,11 +419,11 @@
static void
ftc_cache_add( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FTC_Node node )
{
- node->hash = hash;
- node->cache_index = (FT_UInt16) cache->index;
+ node->hash = hash;
+ node->cache_index = (FT_UInt16)cache->index;
node->ref_count = 0;
ftc_node_hash_link( node, cache );
@@ -438,7 +447,7 @@
FT_LOCAL_DEF( FT_Error )
FTC_Cache_NewNode( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_Pointer query,
FTC_Node *anode )
{
@@ -456,7 +465,7 @@
{
error = cache->clazz.node_new( &node, query, cache );
}
- FTC_CACHE_TRYLOOP_END();
+ FTC_CACHE_TRYLOOP_END( NULL );
if ( error )
node = NULL;
@@ -477,40 +486,59 @@
FT_LOCAL_DEF( FT_Error )
FTC_Cache_Lookup( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_Pointer query,
FTC_Node *anode )
{
- FT_UFast idx;
FTC_Node* bucket;
FTC_Node* pnode;
FTC_Node node;
- FT_Error error = 0;
+ FT_Error error = FTC_Err_Ok;
+ FT_Bool list_changed = FALSE;
FTC_Node_CompareFunc compare = cache->clazz.node_compare;
if ( cache == NULL || anode == NULL )
- return FT_Err_Invalid_Argument;
+ return FTC_Err_Invalid_Argument;
- idx = hash & cache->mask;
- if ( idx < cache->p )
- idx = hash & ( cache->mask * 2 + 1 );
+ /* Go to the `top' node of the list sharing same masked hash */
+ bucket = pnode = FTC_NODE__TOP_FOR_HASH( cache, hash );
- bucket = cache->buckets + idx;
- pnode = bucket;
+ /* Lookup a node with exactly same hash and queried properties. */
+ /* NOTE: _nodcomp() may change the linked list to reduce memory. */
for (;;)
{
node = *pnode;
if ( node == NULL )
goto NewNode;
- if ( node->hash == hash && compare( node, query, cache ) )
+ if ( node->hash == hash &&
+ compare( node, query, cache, &list_changed ) )
break;
pnode = &node->link;
}
+ if ( list_changed )
+ {
+ /* Update bucket by modified linked list */
+ bucket = pnode = FTC_NODE__TOP_FOR_HASH( cache, hash );
+
+ /* Update pnode by modified linked list */
+ while ( *pnode != node )
+ {
+ if ( *pnode == NULL )
+ {
+ FT_ERROR(( "FTC_Cache_Lookup: oops!!! node missing\n" ));
+ goto NewNode;
+ }
+ else
+ pnode = &((*pnode)->link);
+ }
+ }
+
+ /* Reorder the list to move the found node to the `top' */
if ( node != *bucket )
{
*pnode = node->link;
@@ -527,6 +555,7 @@
ftc_node_mru_up( node, manager );
}
*anode = node;
+
return error;
NewNode:
@@ -545,7 +574,7 @@
FTC_Node frees = NULL;
- count = cache->p + cache->mask;
+ count = cache->p + cache->mask + 1;
for ( i = 0; i < count; i++ )
{
FTC_Node* bucket = cache->buckets + i;
@@ -555,12 +584,14 @@
for ( ;; )
{
FTC_Node node = *pnode;
+ FT_Bool list_changed = FALSE;
if ( node == NULL )
break;
- if ( cache->clazz.node_remove_faceid( node, face_id, cache ) )
+ if ( cache->clazz.node_remove_faceid( node, face_id,
+ cache, &list_changed ) )
{
*pnode = node->link;
node->link = frees;
diff --git a/3party/freetype/cache/ftccache.h b/3party/freetype/src/cache/ftccache.h
index 2082bc4f4f..d60984f77f 100644
--- a/3party/freetype/cache/ftccache.h
+++ b/3party/freetype/src/cache/ftccache.h
@@ -4,7 +4,8 @@
/* */
/* FreeType internal cache interface (specification). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, */
+/* 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +25,9 @@
FT_BEGIN_HEADER
+#define _FTC_FACE_ID_HASH( i ) \
+ ((FT_PtrDist)(( (FT_PtrDist)(i) >> 3 ) ^ ( (FT_PtrDist)(i) << 7 )))
+
/* handle to cache object */
typedef struct FTC_CacheRec_* FTC_Cache;
@@ -56,7 +60,7 @@ FT_BEGIN_HEADER
{
FTC_MruNodeRec mru; /* circular mru list pointer */
FTC_Node link; /* used for hashing */
- FT_UInt32 hash; /* used for hashing too */
+ FT_PtrDist hash; /* used for hashing too */
FT_UShort cache_index; /* index of cache the node belongs to */
FT_Short ref_count; /* reference count for this node */
@@ -69,6 +73,19 @@ FT_BEGIN_HEADER
#define FTC_NODE__NEXT( x ) FTC_NODE( (x)->mru.next )
#define FTC_NODE__PREV( x ) FTC_NODE( (x)->mru.prev )
+#ifdef FTC_INLINE
+#define FTC_NODE__TOP_FOR_HASH( cache, hash ) \
+ ( ( cache )->buckets + \
+ ( ( ( ( hash ) & ( cache )->mask ) < ( cache )->p ) \
+ ? ( ( hash ) & ( ( cache )->mask * 2 + 1 ) ) \
+ : ( ( hash ) & ( cache )->mask ) ) )
+#else
+ FT_LOCAL( FTC_Node* )
+ ftc_get_top_node_for_hash( FTC_Cache cache,
+ FT_PtrDist hash );
+#define FTC_NODE__TOP_FOR_HASH( cache, hash ) \
+ ftc_get_top_node_for_hash( ( cache ), ( hash ) )
+#endif
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_BASE( void )
@@ -99,7 +116,8 @@ FT_BEGIN_HEADER
typedef FT_Bool
(*FTC_Node_CompareFunc)( FTC_Node node,
FT_Pointer key,
- FTC_Cache cache );
+ FTC_Cache cache,
+ FT_Bool* list_changed );
typedef void
@@ -159,7 +177,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
FTC_Cache_Done( FTC_Cache cache );
- /* Call this function to lookup the cache. If no corresponding
+ /* Call this function to look up the cache. If no corresponding
* node is found, a new one is automatically created. This function
* is capable of flushing the cache adequately to make room for the
* new cache object.
@@ -168,20 +186,20 @@ FT_BEGIN_HEADER
#ifndef FTC_INLINE
FT_LOCAL( FT_Error )
FTC_Cache_Lookup( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_Pointer query,
FTC_Node *anode );
#endif
FT_LOCAL( FT_Error )
FTC_Cache_NewNode( FTC_Cache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_Pointer query,
FTC_Node *anode );
/* Remove all nodes that relate to a given face_id. This is useful
* when un-installing fonts. Note that if a cache node relates to
- * the face_id, but is locked (i.e., has `ref_count > 0'), the node
+ * the face_id but is locked (i.e., has `ref_count > 0'), the node
* will _not_ be destroyed, but its internal face_id reference will
* be modified.
*
@@ -200,30 +218,51 @@ FT_BEGIN_HEADER
FT_BEGIN_STMNT \
FTC_Node *_bucket, *_pnode, _node; \
FTC_Cache _cache = FTC_CACHE(cache); \
- FT_UInt32 _hash = (FT_UInt32)(hash); \
+ FT_PtrDist _hash = (FT_PtrDist)(hash); \
FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \
- FT_UFast _idx; \
+ FT_Bool _list_changed = FALSE; \
\
\
- error = 0; \
+ error = FTC_Err_Ok; \
node = NULL; \
- _idx = _hash & _cache->mask; \
- if ( _idx < _cache->p ) \
- _idx = _hash & ( _cache->mask*2 + 1 ); \
\
- _bucket = _pnode = _cache->buckets + _idx; \
+ /* Go to the `top' node of the list sharing same masked hash */ \
+ _bucket = _pnode = FTC_NODE__TOP_FOR_HASH( _cache, _hash ); \
+ \
+ /* Look up a node with identical hash and queried properties. */ \
+ /* NOTE: _nodcomp() may change the linked list to reduce memory. */ \
for (;;) \
{ \
_node = *_pnode; \
if ( _node == NULL ) \
goto _NewNode; \
\
- if ( _node->hash == _hash && _nodcomp( _node, query, _cache ) ) \
+ if ( _node->hash == _hash && \
+ _nodcomp( _node, query, _cache, &_list_changed ) ) \
break; \
\
_pnode = &_node->link; \
} \
\
+ if ( _list_changed ) \
+ { \
+ /* Update _bucket by possibly modified linked list */ \
+ _bucket = _pnode = FTC_NODE__TOP_FOR_HASH( _cache, _hash ); \
+ \
+ /* Update _pnode by possibly modified linked list */ \
+ while ( *_pnode != _node ) \
+ { \
+ if ( *_pnode == NULL ) \
+ { \
+ FT_ERROR(( "FTC_CACHE_LOOKUP_CMP: oops!!! node missing\n" )); \
+ goto _NewNode; \
+ } \
+ else \
+ _pnode = &((*_pnode)->link); \
+ } \
+ } \
+ \
+ /* Reorder the list to move the found node to the `top' */ \
if ( _node != *_bucket ) \
{ \
*_pnode = _node->link; \
@@ -231,6 +270,7 @@ FT_BEGIN_HEADER
*_bucket = _node; \
} \
\
+ /* Update MRU list */ \
{ \
FTC_Manager _manager = _cache->manager; \
void* _nl = &_manager->nodes_list; \
@@ -265,7 +305,7 @@ FT_BEGIN_HEADER
* loop to flush the cache repeatedly in case of memory overflows.
*
* It is used when creating a new cache node, or within a lookup
- * that needs to allocate data (e.g., the sbit cache lookup).
+ * that needs to allocate data (e.g. the sbit cache lookup).
*
* Example:
*
@@ -287,11 +327,14 @@ FT_BEGIN_HEADER
FT_UInt _try_done;
-#define FTC_CACHE_TRYLOOP_END() \
- if ( !error || error != FT_Err_Out_Of_Memory ) \
+#define FTC_CACHE_TRYLOOP_END( list_changed ) \
+ if ( !error || error != FTC_Err_Out_Of_Memory ) \
break; \
\
_try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
+ if ( _try_done > 0 && ( list_changed ) ) \
+ *(FT_Bool*)( list_changed ) = TRUE; \
+ \
if ( _try_done == 0 ) \
break; \
\
diff --git a/3party/freetype/cache/ftccback.h b/3party/freetype/src/cache/ftccback.h
index 4d0818db27..80ec9ce44b 100644
--- a/3party/freetype/cache/ftccback.h
+++ b/3party/freetype/src/cache/ftccback.h
@@ -4,7 +4,7 @@
/* */
/* Callback functions of the caching sub-system (specification only). */
/* */
-/* Copyright 2004, 2005, 2006 by */
+/* Copyright 2004, 2005, 2006, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -57,13 +57,15 @@
FT_LOCAL( FT_Bool )
ftc_snode_compare( FTC_Node snode,
FT_Pointer gquery,
- FTC_Cache cache );
+ FTC_Cache cache,
+ FT_Bool* list_changed );
FT_LOCAL( FT_Bool )
ftc_gnode_compare( FTC_Node gnode,
FT_Pointer gquery,
- FTC_Cache cache );
+ FTC_Cache cache,
+ FT_Bool* list_changed );
FT_LOCAL( FT_Error )
diff --git a/3party/freetype/cache/ftccmap.c b/3party/freetype/src/cache/ftccmap.c
index a802b0557c..b7bd2919d9 100644
--- a/3party/freetype/cache/ftccmap.c
+++ b/3party/freetype/src/cache/ftccmap.c
@@ -4,7 +4,8 @@
/* */
/* FreeType CharMap cache (body) */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +22,7 @@
#include FT_CACHE_H
#include "ftcmanag.h"
#include FT_INTERNAL_MEMORY_H
+#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
#include "ftccback.h"
@@ -86,7 +88,7 @@
/* compute a query/node hash */
#define FTC_CMAP_HASH( faceid, index, charcode ) \
- ( FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \
+ ( _FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \
( (charcode) / FTC_CMAP_INDICES_MAX ) )
/* the charmap query */
@@ -153,7 +155,7 @@
FTC_CMapQuery query = (FTC_CMapQuery)ftcquery;
FT_Error error;
FT_Memory memory = cache->memory;
- FTC_CMapNode node;
+ FTC_CMapNode node = NULL;
FT_UInt nn;
@@ -189,13 +191,16 @@
FT_CALLBACK_DEF( FT_Bool )
ftc_cmap_node_compare( FTC_Node ftcnode,
FT_Pointer ftcquery,
- FTC_Cache cache )
+ FTC_Cache cache,
+ FT_Bool* list_changed )
{
FTC_CMapNode node = (FTC_CMapNode)ftcnode;
FTC_CMapQuery query = (FTC_CMapQuery)ftcquery;
FT_UNUSED( cache );
+ if ( list_changed )
+ *list_changed = FALSE;
if ( node->face_id == query->face_id &&
node->cmap_index == query->cmap_index )
{
@@ -212,12 +217,16 @@
FT_CALLBACK_DEF( FT_Bool )
ftc_cmap_node_remove_faceid( FTC_Node ftcnode,
FT_Pointer ftcface_id,
- FTC_Cache cache )
+ FTC_Cache cache,
+ FT_Bool* list_changed )
{
FTC_CMapNode node = (FTC_CMapNode)ftcnode;
FTC_FaceID face_id = (FTC_FaceID)ftcface_id;
FT_UNUSED( cache );
+
+ if ( list_changed )
+ *list_changed = FALSE;
return FT_BOOL( node->face_id == face_id );
}
@@ -286,7 +295,7 @@
FTC_Node node;
FT_Error error;
FT_UInt gindex = 0;
- FT_UInt32 hash;
+ FT_PtrDist hash;
FT_Int no_cmap_change = 0;
@@ -310,19 +319,11 @@
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*
- * Detect a call from a rogue client that thinks it is linking
- * to FreeType 2.1.7. This is possible because the third parameter
- * is then a character code, and we have never seen any font with
- * more than a few charmaps, so if the index is very large...
- *
- * It is also very unlikely that a rogue client is interested
- * in Unicode values 0 to 15.
- *
- * NOTE: The original threshold was 4, but we found a font from the
- * Adobe Acrobat Reader Pack, named `KozMinProVI-Regular.otf',
- * which contains more than 5 charmaps.
+ * If cmap_index is greater than the maximum number of cachable
+ * charmaps, we assume the request is from a legacy rogue client
+ * using old internal header. See include/config/ftoption.h.
*/
- if ( cmap_index >= 16 && !no_cmap_change )
+ if ( cmap_index > FT_MAX_CHARMAP_CACHEABLE && !no_cmap_change )
{
FTC_OldCMapDesc desc = (FTC_OldCMapDesc) face_id;
@@ -384,7 +385,7 @@
/* something rotten can happen with rogue clients */
if ( (FT_UInt)( char_code - FTC_CMAP_NODE( node )->first >=
FTC_CMAP_INDICES_MAX ) )
- return 0;
+ return 0; /* XXX: should return appropriate error */
gindex = FTC_CMAP_NODE( node )->indices[char_code -
FTC_CMAP_NODE( node )->first];
@@ -401,6 +402,12 @@
if ( error )
goto Exit;
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ /* something rotten can happen with rogue clients */
+ if ( cmap_index > FT_MAX_CHARMAP_CACHEABLE )
+ return 0; /* XXX: should return appropriate error */
+#endif
+
if ( (FT_UInt)cmap_index < (FT_UInt)face->num_charmaps )
{
FT_CharMap old, cmap = NULL;
diff --git a/3party/freetype/cache/ftcerror.h b/3party/freetype/src/cache/ftcerror.h
index 5998d42daf..5998d42daf 100644
--- a/3party/freetype/cache/ftcerror.h
+++ b/3party/freetype/src/cache/ftcerror.h
diff --git a/3party/freetype/cache/ftcglyph.c b/3party/freetype/src/cache/ftcglyph.c
index 2f462a2f64..441e177238 100644
--- a/3party/freetype/cache/ftcglyph.c
+++ b/3party/freetype/src/cache/ftcglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Glyph Image (FT_Glyph) cache (body). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2006, 2009 by */
+/* Copyright 2000-2001, 2003, 2004, 2006, 2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,7 @@
#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
#include FT_CACHE_H
#include "ftcglyph.h"
#include FT_ERRORS_H
@@ -64,25 +65,34 @@
FT_LOCAL_DEF( FT_Bool )
ftc_gnode_compare( FTC_Node ftcgnode,
FT_Pointer ftcgquery,
- FTC_Cache cache )
+ FTC_Cache cache,
+ FT_Bool* list_changed )
{
FTC_GNode gnode = (FTC_GNode)ftcgnode;
FTC_GQuery gquery = (FTC_GQuery)ftcgquery;
FT_UNUSED( cache );
- return FT_BOOL( gnode->family == gquery->family &&
- gnode->gindex == gquery->gindex );
+ if ( list_changed )
+ *list_changed = FALSE;
+ return FT_BOOL( gnode->family == gquery->family &&
+ gnode->gindex == gquery->gindex );
}
+#ifdef FTC_INLINE
+
FT_LOCAL_DEF( FT_Bool )
FTC_GNode_Compare( FTC_GNode gnode,
- FTC_GQuery gquery )
+ FTC_GQuery gquery,
+ FTC_Cache cache,
+ FT_Bool* list_changed )
{
- return ftc_gnode_compare( FTC_NODE( gnode ), gquery, NULL );
+ return ftc_gnode_compare( FTC_NODE( gnode ), gquery,
+ cache, list_changed );
}
+#endif
/*************************************************************************/
/*************************************************************************/
@@ -175,7 +185,7 @@
FT_LOCAL_DEF( FT_Error )
FTC_GCache_Lookup( FTC_GCache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_UInt gindex,
FTC_GQuery query,
FTC_Node *anode )
diff --git a/3party/freetype/cache/ftcglyph.h b/3party/freetype/src/cache/ftcglyph.h
index c18f9c3af3..5fed19cb8f 100644
--- a/3party/freetype/cache/ftcglyph.h
+++ b/3party/freetype/src/cache/ftcglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType abstract glyph cache (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2006, 2007 by */
+/* Copyright 2000-2001, 2003, 2004, 2006, 2007, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -180,12 +180,18 @@ FT_BEGIN_HEADER
FT_UInt gindex, /* glyph index for node */
FTC_Family family );
+#ifdef FTC_INLINE
+
/* returns TRUE iff the query's glyph index correspond to the node; */
/* this assumes that the `family' and `hash' fields of the query are */
/* already correctly set */
FT_LOCAL( FT_Bool )
FTC_GNode_Compare( FTC_GNode gnode,
- FTC_GQuery gquery );
+ FTC_GQuery gquery,
+ FTC_Cache cache,
+ FT_Bool* list_changed );
+
+#endif
/* call this function to clear a node's family -- this is necessary */
/* to implement the `node_remove_faceid' cache method correctly */
@@ -254,7 +260,7 @@ FT_BEGIN_HEADER
#ifndef FTC_INLINE
FT_LOCAL( FT_Error )
FTC_GCache_Lookup( FTC_GCache cache,
- FT_UInt32 hash,
+ FT_PtrDist hash,
FT_UInt gindex,
FTC_GQuery query,
FTC_Node *anode );
@@ -307,7 +313,7 @@ FT_BEGIN_HEADER
FT_BEGIN_STMNT \
\
error = FTC_GCache_Lookup( FTC_GCACHE( cache ), hash, gindex, \
- FTC_GQUERY( query ), node ); \
+ FTC_GQUERY( query ), &node ); \
\
FT_END_STMNT
diff --git a/3party/freetype/cache/ftcimage.c b/3party/freetype/src/cache/ftcimage.c
index 417daf2aae..c242ece021 100644
--- a/3party/freetype/cache/ftcimage.c
+++ b/3party/freetype/src/cache/ftcimage.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Image cache (body). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2006 by */
+/* Copyright 2000-2001, 2003, 2004, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -61,7 +61,7 @@
{
FT_Memory memory = cache->memory;
FT_Error error;
- FTC_INode inode;
+ FTC_INode inode = NULL;
if ( !FT_NEW( inode ) )
diff --git a/3party/freetype/cache/ftcimage.h b/3party/freetype/src/cache/ftcimage.h
index 20d5d3e07d..20d5d3e07d 100644
--- a/3party/freetype/cache/ftcimage.h
+++ b/3party/freetype/src/cache/ftcimage.h
diff --git a/3party/freetype/cache/ftcmanag.c b/3party/freetype/src/cache/ftcmanag.c
index f2a298e7d9..548ebe951f 100644
--- a/3party/freetype/cache/ftcmanag.c
+++ b/3party/freetype/src/cache/ftcmanag.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -670,7 +670,7 @@
* the face_id as well
*/
FTC_MruList_RemoveSelection( &manager->faces,
- (FTC_MruNode_CompareFunc)NULL,
+ ftc_face_node_compare,
face_id );
for ( nn = 0; nn < manager->num_caches; nn++ )
diff --git a/3party/freetype/cache/ftcmanag.h b/3party/freetype/src/cache/ftcmanag.h
index 3fdc2c773b..d6c85162a5 100644
--- a/3party/freetype/cache/ftcmanag.h
+++ b/3party/freetype/src/cache/ftcmanag.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2006 by */
+/* Copyright 2000-2001, 2003, 2004, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -161,7 +161,7 @@ FT_BEGIN_HEADER
(a)->y_res == (b)->y_res ) ) )
#define FTC_SCALER_HASH( q ) \
- ( FTC_FACE_ID_HASH( (q)->face_id ) + \
+ ( _FTC_FACE_ID_HASH( (q)->face_id ) + \
(q)->width + (q)->height*7 + \
( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )
diff --git a/3party/freetype/cache/ftcmru.c b/3party/freetype/src/cache/ftcmru.c
index 9944b58980..dc8b4cc397 100644
--- a/3party/freetype/cache/ftcmru.c
+++ b/3party/freetype/src/cache/ftcmru.c
@@ -161,7 +161,7 @@
*plist = NULL;
}
else if ( node == first )
- *plist = next;
+ *plist = next;
}
@@ -238,7 +238,7 @@
FTC_MruNode *anode )
{
FT_Error error;
- FTC_MruNode node;
+ FTC_MruNode node = NULL;
FT_Memory memory = list->memory;
@@ -264,14 +264,14 @@
list->clazz.node_done( node, list->data );
}
else if ( FT_ALLOC( node, list->clazz.node_size ) )
- goto Exit;
+ goto Exit;
error = list->clazz.node_init( node, key, list->data );
if ( error )
goto Fail;
- FTC_MruNode_Prepend( &list->nodes, node );
- list->num_nodes++;
+ FTC_MruNode_Prepend( &list->nodes, node );
+ list->num_nodes++;
Exit:
*anode = node;
@@ -316,7 +316,7 @@
if ( list->clazz.node_done )
- list->clazz.node_done( node, list->data );
+ list->clazz.node_done( node, list->data );
FT_FREE( node );
}
diff --git a/3party/freetype/cache/ftcmru.h b/3party/freetype/src/cache/ftcmru.h
index 5739439f45..8c3797fb05 100644
--- a/3party/freetype/cache/ftcmru.h
+++ b/3party/freetype/src/cache/ftcmru.h
@@ -4,7 +4,7 @@
/* */
/* Simple MRU list-cache (specification). */
/* */
-/* Copyright 2000-2001, 2003, 2004, 2005, 2006 by */
+/* Copyright 2000-2001, 2003, 2004, 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -166,7 +166,7 @@ FT_BEGIN_HEADER
FTC_MruNode _first, _node; \
\
\
- error = 0; \
+ error = FTC_Err_Ok; \
_first = *(_pfirst); \
_node = NULL; \
\
diff --git a/3party/freetype/cache/ftcsbits.c b/3party/freetype/src/cache/ftcsbits.c
index 60d46aa7a0..8bf8d607eb 100644
--- a/3party/freetype/cache/ftcsbits.c
+++ b/3party/freetype/src/cache/ftcsbits.c
@@ -4,7 +4,7 @@
/* */
/* FreeType sbits manager (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -160,7 +160,11 @@
!CHECK_CHAR( slot->bitmap_top ) ||
!CHECK_CHAR( xadvance ) ||
!CHECK_CHAR( yadvance ) )
+ {
+ FT_TRACE2(( "ftc_snode_load:"
+ " glyph too large for small bitmap cache\n"));
goto BadGlyph;
+ }
sbit->width = (FT_Byte)bitmap->width;
sbit->height = (FT_Byte)bitmap->rows;
@@ -191,7 +195,7 @@
sbit->width = 255;
sbit->height = 0;
sbit->buffer = NULL;
- error = 0;
+ error = FTC_Err_Ok;
if ( asize )
*asize = 0;
}
@@ -213,12 +217,13 @@
FTC_SFamilyClass clazz = FTC_CACHE__SFAMILY_CLASS( cache );
FT_UInt total;
+ FT_UInt node_count;
total = clazz->family_get_count( family, cache->manager );
if ( total == 0 || gindex >= total )
{
- error = FT_Err_Invalid_Argument;
+ error = FTC_Err_Invalid_Argument;
goto Exit;
}
@@ -235,6 +240,10 @@
FTC_GNode_Init( FTC_GNODE( snode ), start, family );
snode->count = count;
+ for ( node_count = 0; node_count < count; node_count++ )
+ {
+ snode->sbits[node_count].width = 255;
+ }
error = ftc_snode_load( snode,
cache->manager,
@@ -315,7 +324,8 @@
FT_LOCAL_DEF( FT_Bool )
ftc_snode_compare( FTC_Node ftcsnode,
FT_Pointer ftcgquery,
- FTC_Cache cache )
+ FTC_Cache cache,
+ FT_Bool* list_changed )
{
FTC_SNode snode = (FTC_SNode)ftcsnode;
FTC_GQuery gquery = (FTC_GQuery)ftcgquery;
@@ -324,6 +334,8 @@
FT_Bool result;
+ if (list_changed)
+ *list_changed = FALSE;
result = FT_BOOL( gnode->family == gquery->family &&
(FT_UInt)( gindex - gnode->gindex ) < snode->count );
if ( result )
@@ -364,7 +376,7 @@
*
*/
- if ( sbit->buffer == NULL && sbit->width != 255 )
+ if ( sbit->buffer == NULL && sbit->width == 255 )
{
FT_ULong size;
FT_Error error;
@@ -377,7 +389,7 @@
{
error = ftc_snode_load( snode, cache->manager, gindex, &size );
}
- FTC_CACHE_TRYLOOP_END();
+ FTC_CACHE_TRYLOOP_END( list_changed );
ftcsnode->ref_count--; /* unlock the node */
@@ -392,13 +404,18 @@
}
+#ifdef FTC_INLINE
+
FT_LOCAL_DEF( FT_Bool )
FTC_SNode_Compare( FTC_SNode snode,
FTC_GQuery gquery,
- FTC_Cache cache )
+ FTC_Cache cache,
+ FT_Bool* list_changed )
{
- return ftc_snode_compare( FTC_NODE( snode ), gquery, cache );
+ return ftc_snode_compare( FTC_NODE( snode ), gquery,
+ cache, list_changed );
}
+#endif
/* END */
diff --git a/3party/freetype/cache/ftcsbits.h b/3party/freetype/src/cache/ftcsbits.h
index 6261745f1e..df55dca806 100644
--- a/3party/freetype/cache/ftcsbits.h
+++ b/3party/freetype/src/cache/ftcsbits.h
@@ -4,7 +4,7 @@
/* */
/* A small-bitmap cache (specification). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2006 by */
+/* Copyright 2000-2001, 2002, 2003, 2006, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -83,10 +83,15 @@ FT_BEGIN_HEADER
#endif
+#ifdef FTC_INLINE
+
FT_LOCAL( FT_Bool )
FTC_SNode_Compare( FTC_SNode snode,
FTC_GQuery gquery,
- FTC_Cache cache );
+ FTC_Cache cache,
+ FT_Bool* list_changed);
+
+#endif
/* */
diff --git a/3party/freetype/src/cache/rules.mk b/3party/freetype/src/cache/rules.mk
new file mode 100644
index 0000000000..ed75a6a91f
--- /dev/null
+++ b/3party/freetype/src/cache/rules.mk
@@ -0,0 +1,80 @@
+#
+# FreeType 2 Cache configuration rules
+#
+
+
+# Copyright 2000, 2001, 2003, 2004, 2006, 2008 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.
+
+
+# Cache driver directory
+#
+CACHE_DIR := $(SRC_DIR)/cache
+
+# compilation flags for the driver
+#
+CACHE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CACHE_DIR))
+
+
+# Cache driver sources (i.e., C files)
+#
+CACHE_DRV_SRC := $(CACHE_DIR)/ftcbasic.c \
+ $(CACHE_DIR)/ftccache.c \
+ $(CACHE_DIR)/ftccmap.c \
+ $(CACHE_DIR)/ftcglyph.c \
+ $(CACHE_DIR)/ftcimage.c \
+ $(CACHE_DIR)/ftcmanag.c \
+ $(CACHE_DIR)/ftcmru.c \
+ $(CACHE_DIR)/ftcsbits.c
+
+# Cache driver headers
+#
+CACHE_DRV_H := $(CACHE_DIR)/ftccache.h \
+ $(CACHE_DIR)/ftccback.h \
+ $(CACHE_DIR)/ftcerror.h \
+ $(CACHE_DIR)/ftcglyph.h \
+ $(CACHE_DIR)/ftcimage.h \
+ $(CACHE_DIR)/ftcmanag.h \
+ $(CACHE_DIR)/ftcmru.h \
+ $(CACHE_DIR)/ftcsbits.h
+
+
+# Cache driver object(s)
+#
+# CACHE_DRV_OBJ_M is used during `multi' builds.
+# CACHE_DRV_OBJ_S is used during `single' builds.
+#
+CACHE_DRV_OBJ_M := $(CACHE_DRV_SRC:$(CACHE_DIR)/%.c=$(OBJ_DIR)/%.$O)
+CACHE_DRV_OBJ_S := $(OBJ_DIR)/ftcache.$O
+
+# Cache driver source file for single build
+#
+CACHE_DRV_SRC_S := $(CACHE_DIR)/ftcache.c
+
+
+# Cache driver - single object
+#
+$(CACHE_DRV_OBJ_S): $(CACHE_DRV_SRC_S) $(CACHE_DRV_SRC) \
+ $(FREETYPE_H) $(CACHE_DRV_H)
+ $(CACHE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(CACHE_DRV_SRC_S))
+
+
+# Cache driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(CACHE_DIR)/%.c $(FREETYPE_H) $(CACHE_DRV_H)
+ $(CACHE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(CACHE_DRV_OBJ_S)
+DRV_OBJS_M += $(CACHE_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/cff/Jamfile b/3party/freetype/src/cff/Jamfile
index 6705d3cfdb..6705d3cfdb 100644
--- a/3party/freetype/cff/Jamfile
+++ b/3party/freetype/src/cff/Jamfile
diff --git a/3party/freetype/cff/cff.c b/3party/freetype/src/cff/cff.c
index fccfd442f5..fccfd442f5 100644
--- a/3party/freetype/cff/cff.c
+++ b/3party/freetype/src/cff/cff.c
diff --git a/3party/freetype/cff/cffcmap.c b/3party/freetype/src/cff/cffcmap.c
index 46d603e3a8..1298371105 100644
--- a/3party/freetype/cff/cffcmap.c
+++ b/3party/freetype/src/cff/cffcmap.c
@@ -4,7 +4,7 @@
/* */
/* CFF character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -120,27 +120,15 @@
/*************************************************************************/
FT_CALLBACK_DEF( const char* )
- cff_sid_to_glyph_name( TT_Face face,
- FT_UInt idx )
+ cff_sid_to_glyph_name( TT_Face face,
+ FT_UInt idx )
{
- CFF_Font cff = (CFF_Font)face->extra.data;
- CFF_Charset charset = &cff->charset;
- FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
- FT_UInt sid = charset->sids[idx];
-
-
- return cff_index_get_sid_string( &cff->string_index, sid, psnames );
- }
-
-
- FT_CALLBACK_DEF( void )
- cff_sid_free_glyph_name( TT_Face face,
- const char* gname )
- {
- FT_Memory memory = FT_FACE_MEMORY( face );
+ CFF_Font cff = (CFF_Font)face->extra.data;
+ CFF_Charset charset = &cff->charset;
+ FT_UInt sid = charset->sids[idx];
- FT_FREE( gname );
+ return cff_index_get_sid_string( cff, sid );
}
@@ -155,14 +143,15 @@
/* can't build Unicode map for CID-keyed font */
+ /* because we don't know glyph names. */
if ( !charset->sids )
- return CFF_Err_Invalid_Argument;
+ return CFF_Err_No_Unicode_Glyph_Name;
return psnames->unicodes_init( memory,
unicodes,
cff->num_glyphs,
(PS_GetGlyphNameFunc)&cff_sid_to_glyph_name,
- (PS_FreeGlyphNameFunc)&cff_sid_free_glyph_name,
+ (PS_FreeGlyphNameFunc)NULL,
(FT_Pointer)face );
}
diff --git a/3party/freetype/cff/cffcmap.h b/3party/freetype/src/cff/cffcmap.h
index 3f7f67bbe0..3f7f67bbe0 100644
--- a/3party/freetype/cff/cffcmap.h
+++ b/3party/freetype/src/cff/cffcmap.h
diff --git a/3party/freetype/cff/cffdrivr.c b/3party/freetype/src/cff/cffdrivr.c
index 217adf2f12..4fd3436cc0 100644
--- a/3party/freetype/cff/cffdrivr.c
+++ b/3party/freetype/src/cff/cffdrivr.c
@@ -4,7 +4,8 @@
/* */
/* OpenType font driver implementation (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,7 +23,6 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_SERVICE_CID_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_SERVICE_POSTSCRIPT_INFO_H
#include FT_SERVICE_POSTSCRIPT_NAME_H
#include FT_SERVICE_TT_CMAP_H
@@ -228,16 +228,13 @@
FT_Pointer buffer,
FT_UInt buffer_max )
{
- CFF_Font font = (CFF_Font)face->extra.data;
- FT_Memory memory = FT_FACE_MEMORY( face );
- FT_String* gname;
- FT_UShort sid;
- FT_Service_PsCMaps psnames;
- FT_Error error;
+ CFF_Font font = (CFF_Font)face->extra.data;
+ FT_String* gname;
+ FT_UShort sid;
+ FT_Error error;
- FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
- if ( !psnames )
+ if ( !font->psnames )
{
FT_ERROR(( "cff_get_glyph_name:"
" cannot get glyph name from CFF & CEF fonts\n"
@@ -251,12 +248,11 @@
sid = font->charset.sids[glyph_index];
/* now, lookup the name itself */
- gname = cff_index_get_sid_string( &font->string_index, sid, psnames );
+ gname = cff_index_get_sid_string( font, sid );
if ( gname )
FT_STRCPYN( buffer, gname, buffer_max );
- FT_FREE( gname );
error = CFF_Err_Ok;
Exit:
@@ -271,11 +267,9 @@
CFF_Font cff;
CFF_Charset charset;
FT_Service_PsCMaps psnames;
- FT_Memory memory = FT_FACE_MEMORY( face );
FT_String* name;
FT_UShort sid;
FT_UInt i;
- FT_Int result;
cff = (CFF_FontRec *)face->extra.data;
@@ -290,19 +284,14 @@
sid = charset->sids[i];
if ( sid > 390 )
- name = cff_index_get_name( &cff->string_index, sid - 391 );
+ name = cff_index_get_string( cff, sid - 391 );
else
name = (FT_String *)psnames->adobe_std_strings( sid );
if ( !name )
continue;
- result = ft_strcmp( glyph_name, name );
-
- if ( sid > 390 )
- FT_FREE( name );
-
- if ( !result )
+ if ( !ft_strcmp( glyph_name, name ) )
return i;
}
@@ -333,35 +322,29 @@
PS_FontInfoRec* afont_info )
{
CFF_Font cff = (CFF_Font)face->extra.data;
- FT_Error error = FT_Err_Ok;
+ FT_Error error = CFF_Err_Ok;
if ( cff && cff->font_info == NULL )
{
- CFF_FontRecDict dict = &cff->top_font.font_dict;
- PS_FontInfoRec *font_info;
- FT_Memory memory = face->root.memory;
- FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
+ PS_FontInfoRec *font_info = NULL;
+ FT_Memory memory = face->root.memory;
if ( FT_ALLOC( font_info, sizeof ( *font_info ) ) )
goto Fail;
- font_info->version = cff_index_get_sid_string( &cff->string_index,
- dict->version,
- psnames );
- font_info->notice = cff_index_get_sid_string( &cff->string_index,
- dict->notice,
- psnames );
- font_info->full_name = cff_index_get_sid_string( &cff->string_index,
- dict->full_name,
- psnames );
- font_info->family_name = cff_index_get_sid_string( &cff->string_index,
- dict->family_name,
- psnames );
- font_info->weight = cff_index_get_sid_string( &cff->string_index,
- dict->weight,
- psnames );
+ font_info->version = cff_index_get_sid_string( cff,
+ dict->version );
+ font_info->notice = cff_index_get_sid_string( cff,
+ dict->notice );
+ font_info->full_name = cff_index_get_sid_string( cff,
+ dict->full_name );
+ font_info->family_name = cff_index_get_sid_string( cff,
+ dict->family_name );
+ font_info->weight = cff_index_get_sid_string( cff,
+ dict->weight );
font_info->italic_angle = dict->italic_angle;
font_info->is_fixed_pitch = dict->is_fixed_pitch;
font_info->underline_position = (FT_Short)dict->underline_position;
@@ -467,8 +450,7 @@
if ( cff )
{
- CFF_FontRecDict dict = &cff->top_font.font_dict;
- FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
if ( dict->cid_registry == 0xFFFFU )
@@ -480,18 +462,16 @@
if ( registry )
{
if ( cff->registry == NULL )
- cff->registry = cff_index_get_sid_string( &cff->string_index,
- dict->cid_registry,
- psnames );
+ cff->registry = cff_index_get_sid_string( cff,
+ dict->cid_registry );
*registry = cff->registry;
}
if ( ordering )
{
if ( cff->ordering == NULL )
- cff->ordering = cff_index_get_sid_string( &cff->string_index,
- dict->cid_ordering,
- psnames );
+ cff->ordering = cff_index_get_sid_string( cff,
+ dict->cid_ordering );
*ordering = cff->ordering;
}
@@ -621,14 +601,15 @@
{
FT_Module sfnt;
FT_Module_Interface result;
- FT_Library library = driver->library;
- FT_UNUSED(library);
result = ft_service_list_lookup( FT_CFF_SERVICES_GET, module_interface );
if ( result != NULL )
return result;
+ if ( !driver )
+ return NULL;
+
/* we pass our request to the `sfnt' module */
sfnt = FT_Get_Module( driver->library, "sfnt" );
diff --git a/3party/freetype/cff/cffdrivr.h b/3party/freetype/src/cff/cffdrivr.h
index 50e8138701..50e8138701 100644
--- a/3party/freetype/cff/cffdrivr.h
+++ b/3party/freetype/src/cff/cffdrivr.h
diff --git a/3party/freetype/cff/cfferrs.h b/3party/freetype/src/cff/cfferrs.h
index 1b2a5c95c8..1b2a5c95c8 100644
--- a/3party/freetype/cff/cfferrs.h
+++ b/3party/freetype/src/cff/cfferrs.h
diff --git a/3party/freetype/cff/cffgload.c b/3party/freetype/src/cff/cffgload.c
index 40fa20b426..cb06bdf10a 100644
--- a/3party/freetype/cff/cffgload.c
+++ b/3party/freetype/src/cff/cffgload.c
@@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,7 +21,6 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_OUTLINE_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
#include "cffobjs.h"
#include "cffload.h"
@@ -113,6 +112,9 @@
cff_op_closepath,
cff_op_callothersubr,
cff_op_pop,
+ cff_op_seac,
+ cff_op_sbw,
+ cff_op_setcurrentpoint,
/* do not remove */
cff_op_max
@@ -201,7 +203,10 @@
2, /* hsbw */
0,
0,
- 0
+ 0,
+ 5, /* seac */
+ 4, /* sbw */
+ 2 /* setcurrentpoint */
};
@@ -319,17 +324,23 @@
/* subroutines. */
/* */
/* <Input> */
- /* num_subrs :: The number of glyph subroutines. */
+ /* in_charstring_type :: The `CharstringType' value of the top DICT */
+ /* dictionary. */
+ /* */
+ /* num_subrs :: The number of glyph subroutines. */
/* */
/* <Return> */
/* The bias value. */
static FT_Int
- cff_compute_bias( FT_UInt num_subrs )
+ cff_compute_bias( FT_Int in_charstring_type,
+ FT_UInt num_subrs )
{
FT_Int result;
- if ( num_subrs < 1240 )
+ if ( in_charstring_type == 1 )
+ result = 0;
+ else if ( num_subrs < 1240 )
result = 107;
else if ( num_subrs < 33900U )
result = 1131;
@@ -380,9 +391,12 @@
cff_builder_init( &decoder->builder, face, size, slot, hinting );
/* initialize Type2 decoder */
- decoder->num_globals = cff->num_global_subrs;
+ decoder->cff = cff;
+ decoder->num_globals = cff->global_subrs_index.count;
decoder->globals = cff->global_subrs;
- decoder->globals_bias = cff_compute_bias( decoder->num_globals );
+ decoder->globals_bias = cff_compute_bias(
+ cff->top_font.font_dict.charstring_type,
+ decoder->num_globals );
decoder->hint_mode = hint_mode;
}
@@ -414,7 +428,7 @@
goto Exit;
}
- FT_TRACE4(( "glyph index %d (subfont %d):\n", glyph_index, fd_index ));
+ FT_TRACE3(( "glyph index %d (subfont %d):\n", glyph_index, fd_index ));
sub = cff->subfonts[fd_index];
@@ -429,12 +443,14 @@
}
#ifdef FT_DEBUG_LEVEL_TRACE
else
- FT_TRACE4(( "glyph index %d:\n", glyph_index ));
+ FT_TRACE3(( "glyph index %d:\n", glyph_index ));
#endif
- decoder->num_locals = sub->num_local_subrs;
+ decoder->num_locals = sub->local_subrs_index.count;
decoder->locals = sub->local_subrs;
- decoder->locals_bias = cff_compute_bias( decoder->num_locals );
+ decoder->locals_bias = cff_compute_bias(
+ decoder->cff->top_font.font_dict.charstring_type,
+ decoder->num_locals );
decoder->glyph_width = sub->private_dict.default_width;
decoder->nominal_width = sub->private_dict.nominal_width;
@@ -677,7 +693,7 @@
data.length = length;
face->root.internal->incremental_interface->funcs->free_glyph_data(
- face->root.internal->incremental_interface->object,&data );
+ face->root.internal->incremental_interface->object, &data );
}
else
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
@@ -693,6 +709,7 @@
static FT_Error
cff_operator_seac( CFF_Decoder* decoder,
+ FT_Pos asb,
FT_Pos adx,
FT_Pos ady,
FT_Int bchar,
@@ -705,6 +722,7 @@
FT_Vector left_bearing, advance;
FT_Byte* charstring;
FT_ULong charstring_len;
+ FT_Pos glyph_width;
if ( decoder->seac )
@@ -713,6 +731,9 @@
return CFF_Err_Syntax_Error;
}
+ adx += decoder->builder.left_bearing.x;
+ ady += decoder->builder.left_bearing.y;
+
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Incremental fonts don't necessarily have valid charsets. */
/* They use the character code, not the glyph index, in this case. */
@@ -789,22 +810,23 @@
charstring_len );
decoder->seac = FALSE;
+ cff_free_glyph_data( face, &charstring, charstring_len );
+
if ( error )
goto Exit;
-
- cff_free_glyph_data( face, &charstring, charstring_len );
}
- /* Save the left bearing and width of the base character */
- /* as they will be erased by the next load. */
+ /* Save the left bearing, advance and glyph width of the base */
+ /* character as they will be erased by the next load. */
left_bearing = builder->left_bearing;
advance = builder->advance;
+ glyph_width = decoder->glyph_width;
builder->left_bearing.x = 0;
builder->left_bearing.y = 0;
- builder->pos_x = adx;
+ builder->pos_x = adx - asb;
builder->pos_y = ady;
/* Now load `achar' on top of the base outline. */
@@ -818,16 +840,17 @@
charstring_len );
decoder->seac = FALSE;
+ cff_free_glyph_data( face, &charstring, charstring_len );
+
if ( error )
goto Exit;
-
- cff_free_glyph_data( face, &charstring, charstring_len );
}
- /* Restore the left side bearing and advance width */
- /* of the base character. */
+ /* Restore the left side bearing, advance and glyph width */
+ /* of the base character. */
builder->left_bearing = left_bearing;
builder->advance = advance;
+ decoder->glyph_width = glyph_width;
builder->pos_x = 0;
builder->pos_y = 0;
@@ -869,6 +892,8 @@
FT_Pos x, y;
FT_Fixed seed;
FT_Fixed* stack;
+ FT_Int charstring_type =
+ decoder->cff->top_font.font_dict.charstring_type;
T2_Hints_Funcs hinter;
@@ -958,7 +983,8 @@
( (FT_Int32)ip[2] << 8 ) |
ip[3];
ip += 4;
- shift = 0;
+ if ( charstring_type == 2 )
+ shift = 0;
}
if ( decoder->top - stack >= CFF_MAX_OPERANDS )
goto Stack_Overflow;
@@ -1032,6 +1058,12 @@
case 0:
op = cff_op_dotsection;
break;
+ case 1: /* this is actually the Type1 vstem3 operator */
+ op = cff_op_vstem;
+ break;
+ case 2: /* this is actually the Type1 hstem3 operator */
+ op = cff_op_hstem;
+ break;
case 3:
op = cff_op_and;
break;
@@ -1041,6 +1073,12 @@
case 5:
op = cff_op_not;
break;
+ case 6:
+ op = cff_op_seac;
+ break;
+ case 7:
+ op = cff_op_sbw;
+ break;
case 8:
op = cff_op_store;
break;
@@ -1104,6 +1142,9 @@
case 30:
op = cff_op_roll;
break;
+ case 33:
+ op = cff_op_setcurrentpoint;
+ break;
case 34:
op = cff_op_hflex;
break;
@@ -1117,8 +1158,8 @@
op = cff_op_flex1;
break;
default:
- /* decrement ip for syntax error message */
- ip--;
+ FT_TRACE4(( " unknown op (12, %d)\n", v ));
+ break;
}
}
break;
@@ -1171,11 +1212,12 @@
op = cff_op_hvcurveto;
break;
default:
- ;
+ FT_TRACE4(( " unknown op (%d)\n", v ));
+ break;
}
if ( op == cff_op_unknown )
- goto Syntax_Error;
+ continue;
/* check arguments */
req_args = cff_argument_counts[op];
@@ -1297,6 +1339,14 @@
decoder->num_hints += num_args / 2;
}
+ /* In a valid charstring there must be at least one byte */
+ /* after `hintmask' or `cntrmask' (e.g., for a `return' */
+ /* instruction). Additionally, there must be space for */
+ /* `num_hints' bits. */
+
+ if ( ( ip + ( ( decoder->num_hints + 7 ) >> 3 ) ) >= limit )
+ goto Syntax_Error;
+
if ( hinter )
{
if ( op == cff_op_hintmask )
@@ -1315,20 +1365,18 @@
FT_UInt maskbyte;
- FT_TRACE4(( " (maskbytes: " ));
+ FT_TRACE4(( " (maskbytes:" ));
for ( maskbyte = 0;
- maskbyte < (FT_UInt)(( decoder->num_hints + 7 ) >> 3);
+ maskbyte < (FT_UInt)( ( decoder->num_hints + 7 ) >> 3 );
maskbyte++, ip++ )
- FT_TRACE4(( "0x%02X", *ip ));
+ FT_TRACE4(( " 0x%02X", *ip ));
FT_TRACE4(( ")\n" ));
}
#else
ip += ( decoder->num_hints + 7 ) >> 3;
#endif
- if ( ip >= limit )
- goto Syntax_Error;
args = stack;
break;
@@ -1390,9 +1438,14 @@
FT_TRACE4(( op == cff_op_hlineto ? " hlineto\n"
: " vlineto\n" ));
- if ( num_args < 1 )
+ if ( num_args < 0 )
goto Stack_Underflow;
+ /* there exist subsetted fonts (found in PDFs) */
+ /* which call `hlineto' without arguments */
+ if ( num_args == 0 )
+ break;
+
if ( cff_builder_start_point ( builder, x, y ) ||
check_points( builder, num_args ) )
goto Fail;
@@ -1886,6 +1939,21 @@
}
break;
+ case cff_op_seac:
+ FT_TRACE4(( " seac\n" ));
+
+ error = cff_operator_seac( decoder,
+ args[0], args[1], args[2],
+ (FT_Int)( args[3] >> 16 ),
+ (FT_Int)( args[4] >> 16 ) );
+
+ /* add current outline to the glyph slot */
+ FT_GlyphLoader_Add( builder->loader );
+
+ /* return now! */
+ FT_TRACE4(( "\n" ));
+ return error;
+
case cff_op_endchar:
FT_TRACE4(( " endchar\n" ));
@@ -1895,10 +1963,8 @@
/* Save glyph width so that the subglyphs don't overwrite it. */
FT_Pos glyph_width = decoder->glyph_width;
-
error = cff_operator_seac( decoder,
- args[-4],
- args[-3],
+ 0L, args[-4], args[-3],
(FT_Int)( args[-2] >> 16 ),
(FT_Int)( args[-1] >> 16 ) );
@@ -2106,7 +2172,7 @@
FT_TRACE4(( " dup\n" ));
args[1] = args[0];
- args++;
+ args += 2;
break;
case cff_op_put:
@@ -2117,7 +2183,7 @@
FT_TRACE4(( " put\n" ));
- if ( idx >= 0 && idx < decoder->len_buildchar )
+ if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )
decoder->buildchar[idx] = val;
}
break;
@@ -2130,7 +2196,7 @@
FT_TRACE4(( " get\n" ));
- if ( idx >= 0 && idx < decoder->len_buildchar )
+ if ( idx >= 0 && idx < CFF_MAX_TRANS_ELEMENTS )
val = decoder->buildchar[idx];
args[0] = val;
@@ -2170,10 +2236,42 @@
FT_TRACE4(( " hsbw (invalid op)\n" ));
- decoder->glyph_width = decoder->nominal_width +
- (args[1] >> 16);
- x = args[0];
- y = 0;
+ decoder->glyph_width = decoder->nominal_width + ( args[1] >> 16 );
+
+ decoder->builder.left_bearing.x = args[0];
+ decoder->builder.left_bearing.y = 0;
+
+ x = decoder->builder.pos_x + args[0];
+ y = decoder->builder.pos_y;
+ args = stack;
+ break;
+
+ case cff_op_sbw:
+ /* this is an invalid Type 2 operator; however, there */
+ /* exist fonts which are incorrectly converted from probably */
+ /* Type 1 to CFF, and some parsers seem to accept it */
+
+ FT_TRACE4(( " sbw (invalid op)\n" ));
+
+ decoder->glyph_width = decoder->nominal_width + ( args[2] >> 16 );
+
+ decoder->builder.left_bearing.x = args[0];
+ decoder->builder.left_bearing.y = args[1];
+
+ x = decoder->builder.pos_x + args[0];
+ y = decoder->builder.pos_y + args[1];
+ args = stack;
+ break;
+
+ case cff_op_setcurrentpoint:
+ /* this is an invalid Type 2 operator; however, there */
+ /* exist fonts which are incorrectly converted from probably */
+ /* Type 1 to CFF, and some parsers seem to accept it */
+
+ FT_TRACE4(( " setcurrentpoint (invalid op)\n" ));
+
+ x = decoder->builder.pos_x + args[0];
+ y = decoder->builder.pos_y + args[1];
args = stack;
break;
@@ -2184,8 +2282,14 @@
FT_TRACE4(( " callothersubr (invalid op)\n" ));
- /* don't modify stack; handle the subr as `unknown' so that */
- /* following `pop' operands use the arguments on stack */
+ /* subsequent `pop' operands should add the arguments, */
+ /* this is the implementation described for `unknown' other */
+ /* subroutines in the Type1 spec. */
+ /* */
+ /* XXX Fix return arguments (see discussion below). */
+ args -= 2 + ( args[-2] >> 16 );
+ if ( args < stack )
+ goto Stack_Underflow;
break;
case cff_op_pop:
@@ -2195,6 +2299,22 @@
FT_TRACE4(( " pop (invalid op)\n" ));
+ /* XXX Increasing `args' is wrong: After a certain number of */
+ /* `pop's we get a stack overflow. Reason for doing it is */
+ /* code like this (actually found in a CFF font): */
+ /* */
+ /* 17 1 3 callothersubr */
+ /* pop */
+ /* callsubr */
+ /* */
+ /* Since we handle `callothersubr' as a no-op, and */
+ /* `callsubr' needs at least one argument, `pop' can't be a */
+ /* no-op too as it basically should be. */
+ /* */
+ /* The right solution would be to provide real support for */
+ /* `callothersubr' as done in `t1decode.c', however, given */
+ /* the fact that CFF fonts with `pop' are invalid, it is */
+ /* questionable whether it is worth the time. */
args++;
break;
@@ -2358,7 +2478,10 @@
return CFF_Err_Unimplemented_Feature;
}
- decoder->top = args;
+ decoder->top = args;
+
+ if ( decoder->top - stack >= CFF_MAX_OPERANDS )
+ goto Stack_Overflow;
} /* general operator processing */
@@ -2578,11 +2701,15 @@
/* this scaling is only relevant if the PS hinter isn't active */
if ( cff->num_subfonts )
{
- FT_Byte fd_index = cff_fd_select_get( &cff->fd_select,
- glyph_index );
+ FT_ULong top_upm, sub_upm;
+ FT_Byte fd_index = cff_fd_select_get( &cff->fd_select,
+ glyph_index );
+
+ if ( fd_index >= cff->num_subfonts )
+ fd_index = (FT_Byte)( cff->num_subfonts - 1 );
- FT_ULong top_upm = cff->top_font.font_dict.units_per_em;
- FT_ULong sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;
+ top_upm = cff->top_font.font_dict.units_per_em;
+ sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;
font_matrix = cff->subfonts[fd_index]->font_dict.font_matrix;
@@ -2627,70 +2754,77 @@
/* now load the unscaled outline */
error = cff_get_glyph_data( face, glyph_index,
&charstring, &charstring_len );
- if ( !error )
- {
- error = cff_decoder_prepare( &decoder, size, glyph_index );
- if ( !error )
- {
- error = cff_decoder_parse_charstrings( &decoder,
- charstring,
- charstring_len );
+ if ( error )
+ goto Glyph_Build_Finished;
+
+ error = cff_decoder_prepare( &decoder, size, glyph_index );
+ if ( error )
+ goto Glyph_Build_Finished;
- cff_free_glyph_data( face, &charstring, charstring_len );
+ error = cff_decoder_parse_charstrings( &decoder,
+ charstring,
+ charstring_len );
+
+ cff_free_glyph_data( face, &charstring, charstring_len );
+ if ( error )
+ goto Glyph_Build_Finished;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- /* Control data and length may not be available for incremental */
- /* fonts. */
- if ( face->root.internal->incremental_interface )
- {
- glyph->root.control_data = 0;
- glyph->root.control_len = 0;
- }
- else
+ /* Control data and length may not be available for incremental */
+ /* fonts. */
+ if ( face->root.internal->incremental_interface )
+ {
+ glyph->root.control_data = 0;
+ glyph->root.control_len = 0;
+ }
+ else
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
- /* We set control_data and control_len if charstrings is loaded. */
- /* See how charstring loads at cff_index_access_element() in */
- /* cffload.c. */
- {
- CFF_Index csindex = &cff->charstrings_index;
+ /* We set control_data and control_len if charstrings is loaded. */
+ /* See how charstring loads at cff_index_access_element() in */
+ /* cffload.c. */
+ {
+ CFF_Index csindex = &cff->charstrings_index;
- if ( csindex->offsets )
- {
- glyph->root.control_data = csindex->bytes +
- csindex->offsets[glyph_index] - 1;
- glyph->root.control_len = charstring_len;
- }
- }
+ if ( csindex->offsets )
+ {
+ glyph->root.control_data = csindex->bytes +
+ csindex->offsets[glyph_index] - 1;
+ glyph->root.control_len = charstring_len;
}
}
- /* save new glyph tables */
- cff_builder_done( &decoder.builder );
+ Glyph_Build_Finished:
+ /* save new glyph tables, if no error */
+ if ( !error )
+ cff_builder_done( &decoder.builder );
+ /* XXX: anything to do for broken glyph entry? */
}
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Incremental fonts can optionally override the metrics. */
- if ( !error &&
- face->root.internal->incremental_interface &&
+ if ( !error &&
+ face->root.internal->incremental_interface &&
face->root.internal->incremental_interface->funcs->get_glyph_metrics )
{
FT_Incremental_MetricsRec metrics;
metrics.bearing_x = decoder.builder.left_bearing.x;
- metrics.bearing_y = decoder.builder.left_bearing.y;
+ metrics.bearing_y = 0;
metrics.advance = decoder.builder.advance.x;
+ metrics.advance_v = decoder.builder.advance.y;
+
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
glyph_index, FALSE, &metrics );
+
decoder.builder.left_bearing.x = metrics.bearing_x;
- decoder.builder.left_bearing.y = metrics.bearing_y;
decoder.builder.advance.x = metrics.advance;
- decoder.builder.advance.y = 0;
+ decoder.builder.advance.y = metrics.advance_v;
}
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
@@ -2827,9 +2961,12 @@
if ( has_vertical_info )
metrics->vertBearingX = metrics->horiBearingX -
metrics->horiAdvance / 2;
- else
- ft_synthesize_vertical_metrics( metrics,
- metrics->vertAdvance );
+ else
+ {
+ if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
+ ft_synthesize_vertical_metrics( metrics,
+ metrics->vertAdvance );
+ }
}
}
diff --git a/3party/freetype/cff/cffgload.h b/3party/freetype/src/cff/cffgload.h
index 956817a080..38937be5c1 100644
--- a/3party/freetype/cff/cffgload.h
+++ b/3party/freetype/src/cff/cffgload.h
@@ -28,8 +28,9 @@
FT_BEGIN_HEADER
-#define CFF_MAX_OPERANDS 48
-#define CFF_MAX_SUBRS_CALLS 32
+#define CFF_MAX_OPERANDS 48
+#define CFF_MAX_SUBRS_CALLS 32
+#define CFF_MAX_TRANS_ELEMENTS 32
/*************************************************************************/
@@ -137,8 +138,7 @@ FT_BEGIN_HEADER
FT_Bool read_width;
FT_Bool width_only;
FT_Int num_hints;
- FT_Fixed* buildchar;
- FT_Int len_buildchar;
+ FT_Fixed buildchar[CFF_MAX_TRANS_ELEMENTS];
FT_UInt num_locals;
FT_UInt num_globals;
diff --git a/3party/freetype/cff/cffload.c b/3party/freetype/src/cff/cffload.c
index 64d1395723..98d8e1c8d5 100644
--- a/3party/freetype/cff/cffload.c
+++ b/3party/freetype/src/cff/cffload.c
@@ -4,7 +4,8 @@
/* */
/* OpenType and CFF data/program tables loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,7 +21,6 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_STREAM_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_TRUETYPE_TAGS_H
#include FT_TYPE1_TABLES_H
@@ -251,7 +251,7 @@
if ( offsize < 1 || offsize > 4 )
{
- error = FT_Err_Invalid_Table;
+ error = CFF_Err_Invalid_Table;
goto Exit;
}
@@ -377,18 +377,21 @@
}
- /* allocate a table containing pointers to an index's elements */
+ /* Allocate a table containing pointers to an index's elements. */
+ /* The `pool' argument makes this function convert the index */
+ /* entries to C-style strings (this is, NULL-terminated). */
static FT_Error
cff_index_get_pointers( CFF_Index idx,
- FT_Byte*** table )
+ FT_Byte*** table,
+ FT_Byte** pool )
{
- FT_Error error = CFF_Err_Ok;
- FT_Memory memory = idx->stream->memory;
- FT_ULong n, offset, old_offset;
- FT_Byte** t;
+ FT_Error error = CFF_Err_Ok;
+ FT_Memory memory = idx->stream->memory;
+ FT_Byte** t = NULL;
+ FT_Byte* new_bytes = NULL;
- *table = 0;
+ *table = NULL;
if ( idx->offsets == NULL )
{
@@ -397,28 +400,65 @@
goto Exit;
}
- if ( idx->count > 0 && !FT_NEW_ARRAY( t, idx->count + 1 ) )
+ if ( idx->count > 0 &&
+ !FT_NEW_ARRAY( t, idx->count + 1 ) &&
+ ( !pool || !FT_ALLOC( new_bytes,
+ idx->data_size + idx->count ) ) )
{
- old_offset = 1;
- for ( n = 0; n <= idx->count; n++ )
+ FT_ULong n, cur_offset;
+ FT_ULong extra = 0;
+ FT_Byte* org_bytes = idx->bytes;
+
+
+ /* at this point, `idx->offsets' can't be NULL */
+ cur_offset = idx->offsets[0] - 1;
+
+ /* sanity check */
+ if ( cur_offset >= idx->data_size )
+ {
+ FT_TRACE0(( "cff_index_get_pointers:"
+ " invalid first offset value %d set to zero\n",
+ cur_offset ));
+ cur_offset = 0;
+ }
+
+ if ( !pool )
+ t[0] = org_bytes + cur_offset;
+ else
+ t[0] = new_bytes + cur_offset;
+
+ for ( n = 1; n <= idx->count; n++ )
{
- /* at this point, `idx->offsets' can't be NULL */
- offset = idx->offsets[n];
- if ( !offset )
- offset = old_offset;
+ FT_ULong next_offset = idx->offsets[n] - 1;
- /* two sanity checks for invalid offset tables */
- else if ( offset < old_offset )
- offset = old_offset;
- else if ( offset - 1 >= idx->data_size && n < idx->count )
- offset = old_offset;
+ /* empty slot + two sanity checks for invalid offset tables */
+ if ( next_offset == 0 ||
+ next_offset < cur_offset ||
+ ( next_offset >= idx->data_size && n < idx->count ) )
+ next_offset = cur_offset;
- t[n] = idx->bytes + offset - 1;
+ if ( !pool )
+ t[n] = org_bytes + next_offset;
+ else
+ {
+ t[n] = new_bytes + next_offset + extra;
+
+ if ( next_offset != cur_offset )
+ {
+ FT_MEM_COPY( t[n - 1], org_bytes + cur_offset, t[n] - t[n - 1] );
+ t[n][0] = '\0';
+ t[n] += 1;
+ extra++;
+ }
+ }
- old_offset = offset;
+ cur_offset = next_offset;
}
*table = t;
+
+ if ( pool )
+ *pool = new_bytes;
}
Exit:
@@ -479,6 +519,18 @@
}
}
+ /* XXX: should check off2 does not exceed the end of this entry; */
+ /* at present, only truncate off2 at the end of this stream */
+ if ( off2 > stream->size + 1 ||
+ idx->data_offset > stream->size - off2 + 1 )
+ {
+ FT_ERROR(( "cff_index_access_element:"
+ " offset to next entry (%d)"
+ " exceeds the end of stream (%d)\n",
+ off2, stream->size - idx->data_offset + 1 ));
+ off2 = stream->size - idx->data_offset + 1;
+ }
+
/* access element */
if ( off1 && off2 > off1 )
{
@@ -526,10 +578,12 @@
}
+ /* get an entry from Name INDEX */
FT_LOCAL_DEF( FT_String* )
- cff_index_get_name( CFF_Index idx,
- FT_UInt element )
+ cff_index_get_name( CFF_Font font,
+ FT_UInt element )
{
+ CFF_Index idx = &font->name_index;
FT_Memory memory = idx->stream->memory;
FT_Byte* bytes;
FT_ULong byte_len;
@@ -553,42 +607,35 @@
}
+ /* get an entry from String INDEX */
+ FT_LOCAL_DEF( FT_String* )
+ cff_index_get_string( CFF_Font font,
+ FT_UInt element )
+ {
+ return ( element < font->num_strings )
+ ? (FT_String*)font->strings[element]
+ : NULL;
+ }
+
+
FT_LOCAL_DEF( FT_String* )
- cff_index_get_sid_string( CFF_Index idx,
- FT_UInt sid,
- FT_Service_PsCMaps psnames )
+ cff_index_get_sid_string( CFF_Font font,
+ FT_UInt sid )
{
/* value 0xFFFFU indicates a missing dictionary entry */
if ( sid == 0xFFFFU )
- return 0;
+ return NULL;
/* if it is not a standard string, return it */
if ( sid > 390 )
- return cff_index_get_name( idx, sid - 391 );
+ return cff_index_get_string( font, sid - 391 );
/* CID-keyed CFF fonts don't have glyph names */
- if ( !psnames )
- return 0;
-
- /* that's a standard string, fetch a copy from the PSName module */
- {
- FT_String* name = 0;
- const char* adobe_name = psnames->adobe_std_strings( sid );
-
+ if ( !font->psnames )
+ return NULL;
- if ( adobe_name )
- {
- FT_Memory memory = idx->stream->memory;
- FT_Error error;
-
-
- (void)FT_STRDUP( name, adobe_name );
-
- FT_UNUSED( error );
- }
-
- return name;
- }
+ /* this is a standard string */
+ return (FT_String *)font->psnames->adobe_std_strings( sid );
}
@@ -734,7 +781,7 @@
FT_UInt num_glyphs,
FT_Memory memory )
{
- FT_Error error = FT_Err_Ok;
+ FT_Error error = CFF_Err_Ok;
FT_UInt i;
FT_Long j;
FT_UShort max_cid = 0;
@@ -744,11 +791,12 @@
goto Exit;
for ( i = 0; i < num_glyphs; i++ )
+ {
if ( charset->sids[i] > max_cid )
max_cid = charset->sids[i];
- max_cid++;
+ }
- if ( FT_NEW_ARRAY( charset->cids, max_cid ) )
+ if ( FT_NEW_ARRAY( charset->cids, (FT_ULong)max_cid + 1 ) )
goto Exit;
/* When multiple GIDs map to the same CID, we choose the lowest */
@@ -772,7 +820,7 @@
FT_UInt result = 0;
- if ( cid < charset->max_cid )
+ if ( cid <= charset->max_cid )
result = charset->cids[cid];
return result;
@@ -846,20 +894,7 @@
goto Exit;
for ( j = 1; j < num_glyphs; j++ )
- {
- FT_UShort sid = FT_GET_USHORT();
-
-
- /* this constant is given in the CFF specification */
- if ( sid < 65000L )
- charset->sids[j] = sid;
- else
- {
- FT_TRACE0(( "cff_charset_load:"
- " invalid SID value %d set to zero\n", sid ));
- charset->sids[j] = 0;
- }
- }
+ charset->sids[j] = FT_GET_USHORT();
FT_FRAME_EXIT();
}
@@ -892,18 +927,12 @@
goto Exit;
}
- /* check whether the range contains at least one valid glyph; */
- /* the constant is given in the CFF specification */
- if ( glyph_sid >= 65000L ) {
- FT_ERROR(( "cff_charset_load: invalid SID range\n" ));
- error = CFF_Err_Invalid_File_Format;
- goto Exit;
- }
-
/* try to rescue some of the SIDs if `nleft' is too large */
- if ( nleft > 65000L - 1L || glyph_sid >= 65000L - nleft ) {
- FT_ERROR(( "cff_charset_load: invalid SID range trimmed\n" ));
- nleft = ( FT_UInt )( 65000L - 1L - glyph_sid );
+ if ( glyph_sid > 0xFFFFL - nleft )
+ {
+ FT_ERROR(( "cff_charset_load: invalid SID range trimmed"
+ " nleft=%d -> %d\n", nleft, 0xFFFFL - glyph_sid ));
+ nleft = ( FT_UInt )( 0xFFFFL - glyph_sid );
}
/* Fill in the range of sids -- `nleft + 1' glyphs. */
@@ -1240,9 +1269,7 @@
if ( gid != 0 )
{
encoding->codes[j] = (FT_UShort)gid;
-
- if ( encoding->count < j + 1 )
- encoding->count = j + 1;
+ encoding->count = j + 1;
}
else
{
@@ -1361,9 +1388,8 @@
if ( error )
goto Exit;
- font->num_local_subrs = font->local_subrs_index.count;
error = cff_index_get_pointers( &font->local_subrs_index,
- &font->local_subrs );
+ &font->local_subrs, NULL );
if ( error )
goto Exit;
}
@@ -1409,9 +1435,11 @@
FT_Memory memory = stream->memory;
FT_ULong base_offset;
CFF_FontRecDict dict;
+ CFF_IndexRec string_index;
FT_ZERO( font );
+ FT_ZERO( &string_index );
font->stream = stream;
font->memory = memory;
@@ -1438,15 +1466,20 @@
/* read the name, top dict, string and global subrs index */
if ( FT_SET_ERROR( cff_index_init( &font->name_index,
- stream, 0 ) ) ||
+ stream, 0 ) ) ||
FT_SET_ERROR( cff_index_init( &font->font_dict_index,
- stream, 0 ) ) ||
- FT_SET_ERROR( cff_index_init( &font->string_index,
- stream, 0 ) ) ||
+ stream, 0 ) ) ||
+ FT_SET_ERROR( cff_index_init( &string_index,
+ stream, 1 ) ) ||
FT_SET_ERROR( cff_index_init( &font->global_subrs_index,
- stream, 1 ) ) )
+ stream, 1 ) ) ||
+ FT_SET_ERROR( cff_index_get_pointers( &string_index,
+ &font->strings,
+ &font->string_pool ) ) )
goto Exit;
+ font->num_strings = string_index.count;
+
/* well, we don't really forget the `disabled' fonts... */
font->num_faces = font->name_index.count;
if ( face_index >= (FT_Int)font->num_faces )
@@ -1481,7 +1514,7 @@
if ( dict->cid_registry != 0xFFFFU )
{
CFF_IndexRec fd_index;
- CFF_SubFont sub;
+ CFF_SubFont sub = NULL;
FT_UInt idx;
@@ -1542,12 +1575,10 @@
goto Exit;
}
- /* explicit the global subrs */
- font->num_global_subrs = font->global_subrs_index.count;
- font->num_glyphs = font->charstrings_index.count;
+ font->num_glyphs = font->charstrings_index.count;
error = cff_index_get_pointers( &font->global_subrs_index,
- &font->global_subrs ) ;
+ &font->global_subrs, NULL );
if ( error )
goto Exit;
@@ -1579,9 +1610,11 @@
/* get the font name (/CIDFontName for CID-keyed fonts, */
/* /FontName otherwise) */
- font->font_name = cff_index_get_name( &font->name_index, face_index );
+ font->font_name = cff_index_get_name( font, face_index );
Exit:
+ cff_index_done( &string_index );
+
return error;
}
@@ -1594,7 +1627,6 @@
cff_index_done( &font->global_subrs_index );
- cff_index_done( &font->string_index );
cff_index_done( &font->font_dict_index );
cff_index_done( &font->name_index );
cff_index_done( &font->charstrings_index );
@@ -1617,21 +1649,12 @@
CFF_Done_FD_Select( &font->fd_select, font->stream );
- if (font->font_info != NULL)
- {
- FT_FREE( font->font_info->version );
- FT_FREE( font->font_info->notice );
- FT_FREE( font->font_info->full_name );
- FT_FREE( font->font_info->family_name );
- FT_FREE( font->font_info->weight );
- FT_FREE( font->font_info );
- }
+ FT_FREE( font->font_info );
- FT_FREE( font->registry );
- FT_FREE( font->ordering );
-
- FT_FREE( font->global_subrs );
FT_FREE( font->font_name );
+ FT_FREE( font->global_subrs );
+ FT_FREE( font->strings );
+ FT_FREE( font->string_pool );
}
diff --git a/3party/freetype/cff/cffload.h b/3party/freetype/src/cff/cffload.h
index 2b313acf06..c755de9a20 100644
--- a/3party/freetype/cff/cffload.h
+++ b/3party/freetype/src/cff/cffload.h
@@ -4,7 +4,7 @@
/* */
/* OpenType & CFF data/program tables loader (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,7 +22,6 @@
#include <ft2build.h>
#include "cfftypes.h"
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
FT_BEGIN_HEADER
@@ -32,13 +31,12 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_String* )
- cff_index_get_name( CFF_Index idx,
- FT_UInt element );
+ cff_index_get_string( CFF_Font font,
+ FT_UInt element );
FT_LOCAL( FT_String* )
- cff_index_get_sid_string( CFF_Index idx,
- FT_UInt sid,
- FT_Service_PsCMaps psnames );
+ cff_index_get_sid_string( CFF_Font font,
+ FT_UInt sid );
FT_LOCAL( FT_Error )
@@ -51,6 +49,10 @@ FT_BEGIN_HEADER
cff_index_forget_element( CFF_Index idx,
FT_Byte** pbytes );
+ FT_LOCAL( FT_String* )
+ cff_index_get_name( CFF_Font font,
+ FT_UInt element );
+
FT_LOCAL( FT_UInt )
cff_charset_cid_to_gindex( CFF_Charset charset,
diff --git a/3party/freetype/cff/cffobjs.c b/3party/freetype/src/cff/cffobjs.c
index e0966e0d38..cd386762dc 100644
--- a/3party/freetype/cff/cffobjs.c
+++ b/3party/freetype/src/cff/cffobjs.c
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,8 +24,6 @@
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_SFNT_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
#include "cffobjs.h"
#include "cffload.h"
#include "cffcmap.h"
@@ -58,7 +56,7 @@
{
CFF_Face face = (CFF_Face)size->root.face;
CFF_Font font = (CFF_Font)face->extra.data;
- PSHinter_Service pshinter = (PSHinter_Service)font->pshinter;
+ PSHinter_Service pshinter = font->pshinter;
FT_Module module;
@@ -163,7 +161,7 @@
{
CFF_Face face = (CFF_Face)cffsize->face;
CFF_Font font = (CFF_Font)face->extra.data;
- CFF_Internal internal;
+ CFF_Internal internal = NULL;
PS_PrivateRec priv;
FT_Memory memory = cffsize->face->memory;
@@ -349,7 +347,7 @@
{
CFF_Face face = (CFF_Face)slot->face;
CFF_Font font = (CFF_Font)face->extra.data;
- PSHinter_Service pshinter = (PSHinter_Service)font->pshinter;
+ PSHinter_Service pshinter = font->pshinter;
if ( pshinter )
@@ -395,6 +393,87 @@
}
+ /* Strip all subset prefixes of the form `ABCDEF+'. Usually, there */
+ /* is only one, but font names like `APCOOG+JFABTD+FuturaBQ-Bold' */
+ /* have been seen in the wild. */
+
+ static void
+ remove_subset_prefix( FT_String* name )
+ {
+ FT_Int32 idx = 0;
+ FT_Int32 length = strlen( name ) + 1;
+ FT_Bool continue_search = 1;
+
+
+ while ( continue_search )
+ {
+ if ( length >= 7 && name[6] == '+' )
+ {
+ for ( idx = 0; idx < 6; idx++ )
+ {
+ /* ASCII uppercase letters */
+ if ( !( 'A' <= name[idx] && name[idx] <= 'Z' ) )
+ continue_search = 0;
+ }
+
+ if ( continue_search )
+ {
+ for ( idx = 7; idx < length; idx++ )
+ name[idx - 7] = name[idx];
+ length -= 7;
+ }
+ }
+ else
+ continue_search = 0;
+ }
+ }
+
+
+ /* Remove the style part from the family name (if present). */
+
+ static void
+ remove_style( FT_String* family_name,
+ const FT_String* style_name )
+ {
+ FT_Int32 family_name_length, style_name_length;
+
+
+ family_name_length = strlen( family_name );
+ style_name_length = strlen( style_name );
+
+ if ( family_name_length > style_name_length )
+ {
+ FT_Int idx;
+
+
+ for ( idx = 1; idx <= style_name_length; ++idx )
+ {
+ if ( family_name[family_name_length - idx] !=
+ style_name[style_name_length - idx] )
+ break;
+ }
+
+ if ( idx > style_name_length )
+ {
+ /* family_name ends with style_name; remove it */
+ idx = family_name_length - style_name_length - 1;
+
+ /* also remove special characters */
+ /* between real family name and style */
+ while ( idx > 0 &&
+ ( family_name[idx] == '-' ||
+ family_name[idx] == ' ' ||
+ family_name[idx] == '_' ||
+ family_name[idx] == '+' ) )
+ --idx;
+
+ if ( idx > 0 )
+ family_name[idx + 1] = '\0';
+ }
+ }
+ }
+
+
FT_LOCAL_DEF( FT_Error )
cff_face_init( FT_Stream stream,
FT_Face cffface, /* CFF_Face */
@@ -402,24 +481,16 @@
FT_Int num_params,
FT_Parameter* params )
{
- CFF_Face face = (CFF_Face)cffface;
+ CFF_Face face = (CFF_Face)cffface;
FT_Error error;
SFNT_Service sfnt;
FT_Service_PsCMaps psnames;
PSHinter_Service pshinter;
FT_Bool pure_cff = 1;
FT_Bool sfnt_format = 0;
- FT_Library library = cffface->driver->root.library;
+ FT_Library library = cffface->driver->root.library;
-#if 0
- FT_FACE_FIND_GLOBAL_SERVICE( face, sfnt, SFNT );
- FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
- FT_FACE_FIND_GLOBAL_SERVICE( face, pshinter, POSTSCRIPT_HINTER );
-
- if ( !sfnt )
- goto Bad_Format;
-#else
sfnt = (SFNT_Service)FT_Get_Module_Interface(
library, "sfnt" );
if ( !sfnt )
@@ -429,7 +500,6 @@
pshinter = (PSHinter_Service)FT_Get_Module_Interface(
library, "pshinter" );
-#endif
/* create input stream from resource */
if ( FT_STREAM_SEEK( 0 ) )
@@ -498,7 +568,7 @@
/* now load and parse the CFF table in the file */
{
- CFF_Font cff;
+ CFF_Font cff = NULL;
CFF_FontRecDict dict;
FT_Memory memory = cffface->memory;
FT_Int32 flags;
@@ -514,7 +584,7 @@
goto Exit;
cff->pshinter = pshinter;
- cff->psnames = (void*)psnames;
+ cff->psnames = psnames;
cffface->face_index = face_index;
@@ -652,15 +722,16 @@
/* compute number of glyphs */
if ( dict->cid_registry != 0xFFFFU )
- cffface->num_glyphs = cff->charset.max_cid;
+ cffface->num_glyphs = cff->charset.max_cid + 1;
else
cffface->num_glyphs = cff->charstrings_index.count;
/* set global bbox, as well as EM size */
- cffface->bbox.xMin = dict->font_bbox.xMin >> 16;
- cffface->bbox.yMin = dict->font_bbox.yMin >> 16;
- cffface->bbox.xMax = ( dict->font_bbox.xMax + 0xFFFFU ) >> 16;
- cffface->bbox.yMax = ( dict->font_bbox.yMax + 0xFFFFU ) >> 16;
+ cffface->bbox.xMin = dict->font_bbox.xMin >> 16;
+ cffface->bbox.yMin = dict->font_bbox.yMin >> 16;
+ /* no `U' suffix here to 0xFFFF! */
+ cffface->bbox.xMax = ( dict->font_bbox.xMax + 0xFFFF ) >> 16;
+ cffface->bbox.yMax = ( dict->font_bbox.yMax + 0xFFFF ) >> 16;
cffface->units_per_EM = (FT_UShort)( dict->units_per_em );
@@ -677,24 +748,22 @@
(FT_Short)( dict->underline_thickness >> 16 );
/* retrieve font family & style name */
- cffface->family_name = cff_index_get_name( &cff->name_index,
- face_index );
-
+ cffface->family_name = cff_index_get_name( cff, face_index );
if ( cffface->family_name )
{
- char* full = cff_index_get_sid_string( &cff->string_index,
- dict->full_name,
- psnames );
+ char* full = cff_index_get_sid_string( cff,
+ dict->full_name );
char* fullp = full;
char* family = cffface->family_name;
- char* family_name = 0;
+ char* family_name = NULL;
+
+ remove_subset_prefix( cffface->family_name );
if ( dict->family_name )
{
- family_name = cff_index_get_sid_string( &cff->string_index,
- dict->family_name,
- psnames);
+ family_name = cff_index_get_sid_string( cff,
+ dict->family_name );
if ( family_name )
family = family_name;
}
@@ -734,26 +803,24 @@
/* case, the remaining string in `fullp' will be used as */
/* the style name. */
style_name = cff_strcpy( memory, fullp );
+
+ /* remove the style part from the family name (if present) */
+ remove_style( cffface->family_name, style_name );
}
break;
}
-
- if ( family_name )
- FT_FREE( family_name );
- FT_FREE( full );
}
}
else
{
char *cid_font_name =
- cff_index_get_sid_string( &cff->string_index,
- dict->cid_font_name,
- psnames );
+ cff_index_get_sid_string( cff,
+ dict->cid_font_name );
/* do we have a `/FontName' for a CID-keyed font? */
if ( cid_font_name )
- cffface->family_name = cid_font_name;
+ cffface->family_name = cff_strcpy( memory, cid_font_name );
}
if ( style_name )
@@ -796,16 +863,14 @@
flags |= FT_STYLE_FLAG_ITALIC;
{
- char *weight = cff_index_get_sid_string( &cff->string_index,
- dict->weight,
- psnames );
+ char *weight = cff_index_get_sid_string( cff,
+ dict->weight );
if ( weight )
if ( !ft_strcmp( weight, "Bold" ) ||
!ft_strcmp( weight, "Black" ) )
flags |= FT_STYLE_FLAG_BOLD;
- FT_FREE( weight );
}
/* double check */
@@ -848,13 +913,14 @@
{
cmap = cffface->charmaps[nn];
- /* Windows Unicode (3,1)? */
- if ( cmap->platform_id == 3 && cmap->encoding_id == 1 )
+ /* Windows Unicode? */
+ if ( cmap->platform_id == TT_PLATFORM_MICROSOFT &&
+ cmap->encoding_id == TT_MS_ID_UNICODE_CS )
goto Skip_Unicode;
- /* Deprecated Unicode platform id? */
- if ( cmap->platform_id == 0 )
- goto Skip_Unicode; /* Standard Unicode (deprecated) */
+ /* Apple Unicode platform id? */
+ if ( cmap->platform_id == TT_PLATFORM_APPLE_UNICODE )
+ goto Skip_Unicode; /* Apple Unicode */
}
/* since CID-keyed fonts don't contain glyph names, we can't */
@@ -862,28 +928,51 @@
if ( pure_cff && cff->top_font.font_dict.cid_registry != 0xFFFFU )
goto Exit;
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( nn + 1 > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "cff_face_init: no Unicode cmap is found, "
+ "and too many subtables (%d) to add synthesized cmap\n",
+ nn ));
+ goto Exit;
+ }
+#endif
+
/* we didn't find a Unicode charmap -- synthesize one */
cmaprec.face = cffface;
- cmaprec.platform_id = 3;
- cmaprec.encoding_id = 1;
+ cmaprec.platform_id = TT_PLATFORM_MICROSOFT;
+ cmaprec.encoding_id = TT_MS_ID_UNICODE_CS;
cmaprec.encoding = FT_ENCODING_UNICODE;
nn = (FT_UInt)cffface->num_charmaps;
- FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL, &cmaprec, NULL );
+ error = FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,
+ &cmaprec, NULL );
+ if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ goto Exit;
+ error = FT_Err_Ok;
/* if no Unicode charmap was previously selected, select this one */
if ( cffface->charmap == NULL && nn != (FT_UInt)cffface->num_charmaps )
cffface->charmap = cffface->charmaps[nn];
Skip_Unicode:
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( nn > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "cff_face_init: Unicode cmap is found, "
+ "but too many preceding subtables (%d) to access\n",
+ nn - 1 ));
+ goto Exit;
+ }
+#endif
if ( encoding->count > 0 )
{
FT_CMap_Class clazz;
cmaprec.face = cffface;
- cmaprec.platform_id = 7; /* Adobe platform id */
+ cmaprec.platform_id = TT_PLATFORM_ADOBE; /* Adobe platform id */
if ( encoding->offset == 0 )
{
@@ -904,7 +993,7 @@
clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
}
- FT_CMap_New( clazz, NULL, &cmaprec, NULL );
+ error = FT_CMap_New( clazz, NULL, &cmaprec, NULL );
}
}
}
diff --git a/3party/freetype/cff/cffobjs.h b/3party/freetype/src/cff/cffobjs.h
index 3c81cee009..3c81cee009 100644
--- a/3party/freetype/cff/cffobjs.h
+++ b/3party/freetype/src/cff/cffobjs.h
diff --git a/3party/freetype/cff/cffparse.c b/3party/freetype/src/cff/cffparse.c
index 947ec9d343..0d11a72786 100644
--- a/3party/freetype/cff/cffparse.c
+++ b/3party/freetype/src/cff/cffparse.c
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (body) */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -137,26 +137,23 @@
FT_UInt nib;
FT_UInt phase;
- FT_Long result, number, rest, exponent;
+ FT_Long result, number, exponent;
FT_Int sign = 0, exponent_sign = 0;
FT_Long exponent_add, integer_length, fraction_length;
if ( scaling )
- *scaling = 0;
+ *scaling = 0;
result = 0;
number = 0;
- rest = 0;
exponent = 0;
exponent_add = 0;
integer_length = 0;
fraction_length = 0;
- FT_UNUSED( rest );
-
/* First of all, read the integer part. */
phase = 4;
@@ -332,11 +329,19 @@
goto Exit;
/* Remove non-significant digits. */
- if ( integer_length < 0 ) {
+ if ( integer_length < 0 )
+ {
number /= power_tens[-integer_length];
fraction_length += integer_length;
}
+ /* this can only happen if exponent was non-zero */
+ if ( fraction_length == 10 )
+ {
+ number /= 10;
+ fraction_length -= 1;
+ }
+
/* Convert into 16.16 format. */
if ( fraction_length > 0 )
{
@@ -702,7 +707,7 @@
clazz[i].count_offset = 0;
*output_class = clazz;
- return FT_Err_Ok;
+ return CFF_Err_Ok;
}
@@ -745,8 +750,10 @@
p++;
for (;;)
{
+ /* An unterminated floating point number at the */
+ /* end of a dictionary is invalid but harmless. */
if ( p >= limit )
- goto Syntax_Error;
+ goto Exit;
v = p[0] >> 4;
if ( v == 15 )
break;
diff --git a/3party/freetype/cff/cffparse.h b/3party/freetype/src/cff/cffparse.h
index 7e2c00a044..7e2c00a044 100644
--- a/3party/freetype/cff/cffparse.h
+++ b/3party/freetype/src/cff/cffparse.h
diff --git a/3party/freetype/cff/cffpic.c b/3party/freetype/src/cff/cffpic.c
index 568956d6a9..5d01bd45e1 100644
--- a/3party/freetype/cff/cffpic.c
+++ b/3party/freetype/src/cff/cffpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for cff module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -59,18 +59,20 @@
}
}
+
FT_Error
- cff_driver_class_pic_init( FT_Library library )
+ cff_driver_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- CffModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = CFF_Err_Ok;
+ CffModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->cff = container;
/* initialize pointer table - this is how the module usually expects this data */
diff --git a/3party/freetype/cff/cffpic.h b/3party/freetype/src/cff/cffpic.h
index e29d068134..e29d068134 100644
--- a/3party/freetype/cff/cffpic.h
+++ b/3party/freetype/src/cff/cffpic.h
diff --git a/3party/freetype/cff/cfftoken.h b/3party/freetype/src/cff/cfftoken.h
index 6bb27d5caf..6bb27d5caf 100644
--- a/3party/freetype/cff/cfftoken.h
+++ b/3party/freetype/src/cff/cfftoken.h
diff --git a/3party/freetype/cff/cfftypes.h b/3party/freetype/src/cff/cfftypes.h
index df92e9a1ac..665ab6f68d 100644
--- a/3party/freetype/cff/cfftypes.h
+++ b/3party/freetype/src/cff/cfftypes.h
@@ -5,7 +5,7 @@
/* Basic OpenType/CFF type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008 by */
+/* Copyright 1996-2003, 2006-2008, 2010-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,9 @@
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TYPE1_TABLES_H
+#include FT_INTERNAL_SERVICE_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_INTERNAL_POSTSCRIPT_HINTS_H
FT_BEGIN_HEADER
@@ -204,14 +207,12 @@ FT_BEGIN_HEADER
CFF_PrivateRec private_dict;
CFF_IndexRec local_subrs_index;
- FT_UInt num_local_subrs;
- FT_Byte** local_subrs;
+ FT_Byte** local_subrs; /* array of pointers into Local Subrs INDEX data */
} CFF_SubFontRec, *CFF_SubFont;
- /* maximum number of sub-fonts in a CID-keyed file */
-#define CFF_MAX_CID_FONTS 32
+#define CFF_MAX_CID_FONTS 256
typedef struct CFF_FontRec_
@@ -229,7 +230,6 @@ FT_BEGIN_HEADER
CFF_IndexRec name_index;
CFF_IndexRec top_dict_index;
- CFF_IndexRec string_index;
CFF_IndexRec global_subrs_index;
CFF_EncodingRec encoding;
@@ -241,9 +241,15 @@ FT_BEGIN_HEADER
CFF_IndexRec local_subrs_index;
FT_String* font_name;
- FT_UInt num_global_subrs;
+
+ /* array of pointers into Global Subrs INDEX data */
FT_Byte** global_subrs;
+ /* array of pointers into String INDEX data stored at string_pool */
+ FT_UInt num_strings;
+ FT_Byte** strings;
+ FT_Byte* string_pool;
+
CFF_SubFontRec top_font;
FT_UInt num_subfonts;
CFF_SubFont subfonts[CFF_MAX_CID_FONTS];
@@ -251,10 +257,10 @@ FT_BEGIN_HEADER
CFF_FDSelectRec fd_select;
/* interface to PostScript hinter */
- void* pshinter;
+ PSHinter_Service pshinter;
/* interface to Postscript Names service */
- void* psnames;
+ FT_Service_PsCMaps psnames;
/* since version 2.3.0 */
PS_FontInfoRec* font_info; /* font info dictionary */
diff --git a/3party/freetype/src/cff/module.mk b/3party/freetype/src/cff/module.mk
new file mode 100644
index 0000000000..ef1391c279
--- /dev/null
+++ b/3party/freetype/src/cff/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 CFF module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += CFF_DRIVER
+
+define CFF_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, cff_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)cff $(ECHO_DRIVER_DESC)OpenType fonts with extension *.otf$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/cff/rules.mk b/3party/freetype/src/cff/rules.mk
new file mode 100644
index 0000000000..ca7aa5de89
--- /dev/null
+++ b/3party/freetype/src/cff/rules.mk
@@ -0,0 +1,73 @@
+#
+# FreeType 2 OpenType/CFF driver configuration rules
+#
+
+
+# Copyright 1996-2000, 2001, 2003, 2011 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.
+
+
+# OpenType driver directory
+#
+CFF_DIR := $(SRC_DIR)/cff
+
+
+CFF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CFF_DIR))
+
+
+# CFF driver sources (i.e., C files)
+#
+CFF_DRV_SRC := $(CFF_DIR)/cffcmap.c \
+ $(CFF_DIR)/cffdrivr.c \
+ $(CFF_DIR)/cffgload.c \
+ $(CFF_DIR)/cffload.c \
+ $(CFF_DIR)/cffobjs.c \
+ $(CFF_DIR)/cffparse.c \
+ $(CFF_DIR)/cffpic.c
+
+# CFF driver headers
+#
+CFF_DRV_H := $(CFF_DRV_SRC:%.c=%.h) \
+ $(CFF_DIR)/cfferrs.h \
+ $(CFF_DIR)/cfftoken.h \
+ $(CFF_DIR)/cfftypes.h
+
+
+# CFF driver object(s)
+#
+# CFF_DRV_OBJ_M is used during `multi' builds
+# CFF_DRV_OBJ_S is used during `single' builds
+#
+CFF_DRV_OBJ_M := $(CFF_DRV_SRC:$(CFF_DIR)/%.c=$(OBJ_DIR)/%.$O)
+CFF_DRV_OBJ_S := $(OBJ_DIR)/cff.$O
+
+# CFF driver source file for single build
+#
+CFF_DRV_SRC_S := $(CFF_DIR)/cff.c
+
+
+# CFF driver - single object
+#
+$(CFF_DRV_OBJ_S): $(CFF_DRV_SRC_S) $(CFF_DRV_SRC) $(FREETYPE_H) $(CFF_DRV_H)
+ $(CFF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(CFF_DRV_SRC_S))
+
+
+# CFF driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(CFF_DIR)/%.c $(FREETYPE_H) $(CFF_DRV_H)
+ $(CFF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(CFF_DRV_OBJ_S)
+DRV_OBJS_M += $(CFF_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/cid/Jamfile b/3party/freetype/src/cid/Jamfile
index ebeaed54ea..ebeaed54ea 100644
--- a/3party/freetype/cid/Jamfile
+++ b/3party/freetype/src/cid/Jamfile
diff --git a/3party/freetype/cid/ciderrs.h b/3party/freetype/src/cid/ciderrs.h
index 01813e1898..01813e1898 100644
--- a/3party/freetype/cid/ciderrs.h
+++ b/3party/freetype/src/cid/ciderrs.h
diff --git a/3party/freetype/cid/cidgload.c b/3party/freetype/src/cid/cidgload.c
index f59035ffa3..81742d167a 100644
--- a/3party/freetype/cid/cidgload.c
+++ b/3party/freetype/src/cid/cidgload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,6 +58,8 @@
#endif
+ FT_TRACE4(( "cid_load_glyph: glyph index %d\n", glyph_index ));
+
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* For incremental fonts get the character data using */
@@ -171,16 +173,16 @@
metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x );
- metrics.bearing_y = FIXED_TO_INT( decoder->builder.left_bearing.y );
+ metrics.bearing_y = 0;
metrics.advance = FIXED_TO_INT( decoder->builder.advance.x );
+ metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y );
error = inc->funcs->get_glyph_metrics( inc->object,
glyph_index, FALSE, &metrics );
decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x );
- decoder->builder.left_bearing.y = INT_TO_FIXED( metrics.bearing_y );
decoder->builder.advance.x = INT_TO_FIXED( metrics.advance );
- decoder->builder.advance.y = 0;
+ decoder->builder.advance.y = INT_TO_FIXED( metrics.advance_v );
}
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
@@ -270,7 +272,6 @@
FT_Int32 load_flags )
{
CID_GlyphSlot glyph = (CID_GlyphSlot)cidglyph;
- CID_Size size = (CID_Size)cidsize;
FT_Error error;
T1_DecoderRec decoder;
CID_Face face = (CID_Face)cidglyph->face;
@@ -373,7 +374,7 @@
cidglyph->format = FT_GLYPH_FORMAT_OUTLINE;
- if ( size && cidsize->metrics.y_ppem < 24 )
+ if ( cidsize->metrics.y_ppem < 24 )
cidglyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
/* apply the font matrix */
@@ -425,9 +426,12 @@
metrics->horiBearingX = cbox.xMin;
metrics->horiBearingY = cbox.yMax;
- /* make up vertical ones */
- ft_synthesize_vertical_metrics( metrics,
- metrics->vertAdvance );
+ if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
+ {
+ /* make up vertical ones */
+ ft_synthesize_vertical_metrics( metrics,
+ metrics->vertAdvance );
+ }
}
Exit:
diff --git a/3party/freetype/cid/cidgload.h b/3party/freetype/src/cid/cidgload.h
index a0a91bfea8..a0a91bfea8 100644
--- a/3party/freetype/cid/cidgload.h
+++ b/3party/freetype/src/cid/cidgload.h
diff --git a/3party/freetype/cid/cidload.c b/3party/freetype/src/cid/cidload.c
index 3bb359446f..3bb359446f 100644
--- a/3party/freetype/cid/cidload.c
+++ b/3party/freetype/src/cid/cidload.c
diff --git a/3party/freetype/cid/cidload.h b/3party/freetype/src/cid/cidload.h
index 8c172ffee2..8c172ffee2 100644
--- a/3party/freetype/cid/cidload.h
+++ b/3party/freetype/src/cid/cidload.h
diff --git a/3party/freetype/cid/cidobjs.c b/3party/freetype/src/cid/cidobjs.c
index 9647d87016..eb82168888 100644
--- a/3party/freetype/cid/cidobjs.c
+++ b/3party/freetype/src/cid/cidobjs.c
@@ -4,7 +4,7 @@
/* */
/* CID objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -131,7 +131,7 @@
cid_size_init( FT_Size cidsize ) /* CID_Size */
{
CID_Size size = (CID_Size)cidsize;
- FT_Error error = 0;
+ FT_Error error = CID_Err_Ok;
PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );
@@ -413,10 +413,11 @@
cidface->num_fixed_sizes = 0;
cidface->available_sizes = 0;
- cidface->bbox.xMin = cid->font_bbox.xMin >> 16;
- cidface->bbox.yMin = cid->font_bbox.yMin >> 16;
- cidface->bbox.xMax = ( cid->font_bbox.xMax + 0xFFFFU ) >> 16;
- cidface->bbox.yMax = ( cid->font_bbox.yMax + 0xFFFFU ) >> 16;
+ cidface->bbox.xMin = cid->font_bbox.xMin >> 16;
+ cidface->bbox.yMin = cid->font_bbox.yMin >> 16;
+ /* no `U' suffix here to 0xFFFF! */
+ cidface->bbox.xMax = ( cid->font_bbox.xMax + 0xFFFF ) >> 16;
+ cidface->bbox.yMax = ( cid->font_bbox.yMax + 0xFFFF ) >> 16;
if ( !cidface->units_per_EM )
cidface->units_per_EM = 1000;
diff --git a/3party/freetype/cid/cidobjs.h b/3party/freetype/src/cid/cidobjs.h
index aee346d1c8..aee346d1c8 100644
--- a/3party/freetype/cid/cidobjs.h
+++ b/3party/freetype/src/cid/cidobjs.h
diff --git a/3party/freetype/cid/cidparse.c b/3party/freetype/src/cid/cidparse.c
index efed618f5a..efed618f5a 100644
--- a/3party/freetype/cid/cidparse.c
+++ b/3party/freetype/src/cid/cidparse.c
diff --git a/3party/freetype/cid/cidparse.h b/3party/freetype/src/cid/cidparse.h
index ca37deab93..ca37deab93 100644
--- a/3party/freetype/cid/cidparse.h
+++ b/3party/freetype/src/cid/cidparse.h
diff --git a/3party/freetype/cid/cidriver.c b/3party/freetype/src/cid/cidriver.c
index 3a2d22532a..3a2d22532a 100644
--- a/3party/freetype/cid/cidriver.c
+++ b/3party/freetype/src/cid/cidriver.c
diff --git a/3party/freetype/cid/cidriver.h b/3party/freetype/src/cid/cidriver.h
index c7f424bb38..c7f424bb38 100644
--- a/3party/freetype/cid/cidriver.h
+++ b/3party/freetype/src/cid/cidriver.h
diff --git a/3party/freetype/cid/cidtoken.h b/3party/freetype/src/cid/cidtoken.h
index 94a3657b02..904cb09cf4 100644
--- a/3party/freetype/cid/cidtoken.h
+++ b/3party/freetype/src/cid/cidtoken.h
@@ -22,7 +22,7 @@
#define T1CODE T1_FIELD_LOCATION_CID_INFO
T1_FIELD_KEY ( "CIDFontName", cid_font_name, 0 )
- T1_FIELD_NUM ( "CIDFontVersion", cid_version, 0 )
+ T1_FIELD_FIXED ( "CIDFontVersion", cid_version, 0 )
T1_FIELD_NUM ( "CIDFontType", cid_font_type, 0 )
T1_FIELD_STRING( "Registry", registry, 0 )
T1_FIELD_STRING( "Ordering", ordering, 0 )
diff --git a/3party/freetype/src/cid/module.mk b/3party/freetype/src/cid/module.mk
new file mode 100644
index 0000000000..ce30bfd7ae
--- /dev/null
+++ b/3party/freetype/src/cid/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 CID module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += TYPE1CID_DRIVER
+
+define TYPE1CID_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, t1cid_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)cid $(ECHO_DRIVER_DESC)Postscript CID-keyed fonts, no known extension$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/cid/rules.mk b/3party/freetype/src/cid/rules.mk
new file mode 100644
index 0000000000..f362744612
--- /dev/null
+++ b/3party/freetype/src/cid/rules.mk
@@ -0,0 +1,70 @@
+#
+# FreeType 2 CID driver configuration rules
+#
+
+
+# Copyright 1996-2000, 2001, 2003 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.
+
+
+# CID driver directory
+#
+CID_DIR := $(SRC_DIR)/cid
+
+
+CID_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CID_DIR))
+
+
+# CID driver sources (i.e., C files)
+#
+CID_DRV_SRC := $(CID_DIR)/cidparse.c \
+ $(CID_DIR)/cidload.c \
+ $(CID_DIR)/cidriver.c \
+ $(CID_DIR)/cidgload.c \
+ $(CID_DIR)/cidobjs.c
+
+# CID driver headers
+#
+CID_DRV_H := $(CID_DRV_SRC:%.c=%.h) \
+ $(CID_DIR)/cidtoken.h \
+ $(CID_DIR)/ciderrs.h
+
+
+# CID driver object(s)
+#
+# CID_DRV_OBJ_M is used during `multi' builds
+# CID_DRV_OBJ_S is used during `single' builds
+#
+CID_DRV_OBJ_M := $(CID_DRV_SRC:$(CID_DIR)/%.c=$(OBJ_DIR)/%.$O)
+CID_DRV_OBJ_S := $(OBJ_DIR)/type1cid.$O
+
+# CID driver source file for single build
+#
+CID_DRV_SRC_S := $(CID_DIR)/type1cid.c
+
+
+# CID driver - single object
+#
+$(CID_DRV_OBJ_S): $(CID_DRV_SRC_S) $(CID_DRV_SRC) $(FREETYPE_H) $(CID_DRV_H)
+ $(CID_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(CID_DRV_SRC_S))
+
+
+# CID driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(CID_DIR)/%.c $(FREETYPE_H) $(CID_DRV_H)
+ $(CID_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(CID_DRV_OBJ_S)
+DRV_OBJS_M += $(CID_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/cid/type1cid.c b/3party/freetype/src/cid/type1cid.c
index 0b866e97c4..0b866e97c4 100644
--- a/3party/freetype/cid/type1cid.c
+++ b/3party/freetype/src/cid/type1cid.c
diff --git a/3party/freetype/gxvalid/Jamfile b/3party/freetype/src/gxvalid/Jamfile
index 88049a625d..88049a625d 100644
--- a/3party/freetype/gxvalid/Jamfile
+++ b/3party/freetype/src/gxvalid/Jamfile
diff --git a/3party/freetype/gxvalid/README b/3party/freetype/src/gxvalid/README
index 28e535b0bc..28e535b0bc 100644
--- a/3party/freetype/gxvalid/README
+++ b/3party/freetype/src/gxvalid/README
diff --git a/3party/freetype/gxvalid/gxvalid.c b/3party/freetype/src/gxvalid/gxvalid.c
index bc36e675d1..bc36e675d1 100644
--- a/3party/freetype/gxvalid/gxvalid.c
+++ b/3party/freetype/src/gxvalid/gxvalid.c
diff --git a/3party/freetype/gxvalid/gxvalid.h b/3party/freetype/src/gxvalid/gxvalid.h
index 27be9ecca8..27be9ecca8 100644
--- a/3party/freetype/gxvalid/gxvalid.h
+++ b/3party/freetype/src/gxvalid/gxvalid.h
diff --git a/3party/freetype/gxvalid/gxvbsln.c b/3party/freetype/src/gxvalid/gxvbsln.c
index 3d10031563..3d10031563 100644
--- a/3party/freetype/gxvalid/gxvbsln.c
+++ b/3party/freetype/src/gxvalid/gxvbsln.c
diff --git a/3party/freetype/gxvalid/gxvcommn.c b/3party/freetype/src/gxvalid/gxvcommn.c
index de7ce6fdef..d3c48d4ea6 100644
--- a/3party/freetype/gxvalid/gxvcommn.c
+++ b/3party/freetype/src/gxvalid/gxvcommn.c
@@ -4,7 +4,7 @@
/* */
/* TrueTypeGX/AAT common tables validation (body). */
/* */
-/* Copyright 2004, 2005, 2009 */
+/* Copyright 2004, 2005, 2009, 2010 */
/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
@@ -304,8 +304,7 @@
binSrchHeader->unitSize, binSrchHeader->nUnits,
searchRange, entrySelector, rangeShift ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
}
}
@@ -442,8 +441,7 @@
{
GXV_TRACE(( "too short, glyphs %d - %d are missing\n",
i, valid->face->num_glyphs ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
break;
}
@@ -531,8 +529,7 @@
GXV_TRACE(( "reverse ordered segment specification:"
" lastGlyph[%d]=%d < lastGlyph[%d]=%d\n",
unit, lastGlyph, unit - 1 , gid ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
if ( lastGlyph < firstGlyph )
@@ -540,8 +537,7 @@
GXV_TRACE(( "reverse ordered range specification at unit %d:",
" lastGlyph %d < firstGlyph %d ",
unit, lastGlyph, firstGlyph ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
if ( valid->root->level == FT_VALIDATE_TIGHT )
continue; /* ftxvalidator silently skips such an entry */
@@ -604,8 +600,7 @@
GXV_TRACE(( "reverse ordered segment specification:"
" lastGlyph[%d]=%d < lastGlyph[%d]=%d\n",
unit, lastGlyph, unit - 1 , gid ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
if ( lastGlyph < firstGlyph )
@@ -613,8 +608,7 @@
GXV_TRACE(( "reverse ordered range specification at unit %d:",
" lastGlyph %d < firstGlyph %d ",
unit, lastGlyph, firstGlyph ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
if ( valid->root->level == FT_VALIDATE_TIGHT )
continue; /* ftxvalidator silently skips such an entry */
@@ -705,8 +699,7 @@
{
GXV_TRACE(( "current gid 0x%04x < previous gid 0x%04x\n",
glyph, prev_glyph ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
prev_glyph = glyph;
@@ -834,8 +827,7 @@
{
GXV_TRACE(( " gxv_glyphid_check() gid overflow: num_glyphs %d < %d\n",
face->num_glyphs, gid ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
return 0;
@@ -908,7 +900,7 @@
nnames = FT_Get_Sfnt_Name_Count( valid->face );
for ( i = 0; i < nnames; i++ )
{
- if ( FT_Get_Sfnt_Name( valid->face, i, &name ) != FT_Err_Ok )
+ if ( FT_Get_Sfnt_Name( valid->face, i, &name ) != GXV_Err_Ok )
continue ;
if ( name.name_id == name_index )
@@ -1101,8 +1093,7 @@
if ( ( maxEntry + 1 ) * entrySize > *length_p )
{
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_TOO_SHORT;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_TOO_SHORT );
/* ftxvalidator and FontValidator both warn and continue */
maxEntry = (FT_Byte)( *length_p / entrySize - 1 );
@@ -1126,8 +1117,7 @@
{
GXV_TRACE(( " newState offset 0x%04x is out of stateArray\n",
newState ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_OFFSET;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
continue;
}
@@ -1135,8 +1125,7 @@
{
GXV_TRACE(( " newState offset 0x%04x is not aligned to %d-classes\n",
newState, 1 + maxClassID ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_OFFSET;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
continue;
}
@@ -1173,8 +1162,7 @@
break;
default:
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_FORMAT;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
goto Exit;
}
@@ -1503,8 +1491,7 @@
{
GXV_TRACE(( " newState index 0x%04x points out of stateArray\n",
newState_idx ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_OFFSET;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
}
state = (FT_UShort)( newState_idx / ( 1 + maxClassID ) );
@@ -1513,8 +1500,7 @@
FT_TRACE4(( "-> new state = %d (supposed)\n"
"but newState index 0x%04x is not aligned to %d-classes\n",
state, newState_idx, 1 + maxClassID ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_OFFSET;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
}
switch ( GXV_GLYPHOFFSET_FMT( xstatetable ) )
@@ -1548,8 +1534,7 @@
break;
default:
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_FORMAT;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
goto Exit;
}
diff --git a/3party/freetype/gxvalid/gxvcommn.h b/3party/freetype/src/gxvalid/gxvcommn.h
index 404c07ffad..35c043dbd8 100644
--- a/3party/freetype/gxvalid/gxvcommn.h
+++ b/3party/freetype/src/gxvalid/gxvcommn.h
@@ -51,6 +51,19 @@
FT_BEGIN_HEADER
+ /* some variables are not evaluated or only used in trace */
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+#define GXV_LOAD_TRACE_VARS
+#else
+#undef GXV_LOAD_TRACE_VARS
+#endif
+
+#undef GXV_LOAD_UNUSED_VARS /* debug purpose */
+
+#define IS_PARANOID_VALIDATION ( valid->root->level >= FT_VALIDATE_PARANOID )
+#define GXV_SET_ERR_IF_PARANOID( err ) { if ( IS_PARANOID_VALIDATION ) ( err ); }
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -234,6 +247,9 @@ FT_BEGIN_HEADER
GXV_Lookup_Fmt4_Transit_Func lookupfmt4_trans;
FT_Bytes lookuptbl_head;
+ FT_UShort min_gid;
+ FT_UShort max_gid;
+
GXV_StateTable_ValidatorRec statetable;
GXV_XStateTable_ValidatorRec xstatetable;
diff --git a/3party/freetype/gxvalid/gxverror.h b/3party/freetype/src/gxvalid/gxverror.h
index 0196199227..0196199227 100644
--- a/3party/freetype/gxvalid/gxverror.h
+++ b/3party/freetype/src/gxvalid/gxverror.h
diff --git a/3party/freetype/gxvalid/gxvfeat.c b/3party/freetype/src/gxvalid/gxvfeat.c
index 002fec6d6b..46792bbf98 100644
--- a/3party/freetype/gxvalid/gxvfeat.c
+++ b/3party/freetype/src/gxvalid/gxvfeat.c
@@ -92,8 +92,7 @@
{
GXV_TRACE(( "feature number %d is out of range %d\n",
feature, gxv_feat_registry_length ));
- if ( valid->root->level == FT_VALIDATE_PARANOID )
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
goto Exit;
}
@@ -101,8 +100,7 @@
{
GXV_TRACE(( "feature number %d is in defined range but doesn't exist\n",
feature ));
- if ( valid->root->level == FT_VALIDATE_PARANOID )
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
goto Exit;
}
@@ -222,9 +220,8 @@
if ( settingTable < reserved_size )
FT_INVALID_OFFSET;
- if ( valid->root->level == FT_VALIDATE_PARANOID &&
- ( featureFlags & GXV_FEAT_MASK_UNUSED ) == 0 )
- FT_INVALID_DATA;
+ if ( ( featureFlags & GXV_FEAT_MASK_UNUSED ) == 0 )
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
exclusive = FT_BOOL( featureFlags & GXV_FEAT_MASK_EXCLUSIVE_SETTINGS );
if ( exclusive )
@@ -252,9 +249,8 @@
{
gxv_feat_setting_validate( p, limit, exclusive, valid );
- if ( valid->root->level == FT_VALIDATE_PARANOID &&
- (FT_Int)GXV_FEAT_DATA( setting ) <= last_setting )
- FT_INVALID_FORMAT;
+ if ( (FT_Int)GXV_FEAT_DATA( setting ) <= last_setting )
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
last_setting = (FT_Int)GXV_FEAT_DATA( setting );
/* setting + nameIndex */
@@ -312,8 +308,8 @@
featureNameCount = FT_NEXT_USHORT( p );
GXV_TRACE(( " (featureNameCount = %d)\n", featureNameCount ));
- if ( valid->root->level != FT_VALIDATE_PARANOID )
- p += 6; /* skip (none) and (none) */
+ if ( !( IS_PARANOID_VALIDATION ) )
+ p += 6; /* skip (none) and (none) */
else
{
if ( FT_NEXT_USHORT( p ) != 0 )
@@ -329,9 +325,8 @@
{
gxv_feat_name_validate( p, limit, valid );
- if ( valid->root->level == FT_VALIDATE_PARANOID &&
- (FT_Int)GXV_FEAT_DATA( feature ) <= last_feature )
- FT_INVALID_FORMAT;
+ if ( (FT_Int)GXV_FEAT_DATA( feature ) <= last_feature )
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
last_feature = GXV_FEAT_DATA( feature );
p += 2 + 2 + 4 + 2 + 2;
diff --git a/3party/freetype/gxvalid/gxvfeat.h b/3party/freetype/src/gxvalid/gxvfeat.h
index 049d23a0b9..049d23a0b9 100644
--- a/3party/freetype/gxvalid/gxvfeat.h
+++ b/3party/freetype/src/gxvalid/gxvfeat.h
diff --git a/3party/freetype/gxvalid/gxvfgen.c b/3party/freetype/src/gxvalid/gxvfgen.c
index 483a9b3253..e48778a2a1 100644
--- a/3party/freetype/gxvalid/gxvfgen.c
+++ b/3party/freetype/src/gxvalid/gxvfgen.c
@@ -442,7 +442,7 @@
int
main( void )
{
- size_t i;
+ int i;
printf( " {\n" );
@@ -465,7 +465,7 @@
printf( " {%1d, %1d, %1d, %2d}, /* %s */\n",
feat_name ? 1 : 0,
( feat_name &&
- ( strncmp( feat_name,
+ ( ft_strncmp( feat_name,
APPLE_RESERVED, APPLE_RESERVED_LENGTH ) == 0 )
) ? 1 : 0,
featreg_table[i].exclusive ? 1 : 0,
diff --git a/3party/freetype/gxvalid/gxvjust.c b/3party/freetype/src/gxvalid/gxvjust.c
index e14f946f2d..7816e0b7fb 100644
--- a/3party/freetype/gxvalid/gxvjust.c
+++ b/3party/freetype/src/gxvalid/gxvjust.c
@@ -65,6 +65,22 @@
#define GXV_JUST_DATA( a ) GXV_TABLE_DATA( just, a )
+ /* GX just table does not define their subset of GID */
+ static void
+ gxv_just_check_max_gid( FT_UShort gid,
+ const FT_String* msg_tag,
+ GXV_Validator valid )
+ {
+ if ( gid < valid->face->num_glyphs )
+ return;
+
+ GXV_TRACE(( "just table includes too large %s"
+ " GID=%d > %d (in maxp)\n",
+ msg_tag, gid, valid->face->num_glyphs ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
+ }
+
+
static void
gxv_just_wdp_entry_validate( FT_Bytes table,
FT_Bytes limit,
@@ -72,24 +88,37 @@
{
FT_Bytes p = table;
FT_ULong justClass;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_Fixed beforeGrowLimit;
FT_Fixed beforeShrinkGrowLimit;
FT_Fixed afterGrowLimit;
FT_Fixed afterShrinkGrowLimit;
FT_UShort growFlags;
FT_UShort shrinkFlags;
+#endif
GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 + 4 + 2 + 2 );
justClass = FT_NEXT_ULONG( p );
+#ifndef GXV_LOAD_UNUSED_VARS
+ p += 4 + 4 + 4 + 4 + 2 + 2;
+#else
beforeGrowLimit = FT_NEXT_ULONG( p );
beforeShrinkGrowLimit = FT_NEXT_ULONG( p );
afterGrowLimit = FT_NEXT_ULONG( p );
afterShrinkGrowLimit = FT_NEXT_ULONG( p );
growFlags = FT_NEXT_USHORT( p );
shrinkFlags = FT_NEXT_USHORT( p );
+#endif
- /* TODO: decode flags for human readability */
+ /* According to Apple spec, only 7bits in justClass is used */
+ if ( ( justClass & 0xFFFFFF80 ) != 0 )
+ {
+ GXV_TRACE(( "just table includes non-zero value"
+ " in unused justClass higher bits"
+ " of WidthDeltaPair" ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
+ }
valid->subtable_length = p - table;
}
@@ -153,8 +182,9 @@
FT_Fixed lowerLimit;
FT_Fixed upperLimit;
-
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort order;
+#endif
FT_UShort decomposedCount;
FT_UInt i;
@@ -163,9 +193,20 @@
GXV_LIMIT_CHECK( 4 + 4 + 2 + 2 );
lowerLimit = FT_NEXT_ULONG( p );
upperLimit = FT_NEXT_ULONG( p );
+#ifdef GXV_LOAD_UNUSED_VARS
order = FT_NEXT_USHORT( p );
+#else
+ p += 2;
+#endif
decomposedCount = FT_NEXT_USHORT( p );
+ if ( lowerLimit >= upperLimit )
+ {
+ GXV_TRACE(( "just table includes invalid range spec:"
+ " lowerLimit(%d) > upperLimit(%d)\n" ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
+ }
+
for ( i = 0; i < decomposedCount; i++ )
{
FT_UShort glyphs;
@@ -173,6 +214,7 @@
GXV_LIMIT_CHECK( 2 );
glyphs = FT_NEXT_USHORT( p );
+ gxv_just_check_max_gid( glyphs, "type0:glyphs", valid );
}
valid->subtable_length = p - table;
@@ -191,6 +233,8 @@
GXV_LIMIT_CHECK( 2 );
addGlyph = FT_NEXT_USHORT( p );
+ gxv_just_check_max_gid( addGlyph, "type1:addGlyph", valid );
+
valid->subtable_length = p - table;
}
@@ -201,16 +245,27 @@
GXV_Validator valid )
{
FT_Bytes p = table;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_Fixed substThreshhold; /* Apple misspelled "Threshhold" */
+#endif
FT_UShort addGlyph;
FT_UShort substGlyph;
GXV_LIMIT_CHECK( 4 + 2 + 2 );
+#ifdef GXV_LOAD_UNUSED_VARS
substThreshhold = FT_NEXT_ULONG( p );
+#else
+ p += 4;
+#endif
addGlyph = FT_NEXT_USHORT( p );
substGlyph = FT_NEXT_USHORT( p );
+ if ( addGlyph != 0xFFFF )
+ gxv_just_check_max_gid( addGlyph, "type2:addGlyph", valid );
+
+ gxv_just_check_max_gid( substGlyph, "type2:substGlyph", valid );
+
valid->subtable_length = p - table;
}
@@ -234,6 +289,21 @@
maximumLimit = FT_NEXT_ULONG( p );
valid->subtable_length = p - table;
+
+ if ( variantsAxis != 0x64756374 ) /* 'duct' */
+ GXV_TRACE(( "variantsAxis 0x%08x is non default value",
+ variantsAxis ));
+
+ if ( minimumLimit > noStretchValue )
+ GXV_TRACE(( "type4:minimumLimit 0x%08x > noStretchValue 0x%08x\n",
+ minimumLimit, noStretchValue ));
+ else if ( noStretchValue > maximumLimit )
+ GXV_TRACE(( "type4:noStretchValue 0x%08x > maximumLimit 0x%08x\n",
+ noStretchValue, maximumLimit ));
+ else if ( !IS_PARANOID_VALIDATION )
+ return;
+
+ FT_INVALID_DATA;
}
@@ -251,6 +321,11 @@
flags = FT_NEXT_USHORT( p );
glyph = FT_NEXT_USHORT( p );
+ if ( flags )
+ GXV_TRACE(( "type5: nonzero value 0x%04x in unused flags\n",
+ flags ));
+ gxv_just_check_max_gid( glyph, "type5:glyph", valid );
+
valid->subtable_length = p - table;
}
@@ -274,6 +349,10 @@
actionType = FT_NEXT_USHORT( p );
actionLength = FT_NEXT_ULONG( p );
+ /* actionClass is related with justClass using 7bit only */
+ if ( ( actionClass & 0xFF80 ) != 0 )
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
+
if ( actionType == 0 )
gxv_just_actSubrecord_type0_validate( p, limit, valid );
else if ( actionType == 1 )
@@ -389,10 +468,13 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_UNUSED_VARS
+ /* TODO: validate markClass & currentClass */
FT_UShort setMark;
FT_UShort dontAdvance;
FT_UShort markClass;
FT_UShort currentClass;
+#endif
FT_UNUSED( state );
FT_UNUSED( glyphOffset_p );
@@ -400,13 +482,14 @@
FT_UNUSED( limit );
FT_UNUSED( valid );
-
+#ifndef GXV_LOAD_UNUSED_VARS
+ FT_UNUSED( flags );
+#else
setMark = (FT_UShort)( ( flags >> 15 ) & 1 );
dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
markClass = (FT_UShort)( ( flags >> 7 ) & 0x7F );
currentClass = (FT_UShort)( flags & 0x7F );
-
- /* TODO: validate markClass & currentClass */
+#endif
}
@@ -428,9 +511,15 @@
coverage = FT_NEXT_USHORT( p );
subFeatureFlags = FT_NEXT_ULONG( p );
- GXV_TRACE(( " justClassTable: coverage = 0x%04x (%s)",
- coverage,
- ( 0x4000 & coverage ) == 0 ? "ascending" : "descending" ));
+ GXV_TRACE(( " justClassTable: coverage = 0x%04x (%s) ", coverage ));
+ if ( ( coverage & 0x4000 ) == 0 )
+ GXV_TRACE(( "ascending\n" ));
+ else
+ GXV_TRACE(( "descending\n" ));
+
+ if ( subFeatureFlags )
+ GXV_TRACE(( " justClassTable: nonzero value (0x%08x)"
+ " in unused subFeatureFlags\n", subFeatureFlags ));
valid->statetable.optdata = NULL;
valid->statetable.optdata_load_func = NULL;
@@ -557,7 +646,6 @@
{
FT_Bytes p = table;
FT_Bytes limit = 0;
- FT_Offset table_size;
GXV_ValidatorRec validrec;
GXV_Validator valid = &validrec;
@@ -582,7 +670,6 @@
GXV_INIT;
limit = valid->root->limit;
- table_size = limit - table;
GXV_LIMIT_CHECK( 4 + 2 + 2 + 2 );
version = FT_NEXT_ULONG( p );
diff --git a/3party/freetype/gxvalid/gxvkern.c b/3party/freetype/src/gxvalid/gxvkern.c
index 2137db842a..0ec978f7be 100644
--- a/3party/freetype/gxvalid/gxvkern.c
+++ b/3party/freetype/src/gxvalid/gxvkern.c
@@ -127,7 +127,9 @@
{
FT_UShort gid_left;
FT_UShort gid_right;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_Short kernValue;
+#endif
/* left */
@@ -156,7 +158,11 @@
FT_INVALID_DATA;
/* skip the kern value */
+#ifdef GXV_LOAD_UNUSED_VARS
kernValue = FT_NEXT_SHORT( p );
+#else
+ p += 2;
+#endif
}
GXV_EXIT;
@@ -261,18 +267,24 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort push;
FT_UShort dontAdvance;
+#endif
FT_UShort valueOffset;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort kernAction;
FT_UShort kernValue;
+#endif
FT_UNUSED( state );
FT_UNUSED( glyphOffset_p );
+#ifdef GXV_LOAD_UNUSED_VARS
push = (FT_UShort)( ( flags >> 15 ) & 1 );
dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
+#endif
valueOffset = (FT_UShort)( flags & 0x3FFF );
{
@@ -288,8 +300,12 @@
limit = table + vt_rec->valueTable + vt_rec->valueTable_length;
GXV_LIMIT_CHECK( 2 + 2 );
+#ifdef GXV_LOAD_UNUSED_VARS
kernAction = FT_NEXT_USHORT( p );
kernValue = FT_NEXT_USHORT( p );
+#else
+ p += 4;
+#endif
}
}
@@ -475,10 +491,12 @@
{
GXV_TRACE(( "maxGID=%d, but glyphCount=%d\n",
valid->face->num_glyphs, glyphCount ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
+ if ( flags != 0 )
+ GXV_TRACE(( "kern subtable fmt3 has nonzero value"
+ " (%d) in unused flag\n", flags ));
/*
* just skip kernValue[kernValueCount]
*/
@@ -545,20 +563,24 @@
GXV_Validator valid )
{
/* new Apple-dialect */
+#ifdef GXV_LOAD_TRACE_VARS
FT_Bool kernVertical;
FT_Bool kernCrossStream;
FT_Bool kernVariation;
+#endif
FT_UNUSED( valid );
/* reserved bits = 0 */
if ( coverage & 0x1FFC )
- return 0;
+ return FALSE;
+#ifdef GXV_LOAD_TRACE_VARS
kernVertical = FT_BOOL( ( coverage >> 15 ) & 1 );
kernCrossStream = FT_BOOL( ( coverage >> 14 ) & 1 );
kernVariation = FT_BOOL( ( coverage >> 13 ) & 1 );
+#endif
*format = (FT_UShort)( coverage & 0x0003 );
@@ -568,7 +590,7 @@
GXV_TRACE(( "kerning values in Apple format subtable are ignored\n" ));
- return 1;
+ return TRUE;
}
@@ -578,20 +600,24 @@
GXV_Validator valid )
{
/* classic Apple-dialect */
+#ifdef GXV_LOAD_TRACE_VARS
FT_Bool horizontal;
FT_Bool cross_stream;
+#endif
/* check expected flags, but don't check if MS-dialect is impossible */
if ( !( coverage & 0xFD00 ) && KERN_ALLOWS_MS( valid ) )
- return 0;
+ return FALSE;
/* reserved bits = 0 */
if ( coverage & 0x02FC )
- return 0;
+ return FALSE;
+#ifdef GXV_LOAD_TRACE_VARS
horizontal = FT_BOOL( ( coverage >> 15 ) & 1 );
cross_stream = FT_BOOL( ( coverage >> 13 ) & 1 );
+#endif
*format = (FT_UShort)( coverage & 0x0003 );
@@ -601,11 +627,11 @@
/* format 1 requires GX State Machine, too new for classic */
if ( *format == 1 )
- return 0;
+ return FALSE;
GXV_TRACE(( "kerning values in Apple format subtable are ignored\n" ));
- return 1;
+ return TRUE;
}
@@ -615,22 +641,26 @@
GXV_Validator valid )
{
/* classic Microsoft-dialect */
+#ifdef GXV_LOAD_TRACE_VARS
FT_Bool horizontal;
FT_Bool minimum;
FT_Bool cross_stream;
FT_Bool override;
+#endif
FT_UNUSED( valid );
/* reserved bits = 0 */
if ( coverage & 0xFDF0 )
- return 0;
+ return FALSE;
+#ifdef GXV_LOAD_TRACE_VARS
horizontal = FT_BOOL( coverage & 1 );
minimum = FT_BOOL( ( coverage >> 1 ) & 1 );
cross_stream = FT_BOOL( ( coverage >> 2 ) & 1 );
override = FT_BOOL( ( coverage >> 3 ) & 1 );
+#endif
*format = (FT_UShort)( ( coverage >> 8 ) & 0x0003 );
@@ -643,7 +673,7 @@
GXV_TRACE((
"kerning values in Microsoft format 2 subtable are ignored\n" ));
- return 1;
+ return TRUE;
}
@@ -714,10 +744,14 @@
GXV_Validator valid )
{
FT_Bytes p = table;
+#ifdef GXV_LOAD_TRACE_VARS
FT_UShort version = 0; /* MS only: subtable version, unused */
+#endif
FT_ULong length; /* MS: 16bit, Apple: 32bit*/
FT_UShort coverage;
+#ifdef GXV_LOAD_TRACE_VARS
FT_UShort tupleIndex = 0; /* Apple only */
+#endif
FT_UShort u16[2];
FT_UShort format = 255; /* subtable format */
@@ -732,23 +766,35 @@
switch ( gxv_kern_coverage_validate( coverage, &format, valid ) )
{
case KERN_DIALECT_MS:
+#ifdef GXV_LOAD_TRACE_VARS
version = u16[0];
+#endif
length = u16[1];
+#ifdef GXV_LOAD_TRACE_VARS
tupleIndex = 0;
+#endif
GXV_TRACE(( "Subtable version = %d\n", version ));
GXV_TRACE(( "Subtable length = %d\n", length ));
break;
case KERN_DIALECT_APPLE:
+#ifdef GXV_LOAD_TRACE_VARS
version = 0;
+#endif
length = ( u16[0] << 16 ) + u16[1];
+#ifdef GXV_LOAD_TRACE_VARS
tupleIndex = 0;
+#endif
GXV_TRACE(( "Subtable length = %d\n", length ));
if ( KERN_IS_NEW( valid ) )
{
GXV_LIMIT_CHECK( 2 );
+#ifdef GXV_LOAD_TRACE_VARS
tupleIndex = FT_NEXT_USHORT( p );
+#else
+ p += 2;
+#endif
GXV_TRACE(( "Subtable tupleIndex = %d\n", tupleIndex ));
}
break;
diff --git a/3party/freetype/gxvalid/gxvlcar.c b/3party/freetype/src/gxvalid/gxvlcar.c
index f14fa5b131..f14fa5b131 100644
--- a/3party/freetype/gxvalid/gxvlcar.c
+++ b/3party/freetype/src/gxvalid/gxvlcar.c
diff --git a/3party/freetype/gxvalid/gxvmod.c b/3party/freetype/src/gxvalid/gxvmod.c
index b2b16b1ff3..b2b16b1ff3 100644
--- a/3party/freetype/gxvalid/gxvmod.c
+++ b/3party/freetype/src/gxvalid/gxvmod.c
diff --git a/3party/freetype/gxvalid/gxvmod.h b/3party/freetype/src/gxvalid/gxvmod.h
index d912a8f838..d912a8f838 100644
--- a/3party/freetype/gxvalid/gxvmod.h
+++ b/3party/freetype/src/gxvalid/gxvmod.h
diff --git a/3party/freetype/gxvalid/gxvmort.c b/3party/freetype/src/gxvalid/gxvmort.c
index 0aa066339d..465462a050 100644
--- a/3party/freetype/gxvalid/gxvmort.c
+++ b/3party/freetype/src/gxvalid/gxvmort.c
@@ -47,16 +47,14 @@
GXV_TRACE(( "featureType %d is out of registered range, "
"setting %d is unchecked\n",
f->featureType, f->featureSetting ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
}
else if ( !gxv_feat_registry[f->featureType].existence )
{
GXV_TRACE(( "featureType %d is within registered area "
"but undefined, setting %d is unchecked\n",
f->featureType, f->featureSetting ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
}
else
{
@@ -74,8 +72,7 @@
if ( f->featureSetting > nSettings_max )
{
GXV_TRACE(( "out of defined range %d", nSettings_max ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
}
GXV_TRACE(( "\n" ));
}
@@ -176,7 +173,9 @@
{
FT_UShort length;
FT_UShort coverage;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_ULong subFeatureFlags;
+#endif
FT_UInt type;
FT_UInt rest;
@@ -184,7 +183,11 @@
GXV_LIMIT_CHECK( 2 + 2 + 4 );
length = FT_NEXT_USHORT( p );
coverage = FT_NEXT_USHORT( p );
+#ifdef GXV_LOAD_UNUSED_VARS
subFeatureFlags = FT_NEXT_ULONG( p );
+#else
+ p += 4;
+#endif
GXV_TRACE(( "validating chain subtable %d/%d (%d bytes)\n",
i + 1, nSubtables, length ));
@@ -204,6 +207,7 @@
func( p, p + rest, valid );
p += rest;
+ /* TODO: validate subFeatureFlags */
}
valid->subtable_length = p - table;
@@ -218,7 +222,9 @@
GXV_Validator valid )
{
FT_Bytes p = table;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_ULong defaultFlags;
+#endif
FT_ULong chainLength;
FT_UShort nFeatureFlags;
FT_UShort nSubtables;
@@ -227,7 +233,11 @@
GXV_NAME_ENTER( "mort chain header" );
GXV_LIMIT_CHECK( 4 + 4 + 2 + 2 );
+#ifdef GXV_LOAD_UNUSED_VARS
defaultFlags = FT_NEXT_ULONG( p );
+#else
+ p += 4;
+#endif
chainLength = FT_NEXT_ULONG( p );
nFeatureFlags = FT_NEXT_USHORT( p );
nSubtables = FT_NEXT_USHORT( p );
@@ -238,6 +248,7 @@
gxv_mort_subtables_validate( p, table + chainLength, nSubtables, valid );
valid->subtable_length = chainLength;
+ /* TODO: validate defaultFlags */
GXV_EXIT;
}
diff --git a/3party/freetype/gxvalid/gxvmort.h b/3party/freetype/src/gxvalid/gxvmort.h
index 1e5a1f5ab6..1e5a1f5ab6 100644
--- a/3party/freetype/gxvalid/gxvmort.h
+++ b/3party/freetype/src/gxvalid/gxvmort.h
diff --git a/3party/freetype/gxvalid/gxvmort0.c b/3party/freetype/src/gxvalid/gxvmort0.c
index 0453062f63..b136ceda27 100644
--- a/3party/freetype/gxvalid/gxvmort0.c
+++ b/3party/freetype/src/gxvalid/gxvmort0.c
@@ -98,10 +98,24 @@
GXV_TRACE(( " %02d", verb ));
GXV_TRACE(( " %s\n", GXV_Mort_IndicScript_Msg[verb] ));
+ if ( markFirst > 0 && markLast > 0 )
+ {
+ GXV_TRACE(( " [odd] a glyph is marked as the first and last"
+ " in Indic rearrangement\n" ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
+ }
+
+ if ( markFirst > 0 && dontAdvance > 0 )
+ {
+ GXV_TRACE(( " [odd] the first glyph is marked as dontAdvance"
+ " in Indic rearrangement\n" ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
+ }
+
if ( 0 < reserved )
{
GXV_TRACE(( " non-zero bits found in reserved range\n" ));
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
}
else
GXV_TRACE(( "\n" ));
diff --git a/3party/freetype/gxvalid/gxvmort1.c b/3party/freetype/src/gxvalid/gxvmort1.c
index 696d85032d..1c17a5d92a 100644
--- a/3party/freetype/gxvalid/gxvmort1.c
+++ b/3party/freetype/src/gxvalid/gxvmort1.c
@@ -106,8 +106,6 @@
{
FT_UShort substTable;
FT_UShort substTable_limit;
- FT_UShort min_gid;
- FT_UShort max_gid;
FT_UNUSED( tag );
FT_UNUSED( state );
@@ -121,9 +119,10 @@
((GXV_mort_subtable_type1_StateOptRec *)
(valid->statetable.optdata))->substitutionTable_length );
- min_gid = (FT_UShort)( ( substTable - wordOffset * 2 ) / 2 );
- max_gid = (FT_UShort)( ( substTable_limit - wordOffset * 2 ) / 2 );
- max_gid = (FT_UShort)( FT_MAX( max_gid, valid->face->num_glyphs ) );
+ valid->min_gid = (FT_UShort)( ( substTable - wordOffset * 2 ) / 2 );
+ valid->max_gid = (FT_UShort)( ( substTable_limit - wordOffset * 2 ) / 2 );
+ valid->max_gid = (FT_UShort)( FT_MAX( valid->max_gid,
+ valid->face->num_glyphs ) );
/* XXX: check range? */
@@ -140,8 +139,10 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort setMark;
FT_UShort dontAdvance;
+#endif
FT_UShort reserved;
FT_Short markOffset;
FT_Short currentOffset;
@@ -150,8 +151,10 @@
FT_UNUSED( limit );
+#ifdef GXV_LOAD_UNUSED_VARS
setMark = (FT_UShort)( flags >> 15 );
dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
+#endif
reserved = (FT_Short)( flags & 0x3FFF );
markOffset = (FT_Short)( glyphOffset_p->ul >> 16 );
@@ -160,8 +163,7 @@
if ( 0 < reserved )
{
GXV_TRACE(( " non-zero bits found in reserved range\n" ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
}
gxv_mort_subtable_type1_offset_to_subst_validate( markOffset,
@@ -200,13 +202,12 @@
if ( dst_gid >= 0xFFFFU )
continue;
- if ( dst_gid > valid->face->num_glyphs )
+ if ( dst_gid < valid->min_gid || valid->max_gid < dst_gid )
{
- GXV_TRACE(( "substTable include too large gid[%d]=%d >"
- " max defined gid #%d\n",
- i, dst_gid, valid->face->num_glyphs ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_GLYPH_ID;
+ GXV_TRACE(( "substTable include a strange gid[%d]=%d >"
+ " out of define range (%d..%d)\n",
+ i, dst_gid, valid->min_gid, valid->max_gid ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
}
diff --git a/3party/freetype/gxvalid/gxvmort2.c b/3party/freetype/src/gxvalid/gxvmort2.c
index 6f77cf39ce..9e08fb792a 100644
--- a/3party/freetype/gxvalid/gxvmort2.c
+++ b/3party/freetype/src/gxvalid/gxvmort2.c
@@ -155,8 +155,7 @@
ligActionOffset, lat_base - p ));
/* FontValidator, ftxvalidator, ftxdumperfuser warn but continue */
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_OFFSET;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
}
else if ( lat_limit < p )
{
@@ -164,23 +163,46 @@
ligActionOffset, p - lat_limit ));
/* FontValidator, ftxvalidator, ftxdumperfuser warn but continue */
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_OFFSET;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
}
else
{
/* validate entry in ligActionTable */
FT_ULong lig_action;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort last;
FT_UShort store;
+#endif
FT_ULong offset;
lig_action = FT_NEXT_ULONG( p );
+#ifdef GXV_LOAD_UNUSED_VARS
last = (FT_UShort)( ( lig_action >> 31 ) & 1 );
store = (FT_UShort)( ( lig_action >> 30 ) & 1 );
+#endif
+ /* Apple spec defines this offset as a word offset */
offset = lig_action & 0x3FFFFFFFUL;
+ if ( offset * 2 < optdata->ligatureTable )
+ {
+ GXV_TRACE(( "too short offset 0x%08x:"
+ " 2 x offset < ligatureTable (%d byte rewind)\n",
+ offset, optdata->ligatureTable - offset * 2 ));
+
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
+ } else if ( offset * 2 >
+ optdata->ligatureTable + optdata->ligatureTable_length )
+ {
+ GXV_TRACE(( "too long offset 0x%08x:"
+ " 2 x offset > ligatureTable + ligatureTable_length"
+ " (%d byte overrun)\n",
+ offset,
+ optdata->ligatureTable + optdata->ligatureTable_length
+ - offset * 2 ));
+
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
+ }
}
}
@@ -194,8 +216,10 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort setComponent;
FT_UShort dontAdvance;
+#endif
FT_UShort offset;
FT_UNUSED( state );
@@ -203,8 +227,10 @@
FT_UNUSED( limit );
+#ifdef GXV_LOAD_UNUSED_VARS
setComponent = (FT_UShort)( ( flags >> 15 ) & 1 );
dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
+#endif
offset = (FT_UShort)( flags & 0x3FFFU );
@@ -237,6 +263,9 @@
GXV_LIMIT_CHECK( 2 );
lig_gid = FT_NEXT_USHORT( p );
+
+ if ( valid->face->num_glyphs < lig_gid )
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
}
GXV_EXIT;
diff --git a/3party/freetype/gxvalid/gxvmort4.c b/3party/freetype/src/gxvalid/gxvmort4.c
index 83470988c0..83470988c0 100644
--- a/3party/freetype/gxvalid/gxvmort4.c
+++ b/3party/freetype/src/gxvalid/gxvmort4.c
diff --git a/3party/freetype/gxvalid/gxvmort5.c b/3party/freetype/src/gxvalid/gxvmort5.c
index ec0bcb634d..32cfb03639 100644
--- a/3party/freetype/gxvalid/gxvmort5.c
+++ b/3party/freetype/src/gxvalid/gxvmort5.c
@@ -121,6 +121,9 @@
offset < optdata->entryTable + *(optdata->entryTable_length_p) )
GXV_TRACE(( " offset runs into EntryTable" ));
+#ifndef GXV_LOAD_TRACE_VARS
+ GXV_LIMIT_CHECK( count * 2 );
+#else
while ( p < table + offset + ( count * 2 ) )
{
FT_UShort insert_glyphID;
@@ -130,8 +133,8 @@
insert_glyphID = FT_NEXT_USHORT( p );
GXV_TRACE(( " 0x%04x", insert_glyphID ));
}
-
GXV_TRACE(( "\n" ));
+#endif
}
@@ -144,12 +147,14 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_UNUSED_VARS
FT_Bool setMark;
FT_Bool dontAdvance;
FT_Bool currentIsKashidaLike;
FT_Bool markedIsKashidaLike;
FT_Bool currentInsertBefore;
FT_Bool markedInsertBefore;
+#endif
FT_Byte currentInsertCount;
FT_Byte markedInsertCount;
FT_UShort currentInsertList;
@@ -158,12 +163,14 @@
FT_UNUSED( state );
+#ifdef GXV_LOAD_UNUSED_VARS
setMark = FT_BOOL( ( flags >> 15 ) & 1 );
dontAdvance = FT_BOOL( ( flags >> 14 ) & 1 );
currentIsKashidaLike = FT_BOOL( ( flags >> 13 ) & 1 );
markedIsKashidaLike = FT_BOOL( ( flags >> 12 ) & 1 );
currentInsertBefore = FT_BOOL( ( flags >> 11 ) & 1 );
markedInsertBefore = FT_BOOL( ( flags >> 10 ) & 1 );
+#endif
currentInsertCount = (FT_Byte)( ( flags >> 5 ) & 0x1F );
markedInsertCount = (FT_Byte)( flags & 0x001F );
diff --git a/3party/freetype/gxvalid/gxvmorx.c b/3party/freetype/src/gxvalid/gxvmorx.c
index f8ba5b985d..4b1dd00507 100644
--- a/3party/freetype/gxvalid/gxvmorx.c
+++ b/3party/freetype/src/gxvalid/gxvmorx.c
@@ -68,7 +68,9 @@
{
FT_ULong length;
FT_ULong coverage;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_ULong subFeatureFlags;
+#endif
FT_ULong type;
FT_ULong rest;
@@ -76,7 +78,11 @@
GXV_LIMIT_CHECK( 4 + 4 + 4 );
length = FT_NEXT_ULONG( p );
coverage = FT_NEXT_ULONG( p );
+#ifdef GXV_LOAD_UNUSED_VARS
subFeatureFlags = FT_NEXT_ULONG( p );
+#else
+ p += 4;
+#endif
GXV_TRACE(( "validating chain subtable %d/%d (%d bytes)\n",
i + 1, nSubtables, length ));
@@ -97,6 +103,7 @@
func( p, p + rest, valid );
+ /* TODO: subFeatureFlags should be unique in a table? */
p += rest;
}
@@ -112,7 +119,9 @@
GXV_Validator valid )
{
FT_Bytes p = table;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_ULong defaultFlags;
+#endif
FT_ULong chainLength;
FT_ULong nFeatureFlags;
FT_ULong nSubtables;
@@ -121,7 +130,11 @@
GXV_NAME_ENTER( "morx chain header" );
GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 );
+#ifdef GXV_LOAD_UNUSED_VARS
defaultFlags = FT_NEXT_ULONG( p );
+#else
+ p += 4;
+#endif
chainLength = FT_NEXT_ULONG( p );
nFeatureFlags = FT_NEXT_ULONG( p );
nSubtables = FT_NEXT_ULONG( p );
@@ -138,6 +151,8 @@
valid->subtable_length = chainLength;
+ /* TODO: defaultFlags should be compared with the flags in tables */
+
GXV_EXIT;
}
diff --git a/3party/freetype/gxvalid/gxvmorx.h b/3party/freetype/src/gxvalid/gxvmorx.h
index 28c1a44f6f..28c1a44f6f 100644
--- a/3party/freetype/gxvalid/gxvmorx.h
+++ b/3party/freetype/src/gxvalid/gxvmorx.h
diff --git a/3party/freetype/gxvalid/gxvmorx0.c b/3party/freetype/src/gxvalid/gxvmorx0.c
index 0159c5aef7..6a736c1775 100644
--- a/3party/freetype/gxvalid/gxvmorx0.c
+++ b/3party/freetype/src/gxvalid/gxvmorx0.c
@@ -47,11 +47,15 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort markFirst;
FT_UShort dontAdvance;
FT_UShort markLast;
+#endif
FT_UShort reserved;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort verb;
+#endif
FT_UNUSED( state );
FT_UNUSED( glyphOffset_p );
@@ -59,12 +63,16 @@
FT_UNUSED( limit );
+#ifdef GXV_LOAD_UNUSED_VARS
markFirst = (FT_UShort)( ( flags >> 15 ) & 1 );
dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
markLast = (FT_UShort)( ( flags >> 13 ) & 1 );
+#endif
reserved = (FT_UShort)( flags & 0x1FF0 );
+#ifdef GXV_LOAD_UNUSED_VARS
verb = (FT_UShort)( flags & 0x000F );
+#endif
if ( 0 < reserved )
{
diff --git a/3party/freetype/gxvalid/gxvmorx1.c b/3party/freetype/src/gxvalid/gxvmorx1.c
index e1c162fa0c..ce0009a16f 100644
--- a/3party/freetype/gxvalid/gxvmorx1.c
+++ b/3party/freetype/src/gxvalid/gxvmorx1.c
@@ -108,8 +108,10 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_TRACE_VARS
FT_UShort setMark;
FT_UShort dontAdvance;
+#endif
FT_UShort reserved;
FT_Short markIndex;
FT_Short currentIndex;
@@ -122,8 +124,10 @@
FT_UNUSED( limit );
+#ifdef GXV_LOAD_TRACE_VARS
setMark = (FT_UShort)( ( flags >> 15 ) & 1 );
dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
+#endif
reserved = (FT_UShort)( flags & 0x3FFF );
@@ -136,8 +140,7 @@
if ( 0 < reserved )
{
GXV_TRACE(( " non-zero bits found in reserved range\n" ));
- if ( valid->root->level >= FT_VALIDATE_PARANOID )
- FT_INVALID_DATA;
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
}
GXV_TRACE(( "markIndex = %d, currentIndex = %d\n",
diff --git a/3party/freetype/gxvalid/gxvmorx2.c b/3party/freetype/src/gxvalid/gxvmorx2.c
index b4bb3353f6..bc18c6b8a6 100644
--- a/3party/freetype/gxvalid/gxvmorx2.c
+++ b/3party/freetype/src/gxvalid/gxvmorx2.c
@@ -168,16 +168,50 @@
{
/* validate entry in ligActionTable */
FT_ULong lig_action;
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort last;
FT_UShort store;
+#endif
FT_ULong offset;
lig_action = FT_NEXT_ULONG( p );
+#ifdef GXV_LOAD_UNUSED_VARS
last = (FT_UShort)( ( lig_action >> 31 ) & 1 );
store = (FT_UShort)( ( lig_action >> 30 ) & 1 );
+#endif
offset = lig_action & 0x3FFFFFFFUL;
+
+ /* this offset is 30-bit signed value to add to GID */
+ /* it is different from the location offset in mort */
+ if ( ( offset & 0x3FFF0000UL ) == 0x3FFF0000UL )
+ {
+ if ( offset + valid->face->num_glyphs > 0x40000000UL )
+ return;
+
+ GXV_TRACE(( "ligature action table includes"
+ " too negative offset moving all GID"
+ " below defined range: 0x%04x\n",
+ offset & 0xFFFFU ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
+ }
+ else if ( ( offset & 0x3FFF0000UL ) == 0x0000000UL )
+ {
+ if ( offset + valid->face->num_glyphs < 0 )
+ return;
+
+ GXV_TRACE(( "ligature action table includes"
+ " too large offset moving all GID"
+ " over defined range: 0x%04x\n",
+ offset & 0xFFFFU ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
+ }
+
+ GXV_TRACE(( "ligature action table includes"
+ " invalid offset to add to 16-bit GID:"
+ " 0x%08x\n", offset ));
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_OFFSET );
}
}
@@ -191,9 +225,11 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_UNUSED_VARS
FT_UShort setComponent;
FT_UShort dontAdvance;
FT_UShort performAction;
+#endif
FT_UShort reserved;
FT_UShort ligActionIndex;
@@ -201,9 +237,11 @@
FT_UNUSED( limit );
+#ifdef GXV_LOAD_UNUSED_VARS
setComponent = (FT_UShort)( ( flags >> 15 ) & 1 );
dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
performAction = (FT_UShort)( ( flags >> 13 ) & 1 );
+#endif
reserved = (FT_UShort)( flags & 0x1FFF );
ligActionIndex = glyphOffset_p->u;
@@ -241,6 +279,8 @@
GXV_LIMIT_CHECK( 2 );
lig_gid = FT_NEXT_USHORT( p );
+ if ( lig_gid < valid->face->num_glyphs )
+ GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
}
}
diff --git a/3party/freetype/gxvalid/gxvmorx4.c b/3party/freetype/src/gxvalid/gxvmorx4.c
index c0d2f78e39..c0d2f78e39 100644
--- a/3party/freetype/gxvalid/gxvmorx4.c
+++ b/3party/freetype/src/gxvalid/gxvmorx4.c
diff --git a/3party/freetype/gxvalid/gxvmorx5.c b/3party/freetype/src/gxvalid/gxvmorx5.c
index 5e3a16437e..d8cf700797 100644
--- a/3party/freetype/gxvalid/gxvmorx5.c
+++ b/3party/freetype/src/gxvalid/gxvmorx5.c
@@ -118,6 +118,9 @@
FT_Bytes p = table + table_index * 2;
+#ifndef GXV_LOAD_TRACE_VARS
+ GXV_LIMIT_CHECK( count * 2 );
+#else
while ( p < table + count * 2 + table_index * 2 )
{
FT_UShort insert_glyphID;
@@ -129,6 +132,7 @@
}
GXV_TRACE(( "\n" ));
+#endif
}
@@ -141,12 +145,14 @@
FT_Bytes limit,
GXV_Validator valid )
{
+#ifdef GXV_LOAD_UNUSED_VARS
FT_Bool setMark;
FT_Bool dontAdvance;
FT_Bool currentIsKashidaLike;
FT_Bool markedIsKashidaLike;
FT_Bool currentInsertBefore;
FT_Bool markedInsertBefore;
+#endif
FT_Byte currentInsertCount;
FT_Byte markedInsertCount;
FT_Byte currentInsertList;
@@ -155,12 +161,14 @@
FT_UNUSED( state );
+#ifdef GXV_LOAD_UNUSED_VARS
setMark = FT_BOOL( ( flags >> 15 ) & 1 );
dontAdvance = FT_BOOL( ( flags >> 14 ) & 1 );
currentIsKashidaLike = FT_BOOL( ( flags >> 13 ) & 1 );
markedIsKashidaLike = FT_BOOL( ( flags >> 12 ) & 1 );
currentInsertBefore = FT_BOOL( ( flags >> 11 ) & 1 );
markedInsertBefore = FT_BOOL( ( flags >> 10 ) & 1 );
+#endif
currentInsertCount = (FT_Byte)( ( flags >> 5 ) & 0x1F );
markedInsertCount = (FT_Byte)( flags & 0x001F );
diff --git a/3party/freetype/gxvalid/gxvopbd.c b/3party/freetype/src/gxvalid/gxvopbd.c
index e125060946..e125060946 100644
--- a/3party/freetype/gxvalid/gxvopbd.c
+++ b/3party/freetype/src/gxvalid/gxvopbd.c
diff --git a/3party/freetype/gxvalid/gxvprop.c b/3party/freetype/src/gxvalid/gxvprop.c
index 66c3ab7404..54777271aa 100644
--- a/3party/freetype/gxvalid/gxvprop.c
+++ b/3party/freetype/src/gxvalid/gxvprop.c
@@ -96,7 +96,10 @@
if ( glyph->advance.x != (FT_Pos)0 ||
glyph->advance.y != (FT_Pos)0 )
+ {
+ GXV_TRACE(( " found non-zero advance in zero-advance glyph\n" ));
FT_INVALID_DATA;
+ }
GXV_EXIT;
}
@@ -119,7 +122,10 @@
offset = (FT_UShort)( property & GXV_PROP_COMPLEMENTARY_BRACKET_OFFSET );
if ( offset == 0 )
- FT_INVALID_DATA;
+ {
+ GXV_TRACE(( " found zero offset to property\n" ));
+ FT_INVALID_OFFSET;
+ }
complement = (char)( offset >> 8 );
if ( complement & 0x08 )
@@ -131,7 +137,10 @@
/* The gid for complement must be greater than 0 */
if ( glyph <= complement )
+ {
+ GXV_TRACE(( " found non-positive glyph complement\n" ));
FT_INVALID_DATA;
+ }
}
else
{
@@ -150,18 +159,27 @@
if ( property & GXV_PROP_ATTACHING_TO_RIGHT )
{
if ( GXV_PROP_DATA( version ) == 0x00010000UL )
+ {
+ GXV_TRACE(( " found older version (1.0) in new version table\n" ));
FT_INVALID_DATA;
+ }
}
if ( property & GXV_PROP_RESERVED )
+ {
+ GXV_TRACE(( " found non-zero bits in reserved bits\n" ));
FT_INVALID_DATA;
+ }
if ( ( property & GXV_PROP_DIRECTIONALITY_CLASS ) > 11 )
{
/* TODO: Too restricted. Use the validation level. */
if ( GXV_PROP_DATA( version ) == 0x00010000UL ||
GXV_PROP_DATA( version ) == 0x00020000UL )
+ {
+ GXV_TRACE(( " found too old version in directionality class\n" ));
FT_INVALID_DATA;
+ }
}
}
@@ -264,16 +282,26 @@
format = FT_NEXT_USHORT( p );
defaultProp = FT_NEXT_USHORT( p );
+ GXV_TRACE(( " version 0x%08x\n", version ));
+ GXV_TRACE(( " format 0x%04x\n", format ));
+ GXV_TRACE(( " defaultProp 0x%04x\n", defaultProp ));
+
/* only versions 1.0, 2.0, 3.0 are defined (1996) */
if ( version != 0x00010000UL &&
version != 0x00020000UL &&
version != 0x00030000UL )
+ {
+ GXV_TRACE(( " found unknown version\n" ));
FT_INVALID_FORMAT;
+ }
/* only formats 0x0000, 0x0001 are defined (1996) */
if ( format > 1 )
+ {
+ GXV_TRACE(( " found unknown format\n" ));
FT_INVALID_FORMAT;
+ }
gxv_prop_property_validate( defaultProp, 0, valid );
diff --git a/3party/freetype/gxvalid/gxvtrak.c b/3party/freetype/src/gxvalid/gxvtrak.c
index df3fd15c0b..11fbd7ccfb 100644
--- a/3party/freetype/gxvalid/gxvtrak.c
+++ b/3party/freetype/src/gxvalid/gxvtrak.c
@@ -97,10 +97,10 @@
{
FT_Bytes p = table;
- FT_Fixed track;
+ FT_Fixed track, t;
FT_UShort nameIndex;
FT_UShort offset;
- FT_UShort i;
+ FT_UShort i, j;
GXV_NAME_ENTER( "trackTable" );
@@ -108,9 +108,11 @@
GXV_TRAK_DATA( trackValueOffset_min ) = 0xFFFFU;
GXV_TRAK_DATA( trackValueOffset_max ) = 0x0000;
+ GXV_LIMIT_CHECK( nTracks * ( 4 + 2 + 2 ) );
+
for ( i = 0; i < nTracks; i ++ )
{
- GXV_LIMIT_CHECK( 4 + 2 + 2 );
+ p = table + i * ( 4 + 2 + 2 );
track = FT_NEXT_LONG( p );
nameIndex = FT_NEXT_USHORT( p );
offset = FT_NEXT_USHORT( p );
@@ -121,6 +123,15 @@
GXV_TRAK_DATA( trackValueOffset_max ) = offset;
gxv_sfntName_validate( nameIndex, 256, 32767, valid );
+
+ for ( j = i; j < nTracks; j ++ )
+ {
+ p = table + j * ( 4 + 2 + 2 );
+ t = FT_NEXT_LONG( p );
+ if ( t == track )
+ GXV_TRACE(( "duplicated entries found for track value 0x%x\n",
+ track ));
+ }
}
valid->subtable_length = p - table;
@@ -198,7 +209,6 @@
{
FT_Bytes p = table;
FT_Bytes limit = 0;
- FT_Offset table_size;
GXV_ValidatorRec validrec;
GXV_Validator valid = &validrec;
@@ -220,7 +230,6 @@
valid->face = face;
limit = valid->root->limit;
- table_size = limit - table;
FT_TRACE3(( "validating `trak' table\n" ));
GXV_INIT;
diff --git a/3party/freetype/src/gxvalid/module.mk b/3party/freetype/src/gxvalid/module.mk
new file mode 100644
index 0000000000..9fd098e2c5
--- /dev/null
+++ b/3party/freetype/src/gxvalid/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 gxvalid module definition
+#
+
+# Copyright 2004, 2005, 2006
+# by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
+# 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.
+
+
+FTMODULE_H_COMMANDS += GXVALID_MODULE
+
+define GXVALID_MODULE
+$(OPEN_DRIVER) FT_Module_Class, gxv_module_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)gxvalid $(ECHO_DRIVER_DESC)TrueTypeGX/AAT validation module$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/gxvalid/rules.mk b/3party/freetype/src/gxvalid/rules.mk
new file mode 100644
index 0000000000..57bc0823db
--- /dev/null
+++ b/3party/freetype/src/gxvalid/rules.mk
@@ -0,0 +1,94 @@
+#
+# FreeType 2 TrueTypeGX/AAT validation driver configuration rules
+#
+
+
+# Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,
+# 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.
+
+
+# GXV driver directory
+#
+GXV_DIR := $(SRC_DIR)/gxvalid
+
+
+# compilation flags for the driver
+#
+GXV_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(GXV_DIR))
+
+
+# GXV driver sources (i.e., C files)
+#
+GXV_DRV_SRC := $(GXV_DIR)/gxvcommn.c \
+ $(GXV_DIR)/gxvfeat.c \
+ $(GXV_DIR)/gxvbsln.c \
+ $(GXV_DIR)/gxvtrak.c \
+ $(GXV_DIR)/gxvopbd.c \
+ $(GXV_DIR)/gxvprop.c \
+ $(GXV_DIR)/gxvjust.c \
+ $(GXV_DIR)/gxvmort.c \
+ $(GXV_DIR)/gxvmort0.c \
+ $(GXV_DIR)/gxvmort1.c \
+ $(GXV_DIR)/gxvmort2.c \
+ $(GXV_DIR)/gxvmort4.c \
+ $(GXV_DIR)/gxvmort5.c \
+ $(GXV_DIR)/gxvmorx.c \
+ $(GXV_DIR)/gxvmorx0.c \
+ $(GXV_DIR)/gxvmorx1.c \
+ $(GXV_DIR)/gxvmorx2.c \
+ $(GXV_DIR)/gxvmorx4.c \
+ $(GXV_DIR)/gxvmorx5.c \
+ $(GXV_DIR)/gxvlcar.c \
+ $(GXV_DIR)/gxvkern.c \
+ $(GXV_DIR)/gxvmod.c
+
+# GXV driver headers
+#
+GXV_DRV_H := $(GXV_DIR)/gxvalid.h \
+ $(GXV_DIR)/gxverror.h \
+ $(GXV_DIR)/gxvcommn.h \
+ $(GXV_DIR)/gxvfeat.h \
+ $(GXV_DIR)/gxvmod.h \
+ $(GXV_DIR)/gxvmort.h \
+ $(GXV_DIR)/gxvmorx.h
+
+
+# GXV driver object(s)
+#
+# GXV_DRV_OBJ_M is used during `multi' builds.
+# GXV_DRV_OBJ_S is used during `single' builds.
+#
+GXV_DRV_OBJ_M := $(GXV_DRV_SRC:$(GXV_DIR)/%.c=$(OBJ_DIR)/%.$O)
+GXV_DRV_OBJ_S := $(OBJ_DIR)/gxvalid.$O
+
+# GXV driver source file for single build
+#
+GXV_DRV_SRC_S := $(GXV_DIR)/gxvalid.c
+
+
+# GXV driver - single object
+#
+$(GXV_DRV_OBJ_S): $(GXV_DRV_SRC_S) $(GXV_DRV_SRC) \
+ $(FREETYPE_H) $(GXV_DRV_H)
+ $(GXV_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(GXV_DRV_SRC_S))
+
+
+# GXV driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(GXV_DIR)/%.c $(FREETYPE_H) $(GXV_DRV_H)
+ $(GXV_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(GXV_DRV_OBJ_S)
+DRV_OBJS_M += $(GXV_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/gzip/Jamfile b/3party/freetype/src/gzip/Jamfile
index a7aafa0518..a7aafa0518 100644
--- a/3party/freetype/gzip/Jamfile
+++ b/3party/freetype/src/gzip/Jamfile
diff --git a/3party/freetype/gzip/adler32.c b/3party/freetype/src/gzip/adler32.c
index c53f9dd125..c53f9dd125 100644
--- a/3party/freetype/gzip/adler32.c
+++ b/3party/freetype/src/gzip/adler32.c
diff --git a/3party/freetype/gzip/ftgzip.c b/3party/freetype/src/gzip/ftgzip.c
index 6f0c515723..52966ece71 100644
--- a/3party/freetype/gzip/ftgzip.c
+++ b/3party/freetype/src/gzip/ftgzip.c
@@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2009 by */
+/* Copyright 2002-2006, 2009-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -107,7 +107,7 @@
{
FT_ULong sz = (FT_ULong)size * items;
FT_Error error;
- FT_Pointer p;
+ FT_Pointer p = NULL;
(void)FT_ALLOC( p, sz );
@@ -390,7 +390,7 @@
ft_gzip_file_fill_output( FT_GZipFile zip )
{
z_stream* zstream = &zip->zstream;
- FT_Error error = 0;
+ FT_Error error = Gzip_Err_Ok;
zip->cursor = zip->buffer;
@@ -571,7 +571,7 @@
old_pos = stream->pos;
if ( !FT_Stream_Seek( stream, stream->size - 4 ) )
{
- result = (FT_ULong)FT_Stream_ReadLong( stream, &error );
+ result = FT_Stream_ReadULong( stream, &error );
if ( error )
result = 0;
@@ -588,7 +588,7 @@
{
FT_Error error;
FT_Memory memory = source->memory;
- FT_GZipFile zip;
+ FT_GZipFile zip = NULL;
/*
@@ -628,7 +628,7 @@
if ( zip_size != 0 && zip_size < 40 * 1024 )
{
- FT_Byte* zip_buff;
+ FT_Byte* zip_buff = NULL;
if ( !FT_ALLOC( zip_buff, zip_size ) )
@@ -656,7 +656,7 @@
ft_gzip_file_io( zip, 0, NULL, 0 );
FT_FREE( zip_buff );
}
- error = 0;
+ error = Gzip_Err_Ok;
}
}
diff --git a/3party/freetype/gzip/infblock.c b/3party/freetype/src/gzip/infblock.c
index d6e2dc297d..d6e2dc297d 100644
--- a/3party/freetype/gzip/infblock.c
+++ b/3party/freetype/src/gzip/infblock.c
diff --git a/3party/freetype/gzip/infblock.h b/3party/freetype/src/gzip/infblock.h
index c2535a1e45..c2535a1e45 100644
--- a/3party/freetype/gzip/infblock.h
+++ b/3party/freetype/src/gzip/infblock.h
diff --git a/3party/freetype/gzip/infcodes.c b/3party/freetype/src/gzip/infcodes.c
index f7bfd58c4f..f7bfd58c4f 100644
--- a/3party/freetype/gzip/infcodes.c
+++ b/3party/freetype/src/gzip/infcodes.c
diff --git a/3party/freetype/gzip/infcodes.h b/3party/freetype/src/gzip/infcodes.h
index 154d7f896c..154d7f896c 100644
--- a/3party/freetype/gzip/infcodes.h
+++ b/3party/freetype/src/gzip/infcodes.h
diff --git a/3party/freetype/gzip/inffixed.h b/3party/freetype/src/gzip/inffixed.h
index 4d4760ea00..4d4760ea00 100644
--- a/3party/freetype/gzip/inffixed.h
+++ b/3party/freetype/src/gzip/inffixed.h
diff --git a/3party/freetype/gzip/inflate.c b/3party/freetype/src/gzip/inflate.c
index 8877fa3eb2..8877fa3eb2 100644
--- a/3party/freetype/gzip/inflate.c
+++ b/3party/freetype/src/gzip/inflate.c
diff --git a/3party/freetype/gzip/inftrees.c b/3party/freetype/src/gzip/inftrees.c
index ef53652168..ef53652168 100644
--- a/3party/freetype/gzip/inftrees.c
+++ b/3party/freetype/src/gzip/inftrees.c
diff --git a/3party/freetype/gzip/inftrees.h b/3party/freetype/src/gzip/inftrees.h
index 07bf2aa0bf..07bf2aa0bf 100644
--- a/3party/freetype/gzip/inftrees.h
+++ b/3party/freetype/src/gzip/inftrees.h
diff --git a/3party/freetype/gzip/infutil.c b/3party/freetype/src/gzip/infutil.c
index 6087b40647..6087b40647 100644
--- a/3party/freetype/gzip/infutil.c
+++ b/3party/freetype/src/gzip/infutil.c
diff --git a/3party/freetype/gzip/infutil.h b/3party/freetype/src/gzip/infutil.h
index 7174b6dd0f..7174b6dd0f 100644
--- a/3party/freetype/gzip/infutil.h
+++ b/3party/freetype/src/gzip/infutil.h
diff --git a/3party/freetype/src/gzip/rules.mk b/3party/freetype/src/gzip/rules.mk
new file mode 100644
index 0000000000..d2a43a6a89
--- /dev/null
+++ b/3party/freetype/src/gzip/rules.mk
@@ -0,0 +1,75 @@
+#
+# FreeType 2 GZip support configuration rules
+#
+
+
+# Copyright 2002, 2003 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.
+
+
+# gzip driver directory
+#
+GZIP_DIR := $(SRC_DIR)/gzip
+
+
+# compilation flags for the driver
+#
+ifeq ($(SYSTEM_ZLIB),)
+ GZIP_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(GZIP_DIR))
+else
+ GZIP_COMPILE := $(FT_COMPILE)
+endif
+
+
+# gzip support sources (i.e., C files)
+#
+GZIP_DRV_SRC := $(GZIP_DIR)/ftgzip.c
+
+# gzip support headers
+#
+GZIP_DRV_H :=
+
+
+# gzip driver object(s)
+#
+# GZIP_DRV_OBJ_M is used during `multi' builds
+# GZIP_DRV_OBJ_S is used during `single' builds
+#
+ifeq ($(SYSTEM_ZLIB),)
+ GZIP_DRV_OBJ_M := $(GZIP_DRV_SRC:$(GZIP_DIR)/%.c=$(OBJ_DIR)/%.$O)
+else
+ GZIP_DRV_OBJ_M := $(OBJ_DIR)/ftgzip.$O
+endif
+GZIP_DRV_OBJ_S := $(OBJ_DIR)/ftgzip.$O
+
+# gzip support source file for single build
+#
+GZIP_DRV_SRC_S := $(GZIP_DIR)/ftgzip.c
+
+
+# gzip support - single object
+#
+$(GZIP_DRV_OBJ_S): $(GZIP_DRV_SRC_S) $(GZIP_DRV_SRC) $(FREETYPE_H) \
+ $(GZIP_DRV_H)
+ $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(GZIP_DRV_SRC_S))
+
+
+# gzip support - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(GZIP_DIR)/%.c $(FREETYPE_H) $(GZIP_DRV_H)
+ $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(GZIP_DRV_OBJ_S)
+DRV_OBJS_M += $(GZIP_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/gzip/zconf.h b/3party/freetype/src/gzip/zconf.h
index 3abf0ba03b..3abf0ba03b 100644
--- a/3party/freetype/gzip/zconf.h
+++ b/3party/freetype/src/gzip/zconf.h
diff --git a/3party/freetype/gzip/zlib.h b/3party/freetype/src/gzip/zlib.h
index 50d0d3f146..50d0d3f146 100644
--- a/3party/freetype/gzip/zlib.h
+++ b/3party/freetype/src/gzip/zlib.h
diff --git a/3party/freetype/gzip/zutil.c b/3party/freetype/src/gzip/zutil.c
index 7ad0c1f81b..7ad0c1f81b 100644
--- a/3party/freetype/gzip/zutil.c
+++ b/3party/freetype/src/gzip/zutil.c
diff --git a/3party/freetype/gzip/zutil.h b/3party/freetype/src/gzip/zutil.h
index c9688cd9c0..c9688cd9c0 100644
--- a/3party/freetype/gzip/zutil.h
+++ b/3party/freetype/src/gzip/zutil.h
diff --git a/3party/freetype/lzw/Jamfile b/3party/freetype/src/lzw/Jamfile
index 6f1f516e7c..6f1f516e7c 100644
--- a/3party/freetype/lzw/Jamfile
+++ b/3party/freetype/src/lzw/Jamfile
diff --git a/3party/freetype/lzw/ftlzw.c b/3party/freetype/src/lzw/ftlzw.c
index 4f601a16d2..7f254999ad 100644
--- a/3party/freetype/lzw/ftlzw.c
+++ b/3party/freetype/src/lzw/ftlzw.c
@@ -8,7 +8,7 @@
/* be used to parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2004, 2005, 2006, 2009 by */
+/* Copyright 2004, 2005, 2006, 2009, 2010 by */
/* Albert Chin-A-Young. */
/* */
/* Based on code in src/gzip/ftgzip.c, Copyright 2004 by */
@@ -122,13 +122,9 @@
zip->pos = 0;
/* check and skip .Z header */
- {
- stream = source;
-
- error = ft_lzw_check_header( source );
- if ( error )
- goto Exit;
- }
+ error = ft_lzw_check_header( source );
+ if ( error )
+ goto Exit;
/* initialize internal lzw variable */
ft_lzwstate_init( lzw, source );
@@ -175,7 +171,7 @@
{
FT_LzwState lzw = &zip->lzw;
FT_ULong count;
- FT_Error error = 0;
+ FT_Error error = LZW_Err_Ok;
zip->cursor = zip->buffer;
@@ -353,7 +349,7 @@
{
FT_Error error;
FT_Memory memory = source->memory;
- FT_LZWFile zip;
+ FT_LZWFile zip = NULL;
/*
diff --git a/3party/freetype/lzw/ftzopen.c b/3party/freetype/src/lzw/ftzopen.c
index 8bc65c8f57..8bc65c8f57 100644
--- a/3party/freetype/lzw/ftzopen.c
+++ b/3party/freetype/src/lzw/ftzopen.c
diff --git a/3party/freetype/lzw/ftzopen.h b/3party/freetype/src/lzw/ftzopen.h
index f7d2936be2..f7d2936be2 100644
--- a/3party/freetype/lzw/ftzopen.h
+++ b/3party/freetype/src/lzw/ftzopen.h
diff --git a/3party/freetype/src/lzw/rules.mk b/3party/freetype/src/lzw/rules.mk
new file mode 100644
index 0000000000..5550a48d64
--- /dev/null
+++ b/3party/freetype/src/lzw/rules.mk
@@ -0,0 +1,70 @@
+#
+# FreeType 2 LZW support configuration rules
+#
+
+
+# Copyright 2004, 2005, 2006 by
+# Albert Chin-A-Young.
+#
+# Based on src/lzw/rules.mk, Copyright 2002 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.
+
+
+# LZW driver directory
+#
+LZW_DIR := $(SRC_DIR)/lzw
+
+
+# compilation flags for the driver
+#
+LZW_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(LZW_DIR))
+
+
+# LZW support sources (i.e., C files)
+#
+LZW_DRV_SRC := $(LZW_DIR)/ftlzw.c
+
+# LZW support headers
+#
+LZW_DRV_H := $(LZW_DIR)/ftzopen.h \
+ $(LZW_DIR)/ftzopen.c
+
+
+# LZW driver object(s)
+#
+# LZW_DRV_OBJ_M is used during `multi' builds
+# LZW_DRV_OBJ_S is used during `single' builds
+#
+LZW_DRV_OBJ_M := $(OBJ_DIR)/ftlzw.$O
+LZW_DRV_OBJ_S := $(OBJ_DIR)/ftlzw.$O
+
+# LZW support source file for single build
+#
+LZW_DRV_SRC_S := $(LZW_DIR)/ftlzw.c
+
+
+# LZW support - single object
+#
+$(LZW_DRV_OBJ_S): $(LZW_DRV_SRC_S) $(LZW_DRV_SRC) $(FREETYPE_H) $(LZW_DRV_H)
+ $(LZW_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(LZW_DRV_SRC_S))
+
+
+# LZW support - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(LZW_DIR)/%.c $(FREETYPE_H) $(LZW_DRV_H)
+ $(LZW_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(LZW_DRV_OBJ_S)
+DRV_OBJS_M += $(LZW_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/otvalid/Jamfile b/3party/freetype/src/otvalid/Jamfile
index b457143de4..b457143de4 100644
--- a/3party/freetype/otvalid/Jamfile
+++ b/3party/freetype/src/otvalid/Jamfile
diff --git a/3party/freetype/src/otvalid/module.mk b/3party/freetype/src/otvalid/module.mk
new file mode 100644
index 0000000000..9cadde55e4
--- /dev/null
+++ b/3party/freetype/src/otvalid/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 otvalid module definition
+#
+
+
+# Copyright 2004, 2006 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.
+
+
+FTMODULE_H_COMMANDS += OTVALID_MODULE
+
+define OTVALID_MODULE
+$(OPEN_DRIVER) FT_Module_Class, otv_module_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)otvalid $(ECHO_DRIVER_DESC)OpenType validation module$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/otvalid/otvalid.c b/3party/freetype/src/otvalid/otvalid.c
index d5c2b75abb..d5c2b75abb 100644
--- a/3party/freetype/otvalid/otvalid.c
+++ b/3party/freetype/src/otvalid/otvalid.c
diff --git a/3party/freetype/otvalid/otvalid.h b/3party/freetype/src/otvalid/otvalid.h
index eb99b9cc48..eb99b9cc48 100644
--- a/3party/freetype/otvalid/otvalid.h
+++ b/3party/freetype/src/otvalid/otvalid.h
diff --git a/3party/freetype/otvalid/otvbase.c b/3party/freetype/src/otvalid/otvbase.c
index d742d2dc95..d742d2dc95 100644
--- a/3party/freetype/otvalid/otvbase.c
+++ b/3party/freetype/src/otvalid/otvbase.c
diff --git a/3party/freetype/otvalid/otvcommn.c b/3party/freetype/src/otvalid/otvcommn.c
index a4f885b51f..a4f885b51f 100644
--- a/3party/freetype/otvalid/otvcommn.c
+++ b/3party/freetype/src/otvalid/otvcommn.c
diff --git a/3party/freetype/otvalid/otvcommn.h b/3party/freetype/src/otvalid/otvcommn.h
index 898887fc95..898887fc95 100644
--- a/3party/freetype/otvalid/otvcommn.h
+++ b/3party/freetype/src/otvalid/otvcommn.h
diff --git a/3party/freetype/otvalid/otverror.h b/3party/freetype/src/otvalid/otverror.h
index 041b538368..041b538368 100644
--- a/3party/freetype/otvalid/otverror.h
+++ b/3party/freetype/src/otvalid/otverror.h
diff --git a/3party/freetype/otvalid/otvgdef.c b/3party/freetype/src/otvalid/otvgdef.c
index 3633ad0de1..3633ad0de1 100644
--- a/3party/freetype/otvalid/otvgdef.c
+++ b/3party/freetype/src/otvalid/otvgdef.c
diff --git a/3party/freetype/otvalid/otvgpos.c b/3party/freetype/src/otvalid/otvgpos.c
index 49b46183a3..49b46183a3 100644
--- a/3party/freetype/otvalid/otvgpos.c
+++ b/3party/freetype/src/otvalid/otvgpos.c
diff --git a/3party/freetype/otvalid/otvgpos.h b/3party/freetype/src/otvalid/otvgpos.h
index 14ca408261..14ca408261 100644
--- a/3party/freetype/otvalid/otvgpos.h
+++ b/3party/freetype/src/otvalid/otvgpos.h
diff --git a/3party/freetype/otvalid/otvgsub.c b/3party/freetype/src/otvalid/otvgsub.c
index ed499d1e92..ed499d1e92 100644
--- a/3party/freetype/otvalid/otvgsub.c
+++ b/3party/freetype/src/otvalid/otvgsub.c
diff --git a/3party/freetype/otvalid/otvjstf.c b/3party/freetype/src/otvalid/otvjstf.c
index a616a23432..a616a23432 100644
--- a/3party/freetype/otvalid/otvjstf.c
+++ b/3party/freetype/src/otvalid/otvjstf.c
diff --git a/3party/freetype/otvalid/otvmath.c b/3party/freetype/src/otvalid/otvmath.c
index 50ed10cf28..96f841f2a9 100644
--- a/3party/freetype/otvalid/otvmath.c
+++ b/3party/freetype/src/otvalid/otvmath.c
@@ -248,7 +248,8 @@
otv_MathItalicsCorrectionInfo_validate(
table + MathTopAccentAttachment, valid, FALSE );
- if ( ExtendedShapeCoverage ) {
+ if ( ExtendedShapeCoverage )
+ {
OTV_NAME_ENTER( "ExtendedShapeCoverage" );
otv_Coverage_validate( table + ExtendedShapeCoverage, valid, -1 );
OTV_EXIT;
diff --git a/3party/freetype/otvalid/otvmod.c b/3party/freetype/src/otvalid/otvmod.c
index 3248564560..620e45233d 100644
--- a/3party/freetype/otvalid/otvmod.c
+++ b/3party/freetype/src/otvalid/otvmod.c
@@ -214,7 +214,8 @@
*ot_jstf = (FT_Bytes)jstf;
Exit:
- if ( error ) {
+ if ( error )
+ {
FT_Memory memory = FT_FACE_MEMORY( face );
@@ -224,6 +225,7 @@
FT_FREE( gsub );
FT_FREE( jstf );
}
+
{
FT_Memory memory = FT_FACE_MEMORY( face );
diff --git a/3party/freetype/otvalid/otvmod.h b/3party/freetype/src/otvalid/otvmod.h
index 573b2a0c4b..573b2a0c4b 100644
--- a/3party/freetype/otvalid/otvmod.h
+++ b/3party/freetype/src/otvalid/otvmod.h
diff --git a/3party/freetype/src/otvalid/rules.mk b/3party/freetype/src/otvalid/rules.mk
new file mode 100644
index 0000000000..53bd41e5e7
--- /dev/null
+++ b/3party/freetype/src/otvalid/rules.mk
@@ -0,0 +1,78 @@
+#
+# FreeType 2 OpenType validation driver configuration rules
+#
+
+
+# Copyright 2004, 2007 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.
+
+
+# OTV driver directory
+#
+OTV_DIR := $(SRC_DIR)/otvalid
+
+
+# compilation flags for the driver
+#
+OTV_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(OTV_DIR))
+
+
+# OTV driver sources (i.e., C files)
+#
+OTV_DRV_SRC := $(OTV_DIR)/otvbase.c \
+ $(OTV_DIR)/otvcommn.c \
+ $(OTV_DIR)/otvgdef.c \
+ $(OTV_DIR)/otvgpos.c \
+ $(OTV_DIR)/otvgsub.c \
+ $(OTV_DIR)/otvjstf.c \
+ $(OTV_DIR)/otvmath.c \
+ $(OTV_DIR)/otvmod.c
+
+# OTV driver headers
+#
+OTV_DRV_H := $(OTV_DIR)/otvalid.h \
+ $(OTV_DIR)/otvcommn.h \
+ $(OTV_DIR)/otverror.h \
+ $(OTV_DIR)/otvgpos.h \
+ $(OTV_DIR)/otvmod.h
+
+
+# OTV driver object(s)
+#
+# OTV_DRV_OBJ_M is used during `multi' builds.
+# OTV_DRV_OBJ_S is used during `single' builds.
+#
+OTV_DRV_OBJ_M := $(OTV_DRV_SRC:$(OTV_DIR)/%.c=$(OBJ_DIR)/%.$O)
+OTV_DRV_OBJ_S := $(OBJ_DIR)/otvalid.$O
+
+# OTV driver source file for single build
+#
+OTV_DRV_SRC_S := $(OTV_DIR)/otvalid.c
+
+
+# OTV driver - single object
+#
+$(OTV_DRV_OBJ_S): $(OTV_DRV_SRC_S) $(OTV_DRV_SRC) \
+ $(FREETYPE_H) $(OTV_DRV_H)
+ $(OTV_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(OTV_DRV_SRC_S))
+
+
+# OTV driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(OTV_DIR)/%.c $(FREETYPE_H) $(OTV_DRV_H)
+ $(OTV_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(OTV_DRV_OBJ_S)
+DRV_OBJS_M += $(OTV_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/pcf/Jamfile b/3party/freetype/src/pcf/Jamfile
index 752fcac2a1..752fcac2a1 100644
--- a/3party/freetype/pcf/Jamfile
+++ b/3party/freetype/src/pcf/Jamfile
diff --git a/3party/freetype/pcf/README b/3party/freetype/src/pcf/README
index cc1480b2d2..8858d68ca9 100644
--- a/3party/freetype/pcf/README
+++ b/3party/freetype/src/pcf/README
@@ -31,29 +31,11 @@ on linux/alpha.
Encodings
*********
-The variety of encodings that accompanies pcf fonts appears to encompass the
-small set defined in freetype.h. On the other hand, each pcf font defines
-two properties that specify encoding and registry.
+Use `FT_Get_BDF_Charset_ID' to access the encoding and registry.
-I decided to make these two properties directly accessible, leaving to the
-client application the work of interpreting them. For instance:
-
- #include "pcftypes.h" /* include/freetype/internal/pcftypes.h */
-
- FT_Face face;
- PCF_Public_Face pcfface;
-
- FT_New_Face( library,..., &face );
-
- pcfface = (PCF_Public_Face)face;
-
- if ((pcfface->charset_registry == "ISO10646") &&
- (pcfface->charset_encoding) == "1")) [..]
-
-Thus the driver always export `ft_encoding_none' as
-face->charmap.encoding. FT_Get_Char_Index() behavior is unmodified, that
-is, it converts the ULong value given as argument into the corresponding
-glyph number.
+The driver always exports `ft_encoding_none' as face->charmap.encoding.
+FT_Get_Char_Index() behavior is unmodified, that is, it converts the ULong
+value given as argument into the corresponding glyph number.
Known problems
diff --git a/3party/freetype/src/pcf/module.mk b/3party/freetype/src/pcf/module.mk
new file mode 100644
index 0000000000..df383ff0fb
--- /dev/null
+++ b/3party/freetype/src/pcf/module.mk
@@ -0,0 +1,34 @@
+#
+# FreeType 2 PCF module definition
+#
+
+# Copyright 2000, 2006 by
+# Francesco Zappa Nardelli
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+
+FTMODULE_H_COMMANDS += PCF_DRIVER
+
+define PCF_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, pcf_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)pcf $(ECHO_DRIVER_DESC)pcf bitmap fonts$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/pcf/pcf.c b/3party/freetype/src/pcf/pcf.c
index 11d5b7b2a0..11d5b7b2a0 100644
--- a/3party/freetype/pcf/pcf.c
+++ b/3party/freetype/src/pcf/pcf.c
diff --git a/3party/freetype/pcf/pcf.h b/3party/freetype/src/pcf/pcf.h
index 1cd56c13a4..af0ffc3378 100644
--- a/3party/freetype/pcf/pcf.h
+++ b/3party/freetype/src/pcf/pcf.h
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright (C) 2000, 2001, 2002, 2003, 2006 by
+ Copyright (C) 2000, 2001, 2002, 2003, 2006, 2010 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -136,8 +136,8 @@ FT_BEGIN_HEADER
{
FT_FaceRec root;
- FT_StreamRec gzip_stream;
- FT_Stream gzip_source;
+ FT_StreamRec comp_stream;
+ FT_Stream comp_source;
char* charset_encoding;
char* charset_registry;
diff --git a/3party/freetype/pcf/pcfdrivr.c b/3party/freetype/src/pcf/pcfdrivr.c
index b34e542aeb..af2a2d986f 100644
--- a/3party/freetype/pcf/pcfdrivr.c
+++ b/3party/freetype/src/pcf/pcfdrivr.c
@@ -2,7 +2,8 @@
FreeType font driver for pcf files
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009,
+ 2010 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -32,8 +33,10 @@ THE SOFTWARE.
#include FT_INTERNAL_OBJECTS_H
#include FT_GZIP_H
#include FT_LZW_H
+#include FT_BZIP2_H
#include FT_ERRORS_H
#include FT_BDF_H
+#include FT_TRUETYPE_IDS_H
#include "pcf.h"
#include "pcfdrivr.h"
@@ -227,7 +230,8 @@ THE SOFTWARE.
{
prop = &face->properties[i];
- if ( prop ) {
+ if ( prop )
+ {
FT_FREE( prop->name );
if ( prop->isString )
FT_FREE( prop->value.atom );
@@ -246,11 +250,11 @@ THE SOFTWARE.
FT_TRACE4(( "PCF_Face_Done: done face\n" ));
- /* close gzip/LZW stream if any */
- if ( pcfface->stream == &face->gzip_stream )
+ /* close compressed stream if any */
+ if ( pcfface->stream == &face->comp_stream )
{
- FT_Stream_Close( &face->gzip_stream );
- pcfface->stream = face->gzip_source;
+ FT_Stream_Close( &face->comp_stream );
+ pcfface->stream = face->comp_source;
}
}
@@ -275,8 +279,9 @@ THE SOFTWARE.
{
PCF_Face_Done( pcfface );
-#if defined( FT_CONFIG_OPTION_USE_ZLIB ) || \
- defined( FT_CONFIG_OPTION_USE_LZW )
+#if defined( FT_CONFIG_OPTION_USE_ZLIB ) || \
+ defined( FT_CONFIG_OPTION_USE_LZW ) || \
+ defined( FT_CONFIG_OPTION_USE_BZIP2 )
#ifdef FT_CONFIG_OPTION_USE_ZLIB
{
@@ -284,7 +289,7 @@ THE SOFTWARE.
/* this didn't work, try gzip support! */
- error2 = FT_Stream_OpenGzip( &face->gzip_stream, stream );
+ error2 = FT_Stream_OpenGzip( &face->comp_stream, stream );
if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature )
goto Fail;
@@ -299,7 +304,7 @@ THE SOFTWARE.
/* this didn't work, try LZW support! */
- error3 = FT_Stream_OpenLZW( &face->gzip_stream, stream );
+ error3 = FT_Stream_OpenLZW( &face->comp_stream, stream );
if ( FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature )
goto Fail;
@@ -307,11 +312,26 @@ THE SOFTWARE.
}
#endif /* FT_CONFIG_OPTION_USE_LZW */
+#ifdef FT_CONFIG_OPTION_USE_BZIP2
+ if ( error )
+ {
+ FT_Error error4;
+
+
+ /* this didn't work, try Bzip2 support! */
+ error4 = FT_Stream_OpenBzip2( &face->comp_stream, stream );
+ if ( FT_ERROR_BASE( error4 ) == FT_Err_Unimplemented_Feature )
+ goto Fail;
+
+ error = error4;
+ }
+#endif /* FT_CONFIG_OPTION_USE_BZIP2 */
+
if ( error )
goto Fail;
- face->gzip_source = stream;
- pcfface->stream = &face->gzip_stream;
+ face->comp_source = stream;
+ pcfface->stream = &face->comp_stream;
stream = pcfface->stream;
@@ -319,7 +339,9 @@ THE SOFTWARE.
if ( error )
goto Fail;
-#else /* !(FT_CONFIG_OPTION_USE_ZLIB || FT_CONFIG_OPTION_USE_LZW) */
+#else /* !(FT_CONFIG_OPTION_USE_ZLIB ||
+ FT_CONFIG_OPTION_USE_LZW ||
+ FT_CONFIG_OPTION_USE_BZIP2) */
goto Fail;
@@ -358,14 +380,15 @@ THE SOFTWARE.
charmap.face = FT_FACE( face );
charmap.encoding = FT_ENCODING_NONE;
- charmap.platform_id = 0;
- charmap.encoding_id = 0;
+ /* initial platform/encoding should indicate unset status? */
+ charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
+ charmap.encoding_id = TT_APPLE_ID_DEFAULT;
if ( unicode_charmap )
{
charmap.encoding = FT_ENCODING_UNICODE;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
}
error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
diff --git a/3party/freetype/pcf/pcfdrivr.h b/3party/freetype/src/pcf/pcfdrivr.h
index a81d7309e5..a81d7309e5 100644
--- a/3party/freetype/pcf/pcfdrivr.h
+++ b/3party/freetype/src/pcf/pcfdrivr.h
diff --git a/3party/freetype/pcf/pcferror.h b/3party/freetype/src/pcf/pcferror.h
index d75c067aa6..d75c067aa6 100644
--- a/3party/freetype/pcf/pcferror.h
+++ b/3party/freetype/src/pcf/pcferror.h
diff --git a/3party/freetype/pcf/pcfread.c b/3party/freetype/src/pcf/pcfread.c
index a60505bf29..f8c2a239b9 100644
--- a/3party/freetype/pcf/pcfread.c
+++ b/3party/freetype/src/pcf/pcfread.c
@@ -2,7 +2,8 @@
FreeType font driver for pcf fonts
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2010 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -398,7 +399,7 @@ THE SOFTWARE.
PCF_Face face )
{
PCF_ParseProperty props = 0;
- PCF_Property properties;
+ PCF_Property properties = NULL;
FT_ULong nprops, i;
FT_ULong format, size;
FT_Error error;
@@ -436,7 +437,7 @@ THE SOFTWARE.
FT_TRACE4(( " nprop = %d (truncate %d props)\n",
(int)nprops, nprops - (int)nprops ));
- nprops = nprops - (int)nprops;
+ nprops = (int)nprops;
/* rough estimate */
if ( nprops > size / PCF_PROPERTY_SIZE )
@@ -607,6 +608,9 @@ THE SOFTWARE.
face->nmetrics = nmetrics;
+ if ( !nmetrics )
+ return PCF_Err_Invalid_Table;
+
FT_TRACE4(( "pcf_get_metrics:\n" ));
FT_TRACE4(( " number of metrics: %d\n", nmetrics ));
@@ -659,9 +663,9 @@ THE SOFTWARE.
pcf_get_bitmaps( FT_Stream stream,
PCF_Face face )
{
- FT_Error error = PCF_Err_Ok;
- FT_Memory memory = FT_FACE(face)->memory;
- FT_Long* offsets;
+ FT_Error error = PCF_Err_Ok;
+ FT_Memory memory = FT_FACE(face)->memory;
+ FT_Long* offsets = NULL;
FT_Long bitmapSizes[GLYPHPADOPTIONS];
FT_ULong format, size;
FT_ULong nbitmaps, i, sizebitmaps = 0;
@@ -768,7 +772,7 @@ THE SOFTWARE.
int firstRow, lastRow;
int nencoding, encodingOffset;
int i, j;
- PCF_Encoding tmpEncoding, encoding = 0;
+ PCF_Encoding tmpEncoding = NULL, encoding = 0;
error = pcf_seek_to_table_type( stream,
diff --git a/3party/freetype/pcf/pcfread.h b/3party/freetype/src/pcf/pcfread.h
index c9524f1346..c9524f1346 100644
--- a/3party/freetype/pcf/pcfread.h
+++ b/3party/freetype/src/pcf/pcfread.h
diff --git a/3party/freetype/pcf/pcfutil.c b/3party/freetype/src/pcf/pcfutil.c
index b91274f935..b91274f935 100644
--- a/3party/freetype/pcf/pcfutil.c
+++ b/3party/freetype/src/pcf/pcfutil.c
diff --git a/3party/freetype/pcf/pcfutil.h b/3party/freetype/src/pcf/pcfutil.h
index ce10fb541d..ce10fb541d 100644
--- a/3party/freetype/pcf/pcfutil.h
+++ b/3party/freetype/src/pcf/pcfutil.h
diff --git a/3party/freetype/src/pcf/rules.mk b/3party/freetype/src/pcf/rules.mk
new file mode 100644
index 0000000000..78641528fa
--- /dev/null
+++ b/3party/freetype/src/pcf/rules.mk
@@ -0,0 +1,79 @@
+#
+# FreeType 2 pcf driver configuration rules
+#
+
+
+# Copyright (C) 2000, 2001, 2003, 2008 by
+# Francesco Zappa Nardelli
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+
+# pcf driver directory
+#
+PCF_DIR := $(SRC_DIR)/pcf
+
+
+PCF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PCF_DIR))
+
+
+# pcf driver sources (i.e., C files)
+#
+PCF_DRV_SRC := $(PCF_DIR)/pcfdrivr.c \
+ $(PCF_DIR)/pcfread.c \
+ $(PCF_DIR)/pcfutil.c
+
+# pcf driver headers
+#
+PCF_DRV_H := $(PCF_DRV_SRC:%.c=%.h) \
+ $(PCF_DIR)/pcf.h \
+ $(PCF_DIR)/pcferror.h
+
+# pcf driver object(s)
+#
+# PCF_DRV_OBJ_M is used during `multi' builds
+# PCF_DRV_OBJ_S is used during `single' builds
+#
+PCF_DRV_OBJ_M := $(PCF_DRV_SRC:$(PCF_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PCF_DRV_OBJ_S := $(OBJ_DIR)/pcf.$O
+
+# pcf driver source file for single build
+#
+PCF_DRV_SRC_S := $(PCF_DIR)/pcf.c
+
+
+# pcf driver - single object
+#
+$(PCF_DRV_OBJ_S): $(PCF_DRV_SRC_S) $(PCF_DRV_SRC) $(FREETYPE_H) $(PCF_DRV_H)
+ $(PCF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PCF_DRV_SRC_S))
+
+
+# pcf driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(PCF_DIR)/%.c $(FREETYPE_H) $(PCF_DRV_H)
+ $(PCF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(PCF_DRV_OBJ_S)
+DRV_OBJS_M += $(PCF_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/pfr/Jamfile b/3party/freetype/src/pfr/Jamfile
index 9e2f2b8d05..9e2f2b8d05 100644
--- a/3party/freetype/pfr/Jamfile
+++ b/3party/freetype/src/pfr/Jamfile
diff --git a/3party/freetype/src/pfr/module.mk b/3party/freetype/src/pfr/module.mk
new file mode 100644
index 0000000000..8d1d28a9d2
--- /dev/null
+++ b/3party/freetype/src/pfr/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 PFR module definition
+#
+
+
+# Copyright 2002, 2006 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.
+
+
+FTMODULE_H_COMMANDS += PFR_DRIVER
+
+define PFR_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, pfr_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)pfr $(ECHO_DRIVER_DESC)PFR/TrueDoc font files with extension *.pfr$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/pfr/pfr.c b/3party/freetype/src/pfr/pfr.c
index eb2c4edb7e..eb2c4edb7e 100644
--- a/3party/freetype/pfr/pfr.c
+++ b/3party/freetype/src/pfr/pfr.c
diff --git a/3party/freetype/pfr/pfrcmap.c b/3party/freetype/src/pfr/pfrcmap.c
index 9c8f9ed8eb..9c8f9ed8eb 100644
--- a/3party/freetype/pfr/pfrcmap.c
+++ b/3party/freetype/src/pfr/pfrcmap.c
diff --git a/3party/freetype/pfr/pfrcmap.h b/3party/freetype/src/pfr/pfrcmap.h
index a626953054..a626953054 100644
--- a/3party/freetype/pfr/pfrcmap.h
+++ b/3party/freetype/src/pfr/pfrcmap.h
diff --git a/3party/freetype/pfr/pfrdrivr.c b/3party/freetype/src/pfr/pfrdrivr.c
index 15cca9854e..0053050a2a 100644
--- a/3party/freetype/pfr/pfrdrivr.c
+++ b/3party/freetype/src/pfr/pfrdrivr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR driver interface (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2006, 2008 by */
+/* Copyright 2002, 2003, 2004, 2006, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -84,7 +84,7 @@
if ( gindex < phys->num_chars )
{
*anadvance = phys->chars[gindex].advance;
- error = 0;
+ error = PFR_Err_Ok;
}
}
diff --git a/3party/freetype/pfr/pfrdrivr.h b/3party/freetype/src/pfr/pfrdrivr.h
index da0a1aa634..da0a1aa634 100644
--- a/3party/freetype/pfr/pfrdrivr.h
+++ b/3party/freetype/src/pfr/pfrdrivr.h
diff --git a/3party/freetype/pfr/pfrerror.h b/3party/freetype/src/pfr/pfrerror.h
index 2e1c401dd2..2e1c401dd2 100644
--- a/3party/freetype/pfr/pfrerror.h
+++ b/3party/freetype/src/pfr/pfrerror.h
diff --git a/3party/freetype/pfr/pfrgload.c b/3party/freetype/src/pfr/pfrgload.c
index 6fe6e4225a..6f65b01f5e 100644
--- a/3party/freetype/pfr/pfrgload.c
+++ b/3party/freetype/src/pfr/pfrgload.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR glyph loader (body). */
/* */
-/* Copyright 2002, 2003, 2005, 2007 by */
+/* Copyright 2002, 2003, 2005, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -248,7 +248,7 @@
FT_Byte* p,
FT_Byte* limit )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Memory memory = glyph->loader->memory;
FT_UInt flags, x_count, y_count, i, count, mask;
FT_Int x;
@@ -268,8 +268,8 @@
{
PFR_CHECK( 1 );
count = PFR_NEXT_BYTE( p );
- x_count = ( count & 15 );
- y_count = ( count >> 4 );
+ x_count = count & 15;
+ y_count = count >> 4;
}
else
{
@@ -388,7 +388,7 @@
case 2: /* horizontal line to */
FT_TRACE6(( "- horizontal line to cx.%d", format_low ));
- if ( format_low > x_count )
+ if ( format_low >= x_count )
goto Failure;
pos[0].x = glyph->x_control[format_low];
pos[0].y = pos[3].y;
@@ -398,7 +398,7 @@
case 3: /* vertical line to */
FT_TRACE6(( "- vertical line to cy.%d", format_low ));
- if ( format_low > y_count )
+ if ( format_low >= y_count )
goto Failure;
pos[0].x = pos[3].x;
pos[0].y = glyph->y_control[format_low];
@@ -440,7 +440,7 @@
case 0: /* 8-bit index */
PFR_CHECK( 1 );
idx = PFR_NEXT_BYTE( p );
- if ( idx > x_count )
+ if ( idx >= x_count )
goto Failure;
cur->x = glyph->x_control[idx];
FT_TRACE7(( " cx#%d", idx ));
@@ -470,7 +470,7 @@
case 0: /* 8-bit index */
PFR_CHECK( 1 );
idx = PFR_NEXT_BYTE( p );
- if ( idx > y_count )
+ if ( idx >= y_count )
goto Failure;
cur->y = glyph->y_control[idx];
FT_TRACE7(( " cy#%d", idx ));
@@ -558,7 +558,7 @@
FT_Byte* p,
FT_Byte* limit )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_GlyphLoader loader = glyph->loader;
FT_Memory memory = loader->memory;
PFR_SubGlyph subglyph;
@@ -598,6 +598,16 @@
FT_UInt new_max = ( org_count + count + 3 ) & (FT_UInt)-4;
+ /* we arbitrarily limit the number of subglyphs */
+ /* to avoid endless recursion */
+ if ( new_max > 64 )
+ {
+ error = PFR_Err_Invalid_Table;
+ FT_ERROR(( "pfr_glyph_load_compound:"
+ " too many compound glyphs components\n" ));
+ goto Exit;
+ }
+
if ( FT_RENEW_ARRAY( glyph->subs, glyph->max_subs, new_max ) )
goto Exit;
@@ -743,6 +753,9 @@
count = glyph->num_subs - old_count;
+ FT_TRACE4(( "compound glyph with %d elements (offset %lu):\n",
+ count, offset ));
+
/* now, load each individual glyph */
for ( n = 0; n < count; n++ )
{
@@ -750,6 +763,8 @@
PFR_SubGlyph subglyph;
+ FT_TRACE4(( "subglyph %d:\n", n ));
+
subglyph = glyph->subs + old_count + n;
old_points = base->n_points;
@@ -757,7 +772,7 @@
subglyph->gps_offset,
subglyph->gps_size );
if ( error )
- goto Exit;
+ break;
/* note that `glyph->subs' might have been re-allocated */
subglyph = glyph->subs + old_count + n;
@@ -791,9 +806,13 @@
/* proceed to next sub-glyph */
}
+
+ FT_TRACE4(( "end compound glyph with %d elements\n", count ));
}
else
{
+ FT_TRACE4(( "simple glyph (offset %lu)\n", offset ));
+
/* load a simple glyph */
error = pfr_glyph_load_simple( glyph, p, limit );
@@ -805,9 +824,6 @@
}
-
-
-
FT_LOCAL_DEF( FT_Error )
pfr_glyph_load( PFR_Glyph glyph,
FT_Stream stream,
diff --git a/3party/freetype/pfr/pfrgload.h b/3party/freetype/src/pfr/pfrgload.h
index 7cc7a8702a..7cc7a8702a 100644
--- a/3party/freetype/pfr/pfrgload.h
+++ b/3party/freetype/src/pfr/pfrgload.h
diff --git a/3party/freetype/pfr/pfrload.c b/3party/freetype/src/pfr/pfrload.c
index bc5c035f3d..325322e986 100644
--- a/3party/freetype/pfr/pfrload.c
+++ b/3party/freetype/src/pfr/pfrload.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR loader (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2007, 2009 by */
+/* Copyright 2002, 2003, 2004, 2005, 2007, 2009, 2010 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 @@
PFR_ExtraItem item_list,
FT_Pointer item_data )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Byte* p = *pp;
FT_UInt num_items, item_type, item_size;
@@ -353,7 +353,7 @@
PFR_Strike strike;
FT_UInt flags0;
FT_UInt n, count, size1;
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
PFR_CHECK( 5 );
@@ -449,7 +449,7 @@
FT_Byte* limit,
PFR_PhyFont phy_font )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Memory memory = phy_font->memory;
FT_PtrDist len = limit - p;
@@ -476,8 +476,8 @@
PFR_PhyFont phy_font )
{
FT_UInt count, num_vert, num_horz;
- FT_Int* snaps;
- FT_Error error = 0;
+ FT_Int* snaps = NULL;
+ FT_Error error = PFR_Err_Ok;
FT_Memory memory = phy_font->memory;
@@ -520,8 +520,8 @@
FT_Byte* limit,
PFR_PhyFont phy_font )
{
- PFR_KernItem item;
- FT_Error error = 0;
+ PFR_KernItem item = NULL;
+ FT_Error error = PFR_Err_Ok;
FT_Memory memory = phy_font->memory;
@@ -631,7 +631,7 @@
FT_Memory memory,
FT_String* *astring )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_String* result = NULL;
FT_UInt n, ok;
diff --git a/3party/freetype/pfr/pfrload.h b/3party/freetype/src/pfr/pfrload.h
index ed010715d1..ed010715d1 100644
--- a/3party/freetype/pfr/pfrload.h
+++ b/3party/freetype/src/pfr/pfrload.h
diff --git a/3party/freetype/pfr/pfrobjs.c b/3party/freetype/src/pfr/pfrobjs.c
index 56d617d880..3e5e86e210 100644
--- a/3party/freetype/pfr/pfrobjs.c
+++ b/3party/freetype/src/pfr/pfrobjs.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,6 +23,7 @@
#include "pfrsbit.h"
#include FT_OUTLINE_H
#include FT_INTERNAL_DEBUG_H
+#include FT_TRUETYPE_IDS_H
#include "pfrerror.h"
@@ -147,7 +148,16 @@
break;
if ( nn == phy_font->num_chars )
- pfrface->face_flags = 0; /* not scalable */
+ {
+ if ( phy_font->num_strikes > 0 )
+ pfrface->face_flags = 0; /* not scalable */
+ else
+ {
+ FT_ERROR(( "pfr_face_init: font doesn't contain glyphs\n" ));
+ error = PFR_Err_Invalid_File_Format;
+ goto Exit;
+ }
+ }
}
if ( (phy_font->flags & PFR_PHY_PROPORTIONAL) == 0 )
@@ -243,11 +253,11 @@
charmap.face = pfrface;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
+ error = FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
#if 0
/* Select default charmap */
diff --git a/3party/freetype/pfr/pfrobjs.h b/3party/freetype/src/pfr/pfrobjs.h
index f6aa8b44cc..f6aa8b44cc 100644
--- a/3party/freetype/pfr/pfrobjs.h
+++ b/3party/freetype/src/pfr/pfrobjs.h
diff --git a/3party/freetype/pfr/pfrsbit.c b/3party/freetype/src/pfr/pfrsbit.c
index 8a38bec1d3..52bc2c8c39 100644
--- a/3party/freetype/pfr/pfrsbit.c
+++ b/3party/freetype/src/pfr/pfrsbit.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR bitmap loader (body). */
/* */
-/* Copyright 2002, 2003, 2006 by */
+/* Copyright 2002, 2003, 2006, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -353,7 +353,7 @@
FT_Long *aadvance,
FT_UInt *aformat )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
FT_Byte flags;
FT_Char b;
FT_Byte* p = *pdata;
@@ -484,7 +484,7 @@
FT_Bool decreasing,
FT_Bitmap* target )
{
- FT_Error error = 0;
+ FT_Error error = PFR_Err_Ok;
PFR_BitWriterRec writer;
@@ -600,8 +600,8 @@
/* get the bitmap metrics */
{
- FT_Long xpos, ypos, advance;
- FT_UInt xsize, ysize, format;
+ FT_Long xpos = 0, ypos = 0, advance = 0;
+ FT_UInt xsize = 0, ysize = 0, format = 0;
FT_Byte* p;
diff --git a/3party/freetype/pfr/pfrsbit.h b/3party/freetype/src/pfr/pfrsbit.h
index 015e9e6dad..015e9e6dad 100644
--- a/3party/freetype/pfr/pfrsbit.h
+++ b/3party/freetype/src/pfr/pfrsbit.h
diff --git a/3party/freetype/pfr/pfrtypes.h b/3party/freetype/src/pfr/pfrtypes.h
index 918310814c..918310814c 100644
--- a/3party/freetype/pfr/pfrtypes.h
+++ b/3party/freetype/src/pfr/pfrtypes.h
diff --git a/3party/freetype/src/pfr/rules.mk b/3party/freetype/src/pfr/rules.mk
new file mode 100644
index 0000000000..60b96c7415
--- /dev/null
+++ b/3party/freetype/src/pfr/rules.mk
@@ -0,0 +1,73 @@
+#
+# FreeType 2 PFR driver configuration rules
+#
+
+
+# Copyright 2002, 2003 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.
+
+
+# pfr driver directory
+#
+PFR_DIR := $(SRC_DIR)/pfr
+
+
+# compilation flags for the driver
+#
+PFR_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PFR_DIR))
+
+
+# pfr driver sources (i.e., C files)
+#
+PFR_DRV_SRC := $(PFR_DIR)/pfrload.c \
+ $(PFR_DIR)/pfrgload.c \
+ $(PFR_DIR)/pfrcmap.c \
+ $(PFR_DIR)/pfrdrivr.c \
+ $(PFR_DIR)/pfrsbit.c \
+ $(PFR_DIR)/pfrobjs.c
+
+# pfr driver headers
+#
+PFR_DRV_H := $(PFR_DRV_SRC:%.c=%.h) \
+ $(PFR_DIR)/pfrerror.h \
+ $(PFR_DIR)/pfrtypes.h
+
+
+# Pfr driver object(s)
+#
+# PFR_DRV_OBJ_M is used during `multi' builds
+# PFR_DRV_OBJ_S is used during `single' builds
+#
+PFR_DRV_OBJ_M := $(PFR_DRV_SRC:$(PFR_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PFR_DRV_OBJ_S := $(OBJ_DIR)/pfr.$O
+
+# pfr driver source file for single build
+#
+PFR_DRV_SRC_S := $(PFR_DIR)/pfr.c
+
+
+# pfr driver - single object
+#
+$(PFR_DRV_OBJ_S): $(PFR_DRV_SRC_S) $(PFR_DRV_SRC) $(FREETYPE_H) $(PFR_DRV_H)
+ $(PFR_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PFR_DRV_SRC_S))
+
+
+# pfr driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(PFR_DIR)/%.c $(FREETYPE_H) $(PFR_DRV_H)
+ $(PFR_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(PFR_DRV_OBJ_S)
+DRV_OBJS_M += $(PFR_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/psaux/Jamfile b/3party/freetype/src/psaux/Jamfile
index faeded9044..faeded9044 100644
--- a/3party/freetype/psaux/Jamfile
+++ b/3party/freetype/src/psaux/Jamfile
diff --git a/3party/freetype/psaux/afmparse.c b/3party/freetype/src/psaux/afmparse.c
index 91a17e2362..d7de3736f7 100644
--- a/3party/freetype/psaux/afmparse.c
+++ b/3party/freetype/src/psaux/afmparse.c
@@ -4,7 +4,7 @@
/* */
/* AFM parser (body). */
/* */
-/* Copyright 2006, 2007, 2008, 2009 by */
+/* Copyright 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -527,7 +527,7 @@
FT_Byte* base,
FT_Byte* limit )
{
- AFM_Stream stream;
+ AFM_Stream stream = NULL;
FT_Error error;
diff --git a/3party/freetype/psaux/afmparse.h b/3party/freetype/src/psaux/afmparse.h
index de2a530b2f..35d96046c5 100644
--- a/3party/freetype/psaux/afmparse.h
+++ b/3party/freetype/src/psaux/afmparse.h
@@ -56,7 +56,8 @@ FT_BEGIN_HEADER
typedef struct AFM_ValueRec_
{
enum AFM_ValueType_ type;
- union {
+ union
+ {
char* s;
FT_Fixed f;
FT_Int i;
diff --git a/3party/freetype/src/psaux/module.mk b/3party/freetype/src/psaux/module.mk
new file mode 100644
index 0000000000..42bf6f5199
--- /dev/null
+++ b/3party/freetype/src/psaux/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 PSaux module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += PSAUX_MODULE
+
+define PSAUX_MODULE
+$(OPEN_DRIVER) FT_Module_Class, psaux_module_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)psaux $(ECHO_DRIVER_DESC)Postscript Type 1 & Type 2 helper module$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/psaux/psaux.c b/3party/freetype/src/psaux/psaux.c
index a4b9c5c6e4..a4b9c5c6e4 100644
--- a/3party/freetype/psaux/psaux.c
+++ b/3party/freetype/src/psaux/psaux.c
diff --git a/3party/freetype/psaux/psauxerr.h b/3party/freetype/src/psaux/psauxerr.h
index d0baa3cbb9..d0baa3cbb9 100644
--- a/3party/freetype/psaux/psauxerr.h
+++ b/3party/freetype/src/psaux/psauxerr.h
diff --git a/3party/freetype/psaux/psauxmod.c b/3party/freetype/src/psaux/psauxmod.c
index 4c3579f7b8..4c3579f7b8 100644
--- a/3party/freetype/psaux/psauxmod.c
+++ b/3party/freetype/src/psaux/psauxmod.c
diff --git a/3party/freetype/psaux/psauxmod.h b/3party/freetype/src/psaux/psauxmod.h
index 35e042dbce..35e042dbce 100644
--- a/3party/freetype/psaux/psauxmod.h
+++ b/3party/freetype/src/psaux/psauxmod.h
diff --git a/3party/freetype/psaux/psconv.c b/3party/freetype/src/psaux/psconv.c
index 1531d8f0fb..1531d8f0fb 100644
--- a/3party/freetype/psaux/psconv.c
+++ b/3party/freetype/src/psaux/psconv.c
diff --git a/3party/freetype/psaux/psconv.h b/3party/freetype/src/psaux/psconv.h
index 84854ba0d1..84854ba0d1 100644
--- a/3party/freetype/psaux/psconv.h
+++ b/3party/freetype/src/psaux/psconv.h
diff --git a/3party/freetype/psaux/psobjs.c b/3party/freetype/src/psaux/psobjs.c
index fe8398ae38..a28b5fc241 100644
--- a/3party/freetype/psaux/psobjs.c
+++ b/3party/freetype/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -185,13 +185,13 @@
/* grow the base block if needed */
if ( table->cursor + length > table->capacity )
{
- FT_Error error;
- FT_Offset new_size = table->capacity;
- FT_Long in_offset;
+ FT_Error error;
+ FT_Offset new_size = table->capacity;
+ FT_PtrDist in_offset;
- in_offset = (FT_Long)((FT_Byte*)object - table->block);
- if ( (FT_ULong)in_offset >= table->capacity )
+ in_offset = (FT_Byte*)object - table->block;
+ if ( in_offset < 0 || (FT_Offset)in_offset >= table->capacity )
in_offset = -1;
while ( new_size < table->cursor + length )
@@ -1588,6 +1588,13 @@
FT_Error error;
+ /* this might happen in invalid fonts */
+ if ( !outline )
+ {
+ FT_ERROR(( "t1_builder_add_contour: no outline to add points to\n" ));
+ return PSaux_Err_Invalid_File_Format;
+ }
+
if ( !builder->load_points )
{
outline->n_contours++;
@@ -1621,7 +1628,7 @@
if ( builder->parse_state == T1_Parse_Have_Path )
error = PSaux_Err_Ok;
- else if ( builder->parse_state == T1_Parse_Have_Moveto )
+ else
{
builder->parse_state = T1_Parse_Have_Path;
error = t1_builder_add_contour( builder );
diff --git a/3party/freetype/psaux/psobjs.h b/3party/freetype/src/psaux/psobjs.h
index e380c60dab..e380c60dab 100644
--- a/3party/freetype/psaux/psobjs.h
+++ b/3party/freetype/src/psaux/psobjs.h
diff --git a/3party/freetype/src/psaux/rules.mk b/3party/freetype/src/psaux/rules.mk
new file mode 100644
index 0000000000..7a1be37b69
--- /dev/null
+++ b/3party/freetype/src/psaux/rules.mk
@@ -0,0 +1,73 @@
+#
+# FreeType 2 PSaux driver configuration rules
+#
+
+
+# Copyright 1996-2000, 2002, 2003, 2006 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.
+
+
+# PSAUX driver directory
+#
+PSAUX_DIR := $(SRC_DIR)/psaux
+
+
+# compilation flags for the driver
+#
+PSAUX_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSAUX_DIR))
+
+
+# PSAUX driver sources (i.e., C files)
+#
+PSAUX_DRV_SRC := $(PSAUX_DIR)/psobjs.c \
+ $(PSAUX_DIR)/t1decode.c \
+ $(PSAUX_DIR)/t1cmap.c \
+ $(PSAUX_DIR)/afmparse.c \
+ $(PSAUX_DIR)/psconv.c \
+ $(PSAUX_DIR)/psauxmod.c
+
+# PSAUX driver headers
+#
+PSAUX_DRV_H := $(PSAUX_DRV_SRC:%c=%h) \
+ $(PSAUX_DIR)/psauxerr.h
+
+
+# PSAUX driver object(s)
+#
+# PSAUX_DRV_OBJ_M is used during `multi' builds.
+# PSAUX_DRV_OBJ_S is used during `single' builds.
+#
+PSAUX_DRV_OBJ_M := $(PSAUX_DRV_SRC:$(PSAUX_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PSAUX_DRV_OBJ_S := $(OBJ_DIR)/psaux.$O
+
+# PSAUX driver source file for single build
+#
+PSAUX_DRV_SRC_S := $(PSAUX_DIR)/psaux.c
+
+
+# PSAUX driver - single object
+#
+$(PSAUX_DRV_OBJ_S): $(PSAUX_DRV_SRC_S) $(PSAUX_DRV_SRC) \
+ $(FREETYPE_H) $(PSAUX_DRV_H)
+ $(PSAUX_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PSAUX_DRV_SRC_S))
+
+
+# PSAUX driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(PSAUX_DIR)/%.c $(FREETYPE_H) $(PSAUX_DRV_H)
+ $(PSAUX_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(PSAUX_DRV_OBJ_S)
+DRV_OBJS_M += $(PSAUX_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/psaux/t1cmap.c b/3party/freetype/src/psaux/t1cmap.c
index f933e4da88..f933e4da88 100644
--- a/3party/freetype/psaux/t1cmap.c
+++ b/3party/freetype/src/psaux/t1cmap.c
diff --git a/3party/freetype/psaux/t1cmap.h b/3party/freetype/src/psaux/t1cmap.h
index 7ae65d2fa1..7ae65d2fa1 100644
--- a/3party/freetype/psaux/t1cmap.h
+++ b/3party/freetype/src/psaux/t1cmap.h
diff --git a/3party/freetype/psaux/t1decode.c b/3party/freetype/src/psaux/t1decode.c
index b3245a6788..ea31c51b17 100644
--- a/3party/freetype/psaux/t1decode.c
+++ b/3party/freetype/src/psaux/t1decode.c
@@ -4,7 +4,8 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -211,7 +212,12 @@
/* `glyph_names' is set to 0 for CID fonts which do not */
/* include an encoding. How can we deal with these? */
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ if ( decoder->glyph_names == 0 &&
+ !face->root.internal->incremental_interface )
+#else
if ( decoder->glyph_names == 0 )
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
FT_ERROR(( "t1operator_seac:"
" glyph names table not available in this font\n" ));
@@ -367,15 +373,6 @@
#endif
- /* we don't want to touch the source code -- use macro trick */
-#define start_point t1_builder_start_point
-#define check_points t1_builder_check_points
-#define add_point t1_builder_add_point
-#define add_point1 t1_builder_add_point1
-#define add_contour t1_builder_add_contour
-#define close_contour t1_builder_close_contour
-
-
/* compute random seed from stack address of parameter */
seed = (FT_Fixed)( ( (FT_PtrDist)(char*)&seed ^
(FT_PtrDist)(char*)&decoder ^
@@ -733,8 +730,10 @@
decoder->flex_state = 1;
decoder->num_flex_vectors = 0;
- if ( start_point( builder, x, y ) ||
- check_points( builder, 6 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 6 ) )
+ != PSaux_Err_Ok )
goto Fail;
break;
@@ -751,10 +750,10 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
- add_point( builder,
- x,
- y,
- (FT_Byte)( idx == 3 || idx == 6 ) );
+ t1_builder_add_point( builder,
+ x,
+ y,
+ (FT_Byte)( idx == 3 || idx == 6 ) );
}
break;
@@ -771,6 +770,8 @@
}
/* the two `results' are popped by the following setcurrentpoint */
+ top[0] = x;
+ top[1] = y;
known_othersubr_result_cnt = 2;
break;
@@ -1069,7 +1070,7 @@
case op_endchar:
FT_TRACE4(( " endchar\n" ));
- close_contour( builder );
+ t1_builder_close_contour( builder );
/* close hints recording session */
if ( hinter )
@@ -1168,7 +1169,7 @@
/* if there is no path, `closepath' is a no-op */
if ( builder->parse_state == T1_Parse_Have_Path ||
builder->parse_state == T1_Parse_Have_Moveto )
- close_contour( builder );
+ t1_builder_close_contour( builder );
builder->parse_state = T1_Parse_Have_Width;
break;
@@ -1176,7 +1177,8 @@
case op_hlineto:
FT_TRACE4(( " hlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
@@ -1197,30 +1199,34 @@
case op_hvcurveto:
FT_TRACE4(( " hvcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[1];
y += top[2];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
y += top[3];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_rlineto:
FT_TRACE4(( " rlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
y += top[1];
Add_Line:
- if ( add_point1( builder, x, y ) )
+ if ( ( error = t1_builder_add_point1( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
break;
@@ -1240,43 +1246,48 @@
case op_rrcurveto:
FT_TRACE4(( " rrcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
x += top[0];
y += top[1];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[2];
y += top[3];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[4];
y += top[5];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_vhcurveto:
FT_TRACE4(( " vhcurveto" ));
- if ( start_point( builder, x, y ) ||
- check_points( builder, 3 ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok ||
+ ( error = t1_builder_check_points( builder, 3 ) )
+ != PSaux_Err_Ok )
goto Fail;
y += top[0];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[1];
y += top[2];
- add_point( builder, x, y, 0 );
+ t1_builder_add_point( builder, x, y, 0 );
x += top[3];
- add_point( builder, x, y, 1 );
+ t1_builder_add_point( builder, x, y, 1 );
break;
case op_vlineto:
FT_TRACE4(( " vlineto" ));
- if ( start_point( builder, x, y ) )
+ if ( ( error = t1_builder_start_point( builder, x, y ) )
+ != PSaux_Err_Ok )
goto Fail;
y += top[0];
@@ -1453,12 +1464,20 @@
case op_setcurrentpoint:
FT_TRACE4(( " setcurrentpoint" ));
- /* From the T1 specs, section 6.4: */
+ /* From the T1 specification, section 6.4: */
/* */
/* The setcurrentpoint command is used only in */
/* conjunction with results from OtherSubrs procedures. */
- /* known_othersubr_result_cnt != 0 is already handled above */
+ /* known_othersubr_result_cnt != 0 is already handled */
+ /* above. */
+
+ /* Note, however, that both Ghostscript and Adobe */
+ /* Distiller handle this situation by silently ignoring */
+ /* the inappropriate `setcurrentpoint' instruction. So */
+ /* we do the same. */
+#if 0
+
if ( decoder->flex_state != 1 )
{
FT_ERROR(( "t1_decoder_parse_charstrings:"
@@ -1466,7 +1485,12 @@
goto Syntax_Error;
}
else
- decoder->flex_state = 0;
+ ...
+#endif
+
+ x = top[0];
+ y = top[1];
+ decoder->flex_state = 0;
break;
case op_unknown15:
diff --git a/3party/freetype/psaux/t1decode.h b/3party/freetype/src/psaux/t1decode.h
index 00728db501..00728db501 100644
--- a/3party/freetype/psaux/t1decode.h
+++ b/3party/freetype/src/psaux/t1decode.h
diff --git a/3party/freetype/pshinter/Jamfile b/3party/freetype/src/pshinter/Jamfile
index 779f1b0b82..779f1b0b82 100644
--- a/3party/freetype/pshinter/Jamfile
+++ b/3party/freetype/src/pshinter/Jamfile
diff --git a/3party/freetype/src/pshinter/module.mk b/3party/freetype/src/pshinter/module.mk
new file mode 100644
index 0000000000..ed24eb7fa8
--- /dev/null
+++ b/3party/freetype/src/pshinter/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 PSHinter module definition
+#
+
+
+# Copyright 1996-2001, 2006 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, 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.
+
+
+FTMODULE_H_COMMANDS += PSHINTER_MODULE
+
+define PSHINTER_MODULE
+$(OPEN_DRIVER) FT_Module_Class, pshinter_module_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)pshinter $(ECHO_DRIVER_DESC)Postscript hinter module$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/pshinter/pshalgo.c b/3party/freetype/src/pshinter/pshalgo.c
index 417dcee547..d798978914 100644
--- a/3party/freetype/pshinter/pshalgo.c
+++ b/3party/freetype/src/pshinter/pshalgo.c
@@ -4,7 +4,8 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 */
+/* by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -1690,7 +1691,10 @@
/* process secondary hints to `selected' points */
if ( num_masks > 1 && glyph->num_points > 0 )
{
- first = mask->end_point;
+ /* the `endchar' op can reduce the number of points */
+ first = mask->end_point > glyph->num_points
+ ? glyph->num_points
+ : mask->end_point;
mask++;
for ( ; num_masks > 1; num_masks--, mask++ )
{
@@ -1698,7 +1702,9 @@
FT_Int count;
- next = mask->end_point;
+ next = mask->end_point > glyph->num_points
+ ? glyph->num_points
+ : mask->end_point;
count = next - first;
if ( count > 0 )
{
@@ -1856,12 +1862,10 @@
point->cur_u = hint->cur_pos + hint->cur_len +
FT_MulFix( delta - hint->org_len, scale );
- else if ( hint->org_len > 0 )
+ else /* hint->org_len > 0 */
point->cur_u = hint->cur_pos +
FT_MulDiv( delta, hint->cur_len,
hint->org_len );
- else
- point->cur_u = hint->cur_pos;
}
psh_point_set_fitted( point );
}
diff --git a/3party/freetype/pshinter/pshalgo.h b/3party/freetype/src/pshinter/pshalgo.h
index 1a248a7052..1a248a7052 100644
--- a/3party/freetype/pshinter/pshalgo.h
+++ b/3party/freetype/src/pshinter/pshalgo.h
diff --git a/3party/freetype/pshinter/pshglob.c b/3party/freetype/src/pshinter/pshglob.c
index 8a69aa1e84..31231ad009 100644
--- a/3party/freetype/pshinter/pshglob.c
+++ b/3party/freetype/src/pshinter/pshglob.c
@@ -5,7 +5,7 @@
/* PostScript hinter global hinting management (body). */
/* Inspired by the new auto-hinter module. */
/* */
-/* Copyright 2001, 2002, 2003, 2004, 2006 by */
+/* Copyright 2001, 2002, 2003, 2004, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -624,7 +624,7 @@
T1_Private* priv,
PSH_Globals *aglobals )
{
- PSH_Globals globals;
+ PSH_Globals globals = NULL;
FT_Error error;
diff --git a/3party/freetype/pshinter/pshglob.h b/3party/freetype/src/pshinter/pshglob.h
index c511626157..c511626157 100644
--- a/3party/freetype/pshinter/pshglob.h
+++ b/3party/freetype/src/pshinter/pshglob.h
diff --git a/3party/freetype/pshinter/pshinter.c b/3party/freetype/src/pshinter/pshinter.c
index b35a2a91c5..b35a2a91c5 100644
--- a/3party/freetype/pshinter/pshinter.c
+++ b/3party/freetype/src/pshinter/pshinter.c
diff --git a/3party/freetype/pshinter/pshmod.c b/3party/freetype/src/pshinter/pshmod.c
index 91da5d7e6b..91da5d7e6b 100644
--- a/3party/freetype/pshinter/pshmod.c
+++ b/3party/freetype/src/pshinter/pshmod.c
diff --git a/3party/freetype/pshinter/pshmod.h b/3party/freetype/src/pshinter/pshmod.h
index 0ae7e96f54..0ae7e96f54 100644
--- a/3party/freetype/pshinter/pshmod.h
+++ b/3party/freetype/src/pshinter/pshmod.h
diff --git a/3party/freetype/pshinter/pshnterr.h b/3party/freetype/src/pshinter/pshnterr.h
index 3c0029fbf3..3c0029fbf3 100644
--- a/3party/freetype/pshinter/pshnterr.h
+++ b/3party/freetype/src/pshinter/pshnterr.h
diff --git a/3party/freetype/pshinter/pshpic.c b/3party/freetype/src/pshinter/pshpic.c
index 51a0879888..5efb422948 100644
--- a/3party/freetype/pshinter/pshpic.c
+++ b/3party/freetype/src/pshinter/pshpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for pshinter module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,18 +38,20 @@
}
}
+
FT_Error
- pshinter_module_class_pic_init( FT_Library library )
+ pshinter_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- PSHinterPIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = PSH_Err_Ok;
+ PSHinterPIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->pshinter = container;
/* add call to initialization function when you add new scripts */
diff --git a/3party/freetype/pshinter/pshpic.h b/3party/freetype/src/pshinter/pshpic.h
index 3555d8e851..3555d8e851 100644
--- a/3party/freetype/pshinter/pshpic.h
+++ b/3party/freetype/src/pshinter/pshpic.h
diff --git a/3party/freetype/pshinter/pshrec.c b/3party/freetype/src/pshinter/pshrec.c
index 0910cc5e6a..0910cc5e6a 100644
--- a/3party/freetype/pshinter/pshrec.c
+++ b/3party/freetype/src/pshinter/pshrec.c
diff --git a/3party/freetype/pshinter/pshrec.h b/3party/freetype/src/pshinter/pshrec.h
index dcb3197f94..dcb3197f94 100644
--- a/3party/freetype/pshinter/pshrec.h
+++ b/3party/freetype/src/pshinter/pshrec.h
diff --git a/3party/freetype/src/pshinter/rules.mk b/3party/freetype/src/pshinter/rules.mk
new file mode 100644
index 0000000000..888ece1058
--- /dev/null
+++ b/3party/freetype/src/pshinter/rules.mk
@@ -0,0 +1,73 @@
+#
+# FreeType 2 PSHinter driver configuration rules
+#
+
+
+# Copyright 2001, 2003, 2011 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.
+
+
+# PSHINTER driver directory
+#
+PSHINTER_DIR := $(SRC_DIR)/pshinter
+
+
+# compilation flags for the driver
+#
+PSHINTER_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSHINTER_DIR))
+
+
+# PSHINTER driver sources (i.e., C files)
+#
+PSHINTER_DRV_SRC := $(PSHINTER_DIR)/pshalgo.c \
+ $(PSHINTER_DIR)/pshglob.c \
+ $(PSHINTER_DIR)/pshmod.c \
+ $(PSHINTER_DIR)/pshpic.c \
+ $(PSHINTER_DIR)/pshrec.c
+
+
+# PSHINTER driver headers
+#
+PSHINTER_DRV_H := $(PSHINTER_DRV_SRC:%c=%h) \
+ $(PSHINTER_DIR)/pshnterr.h
+
+
+# PSHINTER driver object(s)
+#
+# PSHINTER_DRV_OBJ_M is used during `multi' builds.
+# PSHINTER_DRV_OBJ_S is used during `single' builds.
+#
+PSHINTER_DRV_OBJ_M := $(PSHINTER_DRV_SRC:$(PSHINTER_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PSHINTER_DRV_OBJ_S := $(OBJ_DIR)/pshinter.$O
+
+# PSHINTER driver source file for single build
+#
+PSHINTER_DRV_SRC_S := $(PSHINTER_DIR)/pshinter.c
+
+
+# PSHINTER driver - single object
+#
+$(PSHINTER_DRV_OBJ_S): $(PSHINTER_DRV_SRC_S) $(PSHINTER_DRV_SRC) \
+ $(FREETYPE_H) $(PSHINTER_DRV_H)
+ $(PSHINTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PSHINTER_DRV_SRC_S))
+
+
+# PSHINTER driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(PSHINTER_DIR)/%.c $(FREETYPE_H) $(PSHINTER_DRV_H)
+ $(PSHINTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(PSHINTER_DRV_OBJ_S)
+DRV_OBJS_M += $(PSHINTER_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/psnames/Jamfile b/3party/freetype/src/psnames/Jamfile
index 06c0dda66f..06c0dda66f 100644
--- a/3party/freetype/psnames/Jamfile
+++ b/3party/freetype/src/psnames/Jamfile
diff --git a/3party/freetype/src/psnames/module.mk b/3party/freetype/src/psnames/module.mk
new file mode 100644
index 0000000000..a6e908257c
--- /dev/null
+++ b/3party/freetype/src/psnames/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 PSnames module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += PSNAMES_MODULE
+
+define PSNAMES_MODULE
+$(OPEN_DRIVER) FT_Module_Class, psnames_module_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)psnames $(ECHO_DRIVER_DESC)Postscript & Unicode Glyph name handling$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/psnames/psmodule.c b/3party/freetype/src/psnames/psmodule.c
index 3518850493..7528696938 100644
--- a/3party/freetype/psnames/psmodule.c
+++ b/3party/freetype/src/psnames/psmodule.c
@@ -366,11 +366,13 @@
if ( count == 0 )
{
+ /* No unicode chars here! */
FT_FREE( table->maps );
if ( !error )
- error = PSnames_Err_Invalid_Argument; /* No unicode chars here! */
+ error = PSnames_Err_No_Unicode_Glyph_Name;
}
- else {
+ else
+ {
/* Reallocate if the number of used entries is much smaller. */
if ( count < num_glyphs / 2 )
{
@@ -561,8 +563,7 @@
psnames_get_service( FT_Module module,
const char* service_id )
{
- FT_Library library = module->library;
- FT_UNUSED(library);
+ FT_UNUSED( module );
return ft_service_list_lookup( FT_PSCMAPS_SERVICES_GET, service_id );
}
diff --git a/3party/freetype/psnames/psmodule.h b/3party/freetype/src/psnames/psmodule.h
index 28fa14807c..28fa14807c 100644
--- a/3party/freetype/psnames/psmodule.h
+++ b/3party/freetype/src/psnames/psmodule.h
diff --git a/3party/freetype/psnames/psnamerr.h b/3party/freetype/src/psnames/psnamerr.h
index ae1541d960..ae1541d960 100644
--- a/3party/freetype/psnames/psnamerr.h
+++ b/3party/freetype/src/psnames/psnamerr.h
diff --git a/3party/freetype/psnames/psnames.c b/3party/freetype/src/psnames/psnames.c
index 1ede225dc9..1ede225dc9 100644
--- a/3party/freetype/psnames/psnames.c
+++ b/3party/freetype/src/psnames/psnames.c
diff --git a/3party/freetype/psnames/pspic.c b/3party/freetype/src/psnames/pspic.c
index ed7dadda39..b9075d5a5a 100644
--- a/3party/freetype/psnames/pspic.c
+++ b/3party/freetype/src/psnames/pspic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for psnames module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -44,13 +44,15 @@
}
}
+
FT_Error
- psnames_module_class_pic_init( FT_Library library )
+ psnames_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- PSModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = PSnames_Err_Ok;
+ PSModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
diff --git a/3party/freetype/psnames/pspic.h b/3party/freetype/src/psnames/pspic.h
index 75a14fdcb9..75a14fdcb9 100644
--- a/3party/freetype/psnames/pspic.h
+++ b/3party/freetype/src/psnames/pspic.h
diff --git a/3party/freetype/psnames/pstables.h b/3party/freetype/src/psnames/pstables.h
index 1521e9c285..1521e9c285 100644
--- a/3party/freetype/psnames/pstables.h
+++ b/3party/freetype/src/psnames/pstables.h
diff --git a/3party/freetype/src/psnames/rules.mk b/3party/freetype/src/psnames/rules.mk
new file mode 100644
index 0000000000..4cd39a8ccf
--- /dev/null
+++ b/3party/freetype/src/psnames/rules.mk
@@ -0,0 +1,71 @@
+#
+# FreeType 2 PSNames driver configuration rules
+#
+
+
+# Copyright 1996-2000, 2001, 2003, 2011 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.
+
+
+# PSNames driver directory
+#
+PSNAMES_DIR := $(SRC_DIR)/psnames
+
+
+# compilation flags for the driver
+#
+PSNAMES_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSNAMES_DIR))
+
+
+# PSNames driver sources (i.e., C files)
+#
+PSNAMES_DRV_SRC := $(PSNAMES_DIR)/psmodule.c \
+ $(PSNAMES_DIR)/pspic.c
+
+
+# PSNames driver headers
+#
+PSNAMES_DRV_H := $(PSNAMES_DRV_SRC:%.c=%.h) \
+ $(PSNAMES_DIR)/psnamerr.h \
+ $(PSNAMES_DIR)/pstables.h
+
+
+# PSNames driver object(s)
+#
+# PSNAMES_DRV_OBJ_M is used during `multi' builds
+# PSNAMES_DRV_OBJ_S is used during `single' builds
+#
+PSNAMES_DRV_OBJ_M := $(PSNAMES_DRV_SRC:$(PSNAMES_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PSNAMES_DRV_OBJ_S := $(OBJ_DIR)/psnames.$O
+
+# PSNames driver source file for single build
+#
+PSNAMES_DRV_SRC_S := $(PSNAMES_DIR)/psmodule.c
+
+
+# PSNames driver - single object
+#
+$(PSNAMES_DRV_OBJ_S): $(PSNAMES_DRV_SRC_S) $(PSNAMES_DRV_SRC) \
+ $(FREETYPE_H) $(PSNAMES_DRV_H)
+ $(PSNAMES_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PSNAMES_DRV_SRC_S))
+
+
+# PSNames driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(PSNAMES_DIR)/%.c $(FREETYPE_H) $(PSNAMES_DRV_H)
+ $(PSNAMES_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(PSNAMES_DRV_OBJ_S)
+DRV_OBJS_M += $(PSNAMES_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/raster/Jamfile b/3party/freetype/src/raster/Jamfile
index 4f60e87c78..4f60e87c78 100644
--- a/3party/freetype/raster/Jamfile
+++ b/3party/freetype/src/raster/Jamfile
diff --git a/3party/freetype/raster/ftmisc.h b/3party/freetype/src/raster/ftmisc.h
index f04b5404bb..7773924feb 100644
--- a/3party/freetype/raster/ftmisc.h
+++ b/3party/freetype/src/raster/ftmisc.h
@@ -5,7 +5,7 @@
/* Miscellaneous macros for stand-alone rasterizer (specification */
/* only). */
/* */
-/* Copyright 2005, 2009 by */
+/* Copyright 2005, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -27,6 +27,7 @@
#ifndef __FTMISC_H__
#define __FTMISC_H__
+
/* memset */
#include FT_CONFIG_STANDARD_LIBRARY_H
@@ -35,6 +36,7 @@
#define FT_LOCAL_DEF( x ) static x
+
/* from include/freetype2/fttypes.h */
typedef unsigned char FT_Byte;
@@ -77,12 +79,22 @@
} FT_MemoryRec;
+
/* from src/ftcalc.c */
-#include <inttypes.h>
+#if ( defined _WIN32 || defined _WIN64 )
+
+ typedef __int64 FT_Int64;
+
+#else
+
+#include "inttypes.h"
typedef int64_t FT_Int64;
+#endif
+
+
static FT_Long
FT_MulDiv( FT_Long a,
FT_Long b,
diff --git a/3party/freetype/raster/ftraster.c b/3party/freetype/src/raster/ftraster.c
index 23ad592653..55e2d0d75a 100644
--- a/3party/freetype/raster/ftraster.c
+++ b/3party/freetype/src/raster/ftraster.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2005, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -302,7 +302,6 @@
typedef short Short;
typedef unsigned short UShort, *PUShort;
typedef long Long, *PLong;
- typedef unsigned long ULong;
typedef unsigned char Byte, *PByte;
typedef char Bool;
@@ -448,7 +447,6 @@
Int precision_bits; /* precision related variables */
Int precision;
Int precision_half;
- Long precision_mask;
Int precision_shift;
Int precision_step;
Int precision_jitter;
@@ -653,11 +651,33 @@
static void
Set_High_Precision( RAS_ARGS Int High )
{
+ /*
+ * `precision_step' is used in `Bezier_Up' to decide when to split a
+ * given y-monotonous Bezier arc that crosses a scanline before
+ * approximating it as a straight segment. The default value of 32 (for
+ * low accuracy) corresponds to
+ *
+ * 32 / 64 == 0.5 pixels ,
+ *
+ * while for the high accuracy case we have
+ *
+ * 256/ (1 << 12) = 0.0625 pixels .
+ *
+ * `precision_jitter' is an epsilon threshold used in
+ * `Vertical_Sweep_Span' to deal with small imperfections in the Bezier
+ * decomposition (after all, we are working with approximations only);
+ * it avoids switching on additional pixels which would cause artifacts
+ * otherwise.
+ *
+ * The value of `precision_jitter' has been determined heuristically.
+ *
+ */
+
if ( High )
{
ras.precision_bits = 12;
ras.precision_step = 256;
- ras.precision_jitter = 50;
+ ras.precision_jitter = 30;
}
else
{
@@ -671,7 +691,6 @@
ras.precision = 1 << ras.precision_bits;
ras.precision_half = ras.precision / 2;
ras.precision_shift = ras.precision_bits - Pixel_Bits;
- ras.precision_mask = -ras.precision;
}
@@ -725,13 +744,13 @@
if ( overshoot )
ras.cProfile->flags |= Overshoot_Bottom;
- FT_TRACE6(( "New ascending profile = %lx\n", (long)ras.cProfile ));
+ FT_TRACE6(( "New ascending profile = %p\n", ras.cProfile ));
break;
case Descending_State:
if ( overshoot )
ras.cProfile->flags |= Overshoot_Top;
- FT_TRACE6(( "New descending profile = %lx\n", (long)ras.cProfile ));
+ FT_TRACE6(( "New descending profile = %p\n", ras.cProfile ));
break;
default:
@@ -784,8 +803,8 @@
if ( h > 0 )
{
- FT_TRACE6(( "Ending profile %lx, start = %ld, height = %ld\n",
- (long)ras.cProfile, ras.cProfile->start, h ));
+ FT_TRACE6(( "Ending profile %p, start = %ld, height = %ld\n",
+ ras.cProfile, ras.cProfile->start, h ));
ras.cProfile->height = h;
if ( overshoot )
@@ -1094,7 +1113,7 @@
return SUCCESS;
else
{
- x1 += FMulDiv( Dx, ras.precision - f1, Dy );
+ x1 += SMulDiv( Dx, ras.precision - f1, Dy );
e1 += 1;
}
}
@@ -1122,13 +1141,13 @@
if ( Dx > 0 )
{
- Ix = ( ras.precision * Dx ) / Dy;
+ Ix = SMulDiv( ras.precision, Dx, Dy);
Rx = ( ras.precision * Dx ) % Dy;
Dx = 1;
}
else
{
- Ix = -( ( ras.precision * -Dx ) / Dy );
+ Ix = SMulDiv( ras.precision, -Dx, Dy) * -1;
Rx = ( ras.precision * -Dx ) % Dy;
Dx = -1;
}
@@ -1931,18 +1950,21 @@
y1 = SCALED( point[-2].y );
x2 = SCALED( point[-1].x );
y2 = SCALED( point[-1].y );
- x3 = SCALED( point[ 0].x );
- y3 = SCALED( point[ 0].y );
if ( flipped )
{
SWAP_( x1, y1 );
SWAP_( x2, y2 );
- SWAP_( x3, y3 );
}
if ( point <= limit )
{
+ x3 = SCALED( point[0].x );
+ y3 = SCALED( point[0].y );
+
+ if ( flipped )
+ SWAP_( x3, y3 );
+
if ( Cubic_To( RAS_VARS x1, y1, x2, y2, x3, y3 ) )
goto Fail;
continue;
@@ -2403,6 +2425,14 @@
return; /* no drop-out control */
}
+ /* undocumented but confirmed: If the drop-out would result in a */
+ /* pixel outside of the bounding box, use the pixel inside of the */
+ /* bounding box instead */
+ if ( pxl < 0 )
+ pxl = e1;
+ else if ( TRUNC( pxl ) >= ras.bWidth )
+ pxl = e2;
+
/* check that the other pixel isn't set */
e1 = pxl == e1 ? e2 : e1;
@@ -2495,7 +2525,7 @@
PByte p;
- p = bits - e1*ras.target.pitch;
+ p = bits - e1 * ras.target.pitch;
if ( ras.target.pitch > 0 )
p += ( ras.target.rows - 1 ) * ras.target.pitch;
@@ -2579,6 +2609,14 @@
return; /* no drop-out control */
}
+ /* undocumented but confirmed: If the drop-out would result in a */
+ /* pixel outside of the bounding box, use the pixel inside of the */
+ /* bounding box instead */
+ if ( pxl < 0 )
+ pxl = e1;
+ else if ( TRUNC( pxl ) >= ras.target.rows )
+ pxl = e2;
+
/* check that the other pixel isn't set */
e1 = pxl == e1 ? e2 : e1;
@@ -3382,6 +3420,7 @@
FT_Raster *araster )
{
static TRaster the_raster;
+ FT_UNUSED( memory );
*araster = (FT_Raster)&the_raster;
@@ -3400,7 +3439,7 @@
}
-#else /* _STANDALONE_ */
+#else /* !_STANDALONE_ */
static int
@@ -3408,7 +3447,7 @@
PRaster *araster )
{
FT_Error error;
- PRaster raster;
+ PRaster raster = NULL;
*araster = 0;
@@ -3432,7 +3471,7 @@
}
-#endif /* _STANDALONE_ */
+#endif /* !_STANDALONE_ */
static void
@@ -3447,9 +3486,8 @@
PWorker worker = (PWorker)pool_base;
- raster->buffer = pool_base + ( (sizeof ( *worker ) + 7 ) & ~7 );
- raster->buffer_size = ( ( pool_base + pool_size ) -
- (char*)raster->buffer ) / sizeof ( Long );
+ raster->buffer = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 );
+ raster->buffer_size = pool_base + pool_size - (char*)raster->buffer;
raster->worker = worker;
}
else
diff --git a/3party/freetype/raster/ftraster.h b/3party/freetype/src/raster/ftraster.h
index 80fe46deba..80fe46deba 100644
--- a/3party/freetype/raster/ftraster.h
+++ b/3party/freetype/src/raster/ftraster.h
diff --git a/3party/freetype/raster/ftrend1.c b/3party/freetype/src/raster/ftrend1.c
index 1ed8af6121..d8a89f28a6 100644
--- a/3party/freetype/raster/ftrend1.c
+++ b/3party/freetype/src/raster/ftrend1.c
@@ -161,10 +161,18 @@
/* compute the control box, and grid fit it */
FT_Outline_Get_CBox( outline, &cbox );
+ /* undocumented but confirmed: bbox values get rounded */
+#if 1
+ cbox.xMin = FT_PIX_ROUND( cbox.xMin );
+ cbox.yMin = FT_PIX_ROUND( cbox.yMin );
+ cbox.xMax = FT_PIX_ROUND( cbox.xMax );
+ cbox.yMax = FT_PIX_ROUND( cbox.yMax );
+#else
cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
cbox.xMax = FT_PIX_CEIL( cbox.xMax );
cbox.yMax = FT_PIX_CEIL( cbox.yMax );
+#endif
width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
diff --git a/3party/freetype/raster/ftrend1.h b/3party/freetype/src/raster/ftrend1.h
index 4cf128622a..4cf128622a 100644
--- a/3party/freetype/raster/ftrend1.h
+++ b/3party/freetype/src/raster/ftrend1.h
diff --git a/3party/freetype/src/raster/module.mk b/3party/freetype/src/raster/module.mk
new file mode 100644
index 0000000000..cbff5df96e
--- /dev/null
+++ b/3party/freetype/src/raster/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 renderer module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += RASTER_MODULE
+
+define RASTER_MODULE
+$(OPEN_DRIVER) FT_Renderer_Class, ft_raster1_renderer_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)raster $(ECHO_DRIVER_DESC)monochrome bitmap renderer$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/raster/raster.c b/3party/freetype/src/raster/raster.c
index 1202a116cd..1202a116cd 100644
--- a/3party/freetype/raster/raster.c
+++ b/3party/freetype/src/raster/raster.c
diff --git a/3party/freetype/raster/rasterrs.h b/3party/freetype/src/raster/rasterrs.h
index 5df9a7ab1e..5df9a7ab1e 100644
--- a/3party/freetype/raster/rasterrs.h
+++ b/3party/freetype/src/raster/rasterrs.h
diff --git a/3party/freetype/raster/rastpic.c b/3party/freetype/src/raster/rastpic.c
index 3c264877b6..e31c549763 100644
--- a/3party/freetype/raster/rastpic.c
+++ b/3party/freetype/src/raster/rastpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for raster module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -43,16 +43,17 @@
FT_Error
- ft_raster1_renderer_class_pic_init( FT_Library library )
+ ft_raster1_renderer_class_pic_init( FT_Library library )
{
FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- RasterPIC* container;
- FT_Memory memory = library->memory;
+ FT_Error error = Raster_Err_Ok;
+ RasterPIC* container;
+ FT_Memory memory = library->memory;
+
/* since this function also serve raster5 renderer,
it implements reference counting */
- if(pic_container->raster)
+ if ( pic_container->raster )
{
((RasterPIC*)pic_container->raster)->ref_count++;
return error;
diff --git a/3party/freetype/raster/rastpic.h b/3party/freetype/src/raster/rastpic.h
index dcd82b8ca8..dcd82b8ca8 100644
--- a/3party/freetype/raster/rastpic.h
+++ b/3party/freetype/src/raster/rastpic.h
diff --git a/3party/freetype/src/raster/rules.mk b/3party/freetype/src/raster/rules.mk
new file mode 100644
index 0000000000..0e0b5e4ebd
--- /dev/null
+++ b/3party/freetype/src/raster/rules.mk
@@ -0,0 +1,70 @@
+#
+# FreeType 2 renderer module build rules
+#
+
+
+# Copyright 1996-2000, 2001, 2003, 2008, 2009, 2011 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.
+
+
+# raster driver directory
+#
+RASTER_DIR := $(SRC_DIR)/raster
+
+# compilation flags for the driver
+#
+RASTER_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(RASTER_DIR))
+
+
+# raster driver sources (i.e., C files)
+#
+RASTER_DRV_SRC := $(RASTER_DIR)/ftraster.c \
+ $(RASTER_DIR)/ftrend1.c \
+ $(RASTER_DIR)/rastpic.c
+
+
+# raster driver headers
+#
+RASTER_DRV_H := $(RASTER_DRV_SRC:%.c=%.h) \
+ $(RASTER_DIR)/rasterrs.h
+
+
+# raster driver object(s)
+#
+# RASTER_DRV_OBJ_M is used during `multi' builds.
+# RASTER_DRV_OBJ_S is used during `single' builds.
+#
+RASTER_DRV_OBJ_M := $(RASTER_DRV_SRC:$(RASTER_DIR)/%.c=$(OBJ_DIR)/%.$O)
+RASTER_DRV_OBJ_S := $(OBJ_DIR)/raster.$O
+
+# raster driver source file for single build
+#
+RASTER_DRV_SRC_S := $(RASTER_DIR)/raster.c
+
+
+# raster driver - single object
+#
+$(RASTER_DRV_OBJ_S): $(RASTER_DRV_SRC_S) $(RASTER_DRV_SRC) \
+ $(FREETYPE_H) $(RASTER_DRV_H)
+ $(RASTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(RASTER_DRV_SRC_S))
+
+
+# raster driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(RASTER_DIR)/%.c $(FREETYPE_H) $(RASTER_DRV_H)
+ $(RASTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(RASTER_DRV_OBJ_S)
+DRV_OBJS_M += $(RASTER_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/sfnt/Jamfile b/3party/freetype/src/sfnt/Jamfile
index cb20b1b04b..cb20b1b04b 100644
--- a/3party/freetype/sfnt/Jamfile
+++ b/3party/freetype/src/sfnt/Jamfile
diff --git a/3party/freetype/src/sfnt/module.mk b/3party/freetype/src/sfnt/module.mk
new file mode 100644
index 0000000000..95fd6a3143
--- /dev/null
+++ b/3party/freetype/src/sfnt/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 SFNT module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += SFNT_MODULE
+
+define SFNT_MODULE
+$(OPEN_DRIVER) FT_Module_Class, sfnt_module_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)sfnt $(ECHO_DRIVER_DESC)helper module for TrueType & OpenType formats$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/sfnt/rules.mk b/3party/freetype/src/sfnt/rules.mk
new file mode 100644
index 0000000000..02cee585df
--- /dev/null
+++ b/3party/freetype/src/sfnt/rules.mk
@@ -0,0 +1,80 @@
+#
+# FreeType 2 SFNT driver configuration rules
+#
+
+
+# Copyright 1996-2000, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2011 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.
+
+
+# SFNT driver directory
+#
+SFNT_DIR := $(SRC_DIR)/sfnt
+
+
+# compilation flags for the driver
+#
+SFNT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SFNT_DIR))
+
+
+# SFNT driver sources (i.e., C files)
+#
+SFNT_DRV_SRC := $(SFNT_DIR)/ttload.c \
+ $(SFNT_DIR)/ttmtx.c \
+ $(SFNT_DIR)/ttcmap.c \
+ $(SFNT_DIR)/ttsbit.c \
+ $(SFNT_DIR)/ttpost.c \
+ $(SFNT_DIR)/ttkern.c \
+ $(SFNT_DIR)/ttbdf.c \
+ $(SFNT_DIR)/sfobjs.c \
+ $(SFNT_DIR)/sfdriver.c \
+ $(SFNT_DIR)/sfntpic.c
+
+# SFNT driver headers
+#
+# Note that ttsbit0.c gets #included by ttsbit.c.
+#
+SFNT_DRV_H := $(SFNT_DRV_SRC:%c=%h) \
+ $(SFNT_DIR)/sferrors.h \
+ $(SFNT_DIR)/ttsbit0.c
+
+
+# SFNT driver object(s)
+#
+# SFNT_DRV_OBJ_M is used during `multi' builds.
+# SFNT_DRV_OBJ_S is used during `single' builds.
+#
+SFNT_DRV_OBJ_M := $(SFNT_DRV_SRC:$(SFNT_DIR)/%.c=$(OBJ_DIR)/%.$O)
+SFNT_DRV_OBJ_S := $(OBJ_DIR)/sfnt.$O
+
+# SFNT driver source file for single build
+#
+SFNT_DRV_SRC_S := $(SFNT_DIR)/sfnt.c
+
+
+# SFNT driver - single object
+#
+$(SFNT_DRV_OBJ_S): $(SFNT_DRV_SRC_S) $(SFNT_DRV_SRC) \
+ $(FREETYPE_H) $(SFNT_DRV_H)
+ $(SFNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(SFNT_DRV_SRC_S))
+
+
+# SFNT driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(SFNT_DIR)/%.c $(FREETYPE_H) $(SFNT_DRV_H)
+ $(SFNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(SFNT_DRV_OBJ_S)
+DRV_OBJS_M += $(SFNT_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/sfnt/sfdriver.c b/3party/freetype/src/sfnt/sfdriver.c
index 1d157b7e9d..247aa67998 100644
--- a/3party/freetype/sfnt/sfdriver.c
+++ b/3party/freetype/src/sfnt/sfdriver.c
@@ -4,7 +4,7 @@
/* */
/* High-level SFNT driver interface (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 1996-2007, 2009-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -117,15 +117,20 @@
FT_ULong *offset,
FT_ULong *length )
{
- if ( !tag || !offset || !length )
+ if ( !offset || !length )
return SFNT_Err_Invalid_Argument;
- if ( idx >= face->num_tables )
- return SFNT_Err_Table_Missing;
+ if ( !tag )
+ *length = face->num_tables;
+ else
+ {
+ if ( idx >= face->num_tables )
+ return SFNT_Err_Table_Missing;
- *tag = face->dir_tables[idx].Tag;
- *offset = face->dir_tables[idx].Offset;
- *length = face->dir_tables[idx].Length;
+ *tag = face->dir_tables[idx].Tag;
+ *offset = face->dir_tables[idx].Offset;
+ *length = face->dir_tables[idx].Length;
+ }
return SFNT_Err_Ok;
}
@@ -362,7 +367,7 @@
*acharset_registry = registry.u.atom;
}
else
- error = FT_Err_Invalid_Argument;
+ error = SFNT_Err_Invalid_Argument;
}
}
@@ -417,8 +422,6 @@
sfnt_get_interface( FT_Module module,
const char* module_interface )
{
- FT_Library library = module->library;
- FT_UNUSED(library);
FT_UNUSED( module );
return ft_service_list_lookup( FT_SFNT_SERVICES_GET, module_interface );
@@ -438,7 +441,7 @@
FT_UNUSED( face_index );
FT_UNUSED( header );
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
@@ -451,7 +454,7 @@
FT_UNUSED( stream );
FT_UNUSED( header );
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
@@ -462,7 +465,7 @@
FT_UNUSED( face );
FT_UNUSED( stream );
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
@@ -515,7 +518,7 @@
* is only there for some rogue clients which would want to call it
* directly (which doesn't make much sense).
*/
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
@@ -536,7 +539,7 @@
FT_UNUSED( cmap );
FT_UNUSED( input );
- return FT_Err_Unimplemented_Feature;
+ return SFNT_Err_Unimplemented_Feature;
}
@@ -547,7 +550,7 @@
FT_UNUSED( face );
FT_UNUSED( cmap );
- return 0;
+ return SFNT_Err_Ok;
}
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
diff --git a/3party/freetype/sfnt/sfdriver.h b/3party/freetype/src/sfnt/sfdriver.h
index 5de25d51ca..5de25d51ca 100644
--- a/3party/freetype/sfnt/sfdriver.h
+++ b/3party/freetype/src/sfnt/sfdriver.h
diff --git a/3party/freetype/sfnt/sferrors.h b/3party/freetype/src/sfnt/sferrors.h
index 27f90de285..27f90de285 100644
--- a/3party/freetype/sfnt/sferrors.h
+++ b/3party/freetype/src/sfnt/sferrors.h
diff --git a/3party/freetype/sfnt/sfnt.c b/3party/freetype/src/sfnt/sfnt.c
index fc507b4961..fc507b4961 100644
--- a/3party/freetype/sfnt/sfnt.c
+++ b/3party/freetype/src/sfnt/sfnt.c
diff --git a/3party/freetype/sfnt/sfntpic.c b/3party/freetype/src/sfnt/sfntpic.c
index fd3cf4e923..53aca17b51 100644
--- a/3party/freetype/sfnt/sfntpic.c
+++ b/3party/freetype/src/sfnt/sfntpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for sfnt module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -60,15 +60,16 @@
FT_Error
sfnt_module_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- sfntModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = SFNT_Err_Ok;
+ sfntModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
return error;
- FT_MEM_SET( container, 0, sizeof(*container) );
+ FT_MEM_SET( container, 0, sizeof ( *container ) );
pic_container->sfnt = container;
/* initialize pointer table - this is how the module usually expects this data */
diff --git a/3party/freetype/sfnt/sfntpic.h b/3party/freetype/src/sfnt/sfntpic.h
index 6943b4250a..6943b4250a 100644
--- a/3party/freetype/sfnt/sfntpic.h
+++ b/3party/freetype/src/sfnt/sfntpic.h
diff --git a/3party/freetype/sfnt/sfobjs.c b/3party/freetype/src/sfnt/sfobjs.c
index cef3cd959e..e581af9b96 100644
--- a/3party/freetype/sfnt/sfobjs.c
+++ b/3party/freetype/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2008, 2010-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,6 +26,7 @@
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_SFNT_NAMES_H
#include "sferrors.h"
#ifdef TT_CONFIG_OPTION_BDF
@@ -49,9 +50,9 @@
tt_name_entry_ascii_from_utf16( TT_NameEntry entry,
FT_Memory memory )
{
- FT_String* string;
+ FT_String* string = NULL;
FT_UInt len, code, n;
- FT_Byte* read = (FT_Byte*)entry->string;
+ FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
@@ -80,9 +81,9 @@
tt_name_entry_ascii_from_other( TT_NameEntry entry,
FT_Memory memory )
{
- FT_String* string;
+ FT_String* string = NULL;
FT_UInt len, code, n;
- FT_Byte* read = (FT_Byte*)entry->string;
+ FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
@@ -159,7 +160,7 @@
/* According to the OpenType 1.3 specification, only Microsoft or */
/* Apple platform IDs might be used in the `name' table. The */
/* `Unicode' platform is reserved for the `cmap' table, and the */
- /* `Iso' one is deprecated. */
+ /* `ISO' one is deprecated. */
/* */
/* However, the Apple TrueType specification doesn't say the same */
/* thing and goes to suggest that all Unicode `name' table entries */
@@ -355,7 +356,7 @@
FT_FRAME_START( 8 ),
FT_FRAME_LONG( version ),
- FT_FRAME_LONG( count ),
+ FT_FRAME_LONG( count ), /* this is ULong in the specs */
FT_FRAME_END
};
@@ -389,6 +390,17 @@
if ( FT_STREAM_READ_FIELDS( ttc_header_fields, &face->ttc_header ) )
return error;
+ if ( face->ttc_header.count == 0 )
+ return SFNT_Err_Invalid_Table;
+
+ /* a rough size estimate: let's conservatively assume that there */
+ /* is just a single table info in each subfont header (12 + 16*1 = */
+ /* 28 bytes), thus we have (at least) `12 + 4*count' bytes for the */
+ /* size of the TTC header plus `28*count' bytes for all subfont */
+ /* headers */
+ if ( (FT_ULong)face->ttc_header.count > stream->size / ( 28 + 4 ) )
+ return SFNT_Err_Array_Too_Large;
+
/* now read the offsets of each font in the file */
if ( FT_NEW_ARRAY( face->ttc_header.offsets, face->ttc_header.count ) )
return error;
@@ -527,13 +539,27 @@
#endif
FT_Bool has_outline;
FT_Bool is_apple_sbit;
+ FT_Bool ignore_preferred_family = FALSE;
+ FT_Bool ignore_preferred_subfamily = FALSE;
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
FT_UNUSED( face_index );
- FT_UNUSED( num_params );
- FT_UNUSED( params );
+ /* Check parameters */
+
+ {
+ FT_Int i;
+
+
+ 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;
+ }
+ }
/* Load tables */
@@ -676,9 +702,7 @@
LOAD_( os2 );
if ( error )
{
- if ( error != SFNT_Err_Table_Missing )
- goto Exit;
-
+ /* we treat the table as missing if there are any errors */
face->os2.version = 0xFFFFU;
}
}
@@ -722,26 +746,30 @@
/* Foundation (WPF). This flag has been introduced in version */
/* 1.5 of the OpenType specification (May 2008). */
+ face->root.family_name = NULL;
+ face->root.style_name = NULL;
if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 )
{
- GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
+ if ( !ignore_preferred_family )
+ GET_NAME( PREFERRED_FAMILY, &face->root.family_name );
if ( !face->root.family_name )
GET_NAME( FONT_FAMILY, &face->root.family_name );
- GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
+ if ( !ignore_preferred_subfamily )
+ GET_NAME( PREFERRED_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 )
+ if ( !face->root.family_name && !ignore_preferred_family )
GET_NAME( PREFERRED_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 )
+ if ( !face->root.style_name && !ignore_preferred_subfamily )
GET_NAME( PREFERRED_SUBFAMILY, &face->root.style_name );
if ( !face->root.style_name )
GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
diff --git a/3party/freetype/sfnt/sfobjs.h b/3party/freetype/src/sfnt/sfobjs.h
index 6241c93b39..6241c93b39 100644
--- a/3party/freetype/sfnt/sfobjs.h
+++ b/3party/freetype/src/sfnt/sfobjs.h
diff --git a/3party/freetype/sfnt/ttbdf.c b/3party/freetype/src/sfnt/ttbdf.c
index 206cecee5e..18845c39c2 100644
--- a/3party/freetype/sfnt/ttbdf.c
+++ b/3party/freetype/src/sfnt/ttbdf.c
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded BDF properties (body). */
/* */
-/* Copyright 2005, 2006 by */
+/* Copyright 2005, 2006, 2010 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 @@
length < 8 ||
FT_FRAME_EXTRACT( length, bdf->table ) )
{
- error = FT_Err_Invalid_Table;
+ error = SFNT_Err_Invalid_Table;
goto Exit;
}
@@ -131,7 +131,7 @@
BadTable:
FT_FRAME_RELEASE( bdf->table );
FT_ZERO( bdf );
- error = FT_Err_Invalid_Table;
+ error = SFNT_Err_Invalid_Table;
goto Exit;
}
@@ -143,7 +143,7 @@
{
TT_BDF bdf = &face->bdf;
FT_Size size = FT_FACE(face)->size;
- FT_Error error = 0;
+ FT_Error error = SFNT_Err_Ok;
FT_Byte* p;
FT_UInt count;
FT_Byte* strike;
@@ -163,7 +163,7 @@
p = bdf->table + 8;
strike = p + 4 * count;
- error = FT_Err_Invalid_Argument;
+ error = SFNT_Err_Invalid_Argument;
if ( size == NULL || property_name == NULL )
goto Exit;
@@ -215,7 +215,7 @@
{
aprop->type = BDF_PROPERTY_TYPE_ATOM;
aprop->u.atom = (const char*)bdf->strings + value;
- error = 0;
+ error = SFNT_Err_Ok;
goto Exit;
}
break;
@@ -223,13 +223,13 @@
case 0x02:
aprop->type = BDF_PROPERTY_TYPE_INTEGER;
aprop->u.integer = (FT_Int32)value;
- error = 0;
+ error = SFNT_Err_Ok;
goto Exit;
case 0x03:
aprop->type = BDF_PROPERTY_TYPE_CARDINAL;
aprop->u.cardinal = value;
- error = 0;
+ error = SFNT_Err_Ok;
goto Exit;
default:
diff --git a/3party/freetype/sfnt/ttbdf.h b/3party/freetype/src/sfnt/ttbdf.h
index 48a10d6e9b..48a10d6e9b 100644
--- a/3party/freetype/sfnt/ttbdf.h
+++ b/3party/freetype/src/sfnt/ttbdf.h
diff --git a/3party/freetype/sfnt/ttcmap.c b/3party/freetype/src/sfnt/ttcmap.c
index 26ea83c16c..544750ab17 100644
--- a/3party/freetype/sfnt/ttcmap.c
+++ b/3party/freetype/src/sfnt/ttcmap.c
@@ -4,7 +4,7 @@
/* */
/* TrueType character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -2574,10 +2574,7 @@
}
- FT_CALLBACK_TABLE_DEF
- const TT_CMap_ClassRec tt_cmap13_class_rec =
- {
- {
+ FT_DEFINE_TT_CMAP(tt_cmap13_class_rec,
sizeof ( TT_CMap13Rec ),
(FT_CMap_InitFunc) tt_cmap13_init,
@@ -2586,11 +2583,11 @@
(FT_CMap_CharNextFunc) tt_cmap13_char_next,
NULL, NULL, NULL, NULL, NULL
- },
+ ,
13,
(TT_CMap_ValidateFunc) tt_cmap13_validate,
(TT_CMap_Info_GetFunc) tt_cmap13_get_info
- };
+ )
#endif /* TT_CONFIG_CMAP_FORMAT_13 */
@@ -2692,7 +2689,7 @@
FT_Memory memory )
{
FT_UInt32 old_max = cmap->max_results;
- FT_Error error = 0;
+ FT_Error error = SFNT_Err_Ok;
if ( num_results > cmap->max_results )
@@ -2790,7 +2787,8 @@
}
/* and the non-default table (these glyphs are specified here) */
- if ( nondefOff != 0 ) {
+ if ( nondefOff != 0 )
+ {
FT_Byte* ndp = table + nondefOff;
FT_ULong numMappings = TT_NEXT_ULONG( ndp );
FT_ULong i, lastUni = 0;
@@ -3378,7 +3376,7 @@
clazz[i] = NULL;
*output_class = clazz;
- return FT_Err_Ok;
+ return SFNT_Err_Ok;
}
#endif /*FT_CONFIG_OPTION_PIC*/
@@ -3394,11 +3392,12 @@
FT_Byte* limit = table + face->cmap_size;
FT_UInt volatile num_cmaps;
FT_Byte* volatile p = table;
- FT_Library library = FT_FACE_LIBRARY(face);
- FT_UNUSED(library);
+ FT_Library library = FT_FACE_LIBRARY( face );
+
+ FT_UNUSED( library );
- if ( p + 4 > limit )
+ if ( !p || p + 4 > limit )
return SFNT_Err_Invalid_Table;
/* only recognize format 0 */
@@ -3412,6 +3411,12 @@
}
num_cmaps = TT_NEXT_USHORT( p );
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( num_cmaps > FT_MAX_CHARMAP_CACHEABLE )
+ FT_ERROR(( "tt_face_build_cmaps: too many cmap subtables(%d) "
+ "subtable#%d and later are loaded but cannot be searched\n",
+ num_cmaps, FT_MAX_CHARMAP_CACHEABLE + 1 ));
+#endif
for ( ; num_cmaps > 0 && p + 8 <= limit; num_cmaps-- )
{
diff --git a/3party/freetype/sfnt/ttcmap.h b/3party/freetype/src/sfnt/ttcmap.h
index 15a4a21e50..15a4a21e50 100644
--- a/3party/freetype/sfnt/ttcmap.h
+++ b/3party/freetype/src/sfnt/ttcmap.h
diff --git a/3party/freetype/sfnt/ttcmapc.h b/3party/freetype/src/sfnt/ttcmapc.h
index 4c9c6a56f7..4c9c6a56f7 100644
--- a/3party/freetype/sfnt/ttcmapc.h
+++ b/3party/freetype/src/sfnt/ttcmapc.h
diff --git a/3party/freetype/sfnt/ttkern.c b/3party/freetype/src/sfnt/ttkern.c
index c1540802b8..46888988e4 100644
--- a/3party/freetype/sfnt/ttkern.c
+++ b/3party/freetype/src/sfnt/ttkern.c
@@ -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-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -115,7 +115,7 @@
num_pairs = FT_NEXT_USHORT( p );
p += 6;
- if ( ( p_next - p ) / 6 < (int)num_pairs ) /* handle broken count */
+ if ( ( p_next - p ) < 6 * (int)num_pairs ) /* handle broken count */
num_pairs = (FT_UInt)( ( p_next - p ) / 6 );
avail |= mask;
@@ -220,7 +220,7 @@
num_pairs = FT_NEXT_USHORT( p );
p += 6;
- if ( ( next - p ) / 6 < (int)num_pairs ) /* handle broken count */
+ if ( ( next - p ) < 6 * (int)num_pairs ) /* handle broken count */
num_pairs = (FT_UInt)( ( next - p ) / 6 );
switch ( coverage >> 8 )
diff --git a/3party/freetype/sfnt/ttkern.h b/3party/freetype/src/sfnt/ttkern.h
index df1da9b273..df1da9b273 100644
--- a/3party/freetype/sfnt/ttkern.h
+++ b/3party/freetype/src/sfnt/ttkern.h
diff --git a/3party/freetype/sfnt/ttload.c b/3party/freetype/src/sfnt/ttload.c
index f08f640398..5fb9aea4e5 100644
--- a/3party/freetype/sfnt/ttload.c
+++ b/3party/freetype/src/sfnt/ttload.c
@@ -5,7 +5,8 @@
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -77,7 +78,8 @@
{
/* For compatibility with Windows, we consider */
/* zero-length tables the same as missing tables. */
- if ( entry->Tag == tag ) {
+ if ( entry->Tag == tag )
+ {
if ( entry->Length != 0 )
{
FT_TRACE4(( "found table.\n" ));
@@ -168,10 +170,10 @@
check_table_dir( SFNT_Header sfnt,
FT_Stream stream )
{
- FT_Error error;
- FT_UInt nn, valid_entries = 0;
- FT_UInt has_head = 0, has_sing = 0, has_meta = 0;
- FT_ULong offset = sfnt->offset + 12;
+ FT_Error error;
+ FT_UShort nn, valid_entries = 0;
+ FT_UInt has_head = 0, has_sing = 0, has_meta = 0;
+ FT_ULong offset = sfnt->offset + 12;
static const FT_Frame_Field table_dir_entry_fields[] =
{
@@ -382,6 +384,10 @@
entry = face->dir_tables;
+ FT_TRACE2(( "\n"
+ " tag offset length checksum\n"
+ " ----------------------------------\n" ));
+
for ( nn = 0; nn < sfnt.num_tables; nn++ )
{
entry->Tag = FT_GET_TAG4();
@@ -394,13 +400,14 @@
continue;
else
{
- FT_TRACE2(( " %c%c%c%c - %08lx - %08lx\n",
+ FT_TRACE2(( " %c%c%c%c %08lx %08lx %08lx\n",
(FT_Char)( entry->Tag >> 24 ),
(FT_Char)( entry->Tag >> 16 ),
(FT_Char)( entry->Tag >> 8 ),
(FT_Char)( entry->Tag ),
entry->Offset,
- entry->Length ));
+ entry->Length,
+ entry->CheckSum ));
entry++;
}
}
@@ -678,9 +685,9 @@
/* broken fonts like `Keystrokes MT' :-( */
/* */
/* We allocate 64 function entries by default when */
- /* the maxFunctionDefs field is null. */
+ /* the maxFunctionDefs value is smaller. */
- if ( maxProfile->maxFunctionDefs == 0 )
+ if ( maxProfile->maxFunctionDefs < 64 )
maxProfile->maxFunctionDefs = 64;
/* we add 4 phantom points later */
@@ -693,6 +700,15 @@
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 ));
@@ -1197,7 +1213,7 @@
FT_Memory memory = stream->memory;
FT_UInt j,num_ranges;
- TT_GaspRange gaspranges;
+ TT_GaspRange gaspranges = NULL;
/* the gasp table is optional */
diff --git a/3party/freetype/sfnt/ttload.h b/3party/freetype/src/sfnt/ttload.h
index 49a1aee163..49a1aee163 100644
--- a/3party/freetype/sfnt/ttload.h
+++ b/3party/freetype/src/sfnt/ttload.h
diff --git a/3party/freetype/sfnt/ttmtx.c b/3party/freetype/src/sfnt/ttmtx.c
index 53e6ac7881..73ac8b2d55 100644
--- a/3party/freetype/sfnt/ttmtx.c
+++ b/3party/freetype/src/sfnt/ttmtx.c
@@ -4,7 +4,7 @@
/* */
/* Load the metrics tables common to TTF and OTF fonts (body). */
/* */
-/* Copyright 2006, 2007, 2008, 2009 by */
+/* Copyright 2006-2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -163,7 +163,7 @@
{
FT_TRACE0(( "tt_face_load_hmtx:"
" %cmtx has more metrics than glyphs.\n",
- vertical ? "v" : "h" ));
+ vertical ? 'v' : 'h' ));
/* Adobe simply ignores this problem. So we shall do the same. */
#if 0
diff --git a/3party/freetype/sfnt/ttmtx.h b/3party/freetype/src/sfnt/ttmtx.h
index 8b91a113d8..8b91a113d8 100644
--- a/3party/freetype/sfnt/ttmtx.h
+++ b/3party/freetype/src/sfnt/ttmtx.h
diff --git a/3party/freetype/sfnt/ttpost.c b/3party/freetype/src/sfnt/ttpost.c
index aa0bf1ec41..6f4bb1d0d3 100644
--- a/3party/freetype/sfnt/ttpost.c
+++ b/3party/freetype/src/sfnt/ttpost.c
@@ -5,7 +5,7 @@
/* Postcript name table processing for TrueType and OpenType fonts */
/* (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,6 +26,7 @@
#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include "ttpost.h"
@@ -153,7 +154,8 @@
static FT_Error
load_format_20( TT_Face face,
- FT_Stream stream )
+ FT_Stream stream,
+ FT_Long post_limit )
{
FT_Memory memory = stream->memory;
FT_Error error;
@@ -230,13 +232,46 @@
FT_UInt len;
- if ( FT_READ_BYTE ( len ) ||
- FT_NEW_ARRAY( name_strings[n], len + 1 ) ||
- FT_STREAM_READ ( name_strings[n], len ) )
+ if ( FT_STREAM_POS() >= post_limit )
+ break;
+ else
+ {
+ FT_TRACE6(( "load_format_20: %d byte left in post table\n",
+ post_limit - FT_STREAM_POS() ));
+
+ if ( FT_READ_BYTE( len ) )
+ goto Fail1;
+ }
+
+ if ( (FT_Int)len > post_limit ||
+ FT_STREAM_POS() > post_limit - (FT_Int)len )
+ {
+ FT_ERROR(( "load_format_20:"
+ " exceeding string length (%d),"
+ " truncating at end of post table (%d byte left)\n",
+ len, post_limit - FT_STREAM_POS() ));
+ len = FT_MAX( 0, post_limit - FT_STREAM_POS() );
+ }
+
+ if ( FT_NEW_ARRAY( name_strings[n], len + 1 ) ||
+ FT_STREAM_READ( name_strings[n], len ) )
goto Fail1;
name_strings[n][len] = '\0';
}
+
+ if ( n < num_names )
+ {
+ FT_ERROR(( "load_format_20:"
+ " all entries in post table are already parsed,"
+ " using NULL names for gid %d - %d\n",
+ n, num_names - 1 ));
+ for ( ; n < num_names; n++ )
+ if ( FT_NEW_ARRAY( name_strings[n], 1 ) )
+ goto Fail1;
+ else
+ name_strings[n][0] = '\0';
+ }
}
/* all right, set table fields and exit successfully */
@@ -271,7 +306,8 @@
static FT_Error
load_format_25( TT_Face face,
- FT_Stream stream )
+ FT_Stream stream,
+ FT_Long post_limit )
{
FT_Memory memory = stream->memory;
FT_Error error;
@@ -279,6 +315,8 @@
FT_Int num_glyphs;
FT_Char* offset_table = 0;
+ FT_UNUSED( post_limit );
+
/* UNDOCUMENTED! This value appears only in the Apple TT specs. */
if ( FT_READ_USHORT( num_glyphs ) )
@@ -338,16 +376,20 @@
FT_Stream stream;
FT_Error error;
FT_Fixed format;
+ FT_ULong post_len;
+ FT_Long post_limit;
/* get a stream for the face's resource */
stream = face->root.stream;
/* seek to the beginning of the PS names table */
- error = face->goto_table( face, TTAG_post, stream, 0 );
+ error = face->goto_table( face, TTAG_post, stream, &post_len );
if ( error )
goto Exit;
+ post_limit = FT_STREAM_POS() + post_len;
+
format = face->postscript.FormatType;
/* go to beginning of subtable */
@@ -356,9 +398,9 @@
/* now read postscript table */
if ( format == 0x00020000L )
- error = load_format_20( face, stream );
+ error = load_format_20( face, stream, post_limit );
else if ( format == 0x00028000L )
- error = load_format_25( face, stream );
+ error = load_format_25( face, stream, post_limit );
else
error = SFNT_Err_Invalid_File_Format;
diff --git a/3party/freetype/sfnt/ttpost.h b/3party/freetype/src/sfnt/ttpost.h
index 6f06d75a71..6f06d75a71 100644
--- a/3party/freetype/sfnt/ttpost.h
+++ b/3party/freetype/src/sfnt/ttpost.h
diff --git a/3party/freetype/sfnt/ttsbit.c b/3party/freetype/src/sfnt/ttsbit.c
index 833bb2add2..283ba7ef72 100644
--- a/3party/freetype/sfnt/ttsbit.c
+++ b/3party/freetype/src/sfnt/ttsbit.c
@@ -4,7 +4,8 @@
/* */
/* TrueType and OpenType embedded bitmap support (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -417,7 +418,7 @@
tt_face_load_eblc( TT_Face face,
FT_Stream stream )
{
- FT_Error error = 0;
+ FT_Error error = SFNT_Err_Ok;
FT_Memory memory = stream->memory;
FT_Fixed version;
FT_ULong num_strikes;
@@ -1342,7 +1343,7 @@
/* All right, we have a compound format. First of all, read */
/* the array of elements. */
{
- TT_SBit_Component components;
+ TT_SBit_Component components = NULL;
TT_SBit_Component comp;
FT_UShort num_components, count;
diff --git a/3party/freetype/sfnt/ttsbit.h b/3party/freetype/src/sfnt/ttsbit.h
index 7ea2af1843..7ea2af1843 100644
--- a/3party/freetype/sfnt/ttsbit.h
+++ b/3party/freetype/src/sfnt/ttsbit.h
diff --git a/3party/freetype/sfnt/ttsbit0.c b/3party/freetype/src/sfnt/ttsbit0.c
index 38bcf210ea..38bcf210ea 100644
--- a/3party/freetype/sfnt/ttsbit0.c
+++ b/3party/freetype/src/sfnt/ttsbit0.c
diff --git a/3party/freetype/smooth/Jamfile b/3party/freetype/src/smooth/Jamfile
index a8496aa2c2..a8496aa2c2 100644
--- a/3party/freetype/smooth/Jamfile
+++ b/3party/freetype/src/smooth/Jamfile
diff --git a/3party/freetype/smooth/ftgrays.c b/3party/freetype/src/smooth/ftgrays.c
index 846e454e66..40de269108 100644
--- a/3party/freetype/smooth/ftgrays.c
+++ b/3party/freetype/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
/* */
/* A new `perfect' anti-aliasing renderer (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2000-2003, 2005-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -103,10 +103,12 @@
#include <stdarg.h>
#endif
+#include <stddef.h>
#include <string.h>
#include <setjmp.h>
#include <limits.h>
#define FT_UINT_MAX UINT_MAX
+#define FT_INT_MAX INT_MAX
#define ft_memset memset
@@ -114,6 +116,8 @@
#define ft_longjmp longjmp
#define ft_jmp_buf jmp_buf
+typedef ptrdiff_t FT_PtrDist;
+
#define ErrRaster_Invalid_Mode -2
#define ErrRaster_Invalid_Outline -1
@@ -183,7 +187,7 @@
shift_, \
delta_ \
};
-
+
#define FT_DEFINE_RASTER_FUNCS( class_, glyph_format_, \
raster_new_, raster_reset_, \
raster_set_mode_, raster_render_, \
@@ -350,8 +354,6 @@
int band_size;
int band_shoot;
- int conic_level;
- int cubic_level;
ft_jmp_buf jump_buffer;
@@ -875,55 +877,31 @@
FT_Vector* arc;
- dx = DOWNSCALE( ras.x ) + to->x - ( control->x << 1 );
- if ( dx < 0 )
- dx = -dx;
- dy = DOWNSCALE( ras.y ) + to->y - ( control->y << 1 );
- if ( dy < 0 )
- dy = -dy;
+ arc = ras.bez_stack;
+ arc[0].x = UPSCALE( to->x );
+ arc[0].y = UPSCALE( to->y );
+ arc[1].x = UPSCALE( control->x );
+ arc[1].y = UPSCALE( control->y );
+ arc[2].x = ras.x;
+ arc[2].y = ras.y;
+
+ dx = FT_ABS( arc[2].x + arc[0].x - 2 * arc[1].x );
+ dy = FT_ABS( arc[2].y + arc[0].y - 2 * arc[1].y );
if ( dx < dy )
dx = dy;
- level = 1;
- dx = dx / ras.conic_level;
- while ( dx > 0 )
+ level = 0;
+ while ( dx > ONE_PIXEL / 6 )
{
dx >>= 2;
level++;
}
- /* a shortcut to speed things up */
- if ( level <= 1 )
- {
- /* we compute the mid-point directly in order to avoid */
- /* calling gray_split_conic() */
- TPos to_x, to_y, mid_x, mid_y;
-
-
- to_x = UPSCALE( to->x );
- to_y = UPSCALE( to->y );
- mid_x = ( ras.x + to_x + 2 * UPSCALE( control->x ) ) / 4;
- mid_y = ( ras.y + to_y + 2 * UPSCALE( control->y ) ) / 4;
-
- gray_render_line( RAS_VAR_ mid_x, mid_y );
- gray_render_line( RAS_VAR_ to_x, to_y );
-
- return;
- }
-
- arc = ras.bez_stack;
levels = ras.lev_stack;
- top = 0;
levels[0] = level;
+ top = 0;
- arc[0].x = UPSCALE( to->x );
- arc[0].y = UPSCALE( to->y );
- arc[1].x = UPSCALE( control->x );
- arc[1].y = UPSCALE( control->y );
- arc[2].x = ras.x;
- arc[2].y = ras.y;
-
- while ( top >= 0 )
+ do
{
level = levels[top];
if ( level > 1 )
@@ -953,24 +931,11 @@
}
Draw:
- {
- TPos to_x, to_y, mid_x, mid_y;
-
+ gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
+ top--;
+ arc -= 2;
- to_x = arc[0].x;
- to_y = arc[0].y;
- mid_x = ( ras.x + to_x + 2 * arc[1].x ) / 4;
- mid_y = ( ras.y + to_y + 2 * arc[1].y ) / 4;
-
- gray_render_line( RAS_VAR_ mid_x, mid_y );
- gray_render_line( RAS_VAR_ to_x, to_y );
-
- top--;
- arc -= 2;
- }
- }
-
- return;
+ } while ( top >= 0 );
}
@@ -1007,59 +972,9 @@
const FT_Vector* control2,
const FT_Vector* to )
{
- TPos dx, dy, da, db;
- int top, level;
- int* levels;
FT_Vector* arc;
- dx = DOWNSCALE( ras.x ) + to->x - ( control1->x << 1 );
- if ( dx < 0 )
- dx = -dx;
- dy = DOWNSCALE( ras.y ) + to->y - ( control1->y << 1 );
- if ( dy < 0 )
- dy = -dy;
- if ( dx < dy )
- dx = dy;
- da = dx;
-
- dx = DOWNSCALE( ras.x ) + to->x - 3 * ( control1->x + control2->x );
- if ( dx < 0 )
- dx = -dx;
- dy = DOWNSCALE( ras.y ) + to->y - 3 * ( control1->x + control2->y );
- if ( dy < 0 )
- dy = -dy;
- if ( dx < dy )
- dx = dy;
- db = dx;
-
- level = 1;
- da = da / ras.cubic_level;
- db = db / ras.conic_level;
- while ( da > 0 || db > 0 )
- {
- da >>= 2;
- db >>= 3;
- level++;
- }
-
- if ( level <= 1 )
- {
- TPos to_x, to_y, mid_x, mid_y;
-
-
- to_x = UPSCALE( to->x );
- to_y = UPSCALE( to->y );
- mid_x = ( ras.x + to_x +
- 3 * UPSCALE( control1->x + control2->x ) ) / 8;
- mid_y = ( ras.y + to_y +
- 3 * UPSCALE( control1->y + control2->y ) ) / 8;
-
- gray_render_line( RAS_VAR_ mid_x, mid_y );
- gray_render_line( RAS_VAR_ to_x, to_y );
- return;
- }
-
arc = ras.bez_stack;
arc[0].x = UPSCALE( to->x );
arc[0].y = UPSCALE( to->y );
@@ -1070,58 +985,127 @@
arc[3].x = ras.x;
arc[3].y = ras.y;
- levels = ras.lev_stack;
- top = 0;
- levels[0] = level;
-
- while ( top >= 0 )
+ for (;;)
{
- level = levels[top];
- if ( level > 1 )
- {
- /* check that the arc crosses the current band */
- TPos min, max, y;
+ /* Check that the arc crosses the current band. */
+ TPos min, max, y;
- min = max = arc[0].y;
- y = arc[1].y;
- if ( y < min ) min = y;
- if ( y > max ) max = y;
- y = arc[2].y;
- if ( y < min ) min = y;
- if ( y > max ) max = y;
- y = arc[3].y;
- if ( y < min ) min = y;
- if ( y > max ) max = y;
- if ( TRUNC( min ) >= ras.max_ey || TRUNC( max ) < 0 )
- goto Draw;
- gray_split_cubic( arc );
- arc += 3;
- top ++;
- levels[top] = levels[top - 1] = level - 1;
- continue;
- }
+ min = max = arc[0].y;
- Draw:
- {
- TPos to_x, to_y, mid_x, mid_y;
+ y = arc[1].y;
+ if ( y < min )
+ min = y;
+ if ( y > max )
+ max = y;
+
+ y = arc[2].y;
+ if ( y < min )
+ min = y;
+ if ( y > max )
+ max = y;
+
+ y = arc[3].y;
+ if ( y < min )
+ min = y;
+ if ( y > max )
+ max = y;
+ if ( TRUNC( min ) >= ras.max_ey || TRUNC( max ) < ras.min_ey )
+ goto Draw;
- to_x = arc[0].x;
- to_y = arc[0].y;
- mid_x = ( ras.x + to_x + 3 * ( arc[1].x + arc[2].x ) ) / 8;
- mid_y = ( ras.y + to_y + 3 * ( arc[1].y + arc[2].y ) ) / 8;
+ /* Decide whether to split or draw. See `Rapid Termination */
+ /* Evaluation for Recursive Subdivision of Bezier Curves' by Thomas */
+ /* F. Hain, at */
+ /* http://www.cis.southalabama.edu/~hain/general/Publications/Bezier/Camera-ready%20CISST02%202.pdf */
- gray_render_line( RAS_VAR_ mid_x, mid_y );
- gray_render_line( RAS_VAR_ to_x, to_y );
- top --;
- arc -= 3;
+ {
+ TPos dx, dy, dx_, dy_;
+ TPos dx1, dy1, dx2, dy2;
+ TPos L, s, s_limit;
+
+
+ /* dx and dy are x and y components of the P0-P3 chord vector. */
+ dx = arc[3].x - arc[0].x;
+ dy = arc[3].y - arc[0].y;
+
+ /* L is an (under)estimate of the Euclidean distance P0-P3. */
+ /* */
+ /* If dx >= dy, then r = sqrt(dx^2 + dy^2) can be overestimated */
+ /* with least maximum error by */
+ /* */
+ /* r_upperbound = dx + (sqrt(2) - 1) * dy , */
+ /* */
+ /* where sqrt(2) - 1 can be (over)estimated by 107/256, giving an */
+ /* error of no more than 8.4%. */
+ /* */
+ /* Similarly, some elementary calculus shows that r can be */
+ /* underestimated with least maximum error by */
+ /* */
+ /* r_lowerbound = sqrt(2 + sqrt(2)) / 2 * dx */
+ /* + sqrt(2 - sqrt(2)) / 2 * dy . */
+ /* */
+ /* 236/256 and 97/256 are (under)estimates of the two algebraic */
+ /* numbers, giving an error of no more than 8.1%. */
+
+ dx_ = FT_ABS( dx );
+ dy_ = FT_ABS( dy );
+
+ /* This is the same as */
+ /* */
+ /* L = ( 236 * FT_MAX( dx_, dy_ ) */
+ /* + 97 * FT_MIN( dx_, dy_ ) ) >> 8; */
+ L = ( dx_ > dy_ ? 236 * dx_ + 97 * dy_
+ : 97 * dx_ + 236 * dy_ ) >> 8;
+
+ /* Avoid possible arithmetic overflow below by splitting. */
+ if ( L > 32767 )
+ goto Split;
+
+ /* Max deviation may be as much as (s/L) * 3/4 (if Hain's v = 1). */
+ s_limit = L * (TPos)( ONE_PIXEL / 6 );
+
+ /* s is L * the perpendicular distance from P1 to the line P0-P3. */
+ dx1 = arc[1].x - arc[0].x;
+ dy1 = arc[1].y - arc[0].y;
+ s = FT_ABS( dy * dx1 - dx * dy1 );
+
+ if ( s > s_limit )
+ goto Split;
+
+ /* s is L * the perpendicular distance from P2 to the line P0-P3. */
+ dx2 = arc[2].x - arc[0].x;
+ dy2 = arc[2].y - arc[0].y;
+ s = FT_ABS( dy * dx2 - dx * dy2 );
+
+ if ( s > s_limit )
+ goto Split;
+
+ /* If P1 or P2 is outside P0-P3, split the curve. */
+ if ( dy * dy1 + dx * dx1 < 0 ||
+ dy * dy2 + dx * dx2 < 0 ||
+ dy * (arc[3].y - arc[1].y) + dx * (arc[3].x - arc[1].x) < 0 ||
+ dy * (arc[3].y - arc[2].y) + dx * (arc[3].x - arc[2].x) < 0 )
+ goto Split;
+
+ /* No reason to split. */
+ goto Draw;
}
- }
- return;
- }
+ Split:
+ gray_split_cubic( arc );
+ arc += 3;
+ continue;
+
+ Draw:
+ gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
+
+ if ( arc == ras.bez_stack )
+ return;
+ arc -= 3;
+ }
+ }
static int
@@ -1189,7 +1173,7 @@
/* first of all, compute the scanline offset */
p = (unsigned char*)map->buffer - y * map->pitch;
if ( map->pitch >= 0 )
- p += ( map->rows - 1 ) * map->pitch;
+ p += (unsigned)( ( map->rows - 1 ) * map->pitch );
for ( ; count > 0; count--, spans++ )
{
@@ -1759,25 +1743,6 @@
ras.count_ex = ras.max_ex - ras.min_ex;
ras.count_ey = ras.max_ey - ras.min_ey;
- /* simple heuristic used to speed up the bezier decomposition -- see */
- /* the code in gray_render_conic() and gray_render_cubic() for more */
- /* details */
- ras.conic_level = 32;
- ras.cubic_level = 16;
-
- {
- int level = 0;
-
-
- if ( ras.count_ex > 24 || ras.count_ey > 24 )
- level++;
- if ( ras.count_ex > 120 || ras.count_ey > 120 )
- level++;
-
- ras.conic_level <<= level;
- ras.cubic_level <<= level;
- }
-
/* set up vertical bands */
num_bands = (int)( ( ras.max_ey - ras.min_ey ) / ras.band_size );
if ( num_bands == 0 )
@@ -2003,14 +1968,14 @@
FT_UNUSED( raster );
}
-#else /* _STANDALONE_ */
+#else /* !_STANDALONE_ */
static int
gray_raster_new( FT_Memory memory,
FT_Raster* araster )
{
FT_Error error;
- PRaster raster;
+ PRaster raster = NULL;
*araster = 0;
@@ -2033,7 +1998,7 @@
FT_FREE( raster );
}
-#endif /* _STANDALONE_ */
+#endif /* !_STANDALONE_ */
static void
diff --git a/3party/freetype/smooth/ftgrays.h b/3party/freetype/src/smooth/ftgrays.h
index f20f55f14b..f20f55f14b 100644
--- a/3party/freetype/smooth/ftgrays.h
+++ b/3party/freetype/src/smooth/ftgrays.h
diff --git a/3party/freetype/smooth/ftsmerrs.h b/3party/freetype/src/smooth/ftsmerrs.h
index 0c2a2ecd90..0c2a2ecd90 100644
--- a/3party/freetype/smooth/ftsmerrs.h
+++ b/3party/freetype/src/smooth/ftsmerrs.h
diff --git a/3party/freetype/smooth/ftsmooth.c b/3party/freetype/src/smooth/ftsmooth.c
index eed6353157..1350a56618 100644
--- a/3party/freetype/smooth/ftsmooth.c
+++ b/3party/freetype/src/smooth/ftsmooth.c
@@ -4,7 +4,7 @@
/* */
/* Anti-aliasing renderer interface (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009 by */
+/* Copyright 2000-2006, 2009-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -105,7 +105,10 @@
FT_Error error;
FT_Outline* outline = NULL;
FT_BBox cbox;
- FT_UInt width, height, height_org, width_org, pitch;
+ FT_UInt width, height, pitch;
+#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ FT_UInt height_org, width_org;
+#endif
FT_Bitmap* bitmap;
FT_Memory memory;
FT_Int hmul = mode == FT_RENDER_MODE_LCD;
@@ -140,13 +143,33 @@
cbox.xMax = FT_PIX_CEIL( cbox.xMax );
cbox.yMax = FT_PIX_CEIL( cbox.yMax );
- width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
- height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
+ if ( cbox.xMin < 0 && cbox.xMax > FT_INT_MAX + cbox.xMin )
+ {
+ FT_ERROR(( "ft_smooth_render_generic: glyph too large:"
+ " xMin = %d, xMax = %d\n",
+ cbox.xMin >> 6, cbox.xMax >> 6 ));
+ return Smooth_Err_Raster_Overflow;
+ }
+ else
+ width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
+
+ if ( cbox.yMin < 0 && cbox.yMax > FT_INT_MAX + cbox.yMin )
+ {
+ FT_ERROR(( "ft_smooth_render_generic: glyph too large:"
+ " yMin = %d, yMax = %d\n",
+ cbox.yMin >> 6, cbox.yMax >> 6 ));
+ return Smooth_Err_Raster_Overflow;
+ }
+ else
+ height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
+
bitmap = &slot->bitmap;
memory = render->root.memory;
+#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
width_org = width;
height_org = height;
+#endif
/* release old bitmap buffer */
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
@@ -200,9 +223,9 @@
/* Required check is ( pitch * height < FT_ULONG_MAX ), */
/* but we care realistic cases only. Always pitch <= width. */
- if ( width > 0xFFFFU || height > 0xFFFFU )
+ if ( width > 0x7FFFU || height > 0x7FFFU )
{
- FT_ERROR(( "ft_smooth_render_generic: glyph too large: %d x %d\n",
+ FT_ERROR(( "ft_smooth_render_generic: glyph too large: %u x %u\n",
width, height ));
return Smooth_Err_Raster_Overflow;
}
diff --git a/3party/freetype/smooth/ftsmooth.h b/3party/freetype/src/smooth/ftsmooth.h
index 3708790df1..3708790df1 100644
--- a/3party/freetype/smooth/ftsmooth.h
+++ b/3party/freetype/src/smooth/ftsmooth.h
diff --git a/3party/freetype/smooth/ftspic.c b/3party/freetype/src/smooth/ftspic.c
index aa547fceb6..7adaab17d2 100644
--- a/3party/freetype/smooth/ftspic.c
+++ b/3party/freetype/src/smooth/ftspic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for smooth module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -43,12 +43,13 @@
FT_Error
- ft_smooth_renderer_class_pic_init( FT_Library library )
+ ft_smooth_renderer_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- SmoothPIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = Smooth_Err_Ok;
+ SmoothPIC* container;
+ FT_Memory memory = library->memory;
+
/* since this function also serve smooth_lcd and smooth_lcdv renderers,
it implements reference counting */
diff --git a/3party/freetype/smooth/ftspic.h b/3party/freetype/src/smooth/ftspic.h
index c7e0ce9d89..c7e0ce9d89 100644
--- a/3party/freetype/smooth/ftspic.h
+++ b/3party/freetype/src/smooth/ftspic.h
diff --git a/3party/freetype/src/smooth/module.mk b/3party/freetype/src/smooth/module.mk
new file mode 100644
index 0000000000..47f6c04076
--- /dev/null
+++ b/3party/freetype/src/smooth/module.mk
@@ -0,0 +1,27 @@
+#
+# FreeType 2 smooth renderer module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += SMOOTH_RENDERER
+
+define SMOOTH_RENDERER
+$(OPEN_DRIVER) FT_Renderer_Class, ft_smooth_renderer_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer$(ECHO_DRIVER_DONE)
+$(OPEN_DRIVER) FT_Renderer_Class, ft_smooth_lcd_renderer_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer for LCDs$(ECHO_DRIVER_DONE)
+$(OPEN_DRIVER) FT_Renderer_Class, ft_smooth_lcdv_renderer_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)smooth $(ECHO_DRIVER_DESC)anti-aliased bitmap renderer for vertical LCDs$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/smooth/rules.mk b/3party/freetype/src/smooth/rules.mk
new file mode 100644
index 0000000000..88d0aa53ac
--- /dev/null
+++ b/3party/freetype/src/smooth/rules.mk
@@ -0,0 +1,70 @@
+#
+# FreeType 2 smooth renderer module build rules
+#
+
+
+# Copyright 1996-2000, 2001, 2003, 2011 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.
+
+
+# smooth driver directory
+#
+SMOOTH_DIR := $(SRC_DIR)/smooth
+
+# compilation flags for the driver
+#
+SMOOTH_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SMOOTH_DIR))
+
+
+# smooth driver sources (i.e., C files)
+#
+SMOOTH_DRV_SRC := $(SMOOTH_DIR)/ftgrays.c \
+ $(SMOOTH_DIR)/ftsmooth.c \
+ $(SMOOTH_DIR)/ftspic.c
+
+
+# smooth driver headers
+#
+SMOOTH_DRV_H := $(SMOOTH_DRV_SRC:%c=%h) \
+ $(SMOOTH_DIR)/ftsmerrs.h
+
+
+# smooth driver object(s)
+#
+# SMOOTH_DRV_OBJ_M is used during `multi' builds.
+# SMOOTH_DRV_OBJ_S is used during `single' builds.
+#
+SMOOTH_DRV_OBJ_M := $(SMOOTH_DRV_SRC:$(SMOOTH_DIR)/%.c=$(OBJ_DIR)/%.$O)
+SMOOTH_DRV_OBJ_S := $(OBJ_DIR)/smooth.$O
+
+# smooth driver source file for single build
+#
+SMOOTH_DRV_SRC_S := $(SMOOTH_DIR)/smooth.c
+
+
+# smooth driver - single object
+#
+$(SMOOTH_DRV_OBJ_S): $(SMOOTH_DRV_SRC_S) $(SMOOTH_DRV_SRC) \
+ $(FREETYPE_H) $(SMOOTH_DRV_H)
+ $(SMOOTH_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(SMOOTH_DRV_SRC_S))
+
+
+# smooth driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(SMOOTH_DIR)/%.c $(FREETYPE_H) $(SMOOTH_DRV_H)
+ $(SMOOTH_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(SMOOTH_DRV_OBJ_S)
+DRV_OBJS_M += $(SMOOTH_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/smooth/smooth.c b/3party/freetype/src/smooth/smooth.c
index a8ac51f9f8..a8ac51f9f8 100644
--- a/3party/freetype/smooth/smooth.c
+++ b/3party/freetype/src/smooth/smooth.c
diff --git a/3party/freetype/tools/Jamfile b/3party/freetype/src/tools/Jamfile
index 475161e07f..475161e07f 100644
--- a/3party/freetype/tools/Jamfile
+++ b/3party/freetype/src/tools/Jamfile
diff --git a/3party/freetype/tools/apinames.c b/3party/freetype/src/tools/apinames.c
index 19aec500bf..99e3028c93 100644
--- a/3party/freetype/tools/apinames.c
+++ b/3party/freetype/src/tools/apinames.c
@@ -10,7 +10,7 @@
* accepted if you are using GCC for compilation (and probably by
* other compilers too).
*
- * Author: David Turner, 2005, 2006, 2008
+ * Author: David Turner, 2005, 2006, 2008, 2009, 2010
*
* This code is explicitly placed into the public domain.
*
@@ -126,6 +126,7 @@ names_dump( FILE* out,
{
int nn;
+
switch ( format )
{
case OUTPUT_WINDOWS_DEF:
@@ -151,22 +152,25 @@ names_dump( FILE* out,
case OUTPUT_WATCOM_LBC:
{
/* we must omit the .dll suffix from the library name */
- char temp[512];
- char* dot;
+ char temp[512];
+ const char* dot;
+
if ( dll_name == NULL )
{
fprintf( stderr,
- "you must provide a DLL name with the -d option !!\n" );
- exit(4);
+ "you must provide a DLL name with the -d option!\n" );
+ exit( 4 );
}
dot = strchr( dll_name, '.' );
if ( dot != NULL )
{
- int len = (dot - dll_name);
- if ( len > (int)(sizeof(temp)-1) )
- len = sizeof(temp)-1;
+ int len = dot - dll_name;
+
+
+ if ( len > (int)( sizeof( temp ) - 1 ) )
+ len = sizeof ( temp ) - 1;
memcpy( temp, dll_name, len );
temp[len] = 0;
@@ -265,7 +269,7 @@ read_header_file( FILE* file, int verbose )
if ( p > name )
{
if ( verbose )
- fprintf( stderr, ">>> %.*s\n", p-name, name );
+ fprintf( stderr, ">>> %.*s\n", (int)(p - name), name );
names_add( name, p );
}
diff --git a/3party/freetype/tools/chktrcmp.py b/3party/freetype/src/tools/chktrcmp.py
index d0f342e6bd..d0f342e6bd 100755
--- a/3party/freetype/tools/chktrcmp.py
+++ b/3party/freetype/src/tools/chktrcmp.py
diff --git a/3party/freetype/tools/cordic.py b/3party/freetype/src/tools/cordic.py
index 3f80c5f09a..3f80c5f09a 100644
--- a/3party/freetype/tools/cordic.py
+++ b/3party/freetype/src/tools/cordic.py
diff --git a/3party/freetype/src/tools/docmaker/.gitignore b/3party/freetype/src/tools/docmaker/.gitignore
new file mode 100644
index 0000000000..0d20b6487c
--- /dev/null
+++ b/3party/freetype/src/tools/docmaker/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/3party/freetype/tools/docmaker/content.py b/3party/freetype/src/tools/docmaker/content.py
index b398955b81..b398955b81 100644
--- a/3party/freetype/tools/docmaker/content.py
+++ b/3party/freetype/src/tools/docmaker/content.py
diff --git a/3party/freetype/tools/docmaker/docbeauty.py b/3party/freetype/src/tools/docmaker/docbeauty.py
index 3ddf4a94a1..3ddf4a94a1 100644
--- a/3party/freetype/tools/docmaker/docbeauty.py
+++ b/3party/freetype/src/tools/docmaker/docbeauty.py
diff --git a/3party/freetype/tools/docmaker/docmaker.py b/3party/freetype/src/tools/docmaker/docmaker.py
index 1d9de9fbff..1d9de9fbff 100644
--- a/3party/freetype/tools/docmaker/docmaker.py
+++ b/3party/freetype/src/tools/docmaker/docmaker.py
diff --git a/3party/freetype/tools/docmaker/formatter.py b/3party/freetype/src/tools/docmaker/formatter.py
index f62ce676c1..f62ce676c1 100644
--- a/3party/freetype/tools/docmaker/formatter.py
+++ b/3party/freetype/src/tools/docmaker/formatter.py
diff --git a/3party/freetype/tools/docmaker/sources.py b/3party/freetype/src/tools/docmaker/sources.py
index 7b68c07019..7b68c07019 100644
--- a/3party/freetype/tools/docmaker/sources.py
+++ b/3party/freetype/src/tools/docmaker/sources.py
diff --git a/3party/freetype/tools/docmaker/tohtml.py b/3party/freetype/src/tools/docmaker/tohtml.py
index fffa120973..fffa120973 100644
--- a/3party/freetype/tools/docmaker/tohtml.py
+++ b/3party/freetype/src/tools/docmaker/tohtml.py
diff --git a/3party/freetype/tools/docmaker/utils.py b/3party/freetype/src/tools/docmaker/utils.py
index 1d96658c7d..1d96658c7d 100644
--- a/3party/freetype/tools/docmaker/utils.py
+++ b/3party/freetype/src/tools/docmaker/utils.py
diff --git a/3party/freetype/tools/ftrandom/README b/3party/freetype/src/tools/ftrandom/README
index c093f15e81..c093f15e81 100644
--- a/3party/freetype/tools/ftrandom/README
+++ b/3party/freetype/src/tools/ftrandom/README
diff --git a/3party/freetype/tools/ftrandom/ftrandom.c b/3party/freetype/src/tools/ftrandom/ftrandom.c
index 4daac0dc1d..4daac0dc1d 100644
--- a/3party/freetype/tools/ftrandom/ftrandom.c
+++ b/3party/freetype/src/tools/ftrandom/ftrandom.c
diff --git a/3party/freetype/tools/glnames.py b/3party/freetype/src/tools/glnames.py
index 55573b22fe..cf5114c108 100644
--- a/3party/freetype/tools/glnames.py
+++ b/3party/freetype/src/tools/glnames.py
@@ -6,7 +6,7 @@
#
-# Copyright 1996-2000, 2003, 2005, 2007, 2008 by
+# Copyright 1996-2000, 2003, 2005, 2007, 2008, 2011 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -151,7 +151,7 @@ mac_standard_names = \
# The list of standard `SID' glyph names. For the official list,
# see Annex A of document at
#
-# http://partners.adobe.com/asn/developer/pdfs/tn/5176.CFF.pdf.
+# http://partners.adobe.com/public/developer/en/font/5176.CFF.pdf .
#
sid_standard_names = \
[
@@ -415,8 +415,7 @@ t1_expert_encoding = \
# This data has been taken literally from the file `glyphlist.txt',
# version 2.0, 22 Sept 2002. It is available from
#
-# http://partners.adobe.com/asn/developer/typeforum/unicodegn.html
-# http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
+# http://sourceforge.net/adobe/aglfn/
#
adobe_glyph_list = """\
A;0041
diff --git a/3party/freetype/tools/test_afm.c b/3party/freetype/src/tools/test_afm.c
index f5f99363ca..f5f99363ca 100644
--- a/3party/freetype/tools/test_afm.c
+++ b/3party/freetype/src/tools/test_afm.c
diff --git a/3party/freetype/tools/test_bbox.c b/3party/freetype/src/tools/test_bbox.c
index e085c5b3d6..e085c5b3d6 100644
--- a/3party/freetype/tools/test_bbox.c
+++ b/3party/freetype/src/tools/test_bbox.c
diff --git a/3party/freetype/tools/test_trig.c b/3party/freetype/src/tools/test_trig.c
index 8c8a544aa9..8c8a544aa9 100644
--- a/3party/freetype/tools/test_trig.c
+++ b/3party/freetype/src/tools/test_trig.c
diff --git a/3party/freetype/truetype/Jamfile b/3party/freetype/src/truetype/Jamfile
index a8cccfe137..a8cccfe137 100644
--- a/3party/freetype/truetype/Jamfile
+++ b/3party/freetype/src/truetype/Jamfile
diff --git a/3party/freetype/src/truetype/module.mk b/3party/freetype/src/truetype/module.mk
new file mode 100644
index 0000000000..baee81a773
--- /dev/null
+++ b/3party/freetype/src/truetype/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 TrueType module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += TRUETYPE_DRIVER
+
+define TRUETYPE_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, tt_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)truetype $(ECHO_DRIVER_DESC)Windows/Mac font files with extension *.ttf or *.ttc$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/truetype/rules.mk b/3party/freetype/src/truetype/rules.mk
new file mode 100644
index 0000000000..507ef16b02
--- /dev/null
+++ b/3party/freetype/src/truetype/rules.mk
@@ -0,0 +1,73 @@
+#
+# FreeType 2 TrueType driver configuration rules
+#
+
+
+# Copyright 1996-2000, 2001, 2003, 2004, 2011 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.
+
+
+# TrueType driver directory
+#
+TT_DIR := $(SRC_DIR)/truetype
+
+
+# compilation flags for the driver
+#
+TT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(TT_DIR))
+
+
+# TrueType driver sources (i.e., C files)
+#
+TT_DRV_SRC := $(TT_DIR)/ttdriver.c \
+ $(TT_DIR)/ttgload.c \
+ $(TT_DIR)/ttgxvar.c \
+ $(TT_DIR)/ttinterp.c \
+ $(TT_DIR)/ttobjs.c \
+ $(TT_DIR)/ttpic.c \
+ $(TT_DIR)/ttpload.c
+
+# TrueType driver headers
+#
+TT_DRV_H := $(TT_DRV_SRC:%.c=%.h) \
+ $(TT_DIR)/tterrors.h
+
+
+# TrueType driver object(s)
+#
+# TT_DRV_OBJ_M is used during `multi' builds
+# TT_DRV_OBJ_S is used during `single' builds
+#
+TT_DRV_OBJ_M := $(TT_DRV_SRC:$(TT_DIR)/%.c=$(OBJ_DIR)/%.$O)
+TT_DRV_OBJ_S := $(OBJ_DIR)/truetype.$O
+
+# TrueType driver source file for single build
+#
+TT_DRV_SRC_S := $(TT_DIR)/truetype.c
+
+
+# TrueType driver - single object
+#
+$(TT_DRV_OBJ_S): $(TT_DRV_SRC_S) $(TT_DRV_SRC) $(FREETYPE_H) $(TT_DRV_H)
+ $(TT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(TT_DRV_SRC_S))
+
+
+# driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(TT_DIR)/%.c $(FREETYPE_H) $(TT_DRV_H)
+ $(TT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(TT_DRV_OBJ_S)
+DRV_OBJS_M += $(TT_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/truetype/truetype.c b/3party/freetype/src/truetype/truetype.c
index 4bd1209787..4bd1209787 100644
--- a/3party/freetype/truetype/truetype.c
+++ b/3party/freetype/src/truetype/truetype.c
diff --git a/3party/freetype/truetype/ttdriver.c b/3party/freetype/src/truetype/ttdriver.c
index dca009a104..66061fd3af 100644
--- a/3party/freetype/truetype/ttdriver.c
+++ b/3party/freetype/src/truetype/ttdriver.c
@@ -4,7 +4,7 @@
/* */
/* TrueType font driver implementation (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -134,8 +134,6 @@
{
FT_UInt nn;
TT_Face face = (TT_Face) ttface;
- FT_Bool check = FT_BOOL(
- !( flags & FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ) );
/* XXX: TODO: check for sbits */
@@ -148,7 +146,7 @@
FT_UShort ah;
- TT_Get_VMetrics( face, start + nn, check, &tsb, &ah );
+ TT_Get_VMetrics( face, start + nn, &tsb, &ah );
advances[nn] = ah;
}
}
@@ -160,7 +158,7 @@
FT_UShort aw;
- TT_Get_HMetrics( face, start + nn, check, &lsb, &aw );
+ TT_Get_HMetrics( face, start + nn, &lsb, &aw );
advances[nn] = aw;
}
}
@@ -298,7 +296,15 @@
if ( !size )
return TT_Err_Invalid_Size_Handle;
- if ( !face || glyph_index >= (FT_UInt)face->num_glyphs )
+ if ( !face )
+ return TT_Err_Invalid_Argument;
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ if ( glyph_index >= (FT_UInt)face->num_glyphs &&
+ !face->internal->incremental_interface )
+#else
+ if ( glyph_index >= (FT_UInt)face->num_glyphs )
+#endif
return TT_Err_Invalid_Argument;
if ( load_flags & FT_LOAD_NO_HINTING )
@@ -393,16 +399,17 @@
tt_get_interface( FT_Module driver, /* TT_Driver */
const char* tt_interface )
{
- FT_Library library = driver->library;
FT_Module_Interface result;
FT_Module sfntd;
SFNT_Service sfnt;
- FT_UNUSED(library);
result = ft_service_list_lookup( FT_TT_SERVICES_GET, tt_interface );
if ( result != NULL )
return result;
+ if ( !driver )
+ return NULL;
+
/* only return the default interface from the SFNT module */
sfntd = FT_Get_Module( driver->library, "sfnt" );
if ( sfntd )
diff --git a/3party/freetype/truetype/ttdriver.h b/3party/freetype/src/truetype/ttdriver.h
index aae00f2617..aae00f2617 100644
--- a/3party/freetype/truetype/ttdriver.h
+++ b/3party/freetype/src/truetype/ttdriver.h
diff --git a/3party/freetype/truetype/tterrors.h b/3party/freetype/src/truetype/tterrors.h
index d317c70e0e..d317c70e0e 100644
--- a/3party/freetype/truetype/tterrors.h
+++ b/3party/freetype/src/truetype/tterrors.h
diff --git a/3party/freetype/truetype/ttgload.c b/3party/freetype/src/truetype/ttgload.c
index 28ddb99553..f35521e17b 100644
--- a/3party/freetype/truetype/ttgload.c
+++ b/3party/freetype/src/truetype/ttgload.c
@@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -46,7 +46,7 @@
/*************************************************************************/
/* */
- /* Composite font flags. */
+ /* Composite glyph flags. */
/* */
#define ARGS_ARE_WORDS 0x0001
#define ARGS_ARE_XY_VALUES 0x0002
@@ -65,27 +65,24 @@
/*************************************************************************/
/* */
- /* Returns the horizontal metrics in font units for a given glyph. If */
- /* `check' is true, take care of monospaced fonts by returning the */
- /* advance width maximum. */
+ /* Return the horizontal metrics in font units for a given glyph. */
/* */
- FT_LOCAL_DEF(void)
+ FT_LOCAL_DEF( void )
TT_Get_HMetrics( TT_Face face,
FT_UInt idx,
- FT_Bool check,
FT_Short* lsb,
FT_UShort* aw )
{
( (SFNT_Service)face->sfnt )->get_metrics( face, 0, idx, lsb, aw );
- if ( check && face->postscript.isFixedPitch )
- *aw = face->horizontal.advance_Width_Max;
+ FT_TRACE5(( " advance width (font units): %d\n", *aw ));
+ FT_TRACE5(( " left side bearing (font units): %d\n", *lsb ));
}
/*************************************************************************/
/* */
- /* Returns the vertical metrics in font units for a given glyph. */
+ /* Return the vertical metrics in font units for a given glyph. */
/* Greg Hitchcock from Microsoft told us that if there were no `vmtx' */
/* table, typoAscender/Descender from the `OS/2' table would be used */
/* instead, and if there were no `OS/2' table, use ascender/descender */
@@ -93,18 +90,12 @@
/* apparently does: It uses the ppem value as the advance height, and */
/* sets the top side bearing to be zero. */
/* */
- /* The monospace `check' is probably not meaningful here, but we leave */
- /* it in for a consistent interface. */
- /* */
- FT_LOCAL_DEF(void)
+ FT_LOCAL_DEF( void )
TT_Get_VMetrics( TT_Face face,
FT_UInt idx,
- FT_Bool check,
FT_Short* tsb,
FT_UShort* ah )
{
- FT_UNUSED( check );
-
if ( face->vertical_info )
( (SFNT_Service)face->sfnt )->get_metrics( face, 1, idx, tsb, ah );
@@ -131,8 +122,112 @@
#endif
+ FT_TRACE5(( " advance height (font units): %d\n", *ah ));
+ FT_TRACE5(( " top side bearing (font units): %d\n", *tsb ));
+ }
+
+
+ static void
+ tt_get_metrics( TT_Loader loader,
+ FT_UInt glyph_index )
+ {
+ TT_Face face = (TT_Face)loader->face;
+
+ FT_Short left_bearing = 0, top_bearing = 0;
+ FT_UShort advance_width = 0, advance_height = 0;
+
+
+ TT_Get_HMetrics( face, glyph_index,
+ &left_bearing,
+ &advance_width );
+ TT_Get_VMetrics( face, glyph_index,
+ &top_bearing,
+ &advance_height );
+
+ loader->left_bearing = left_bearing;
+ loader->advance = advance_width;
+ loader->top_bearing = top_bearing;
+ loader->vadvance = advance_height;
+
+ if ( !loader->linear_def )
+ {
+ loader->linear_def = 1;
+ loader->linear = advance_width;
+ }
+ }
+
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+
+ static void
+ tt_get_metrics_incr_overrides( TT_Loader loader,
+ FT_UInt glyph_index )
+ {
+ TT_Face face = (TT_Face)loader->face;
+
+ FT_Short left_bearing = 0, top_bearing = 0;
+ FT_UShort advance_width = 0, advance_height = 0;
+
+
+ /* If this is an incrementally loaded font check whether there are */
+ /* overriding metrics for this glyph. */
+ if ( face->root.internal->incremental_interface &&
+ face->root.internal->incremental_interface->funcs->get_glyph_metrics )
+ {
+ FT_Incremental_MetricsRec metrics;
+ FT_Error error;
+
+
+ metrics.bearing_x = loader->left_bearing;
+ metrics.bearing_y = 0;
+ metrics.advance = loader->advance;
+ metrics.advance_v = 0;
+
+ error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
+ face->root.internal->incremental_interface->object,
+ glyph_index, FALSE, &metrics );
+ if ( error )
+ goto Exit;
+
+ left_bearing = (FT_Short)metrics.bearing_x;
+ advance_width = (FT_UShort)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;
+
+ error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
+ face->root.internal->incremental_interface->object,
+ glyph_index, TRUE, &metrics );
+ if ( error )
+ goto Exit;
+
+ top_bearing = (FT_Short)metrics.bearing_y;
+ advance_height = (FT_UShort)metrics.advance;
+
+#endif /* 0 */
+
+ loader->left_bearing = left_bearing;
+ loader->advance = advance_width;
+ loader->top_bearing = top_bearing;
+ loader->vadvance = advance_height;
+
+ if ( !loader->linear_def )
+ {
+ loader->linear_def = 1;
+ loader->linear = advance_width;
+ }
+ }
+
+ Exit:
+ return;
}
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
+
/*************************************************************************/
/* */
@@ -182,7 +277,7 @@
FT_UNUSED( glyph_index );
- FT_TRACE5(( "Glyph %ld\n", glyph_index ));
+ FT_TRACE4(( "Glyph %ld\n", glyph_index ));
/* the following line sets the `error' variable through macros! */
if ( FT_STREAM_SEEK( offset ) || FT_FRAME_ENTER( byte_count ) )
@@ -278,7 +373,7 @@
if ( cont[0] <= prev_cont )
{
/* unordered contours: this is invalid */
- error = FT_Err_Invalid_Table;
+ error = TT_Err_Invalid_Table;
goto Fail;
}
prev_cont = cont[0];
@@ -1029,7 +1124,8 @@
{
FT_Stream stream = loader->stream;
- FT_UShort n_ins;
+ FT_UShort n_ins, max_ins;
+ FT_ULong tmp;
/* TT_Load_Composite_Glyph only gives us the offset of instructions */
@@ -1041,12 +1137,27 @@
FT_TRACE5(( " Instructions size = %d\n", n_ins ));
/* check it */
- if ( n_ins > ((TT_Face)loader->face)->max_profile.maxSizeOfInstructions )
+ max_ins = ((TT_Face)loader->face)->max_profile.maxSizeOfInstructions;
+ if ( n_ins > max_ins )
{
- FT_TRACE0(( "TT_Process_Composite_Glyph: too many instructions (%d)\n",
- n_ins ));
+ /* acroread ignores this field, so we only do a rough safety check */
+ if ( (FT_Int)n_ins > loader->byte_len )
+ {
+ FT_TRACE1(( "TT_Process_Composite_Glyph: "
+ "too many instructions (%d) for glyph with length %d\n",
+ n_ins, loader->byte_len ));
+ return TT_Err_Too_Many_Hints;
+ }
- return TT_Err_Too_Many_Hints;
+ tmp = loader->exec->glyphSize;
+ error = Update_Max( loader->exec->memory,
+ &tmp,
+ sizeof ( FT_Byte ),
+ (void*)&loader->exec->glyphIns,
+ n_ins );
+ loader->exec->glyphSize = (FT_UShort)tmp;
+ if ( error )
+ return error;
}
else if ( n_ins == 0 )
return TT_Err_Ok;
@@ -1102,9 +1213,10 @@
static FT_Error
load_truetype_glyph( TT_Loader loader,
FT_UInt glyph_index,
- FT_UInt recurse_count )
+ FT_UInt recurse_count,
+ FT_Bool header_only )
{
- FT_Error error;
+ FT_Error error = TT_Err_Ok;
FT_Fixed x_scale, y_scale;
FT_ULong offset;
TT_Face face = (TT_Face)loader->face;
@@ -1151,75 +1263,7 @@
y_scale = 0x10000L;
}
- /* get metrics, horizontal and vertical */
- {
- FT_Short left_bearing = 0, top_bearing = 0;
- FT_UShort advance_width = 0, advance_height = 0;
-
-
- TT_Get_HMetrics( face, glyph_index,
- (FT_Bool)!( loader->load_flags &
- FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ),
- &left_bearing,
- &advance_width );
- TT_Get_VMetrics( face, glyph_index,
- (FT_Bool)!( loader->load_flags &
- FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ),
- &top_bearing,
- &advance_height );
-
-#ifdef FT_CONFIG_OPTION_INCREMENTAL
-
- /* If this is an incrementally loaded font see if there are */
- /* overriding metrics for this glyph. */
- if ( face->root.internal->incremental_interface &&
- face->root.internal->incremental_interface->funcs->get_glyph_metrics )
- {
- FT_Incremental_MetricsRec metrics;
-
-
- metrics.bearing_x = left_bearing;
- metrics.bearing_y = 0;
- metrics.advance = advance_width;
- error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
- face->root.internal->incremental_interface->object,
- glyph_index, FALSE, &metrics );
- if ( error )
- goto Exit;
- left_bearing = (FT_Short)metrics.bearing_x;
- advance_width = (FT_UShort)metrics.advance;
-
-#if 0
-
- /* GWW: Do I do the same for vertical metrics? */
- metrics.bearing_x = 0;
- metrics.bearing_y = top_bearing;
- metrics.advance = advance_height;
- error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
- face->root.internal->incremental_interface->object,
- glyph_index, TRUE, &metrics );
- if ( error )
- goto Exit;
- top_bearing = (FT_Short)metrics.bearing_y;
- advance_height = (FT_UShort)metrics.advance;
-
-#endif /* 0 */
-
- }
-
-#endif /* FT_CONFIG_OPTION_INCREMENTAL */
-
- loader->left_bearing = left_bearing;
- loader->advance = advance_width;
- loader->top_bearing = top_bearing;
- loader->vadvance = advance_height;
-
- if ( !loader->linear_def )
- {
- loader->linear_def = 1;
- loader->linear = advance_width;
- }
- }
+ tt_get_metrics( loader, glyph_index );
/* Set `offset' to the start of the glyph relative to the start of */
/* the `glyf' table, and `byte_len' to the length of the glyph in */
@@ -1257,7 +1301,13 @@
if ( loader->byte_len > 0 )
{
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ /* for the incremental interface, `glyf_offset' is always zero */
+ if ( !loader->glyf_offset &&
+ !face->root.internal->incremental_interface )
+#else
if ( !loader->glyf_offset )
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
FT_TRACE2(( "no `glyf' table but non-zero `loca' entry\n" ));
error = TT_Err_Invalid_Table;
@@ -1272,9 +1322,9 @@
opened_frame = 1;
- /* read first glyph header */
+ /* read glyph header first */
error = face->read_glyph_header( loader );
- if ( error )
+ if ( error || header_only )
goto Exit;
}
@@ -1285,8 +1335,17 @@
loader->bbox.yMin = 0;
loader->bbox.yMax = 0;
+ if ( header_only )
+ goto Exit;
+
+ /* must initialize points before (possibly) overriding */
+ /* glyph metrics from the incremental interface */
TT_LOADER_SET_PP( loader );
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ tt_get_metrics_incr_overrides( loader, glyph_index );
+#endif
+
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
if ( ((TT_Face)(loader->face))->doblend )
@@ -1322,8 +1381,14 @@
goto Exit;
}
+ /* must initialize points before (possibly) overriding */
+ /* glyph metrics from the incremental interface */
TT_LOADER_SET_PP( loader );
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ tt_get_metrics_incr_overrides( loader, glyph_index );
+#endif
+
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
@@ -1450,6 +1515,7 @@
FT_UInt num_base_subgs = gloader->base.num_subglyphs;
FT_Stream old_stream = loader->stream;
+ FT_Int old_byte_len = loader->byte_len;
FT_GlyphLoader_Add( gloader );
@@ -1474,7 +1540,7 @@
num_base_points = gloader->base.outline.n_points;
error = load_truetype_glyph( loader, subglyph->index,
- recurse_count + 1 );
+ recurse_count + 1, FALSE );
if ( error )
goto Exit;
@@ -1504,7 +1570,8 @@
num_base_points );
}
- loader->stream = old_stream;
+ loader->stream = old_stream;
+ loader->byte_len = old_byte_len;
/* process the glyph */
loader->ins_pos = ins_pos;
@@ -1572,23 +1639,7 @@
/* get the device-independent horizontal advance; it is scaled later */
/* by the base layer. */
- {
- FT_Pos advance = loader->linear;
-
-
- /* the flag FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH was introduced to */
- /* correctly support DynaLab fonts, which have an incorrect */
- /* `advance_Width_Max' field! It is used, to my knowledge, */
- /* exclusively in the X-TrueType font server. */
- /* */
- if ( face->postscript.isFixedPitch &&
- ( loader->load_flags & FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ) == 0 )
- advance = face->horizontal.advance_Width_Max;
-
- /* we need to return the advance in font units in linearHoriAdvance, */
- /* it will be scaled later by the base layer. */
- glyph->linearHoriAdvance = advance;
- }
+ glyph->linearHoriAdvance = loader->linear;
glyph->metrics.horiBearingX = bbox.xMin;
glyph->metrics.horiBearingY = bbox.yMax;
@@ -1697,7 +1748,7 @@
/* scale the metrics */
if ( !( loader->load_flags & FT_LOAD_NO_SCALE ) )
{
- top = FT_MulFix( top, y_scale );
+ top = FT_MulFix( top, y_scale );
advance = FT_MulFix( advance, y_scale );
}
@@ -1757,6 +1808,7 @@
glyph->metrics.vertAdvance = (FT_Pos)metrics.vertAdvance << 6;
glyph->format = FT_GLYPH_FORMAT_BITMAP;
+
if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
{
glyph->bitmap_left = metrics.vertBearingX;
@@ -1779,10 +1831,12 @@
tt_loader_init( TT_Loader loader,
TT_Size size,
TT_GlyphSlot glyph,
- FT_Int32 load_flags )
+ FT_Int32 load_flags,
+ FT_Bool glyf_table_only )
{
TT_Face face;
FT_Stream stream;
+ FT_Bool pedantic = FT_BOOL( load_flags & FT_LOAD_PEDANTIC );
face = (TT_Face)glyph->face;
@@ -1793,7 +1847,7 @@
#ifdef TT_USE_BYTECODE_INTERPRETER
/* load execution context */
- if ( IS_HINTED( load_flags ) )
+ if ( IS_HINTED( load_flags ) && !glyf_table_only )
{
TT_ExecContext exec;
FT_Bool grayscale;
@@ -1801,7 +1855,9 @@
if ( !size->cvt_ready )
{
- FT_Error error = tt_size_ready_bytecode( size );
+ FT_Error error = tt_size_ready_bytecode( size, pedantic );
+
+
if ( error )
return error;
}
@@ -1824,11 +1880,14 @@
FT_UInt i;
+ FT_TRACE4(( "tt_loader_init: grayscale change,"
+ " re-executing `prep' table\n" ));
+
exec->grayscale = grayscale;
for ( i = 0; i < size->cvt_size; i++ )
size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );
- tt_size_run_prep( size );
+ tt_size_run_prep( size, pedantic );
}
/* see whether the cvt program has disabled hinting */
@@ -1874,6 +1933,7 @@
}
/* get face's glyph loader */
+ if ( !glyf_table_only )
{
FT_GlyphLoader gloader = glyph->internal->loader;
@@ -1945,7 +2005,22 @@
{
error = load_sbit_image( size, glyph, glyph_index, load_flags );
if ( !error )
+ {
+ FT_Face root = &face->root;
+
+
+ if ( FT_IS_SCALABLE( root ) )
+ {
+ /* for the bbox we need the header only */
+ (void)tt_loader_init( &loader, size, glyph, load_flags, TRUE );
+ (void)load_truetype_glyph( &loader, glyph_index, 0, TRUE );
+ glyph->linearHoriAdvance = loader.linear;
+ glyph->linearVertAdvance = loader.top_bearing + loader.bbox.yMax -
+ loader.vadvance;
+ }
+
return TT_Err_Ok;
+ }
}
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -1957,7 +2032,7 @@
if ( load_flags & FT_LOAD_SBITS_ONLY )
return TT_Err_Invalid_Argument;
- error = tt_loader_init( &loader, size, glyph, load_flags );
+ error = tt_loader_init( &loader, size, glyph, load_flags, FALSE );
if ( error )
return error;
@@ -1966,7 +2041,7 @@
glyph->outline.flags = 0;
/* main loading loop */
- error = load_truetype_glyph( &loader, glyph_index, 0 );
+ error = load_truetype_glyph( &loader, glyph_index, 0, FALSE );
if ( !error )
{
if ( glyph->format == FT_GLYPH_FORMAT_COMPOSITE )
@@ -1979,9 +2054,11 @@
glyph->outline = loader.gloader->base.outline;
glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
- /* In case bit 1 of the `flags' field in the `head' table isn't */
- /* set, translate array so that (0,0) is the glyph's origin. */
- if ( ( face->header.Flags & 2 ) == 0 && loader.pp1.x )
+ /* Translate array so that (0,0) is the glyph's origin. Note */
+ /* that this behaviour is independent on the value of bit 1 of */
+ /* the `flags' field in the `head' table -- at least major */
+ /* applications like Acroread indicate that. */
+ if ( loader.pp1.x )
FT_Outline_Translate( &glyph->outline, -loader.pp1.x, 0 );
}
diff --git a/3party/freetype/truetype/ttgload.h b/3party/freetype/src/truetype/ttgload.h
index 958d67d20d..05f75882dc 100644
--- a/3party/freetype/truetype/ttgload.h
+++ b/3party/freetype/src/truetype/ttgload.h
@@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008 by */
+/* Copyright 1996-2006, 2008, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -37,14 +37,12 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
TT_Get_HMetrics( TT_Face face,
FT_UInt idx,
- FT_Bool check,
FT_Short* lsb,
FT_UShort* aw );
FT_LOCAL( void )
TT_Get_VMetrics( TT_Face face,
FT_UInt idx,
- FT_Bool check,
FT_Short* tsb,
FT_UShort* ah );
diff --git a/3party/freetype/truetype/ttgxvar.c b/3party/freetype/src/truetype/ttgxvar.c
index 1456a8cc0a..37bbe6d2ef 100644
--- a/3party/freetype/truetype/ttgxvar.c
+++ b/3party/freetype/src/truetype/ttgxvar.c
@@ -4,7 +4,7 @@
/* */
/* TrueType GX Font Variation loader */
/* */
-/* Copyright 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -94,11 +94,8 @@
#define ALL_POINTS (FT_UShort*)( -1 )
- enum
- {
- GX_PT_POINTS_ARE_WORDS = 0x80,
- GX_PT_POINT_RUN_COUNT_MASK = 0x7F
- };
+#define GX_PT_POINTS_ARE_WORDS 0x80
+#define GX_PT_POINT_RUN_COUNT_MASK 0x7F
/*************************************************************************/
@@ -126,14 +123,14 @@
ft_var_readpackedpoints( FT_Stream stream,
FT_UInt *point_cnt )
{
- FT_UShort *points;
+ FT_UShort *points = NULL;
FT_Int n;
FT_Int runcnt;
FT_Int i;
FT_Int j;
FT_Int first;
FT_Memory memory = stream->memory;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = TT_Err_Ok;
FT_UNUSED( error );
@@ -157,7 +154,7 @@
runcnt = runcnt & GX_PT_POINT_RUN_COUNT_MASK;
first = points[i++] = FT_GET_USHORT();
- if ( runcnt < 1 )
+ if ( runcnt < 1 || i + runcnt >= n )
goto Exit;
/* first point not included in runcount */
@@ -168,7 +165,7 @@
{
first = points[i++] = FT_GET_BYTE();
- if ( runcnt < 1 )
+ if ( runcnt < 1 || i + runcnt >= n )
goto Exit;
for ( j = 0; j < runcnt; ++j )
@@ -213,12 +210,12 @@
ft_var_readpackeddeltas( FT_Stream stream,
FT_Offset delta_cnt )
{
- FT_Short *deltas;
- FT_Int runcnt;
+ FT_Short *deltas = NULL;
+ FT_UInt runcnt;
FT_Offset i;
- FT_Offset j;
+ FT_UInt j;
FT_Memory memory = stream->memory;
- FT_Error error = TT_Err_Ok;
+ FT_Error error = TT_Err_Ok;
FT_UNUSED( error );
@@ -625,7 +622,7 @@
FT_Error error = TT_Err_Ok;
FT_ULong fvar_start;
FT_Int i, j;
- FT_MM_Var* mmvar;
+ FT_MM_Var* mmvar = NULL;
FT_Fixed* next_coords;
FT_String* next_name;
FT_Var_Axis* a;
@@ -685,7 +682,11 @@
if ( fvar_head.version != (FT_Long)0x00010000L ||
fvar_head.countSizePairs != 2 ||
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 )
{
@@ -696,7 +697,7 @@
if ( FT_NEW( face->blend ) )
goto Exit;
- /* XXX: TODO - check for overflows */
+ /* cannot overflow 32-bit arithmetic because of limits above */
face->blend->mmvar_len =
sizeof ( FT_MM_Var ) +
fvar_head.axisCount * sizeof ( FT_Var_Axis ) +
@@ -1324,7 +1325,7 @@
FT_Stream stream = face->root.stream;
FT_Memory memory = stream->memory;
GX_Blend blend = face->blend;
- FT_Vector* delta_xy;
+ FT_Vector* delta_xy = NULL;
FT_Error error;
FT_ULong glyph_start;
diff --git a/3party/freetype/truetype/ttgxvar.h b/3party/freetype/src/truetype/ttgxvar.h
index 82dfc4431f..82dfc4431f 100644
--- a/3party/freetype/truetype/ttgxvar.h
+++ b/3party/freetype/src/truetype/ttgxvar.h
diff --git a/3party/freetype/truetype/ttinterp.c b/3party/freetype/src/truetype/ttinterp.c
index 13aa9a27c4..d568926bf9 100644
--- a/3party/freetype/truetype/ttinterp.c
+++ b/3party/freetype/src/truetype/ttinterp.c
@@ -4,8 +4,8 @@
/* */
/* TrueType bytecode interpreter (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* Copyright 1996-2011 */
+/* 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 */
@@ -223,9 +223,10 @@
/*************************************************************************/
/* */
- /* A simple bounds-checking macro. */
+ /* Two simple bounds-checking macros. */
/* */
-#define BOUNDS( x, n ) ( (FT_UInt)(x) >= (FT_UInt)(n) )
+#define BOUNDS( x, n ) ( (FT_UInt)(x) >= (FT_UInt)(n) )
+#define BOUNDSL( x, n ) ( (FT_ULong)(x) >= (FT_ULong)(n) )
#undef SUCCESS
#define SUCCESS 0
@@ -476,8 +477,7 @@
return TT_Err_Ok;
Fail_Memory:
- FT_ERROR(( "Init_Context: not enough memory for 0x%08lx\n",
- (FT_Long)exec ));
+ FT_ERROR(( "Init_Context: not enough memory for %p\n", exec ));
TT_Done_Context( exec );
return error;
@@ -508,7 +508,7 @@
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
Update_Max( FT_Memory memory,
FT_ULong* size,
FT_Long multiplier,
@@ -594,6 +594,12 @@
exec->storage = size->storage;
exec->twilight = size->twilight;
+
+ /* 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 ) );
+ exec->zp1 = exec->zp0;
+ exec->zp2 = exec->zp0;
}
/* XXX: We reserve a little more elements on the stack to deal safely */
@@ -979,8 +985,8 @@
/* INS_$83 */ PACK( 0, 0 ),
/* INS_$84 */ PACK( 0, 0 ),
/* ScanCTRL */ PACK( 1, 0 ),
- /* SDVPTL[0] */ PACK( 2, 0 ),
- /* SDVPTL[1] */ PACK( 2, 0 ),
+ /* SDPVTL[0] */ PACK( 2, 0 ),
+ /* SDPVTL[1] */ PACK( 2, 0 ),
/* GetINFO */ PACK( 1, 1 ),
/* IDEF */ PACK( 1, 0 ),
/* ROLL */ PACK( 3, 3 ),
@@ -1111,6 +1117,287 @@
};
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+ static
+ const char* const opcode_name[256] =
+ {
+ "SVTCA y",
+ "SVTCA x",
+ "SPvTCA y",
+ "SPvTCA x",
+ "SFvTCA y",
+ "SFvTCA x",
+ "SPvTL ||",
+ "SPvTL +",
+ "SFvTL ||",
+ "SFvTL +",
+ "SPvFS",
+ "SFvFS",
+ "GPV",
+ "GFV",
+ "SFvTPv",
+ "ISECT",
+
+ "SRP0",
+ "SRP1",
+ "SRP2",
+ "SZP0",
+ "SZP1",
+ "SZP2",
+ "SZPS",
+ "SLOOP",
+ "RTG",
+ "RTHG",
+ "SMD",
+ "ELSE",
+ "JMPR",
+ "SCvTCi",
+ "SSwCi",
+ "SSW",
+
+ "DUP",
+ "POP",
+ "CLEAR",
+ "SWAP",
+ "DEPTH",
+ "CINDEX",
+ "MINDEX",
+ "AlignPTS",
+ "INS_$28",
+ "UTP",
+ "LOOPCALL",
+ "CALL",
+ "FDEF",
+ "ENDF",
+ "MDAP[0]",
+ "MDAP[1]",
+
+ "IUP[0]",
+ "IUP[1]",
+ "SHP[0]",
+ "SHP[1]",
+ "SHC[0]",
+ "SHC[1]",
+ "SHZ[0]",
+ "SHZ[1]",
+ "SHPIX",
+ "IP",
+ "MSIRP[0]",
+ "MSIRP[1]",
+ "AlignRP",
+ "RTDG",
+ "MIAP[0]",
+ "MIAP[1]",
+
+ "NPushB",
+ "NPushW",
+ "WS",
+ "RS",
+ "WCvtP",
+ "RCvt",
+ "GC[0]",
+ "GC[1]",
+ "SCFS",
+ "MD[0]",
+ "MD[1]",
+ "MPPEM",
+ "MPS",
+ "FlipON",
+ "FlipOFF",
+ "DEBUG",
+
+ "LT",
+ "LTEQ",
+ "GT",
+ "GTEQ",
+ "EQ",
+ "NEQ",
+ "ODD",
+ "EVEN",
+ "IF",
+ "EIF",
+ "AND",
+ "OR",
+ "NOT",
+ "DeltaP1",
+ "SDB",
+ "SDS",
+
+ "ADD",
+ "SUB",
+ "DIV",
+ "MUL",
+ "ABS",
+ "NEG",
+ "FLOOR",
+ "CEILING",
+ "ROUND[0]",
+ "ROUND[1]",
+ "ROUND[2]",
+ "ROUND[3]",
+ "NROUND[0]",
+ "NROUND[1]",
+ "NROUND[2]",
+ "NROUND[3]",
+
+ "WCvtF",
+ "DeltaP2",
+ "DeltaP3",
+ "DeltaCn[0]",
+ "DeltaCn[1]",
+ "DeltaCn[2]",
+ "SROUND",
+ "S45Round",
+ "JROT",
+ "JROF",
+ "ROFF",
+ "INS_$7B",
+ "RUTG",
+ "RDTG",
+ "SANGW",
+ "AA",
+
+ "FlipPT",
+ "FlipRgON",
+ "FlipRgOFF",
+ "INS_$83",
+ "INS_$84",
+ "ScanCTRL",
+ "SDVPTL[0]",
+ "SDVPTL[1]",
+ "GetINFO",
+ "IDEF",
+ "ROLL",
+ "MAX",
+ "MIN",
+ "ScanTYPE",
+ "InstCTRL",
+ "INS_$8F",
+
+ "INS_$90",
+ "INS_$91",
+ "INS_$92",
+ "INS_$93",
+ "INS_$94",
+ "INS_$95",
+ "INS_$96",
+ "INS_$97",
+ "INS_$98",
+ "INS_$99",
+ "INS_$9A",
+ "INS_$9B",
+ "INS_$9C",
+ "INS_$9D",
+ "INS_$9E",
+ "INS_$9F",
+
+ "INS_$A0",
+ "INS_$A1",
+ "INS_$A2",
+ "INS_$A3",
+ "INS_$A4",
+ "INS_$A5",
+ "INS_$A6",
+ "INS_$A7",
+ "INS_$A8",
+ "INS_$A9",
+ "INS_$AA",
+ "INS_$AB",
+ "INS_$AC",
+ "INS_$AD",
+ "INS_$AE",
+ "INS_$AF",
+
+ "PushB[0]",
+ "PushB[1]",
+ "PushB[2]",
+ "PushB[3]",
+ "PushB[4]",
+ "PushB[5]",
+ "PushB[6]",
+ "PushB[7]",
+ "PushW[0]",
+ "PushW[1]",
+ "PushW[2]",
+ "PushW[3]",
+ "PushW[4]",
+ "PushW[5]",
+ "PushW[6]",
+ "PushW[7]",
+
+ "MDRP[00]",
+ "MDRP[01]",
+ "MDRP[02]",
+ "MDRP[03]",
+ "MDRP[04]",
+ "MDRP[05]",
+ "MDRP[06]",
+ "MDRP[07]",
+ "MDRP[08]",
+ "MDRP[09]",
+ "MDRP[10]",
+ "MDRP[11]",
+ "MDRP[12]",
+ "MDRP[13]",
+ "MDRP[14]",
+ "MDRP[15]",
+
+ "MDRP[16]",
+ "MDRP[17]",
+ "MDRP[18]",
+ "MDRP[19]",
+ "MDRP[20]",
+ "MDRP[21]",
+ "MDRP[22]",
+ "MDRP[23]",
+ "MDRP[24]",
+ "MDRP[25]",
+ "MDRP[26]",
+ "MDRP[27]",
+ "MDRP[28]",
+ "MDRP[29]",
+ "MDRP[30]",
+ "MDRP[31]",
+
+ "MIRP[00]",
+ "MIRP[01]",
+ "MIRP[02]",
+ "MIRP[03]",
+ "MIRP[04]",
+ "MIRP[05]",
+ "MIRP[06]",
+ "MIRP[07]",
+ "MIRP[08]",
+ "MIRP[09]",
+ "MIRP[10]",
+ "MIRP[11]",
+ "MIRP[12]",
+ "MIRP[13]",
+ "MIRP[14]",
+ "MIRP[15]",
+
+ "MIRP[16]",
+ "MIRP[17]",
+ "MIRP[18]",
+ "MIRP[19]",
+ "MIRP[20]",
+ "MIRP[21]",
+ "MIRP[22]",
+ "MIRP[23]",
+ "MIRP[24]",
+ "MIRP[25]",
+ "MIRP[26]",
+ "MIRP[27]",
+ "MIRP[28]",
+ "MIRP[29]",
+ "MIRP[30]",
+ "MIRP[31]"
+ };
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
+
static
const FT_Char opcode_length[256] =
{
@@ -1727,7 +2014,8 @@
if ( distance && val < 0 )
val = 0;
}
- else {
+ else
+ {
val = distance - compensation;
if ( val > 0 )
val = 0;
@@ -2878,38 +3166,54 @@
args[0] = CUR.top;
-#define DO_CINDEX \
- { \
- FT_Long L; \
- \
- \
- L = args[0]; \
- \
- if ( L <= 0 || L > CUR.args ) \
- CUR.error = TT_Err_Invalid_Reference; \
- else \
- args[0] = CUR.stack[CUR.args - L]; \
- }
-
-
-#define DO_JROT \
- if ( args[1] != 0 ) \
- { \
- CUR.IP += args[0]; \
- CUR.step_ins = FALSE; \
- }
-
-
-#define DO_JMPR \
- CUR.IP += args[0]; \
+#define DO_CINDEX \
+ { \
+ FT_Long L; \
+ \
+ \
+ L = args[0]; \
+ \
+ if ( L <= 0 || L > CUR.args ) \
+ { \
+ if ( CUR.pedantic_hinting ) \
+ CUR.error = TT_Err_Invalid_Reference; \
+ args[0] = 0; \
+ } \
+ else \
+ args[0] = CUR.stack[CUR.args - L]; \
+ }
+
+
+#define DO_JROT \
+ if ( args[1] != 0 ) \
+ { \
+ if ( args[0] == 0 && CUR.args == 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
+ CUR.step_ins = FALSE; \
+ }
+
+
+#define DO_JMPR \
+ if ( args[0] == 0 && CUR.args == 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
CUR.step_ins = FALSE;
-#define DO_JROF \
- if ( args[1] == 0 ) \
- { \
- CUR.IP += args[0]; \
- CUR.step_ins = FALSE; \
+#define DO_JROF \
+ if ( args[1] == 0 ) \
+ { \
+ if ( args[0] == 0 && CUR.args == 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
+ CUR.IP += args[0]; \
+ if ( CUR.IP < 0 ) \
+ CUR.error = TT_Err_Bad_Argument; \
+ CUR.step_ins = FALSE; \
}
@@ -2992,39 +3296,39 @@
args[0] = FT_PIX_CEIL( args[0] );
-#define DO_RS \
- { \
- FT_ULong I = (FT_ULong)args[0]; \
- \
- \
- if ( BOUNDS( I, CUR.storeSize ) ) \
- { \
- if ( CUR.pedantic_hinting ) \
- { \
- ARRAY_BOUND_ERROR; \
- } \
- else \
- args[0] = 0; \
- } \
- else \
- args[0] = CUR.storage[I]; \
+#define DO_RS \
+ { \
+ FT_ULong I = (FT_ULong)args[0]; \
+ \
+ \
+ if ( BOUNDSL( I, CUR.storeSize ) ) \
+ { \
+ if ( CUR.pedantic_hinting ) \
+ { \
+ ARRAY_BOUND_ERROR; \
+ } \
+ else \
+ args[0] = 0; \
+ } \
+ else \
+ args[0] = CUR.storage[I]; \
}
-#define DO_WS \
- { \
- FT_ULong I = (FT_ULong)args[0]; \
- \
- \
- if ( BOUNDS( I, CUR.storeSize ) ) \
- { \
- if ( CUR.pedantic_hinting ) \
- { \
- ARRAY_BOUND_ERROR; \
- } \
- } \
- else \
- CUR.storage[I] = args[1]; \
+#define DO_WS \
+ { \
+ FT_ULong I = (FT_ULong)args[0]; \
+ \
+ \
+ if ( BOUNDSL( I, CUR.storeSize ) ) \
+ { \
+ if ( CUR.pedantic_hinting ) \
+ { \
+ ARRAY_BOUND_ERROR; \
+ } \
+ } \
+ else \
+ CUR.storage[I] = args[1]; \
}
@@ -3033,7 +3337,7 @@
FT_ULong I = (FT_ULong)args[0]; \
\
\
- if ( BOUNDS( I, CUR.cvtSize ) ) \
+ if ( BOUNDSL( I, CUR.cvtSize ) ) \
{ \
if ( CUR.pedantic_hinting ) \
{ \
@@ -3052,7 +3356,7 @@
FT_ULong I = (FT_ULong)args[0]; \
\
\
- if ( BOUNDS( I, CUR.cvtSize ) ) \
+ if ( BOUNDSL( I, CUR.cvtSize ) ) \
{ \
if ( CUR.pedantic_hinting ) \
{ \
@@ -3069,7 +3373,7 @@
FT_ULong I = (FT_ULong)args[0]; \
\
\
- if ( BOUNDS( I, CUR.cvtSize ) ) \
+ if ( BOUNDSL( I, CUR.cvtSize ) ) \
{ \
if ( CUR.pedantic_hinting ) \
{ \
@@ -4091,17 +4395,19 @@
if ( L <= 0 || L > CUR.args )
{
- CUR.error = TT_Err_Invalid_Reference;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Invalid_Reference;
}
+ else
+ {
+ K = CUR.stack[CUR.args - L];
- K = CUR.stack[CUR.args - L];
-
- FT_ARRAY_MOVE( &CUR.stack[CUR.args - L ],
- &CUR.stack[CUR.args - L + 1],
- ( L - 1 ) );
+ FT_ARRAY_MOVE( &CUR.stack[CUR.args - L ],
+ &CUR.stack[CUR.args - L + 1],
+ ( L - 1 ) );
- CUR.stack[CUR.args - 1] = K;
+ CUR.stack[CUR.args - 1] = K;
+ }
}
@@ -4390,7 +4696,7 @@
/* first of all, check the index */
F = args[0];
- if ( BOUNDS( F, CUR.maxFunc + 1 ) )
+ if ( BOUNDSL( F, CUR.maxFunc + 1 ) )
goto Fail;
/* Except for some old Apple fonts, all functions in a TrueType */
@@ -4466,7 +4772,7 @@
/* first of all, check the index */
F = args[1];
- if ( BOUNDS( F, CUR.maxFunc + 1 ) )
+ if ( BOUNDSL( F, CUR.maxFunc + 1 ) )
goto Fail;
/* Except for some old Apple fonts, all functions in a TrueType */
@@ -4569,7 +4875,7 @@
}
def->opc = (FT_Byte)args[0];
- def->start = CUR.IP+1;
+ def->start = CUR.IP + 1;
def->range = CUR.curRange;
def->active = TRUE;
@@ -4741,15 +5047,11 @@
L = (FT_ULong)args[0];
- if ( BOUNDS( L, CUR.zp2.n_points ) )
+ if ( BOUNDSL( L, CUR.zp2.n_points ) )
{
if ( CUR.pedantic_hinting )
- {
CUR.error = TT_Err_Invalid_Reference;
- return;
- }
- else
- R = 0;
+ R = 0;
}
else
{
@@ -4825,14 +5127,11 @@
K = (FT_UShort)args[1];
L = (FT_UShort)args[0];
- if( BOUNDS( L, CUR.zp0.n_points ) ||
- BOUNDS( K, CUR.zp1.n_points ) )
+ if ( BOUNDS( L, CUR.zp0.n_points ) ||
+ BOUNDS( K, CUR.zp1.n_points ) )
{
if ( CUR.pedantic_hinting )
- {
CUR.error = TT_Err_Invalid_Reference;
- return;
- }
D = 0;
}
else
@@ -5170,8 +5469,9 @@
if ( CUR.top < CUR.GS.loop )
{
- CUR.error = TT_Err_Too_Few_Arguments;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Too_Few_Arguments;
+ goto Fail;
}
while ( CUR.GS.loop > 0 )
@@ -5194,6 +5494,7 @@
CUR.GS.loop--;
}
+ Fail:
CUR.GS.loop = 1;
CUR.new_top = CUR.args;
}
@@ -5381,8 +5682,9 @@
if ( CUR.top < CUR.GS.loop )
{
- CUR.error = TT_Err_Invalid_Reference;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Invalid_Reference;
+ goto Fail;
}
if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) )
@@ -5408,6 +5710,7 @@
CUR.GS.loop--;
}
+ Fail:
CUR.GS.loop = 1;
CUR.new_top = CUR.args;
}
@@ -5480,12 +5783,12 @@
static void
Ins_SHZ( INS_ARG )
{
- TT_GlyphZoneRec zp;
- FT_UShort refp;
- FT_F26Dot6 dx,
- dy;
+ TT_GlyphZoneRec zp;
+ FT_UShort refp;
+ FT_F26Dot6 dx,
+ dy;
- FT_UShort last_point, i;
+ FT_UShort last_point, i;
if ( BOUNDS( args[0], 2 ) )
@@ -5505,7 +5808,16 @@
if ( CUR.GS.gep2 == 0 && CUR.zp2.n_points > 0 )
last_point = (FT_UShort)( CUR.zp2.n_points - 1 );
else if ( CUR.GS.gep2 == 1 && CUR.zp2.n_contours > 0 )
+ {
last_point = (FT_UShort)( CUR.zp2.contours[CUR.zp2.n_contours - 1] );
+
+ if ( BOUNDS( last_point, CUR.zp2.n_points ) )
+ {
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Invalid_Reference;
+ return;
+ }
+ }
else
last_point = 0;
@@ -5533,8 +5845,9 @@
if ( CUR.top < CUR.GS.loop + 1 )
{
- CUR.error = TT_Err_Invalid_Reference;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Invalid_Reference;
+ goto Fail;
}
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
@@ -5578,6 +5891,7 @@
CUR.GS.loop--;
}
+ Fail:
CUR.GS.loop = 1;
CUR.new_top = CUR.args;
}
@@ -5687,12 +6001,12 @@
cvtEntry = (FT_ULong)args[1];
point = (FT_UShort)args[0];
- if ( BOUNDS( point, CUR.zp0.n_points ) ||
- BOUNDS( cvtEntry, CUR.cvtSize ) )
+ if ( BOUNDS( point, CUR.zp0.n_points ) ||
+ BOUNDSL( cvtEntry, CUR.cvtSize ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
- return;
+ goto Fail;
}
/* XXX: UNDOCUMENTED! */
@@ -5738,6 +6052,7 @@
CUR_Func_move( &CUR.zp0, point, distance - org_dist );
+ Fail:
CUR.GS.rp0 = point;
CUR.GS.rp1 = point;
}
@@ -5763,7 +6078,7 @@
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
- return;
+ goto Fail;
}
/* XXX: Is there some undocumented feature while in the */
@@ -5848,6 +6163,7 @@
CUR_Func_move( &CUR.zp1, point, distance - org_dist );
+ Fail:
CUR.GS.rp1 = CUR.GS.rp0;
CUR.GS.rp2 = point;
@@ -5880,12 +6196,12 @@
/* XXX: UNDOCUMENTED! cvt[-1] = 0 always */
if ( BOUNDS( point, CUR.zp1.n_points ) ||
- BOUNDS( cvtEntry, CUR.cvtSize + 1 ) ||
+ BOUNDSL( cvtEntry, CUR.cvtSize + 1 ) ||
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
- return;
+ goto Fail;
}
if ( !cvtEntry )
@@ -5940,8 +6256,22 @@
/* refer to the same zone. */
if ( CUR.GS.gep0 == CUR.GS.gep1 )
- if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
+ {
+ /* XXX: According to Greg Hitchcock, the following wording is */
+ /* the right one: */
+ /* */
+ /* When the absolute difference between the value in */
+ /* the table [CVT] and the measurement directly from */
+ /* the outline is _greater_ than the cut_in value, the */
+ /* outline measurement is used. */
+ /* */
+ /* This is from `instgly.doc'. The description in */
+ /* `ttinst2.doc', version 1.66, is thus incorrect since */
+ /* it implies `>=' instead of `>'. */
+
+ if ( FT_ABS( cvt_dist - org_dist ) > CUR.GS.control_value_cutin )
cvt_dist = org_dist;
+ }
distance = CUR_Func_round(
cvt_dist,
@@ -5970,6 +6300,7 @@
CUR_Func_move( &CUR.zp1, point, distance - cur_dist );
+ Fail:
CUR.GS.rp1 = CUR.GS.rp0;
if ( ( CUR.opcode & 16 ) != 0 )
@@ -6000,7 +6331,7 @@
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
- return;
+ goto Fail;
}
while ( CUR.GS.loop > 0 )
@@ -6028,6 +6359,7 @@
CUR.GS.loop--;
}
+ Fail:
CUR.GS.loop = 1;
CUR.new_top = CUR.args;
}
@@ -6131,8 +6463,8 @@
p1 = (FT_UShort)args[0];
p2 = (FT_UShort)args[1];
- if ( BOUNDS( args[0], CUR.zp1.n_points ) ||
- BOUNDS( args[1], CUR.zp0.n_points ) )
+ if ( BOUNDS( p1, CUR.zp1.n_points ) ||
+ BOUNDS( p2, CUR.zp0.n_points ) )
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
@@ -6169,8 +6501,9 @@
if ( CUR.top < CUR.GS.loop )
{
- CUR.error = TT_Err_Invalid_Reference;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Invalid_Reference;
+ goto Fail;
}
/*
@@ -6184,7 +6517,7 @@
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
- return;
+ goto Fail;
}
if ( twilight )
@@ -6249,6 +6582,8 @@
CUR_Func_move( &CUR.zp2, (FT_UShort)point, new_dist - cur_dist );
}
+
+ Fail:
CUR.GS.loop = 1;
CUR.new_top = CUR.args;
}
@@ -6466,8 +6801,8 @@
end_point = CUR.pts.contours[contour] - CUR.pts.first_point;
first_point = point;
- if ( CUR.pts.n_points <= end_point )
- end_point = CUR.pts.n_points;
+ if ( BOUNDS ( end_point, CUR.pts.n_points ) )
+ end_point = CUR.pts.n_points - 1;
while ( point <= end_point && ( CUR.pts.tags[point] & mask ) == 0 )
point++;
@@ -6483,12 +6818,11 @@
{
if ( ( CUR.pts.tags[point] & mask ) != 0 )
{
- if ( point > 0 )
- _iup_worker_interpolate( &V,
- cur_touched + 1,
- point - 1,
- cur_touched,
- point );
+ _iup_worker_interpolate( &V,
+ cur_touched + 1,
+ point - 1,
+ cur_touched,
+ point );
cur_touched = point;
}
@@ -6542,8 +6876,9 @@
if ( CUR.args < n )
{
- CUR.error = TT_Err_Too_Few_Arguments;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Too_Few_Arguments;
+ n = CUR.args;
}
CUR.args -= n;
@@ -6559,8 +6894,10 @@
{
if ( CUR.args < 2 )
{
- CUR.error = TT_Err_Too_Few_Arguments;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Too_Few_Arguments;
+ CUR.args = 0;
+ goto Fail;
}
CUR.args -= 2;
@@ -6609,6 +6946,7 @@
CUR.error = TT_Err_Invalid_Reference;
}
+ Fail:
CUR.new_top = CUR.args;
}
@@ -6636,8 +6974,9 @@
if ( CUR.args < n )
{
- CUR.error = TT_Err_Too_Few_Arguments;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Too_Few_Arguments;
+ n = CUR.args;
}
CUR.args -= n;
@@ -6652,8 +6991,10 @@
{
if ( CUR.args < 2 )
{
- CUR.error = TT_Err_Too_Few_Arguments;
- return;
+ if ( CUR.pedantic_hinting )
+ CUR.error = TT_Err_Too_Few_Arguments;
+ CUR.args = 0;
+ goto Fail;
}
CUR.args -= 2;
@@ -6661,7 +7002,7 @@
A = (FT_ULong)CUR.stack[CUR.args + 1];
B = CUR.stack[CUR.args];
- if ( BOUNDS( A, CUR.cvtSize ) )
+ if ( BOUNDSL( A, CUR.cvtSize ) )
{
if ( CUR.pedantic_hinting )
{
@@ -6701,6 +7042,7 @@
}
}
+ Fail:
CUR.new_top = CUR.args;
}
@@ -6771,7 +7113,7 @@
call = CUR.callStack + CUR.callTop++;
call->Caller_Range = CUR.curRange;
- call->Caller_IP = CUR.IP+1;
+ call->Caller_IP = CUR.IP + 1;
call->Cur_Count = 1;
call->Cur_Restart = def->start;
@@ -7140,6 +7482,10 @@
{
CUR.opcode = CUR.code[CUR.IP];
+ FT_TRACE7(( " " ));
+ FT_TRACE7(( opcode_name[CUR.opcode] ));
+ FT_TRACE7(( "\n" ));
+
if ( ( CUR.length = opcode_length[CUR.opcode] ) < 0 )
{
if ( CUR.IP + 1 > CUR.codeSize )
@@ -7158,8 +7504,19 @@
/* One can also interpret it as the index of the last argument. */
if ( CUR.args < 0 )
{
- CUR.error = TT_Err_Too_Few_Arguments;
- goto LErrorLabel_;
+ FT_UShort i;
+
+
+ if ( CUR.pedantic_hinting )
+ {
+ CUR.error = TT_Err_Too_Few_Arguments;
+ goto LErrorLabel_;
+ }
+
+ /* push zeroes onto the stack */
+ for ( i = 0; i < Pop_Push_Count[CUR.opcode] >> 4; i++ )
+ CUR.stack[i] = 0;
+ CUR.args = 0;
}
CUR.new_top = CUR.args + ( Pop_Push_Count[CUR.opcode] & 15 );
@@ -7196,7 +7553,7 @@
case 0x04: /* SFvTCA y */
case 0x05: /* SFvTCA x */
{
- FT_Short AA, BB;
+ FT_Short AA, BB;
AA = (FT_Short)( ( opcode & 1 ) << 14 );
@@ -7834,6 +8191,15 @@
*exc = cur;
#endif
+ /* 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 ( CUR.error && !CUR.instruction_trap )
+ {
+ FT_TRACE1(( " The interpreter returned error 0x%x\n", CUR.error ));
+ exc->size->cvt_ready = FALSE;
+ }
+
return CUR.error;
}
diff --git a/3party/freetype/truetype/ttinterp.h b/3party/freetype/src/truetype/ttinterp.h
index 07a8972cb3..c480dfa506 100644
--- a/3party/freetype/truetype/ttinterp.h
+++ b/3party/freetype/src/truetype/ttinterp.h
@@ -4,7 +4,7 @@
/* */
/* TrueType bytecode interpreter (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -150,7 +150,7 @@ FT_BEGIN_HEADER
FT_Bool step_ins; /* true if the interpreter must */
/* increment IP after ins. exec */
- FT_Long cvtSize;
+ FT_ULong cvtSize;
FT_Long* cvt;
FT_UInt glyphSize; /* glyph instructions buffer size */
@@ -239,6 +239,14 @@ FT_BEGIN_HEADER
FT_Int range );
+ FT_LOCAL( FT_Error )
+ Update_Max( FT_Memory memory,
+ FT_ULong* size,
+ FT_Long multiplier,
+ void* _pbuff,
+ FT_ULong new_max );
+
+
/*************************************************************************/
/* */
/* <Function> */
diff --git a/3party/freetype/truetype/ttobjs.c b/3party/freetype/src/truetype/ttobjs.c
index 11d662d2d4..bcbd3b56c0 100644
--- a/3party/freetype/truetype/ttobjs.c
+++ b/3party/freetype/src/truetype/ttobjs.c
@@ -4,7 +4,7 @@
/* */
/* Objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011 */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -146,28 +146,28 @@
/* This list shall be expanded as we find more of them. */
static FT_Bool
- tt_check_trickyness( FT_String* name )
+ tt_check_trickyness_family( FT_String* name )
{
+
#define TRICK_NAMES_MAX_CHARACTERS 16
-#define TRICK_NAMES_COUNT 7
- static const char trick_names[TRICK_NAMES_COUNT][TRICK_NAMES_MAX_CHARACTERS+1] =
+#define TRICK_NAMES_COUNT 8
+
+ static const char trick_names[TRICK_NAMES_COUNT]
+ [TRICK_NAMES_MAX_CHARACTERS + 1] =
{
"DFKaiSho-SB", /* dfkaisb.ttf */
"DFKaiShu",
"DFKai-SB", /* kaiu.ttf */
+ "HuaTianKaiTi?", /* htkt2.ttf */
"HuaTianSongTi?", /* htst3.ttf */
"MingLiU", /* mingliu.ttf & mingliu.ttc */
"PMingLiU", /* mingliu.ttc */
"MingLi43", /* mingli.ttf */
};
- int nn;
+ int nn;
- if ( !name )
- return FALSE;
- /* Note that we only check the face name at the moment; it might */
- /* be worth to do more checks for a few special cases. */
for ( nn = 0; nn < TRICK_NAMES_COUNT; nn++ )
if ( ft_strstr( name, trick_names[nn] ) )
return TRUE;
@@ -176,6 +176,239 @@
}
+ /* XXX: This function should be in the `sfnt' module. */
+
+ /* Some PDF generators clear the checksums in the TrueType header table. */
+ /* For example, Quartz ContextPDF clears all entries, or Bullzip PDF */
+ /* Printer clears the entries for subsetted subtables. We thus have to */
+ /* recalculate the checksums where necessary. */
+
+ static FT_UInt32
+ tt_synth_sfnt_checksum( FT_Stream stream,
+ FT_ULong length )
+ {
+ FT_Error error;
+ FT_UInt32 checksum = 0;
+ int i;
+
+
+ if ( FT_FRAME_ENTER( length ) )
+ return 0;
+
+ for ( ; length > 3; length -= 4 )
+ checksum += (FT_UInt32)FT_GET_ULONG();
+
+ for ( i = 3; length > 0; length --, i-- )
+ checksum += (FT_UInt32)( FT_GET_BYTE() << ( i * 8 ) );
+
+ FT_FRAME_EXIT();
+
+ return checksum;
+ }
+
+
+ /* XXX: This function should be in the `sfnt' module. */
+
+ static FT_ULong
+ tt_get_sfnt_checksum( TT_Face face,
+ FT_UShort i )
+ {
+#if 0 /* if we believe the written value, use following part. */
+ if ( face->dir_tables[i].CheckSum )
+ return face->dir_tables[i].CheckSum;
+#endif
+
+ if ( !face->goto_table )
+ return 0;
+
+ if ( face->goto_table( face,
+ face->dir_tables[i].Tag,
+ face->root.stream,
+ NULL ) )
+ return 0;
+
+ return (FT_ULong)tt_synth_sfnt_checksum( face->root.stream,
+ face->dir_tables[i].Length );
+ }
+
+
+ typedef struct tt_sfnt_id_rec_
+ {
+ FT_ULong CheckSum;
+ FT_ULong Length;
+
+ } tt_sfnt_id_rec;
+
+
+ static FT_Bool
+ tt_check_trickyness_sfnt_ids( TT_Face face )
+ {
+#define TRICK_SFNT_IDS_PER_FACE 3
+#define TRICK_SFNT_IDS_NUM_FACES 13
+
+ static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES]
+ [TRICK_SFNT_IDS_PER_FACE] = {
+
+#define TRICK_SFNT_ID_cvt 0
+#define TRICK_SFNT_ID_fpgm 1
+#define TRICK_SFNT_ID_prep 2
+
+ { /* MingLiU 1995 */
+ { 0x05bcf058, 0x000002e4 }, /* cvt */
+ { 0x28233bf1, 0x000087c4 }, /* fpgm */
+ { 0xa344a1ea, 0x000001e1 } /* prep */
+ },
+ { /* MingLiU 1996- */
+ { 0x05bcf058, 0x000002e4 }, /* cvt */
+ { 0x28233bf1, 0x000087c4 }, /* fpgm */
+ { 0xa344a1eb, 0x000001e1 } /* prep */
+ },
+ { /* DFKaiShu */
+ { 0x11e5ead4, 0x00000350 }, /* cvt */
+ { 0x5a30ca3b, 0x00009063 }, /* fpgm */
+ { 0x13a42602, 0x0000007e } /* prep */
+ },
+ { /* HuaTianKaiTi */
+ { 0xfffbfffc, 0x00000008 }, /* cvt */
+ { 0x9c9e48b8, 0x0000bea2 }, /* fpgm */
+ { 0x70020112, 0x00000008 } /* prep */
+ },
+ { /* HuaTianSongTi */
+ { 0xfffbfffc, 0x00000008 }, /* cvt */
+ { 0x0a5a0483, 0x00017c39 }, /* fpgm */
+ { 0x70020112, 0x00000008 } /* prep */
+ },
+ { /* NEC fadpop7.ttf */
+ { 0x00000000, 0x00000000 }, /* cvt */
+ { 0x40c92555, 0x000000e5 }, /* fpgm */
+ { 0xa39b58e3, 0x0000117c } /* prep */
+ },
+ { /* NEC fadrei5.ttf */
+ { 0x00000000, 0x00000000 }, /* cvt */
+ { 0x33c41652, 0x000000e5 }, /* fpgm */
+ { 0x26d6c52a, 0x00000f6a } /* prep */
+ },
+ { /* NEC fangot7.ttf */
+ { 0x00000000, 0x00000000 }, /* cvt */
+ { 0x6db1651d, 0x0000019d }, /* fpgm */
+ { 0x6c6e4b03, 0x00002492 } /* prep */
+ },
+ { /* NEC fangyo5.ttf */
+ { 0x00000000, 0x00000000 }, /* cvt */
+ { 0x40c92555, 0x000000e5 }, /* fpgm */
+ { 0xde51fad0, 0x0000117c } /* prep */
+ },
+ { /* NEC fankyo5.ttf */
+ { 0x00000000, 0x00000000 }, /* cvt */
+ { 0x85e47664, 0x000000e5 }, /* fpgm */
+ { 0xa6c62831, 0x00001caa } /* prep */
+ },
+ { /* NEC fanrgo5.ttf */
+ { 0x00000000, 0x00000000 }, /* cvt */
+ { 0x2d891cfd, 0x0000019d }, /* fpgm */
+ { 0xa0604633, 0x00001de8 } /* prep */
+ },
+ { /* NEC fangot5.ttc */
+ { 0x00000000, 0x00000000 }, /* cvt */
+ { 0x40aa774c, 0x000001cb }, /* fpgm */
+ { 0x9b5caa96, 0x00001f9a } /* prep */
+ },
+ { /* NEC fanmin3.ttc */
+ { 0x00000000, 0x00000000 }, /* cvt */
+ { 0x0d3de9cb, 0x00000141 }, /* fpgm */
+ { 0xd4127766, 0x00002280 } /* prep */
+ }
+ };
+
+ FT_ULong checksum;
+ int num_matched_ids[TRICK_SFNT_IDS_NUM_FACES];
+ FT_Bool has_cvt, has_fpgm, has_prep;
+ FT_UShort i;
+ int j, k;
+
+
+ FT_MEM_SET( num_matched_ids, 0,
+ sizeof( int ) * TRICK_SFNT_IDS_NUM_FACES );
+ has_cvt = FALSE;
+ has_fpgm = FALSE;
+ has_prep = FALSE;
+
+ for ( i = 0; i < face->num_tables; i++ )
+ {
+ checksum = 0;
+
+ switch( face->dir_tables[i].Tag )
+ {
+ case TTAG_cvt:
+ k = TRICK_SFNT_ID_cvt;
+ has_cvt = TRUE;
+ break;
+
+ case TTAG_fpgm:
+ k = TRICK_SFNT_ID_fpgm;
+ has_fpgm = TRUE;
+ break;
+
+ case TTAG_prep:
+ k = TRICK_SFNT_ID_prep;
+ has_prep = TRUE;
+ break;
+
+ default:
+ continue;
+ }
+
+ for ( j = 0; j < TRICK_SFNT_IDS_NUM_FACES; j++ )
+ if ( face->dir_tables[i].Length == sfnt_id[j][k].Length )
+ {
+ if ( !checksum )
+ checksum = tt_get_sfnt_checksum( face, i );
+
+ if ( sfnt_id[j][k].CheckSum == checksum )
+ num_matched_ids[j]++;
+
+ if ( num_matched_ids[j] == TRICK_SFNT_IDS_PER_FACE )
+ return TRUE;
+ }
+ }
+
+ for ( j = 0; j < TRICK_SFNT_IDS_NUM_FACES; j++ )
+ {
+ if ( !has_cvt && !sfnt_id[j][TRICK_SFNT_ID_cvt].Length )
+ num_matched_ids[j] ++;
+ if ( !has_fpgm && !sfnt_id[j][TRICK_SFNT_ID_fpgm].Length )
+ num_matched_ids[j] ++;
+ if ( !has_prep && !sfnt_id[j][TRICK_SFNT_ID_prep].Length )
+ num_matched_ids[j] ++;
+ if ( num_matched_ids[j] == TRICK_SFNT_IDS_PER_FACE )
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+
+ static FT_Bool
+ tt_check_trickyness( FT_Face face )
+ {
+ if ( !face )
+ return FALSE;
+
+ /* For first, check the face name for quick check. */
+ if ( face->family_name &&
+ tt_check_trickyness_family( face->family_name ) )
+ return TRUE;
+
+ /* Type42 fonts may lack `name' tables, we thus try to identify */
+ /* tricky fonts by checking the checksums of Type42-persistent */
+ /* sfnt tables (`cvt', `fpgm', and `prep'). */
+ if ( tt_check_trickyness_sfnt_ids( (TT_Face)face ) )
+ return TRUE;
+
+ return FALSE;
+ }
+
+
/*************************************************************************/
/* */
/* <Function> */
@@ -250,7 +483,7 @@
if ( error )
goto Exit;
- if ( tt_check_trickyness( ttface->family_name ) )
+ if ( tt_check_trickyness( ttface ) )
ttface->face_flags |= FT_FACE_FLAG_TRICKY;
error = tt_face_load_hdmx( face, stream );
@@ -394,13 +627,16 @@
/* Run the font program. */
/* */
/* <Input> */
- /* size :: A handle to the size object. */
+ /* size :: A handle to the size object. */
+ /* */
+ /* pedantic :: Set if bytecode execution should be pedantic. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- tt_size_run_fpgm( TT_Size size )
+ tt_size_run_fpgm( TT_Size size,
+ FT_Bool pedantic )
{
TT_Face face = (TT_Face)size->root.face;
TT_ExecContext exec;
@@ -418,15 +654,17 @@
TT_Load_Context( exec, face, size );
- exec->callTop = 0;
- exec->top = 0;
+ exec->callTop = 0;
+ exec->top = 0;
exec->period = 64;
exec->phase = 0;
exec->threshold = 0;
exec->instruction_trap = FALSE;
- exec->F_dot_P = 0x10000L;
+ exec->F_dot_P = 0x10000L;
+
+ exec->pedantic_hinting = pedantic;
{
FT_Size_Metrics* metrics = &exec->metrics;
@@ -458,7 +696,11 @@
error = TT_Goto_CodeRange( exec, tt_coderange_font, 0 );
if ( !error )
+ {
+ FT_TRACE4(( "Executing `fpgm' table.\n" ));
+
error = face->interpreter( exec );
+ }
}
else
error = TT_Err_Ok;
@@ -479,13 +721,16 @@
/* Run the control value program. */
/* */
/* <Input> */
- /* size :: A handle to the size object. */
+ /* size :: A handle to the size object. */
+ /* */
+ /* pedantic :: Set if bytecode execution should be pedantic. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
FT_LOCAL_DEF( FT_Error )
- tt_size_run_prep( TT_Size size )
+ tt_size_run_prep( TT_Size size,
+ FT_Bool pedantic )
{
TT_Face face = (TT_Face)size->root.face;
TT_ExecContext exec;
@@ -508,6 +753,8 @@
exec->instruction_trap = FALSE;
+ exec->pedantic_hinting = pedantic;
+
TT_Set_CodeRange( exec,
tt_coderange_cvt,
face->cvt_program,
@@ -520,7 +767,11 @@
error = TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
if ( !error && !size->debug )
+ {
+ FT_TRACE4(( "Executing `prep' table.\n" ));
+
error = face->interpreter( exec );
+ }
}
else
error = TT_Err_Ok;
@@ -582,7 +833,8 @@
/* Initialize bytecode-related fields in the size object. */
/* We do this only if bytecode interpretation is really needed. */
static FT_Error
- tt_size_init_bytecode( FT_Size ftsize )
+ tt_size_init_bytecode( FT_Size ftsize,
+ FT_Bool pedantic )
{
FT_Error error;
TT_Size size = (TT_Size)ftsize;
@@ -655,7 +907,7 @@
}
/* Fine, now run the font program! */
- error = tt_size_run_fpgm( size );
+ error = tt_size_run_fpgm( size, pedantic );
Exit:
if ( error )
@@ -666,14 +918,15 @@
FT_LOCAL_DEF( FT_Error )
- tt_size_ready_bytecode( TT_Size size )
+ tt_size_ready_bytecode( TT_Size size,
+ FT_Bool pedantic )
{
FT_Error error = TT_Err_Ok;
if ( !size->bytecode_ready )
{
- error = tt_size_init_bytecode( (FT_Size)size );
+ error = tt_size_init_bytecode( (FT_Size)size, pedantic );
if ( error )
goto Exit;
}
@@ -705,7 +958,7 @@
size->GS = tt_default_graphics_state;
- error = tt_size_run_prep( size );
+ error = tt_size_run_prep( size, pedantic );
if ( !error )
size->cvt_ready = 1;
}
diff --git a/3party/freetype/truetype/ttobjs.h b/3party/freetype/src/truetype/ttobjs.h
index 30c8669cb2..087b3c2e1b 100644
--- a/3party/freetype/truetype/ttobjs.h
+++ b/3party/freetype/src/truetype/ttobjs.h
@@ -4,7 +4,7 @@
/* */
/* Objects manager (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -390,13 +390,16 @@ FT_BEGIN_HEADER
#ifdef TT_USE_BYTECODE_INTERPRETER
FT_LOCAL( FT_Error )
- tt_size_run_fpgm( TT_Size size );
+ tt_size_run_fpgm( TT_Size size,
+ FT_Bool pedantic );
FT_LOCAL( FT_Error )
- tt_size_run_prep( TT_Size size );
+ tt_size_run_prep( TT_Size size,
+ FT_Bool pedantic );
FT_LOCAL( FT_Error )
- tt_size_ready_bytecode( TT_Size size );
+ tt_size_ready_bytecode( TT_Size size,
+ FT_Bool pedantic );
#endif /* TT_USE_BYTECODE_INTERPRETER */
diff --git a/3party/freetype/truetype/ttpic.c b/3party/freetype/src/truetype/ttpic.c
index 27ec4a1d5e..5d725742c7 100644
--- a/3party/freetype/truetype/ttpic.c
+++ b/3party/freetype/src/truetype/ttpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for truetype module. */
/* */
-/* Copyright 2009 by */
+/* Copyright 2009, 2010 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -45,13 +45,15 @@
}
}
+
FT_Error
- tt_driver_class_pic_init( FT_Library library )
+ tt_driver_class_pic_init( FT_Library library )
{
- FT_PIC_Container* pic_container = &library->pic_container;
- FT_Error error = FT_Err_Ok;
- TTModulePIC* container;
- FT_Memory memory = library->memory;
+ FT_PIC_Container* pic_container = &library->pic_container;
+ FT_Error error = TT_Err_Ok;
+ TTModulePIC* container;
+ FT_Memory memory = library->memory;
+
/* allocate pointer, clear and set global container pointer */
if ( FT_ALLOC ( container, sizeof ( *container ) ) )
diff --git a/3party/freetype/truetype/ttpic.h b/3party/freetype/src/truetype/ttpic.h
index 84de0fee9e..84de0fee9e 100644
--- a/3party/freetype/truetype/ttpic.h
+++ b/3party/freetype/src/truetype/ttpic.h
diff --git a/3party/freetype/truetype/ttpload.c b/3party/freetype/src/truetype/ttpload.c
index a311b03c00..818b29d263 100644
--- a/3party/freetype/truetype/ttpload.c
+++ b/3party/freetype/src/truetype/ttpload.c
@@ -4,7 +4,7 @@
/* */
/* TrueType-specific tables loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2002, 2004-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -110,15 +110,16 @@
face->num_locations = table_len >> shift;
}
- if ( face->num_locations != (FT_ULong)face->root.num_glyphs )
+ if ( face->num_locations != (FT_ULong)face->root.num_glyphs + 1 )
{
FT_TRACE2(( "glyph count mismatch! loca: %d, maxp: %d\n",
- face->num_locations, face->root.num_glyphs ));
+ face->num_locations - 1, face->root.num_glyphs ));
/* we only handle the case where `maxp' gives a larger value */
- if ( face->num_locations < (FT_ULong)face->root.num_glyphs )
+ if ( face->num_locations <= (FT_ULong)face->root.num_glyphs )
{
- FT_Long new_loca_len = (FT_Long)face->root.num_glyphs << shift;
+ FT_Long new_loca_len =
+ ( (FT_Long)( face->root.num_glyphs ) + 1 ) << shift;
TT_Table entry = face->dir_tables;
TT_Table limit = entry + face->num_tables;
@@ -137,9 +138,15 @@
dist = diff;
}
+ if ( entry == limit )
+ {
+ /* `loca' is the last table */
+ dist = stream->size - pos;
+ }
+
if ( new_loca_len <= dist )
{
- face->num_locations = face->root.num_glyphs;
+ face->num_locations = face->root.num_glyphs + 1;
table_len = new_loca_len;
FT_TRACE2(( "adjusting num_locations to %d\n",
@@ -203,6 +210,26 @@
}
}
+ /* 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,"
+ " 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,"
+ " truncate at the end of glyf table (0x%08lx)\n",
+ pos2, gindex + 1, face->glyf_len ));
+ pos2 = face->glyf_len;
+ }
+
/* The `loca' table must be ordered; it refers to the length of */
/* an entry as the difference between the current and the next */
/* position. However, there do exist (malformed) fonts which */
@@ -287,7 +314,7 @@
FT_Short* limit = cur + face->cvt_size;
- for ( ; cur < limit; cur++ )
+ for ( ; cur < limit; cur++ )
*cur = FT_GET_SHORT();
}
diff --git a/3party/freetype/truetype/ttpload.h b/3party/freetype/src/truetype/ttpload.h
index f61ac079ce..f61ac079ce 100644
--- a/3party/freetype/truetype/ttpload.h
+++ b/3party/freetype/src/truetype/ttpload.h
diff --git a/3party/freetype/type1/Jamfile b/3party/freetype/src/type1/Jamfile
index 8e366baae5..8e366baae5 100644
--- a/3party/freetype/type1/Jamfile
+++ b/3party/freetype/src/type1/Jamfile
diff --git a/3party/freetype/src/type1/module.mk b/3party/freetype/src/type1/module.mk
new file mode 100644
index 0000000000..ade0210d76
--- /dev/null
+++ b/3party/freetype/src/type1/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 Type1 module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += TYPE1_DRIVER
+
+define TYPE1_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, t1_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)type1 $(ECHO_DRIVER_DESC)Postscript font files with extension *.pfa or *.pfb$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/type1/rules.mk b/3party/freetype/src/type1/rules.mk
new file mode 100644
index 0000000000..15087b0304
--- /dev/null
+++ b/3party/freetype/src/type1/rules.mk
@@ -0,0 +1,73 @@
+#
+# FreeType 2 Type1 driver configuration rules
+#
+
+
+# Copyright 1996-2000, 2001, 2003 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.
+
+
+# Type1 driver directory
+#
+T1_DIR := $(SRC_DIR)/type1
+
+
+# compilation flags for the driver
+#
+T1_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(T1_DIR))
+
+
+# Type1 driver sources (i.e., C files)
+#
+T1_DRV_SRC := $(T1_DIR)/t1parse.c \
+ $(T1_DIR)/t1load.c \
+ $(T1_DIR)/t1driver.c \
+ $(T1_DIR)/t1afm.c \
+ $(T1_DIR)/t1gload.c \
+ $(T1_DIR)/t1objs.c
+
+# Type1 driver headers
+#
+T1_DRV_H := $(T1_DRV_SRC:%.c=%.h) \
+ $(T1_DIR)/t1tokens.h \
+ $(T1_DIR)/t1errors.h
+
+
+# Type1 driver object(s)
+#
+# T1_DRV_OBJ_M is used during `multi' builds
+# T1_DRV_OBJ_S is used during `single' builds
+#
+T1_DRV_OBJ_M := $(T1_DRV_SRC:$(T1_DIR)/%.c=$(OBJ_DIR)/%.$O)
+T1_DRV_OBJ_S := $(OBJ_DIR)/type1.$O
+
+# Type1 driver source file for single build
+#
+T1_DRV_SRC_S := $(T1_DIR)/type1.c
+
+
+# Type1 driver - single object
+#
+$(T1_DRV_OBJ_S): $(T1_DRV_SRC_S) $(T1_DRV_SRC) $(FREETYPE_H) $(T1_DRV_H)
+ $(T1_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(T1_DRV_SRC_S))
+
+
+# Type1 driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(T1_DIR)/%.c $(FREETYPE_H) $(T1_DRV_H)
+ $(T1_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(T1_DRV_OBJ_S)
+DRV_OBJS_M += $(T1_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/type1/t1afm.c b/3party/freetype/src/type1/t1afm.c
index 16dc471c57..780ab33bf7 100644
--- a/3party/freetype/type1/t1afm.c
+++ b/3party/freetype/src/type1/t1afm.c
@@ -4,7 +4,8 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,7 +59,7 @@
/* PS string/name length must be < 16-bit */
- if ( ( len - 0xFFFFU ) > 0 )
+ if ( len > 0xFFFFU )
return 0;
for ( n = 0; n < type1->num_glyphs; n++ )
@@ -235,10 +236,10 @@
FT_Stream stream )
{
PSAux_Service psaux;
- FT_Memory memory = stream->memory;
+ FT_Memory memory = stream->memory;
AFM_ParserRec parser;
- AFM_FontInfo fi;
- FT_Error error = T1_Err_Unknown_File_Format;
+ AFM_FontInfo fi = NULL;
+ FT_Error error = T1_Err_Unknown_File_Format;
T1_Font t1_font = &( (T1_Face)t1_face )->type1;
@@ -285,13 +286,15 @@
{
t1_font->font_bbox = fi->FontBBox;
- t1_face->bbox.xMin = fi->FontBBox.xMin >> 16;
- t1_face->bbox.yMin = fi->FontBBox.yMin >> 16;
- t1_face->bbox.xMax = ( fi->FontBBox.xMax + 0xFFFFU ) >> 16;
- t1_face->bbox.yMax = ( fi->FontBBox.yMax + 0xFFFFU ) >> 16;
+ t1_face->bbox.xMin = fi->FontBBox.xMin >> 16;
+ t1_face->bbox.yMin = fi->FontBBox.yMin >> 16;
+ /* no `U' suffix here to 0xFFFF! */
+ t1_face->bbox.xMax = ( fi->FontBBox.xMax + 0xFFFF ) >> 16;
+ t1_face->bbox.yMax = ( fi->FontBBox.yMax + 0xFFFF ) >> 16;
- t1_face->ascender = (FT_Short)( ( fi->Ascender + 0x8000U ) >> 16 );
- t1_face->descender = (FT_Short)( ( fi->Descender + 0x8000U ) >> 16 );
+ /* no `U' suffix here to 0x8000! */
+ t1_face->ascender = (FT_Short)( ( fi->Ascender + 0x8000 ) >> 16 );
+ t1_face->descender = (FT_Short)( ( fi->Descender + 0x8000 ) >> 16 );
if ( fi->NumKernPair )
{
diff --git a/3party/freetype/type1/t1afm.h b/3party/freetype/src/type1/t1afm.h
index 8eb1764de7..8eb1764de7 100644
--- a/3party/freetype/type1/t1afm.h
+++ b/3party/freetype/src/type1/t1afm.h
diff --git a/3party/freetype/type1/t1driver.c b/3party/freetype/src/type1/t1driver.c
index 8c398eee22..8c398eee22 100644
--- a/3party/freetype/type1/t1driver.c
+++ b/3party/freetype/src/type1/t1driver.c
diff --git a/3party/freetype/type1/t1driver.h b/3party/freetype/src/type1/t1driver.h
index 9fecbeb0f8..9fecbeb0f8 100644
--- a/3party/freetype/type1/t1driver.h
+++ b/3party/freetype/src/type1/t1driver.h
diff --git a/3party/freetype/type1/t1errors.h b/3party/freetype/src/type1/t1errors.h
index 81221c343d..81221c343d 100644
--- a/3party/freetype/type1/t1errors.h
+++ b/3party/freetype/src/type1/t1errors.h
diff --git a/3party/freetype/type1/t1gload.c b/3party/freetype/src/type1/t1gload.c
index 16586153fb..f3fad4f5df 100644
--- a/3party/freetype/type1/t1gload.c
+++ b/3party/freetype/src/type1/t1gload.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -103,16 +103,16 @@
metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x );
- metrics.bearing_y = FIXED_TO_INT( decoder->builder.left_bearing.y );
+ metrics.bearing_y = 0;
metrics.advance = FIXED_TO_INT( decoder->builder.advance.x );
+ metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y );
error = inc->funcs->get_glyph_metrics( inc->object,
glyph_index, FALSE, &metrics );
decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x );
- decoder->builder.left_bearing.y = INT_TO_FIXED( metrics.bearing_y );
decoder->builder.advance.x = INT_TO_FIXED( metrics.advance );
- decoder->builder.advance.y = 0;
+ decoder->builder.advance.y = INT_TO_FIXED( metrics.advance_v );
}
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
@@ -287,7 +287,12 @@
#endif
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ if ( glyph_index >= (FT_UInt)face->root.num_glyphs &&
+ !face->root.internal->incremental_interface )
+#else
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
error = T1_Err_Invalid_Argument;
goto Exit;
@@ -396,10 +401,20 @@
FIXED_TO_INT( decoder.builder.advance.x );
glyph->root.internal->glyph_transformed = 0;
- /* make up vertical ones */
- metrics->vertAdvance = ( face->type1.font_bbox.yMax -
- face->type1.font_bbox.yMin ) >> 16;
- glyph->root.linearVertAdvance = metrics->vertAdvance;
+ if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
+ {
+ /* make up vertical ones */
+ metrics->vertAdvance = ( face->type1.font_bbox.yMax -
+ face->type1.font_bbox.yMin ) >> 16;
+ glyph->root.linearVertAdvance = metrics->vertAdvance;
+ }
+ else
+ {
+ metrics->vertAdvance =
+ FIXED_TO_INT( decoder.builder.advance.y );
+ glyph->root.linearVertAdvance =
+ FIXED_TO_INT( decoder.builder.advance.y );
+ }
glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
@@ -459,9 +474,12 @@
metrics->horiBearingX = cbox.xMin;
metrics->horiBearingY = cbox.yMax;
- /* make up vertical ones */
- ft_synthesize_vertical_metrics( metrics,
- metrics->vertAdvance );
+ if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
+ {
+ /* make up vertical ones */
+ ft_synthesize_vertical_metrics( metrics,
+ metrics->vertAdvance );
+ }
}
/* Set control data to the glyph charstrings. Note that this is */
diff --git a/3party/freetype/type1/t1gload.h b/3party/freetype/src/type1/t1gload.h
index 100df06e8e..100df06e8e 100644
--- a/3party/freetype/type1/t1gload.h
+++ b/3party/freetype/src/type1/t1gload.h
diff --git a/3party/freetype/type1/t1load.c b/3party/freetype/src/type1/t1load.c
index d867e942c9..09fe6adf5e 100644
--- a/3party/freetype/type1/t1load.c
+++ b/3party/freetype/src/type1/t1load.c
@@ -4,7 +4,8 @@
/* */
/* Type 1 font loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
+/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -302,7 +303,7 @@
FT_MM_Var* *master )
{
FT_Memory memory = face->root.memory;
- FT_MM_Var *mmvar;
+ FT_MM_Var *mmvar = NULL;
FT_Multi_Master mmaster;
FT_Error error;
FT_UInt i;
@@ -1045,7 +1046,8 @@
if ( cur < limit && ft_isdigit( *cur ) )
{
- *size = T1_ToInt( parser );
+ FT_Long s = T1_ToInt( parser );
+
T1_Skip_PS_Token( parser ); /* `RD' or `-|' or something else */
@@ -1053,8 +1055,12 @@
/* `RD' or `-|' token */
*base = parser->root.cursor + 1;
- parser->root.cursor += *size + 1;
- return !parser->root.error;
+ if ( s >= 0 && s < limit - *base )
+ {
+ parser->root.cursor += s + 1;
+ *size = s;
+ return !parser->root.error;
+ }
}
FT_ERROR(( "read_binary_data: invalid size field\n" ));
@@ -1111,7 +1117,7 @@
temp[2] = FT_DivFix( temp[2], temp_scale );
temp[4] = FT_DivFix( temp[4], temp_scale );
temp[5] = FT_DivFix( temp[5], temp_scale );
- temp[3] = 0x10000L;
+ temp[3] = temp[3] < 0 ? -0x10000L : 0x10000L;
}
matrix->xx = temp[0];
@@ -2180,7 +2186,7 @@
/* OK, we do the following: for each element in the encoding */
/* table, look up the index of the glyph having the same name */
/* the index is then stored in type1.encoding.char_index, and */
- /* a the name to type1.encoding.char_name */
+ /* the name to type1.encoding.char_name */
min_char = 0;
max_char = 0;
diff --git a/3party/freetype/type1/t1load.h b/3party/freetype/src/type1/t1load.h
index 546fc33530..546fc33530 100644
--- a/3party/freetype/type1/t1load.h
+++ b/3party/freetype/src/type1/t1load.h
diff --git a/3party/freetype/type1/t1objs.c b/3party/freetype/src/type1/t1objs.c
index e9357e6c57..58632109c7 100644
--- a/3party/freetype/type1/t1objs.c
+++ b/3party/freetype/src/type1/t1objs.c
@@ -441,10 +441,11 @@
root->num_fixed_sizes = 0;
root->available_sizes = 0;
- root->bbox.xMin = type1->font_bbox.xMin >> 16;
- root->bbox.yMin = type1->font_bbox.yMin >> 16;
- root->bbox.xMax = ( type1->font_bbox.xMax + 0xFFFFU ) >> 16;
- root->bbox.yMax = ( type1->font_bbox.yMax + 0xFFFFU ) >> 16;
+ root->bbox.xMin = type1->font_bbox.xMin >> 16;
+ root->bbox.yMin = type1->font_bbox.yMin >> 16;
+ /* no `U' suffix here to 0xFFFF! */
+ root->bbox.xMax = ( type1->font_bbox.xMax + 0xFFFF ) >> 16;
+ root->bbox.yMax = ( type1->font_bbox.yMax + 0xFFFF ) >> 16;
/* Set units_per_EM if we didn't set it in parse_font_matrix. */
if ( !root->units_per_EM )
@@ -493,14 +494,17 @@
charmap.face = root;
/* first of all, try to synthesize a Unicode charmap */
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ goto Exit;
+ error = FT_Err_Ok;
/* now, generate an Adobe Standard encoding when appropriate */
- charmap.platform_id = 7;
+ charmap.platform_id = TT_PLATFORM_ADOBE;
clazz = NULL;
switch ( type1->encoding_type )
@@ -534,7 +538,7 @@
}
if ( clazz )
- FT_CMap_New( clazz, NULL, &charmap, NULL );
+ error = FT_CMap_New( clazz, NULL, &charmap, NULL );
#if 0
/* Select default charmap */
diff --git a/3party/freetype/type1/t1objs.h b/3party/freetype/src/type1/t1objs.h
index e5e90293d7..e5e90293d7 100644
--- a/3party/freetype/type1/t1objs.h
+++ b/3party/freetype/src/type1/t1objs.h
diff --git a/3party/freetype/type1/t1parse.c b/3party/freetype/src/type1/t1parse.c
index 1bef56bcfa..2a762279fd 100644
--- a/3party/freetype/type1/t1parse.c
+++ b/3party/freetype/src/type1/t1parse.c
@@ -397,15 +397,18 @@
T1_Skip_PS_Token( parser );
cur = parser->root.cursor;
- if ( *cur == '\r' )
- {
- cur++;
- if ( *cur == '\n' )
- cur++;
- }
- else if ( *cur == '\n' )
- cur++;
- else
+
+ /* according to the Type1 spec, the first cipher byte must not be */
+ /* an ASCII whitespace character code (blank, tab, carriage return */
+ /* or line feed). We have seen Type 1 fonts with two line feed */
+ /* characters... So skip now all whitespace character codes. */
+ while ( cur < limit &&
+ ( *cur == ' ' ||
+ *cur == '\t' ||
+ *cur == '\r' ||
+ *cur == '\n' ) )
+ ++cur;
+ if ( cur >= limit )
{
FT_ERROR(( "T1_Get_Private_Dict:"
" `eexec' not properly terminated\n" ));
diff --git a/3party/freetype/type1/t1parse.h b/3party/freetype/src/type1/t1parse.h
index fb1c8a8830..fb1c8a8830 100644
--- a/3party/freetype/type1/t1parse.h
+++ b/3party/freetype/src/type1/t1parse.h
diff --git a/3party/freetype/type1/t1tokens.h b/3party/freetype/src/type1/t1tokens.h
index 2d692f0e61..2d692f0e61 100644
--- a/3party/freetype/type1/t1tokens.h
+++ b/3party/freetype/src/type1/t1tokens.h
diff --git a/3party/freetype/type1/type1.c b/3party/freetype/src/type1/type1.c
index ccc12be103..ccc12be103 100644
--- a/3party/freetype/type1/type1.c
+++ b/3party/freetype/src/type1/type1.c
diff --git a/3party/freetype/type42/Jamfile b/3party/freetype/src/type42/Jamfile
index 00371d54f3..00371d54f3 100644
--- a/3party/freetype/type42/Jamfile
+++ b/3party/freetype/src/type42/Jamfile
diff --git a/3party/freetype/src/type42/module.mk b/3party/freetype/src/type42/module.mk
new file mode 100644
index 0000000000..b3f10a8d3c
--- /dev/null
+++ b/3party/freetype/src/type42/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 Type42 module definition
+#
+
+
+# Copyright 2002, 2006 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.
+
+
+FTMODULE_H_COMMANDS += TYPE42_DRIVER
+
+define TYPE42_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, t42_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)type42 $(ECHO_DRIVER_DESC)Type 42 font files with no known extension$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/type42/rules.mk b/3party/freetype/src/type42/rules.mk
new file mode 100644
index 0000000000..eac1081eb1
--- /dev/null
+++ b/3party/freetype/src/type42/rules.mk
@@ -0,0 +1,70 @@
+#
+# FreeType 2 Type42 driver configuration rules
+#
+
+
+# Copyright 2002, 2003, 2008 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.
+
+
+# Type42 driver directory
+#
+T42_DIR := $(SRC_DIR)/type42
+
+
+# compilation flags for the driver
+#
+T42_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(T42_DIR))
+
+
+# Type42 driver source
+#
+T42_DRV_SRC := $(T42_DIR)/t42objs.c \
+ $(T42_DIR)/t42parse.c \
+ $(T42_DIR)/t42drivr.c
+
+# Type42 driver headers
+#
+T42_DRV_H := $(T42_DRV_SRC:%.c=%.h) \
+ $(T42_DIR)/t42error.h \
+ $(T42_DIR)/t42types.h
+
+
+# Type42 driver object(s)
+#
+# T42_DRV_OBJ_M is used during `multi' builds
+# T42_DRV_OBJ_S is used during `single' builds
+#
+T42_DRV_OBJ_M := $(T42_DRV_SRC:$(T42_DIR)/%.c=$(OBJ_DIR)/%.$O)
+T42_DRV_OBJ_S := $(OBJ_DIR)/type42.$O
+
+# Type42 driver source file for single build
+#
+T42_DRV_SRC_S := $(T42_DIR)/type42.c
+
+
+# Type42 driver - single object
+#
+$(T42_DRV_OBJ_S): $(T42_DRV_SRC_S) $(T42_DRV_SRC) $(FREETYPE_H) $(T42_DRV_H)
+ $(T42_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(T42_DRV_SRC_S))
+
+
+# Type42 driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(T42_DIR)/%.c $(FREETYPE_H) $(T42_DRV_H)
+ $(T42_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(T42_DRV_OBJ_S)
+DRV_OBJS_M += $(T42_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/type42/t42drivr.c b/3party/freetype/src/type42/t42drivr.c
index 820c679612..820c679612 100644
--- a/3party/freetype/type42/t42drivr.c
+++ b/3party/freetype/src/type42/t42drivr.c
diff --git a/3party/freetype/type42/t42drivr.h b/3party/freetype/src/type42/t42drivr.h
index 4717e4613f..4717e4613f 100644
--- a/3party/freetype/type42/t42drivr.h
+++ b/3party/freetype/src/type42/t42drivr.h
diff --git a/3party/freetype/type42/t42error.h b/3party/freetype/src/type42/t42error.h
index b230910012..b230910012 100644
--- a/3party/freetype/type42/t42error.h
+++ b/3party/freetype/src/type42/t42error.h
diff --git a/3party/freetype/type42/t42objs.c b/3party/freetype/src/type42/t42objs.c
index 9081ffc6d2..a5e0ee5e81 100644
--- a/3party/freetype/type42/t42objs.c
+++ b/3party/freetype/src/type42/t42objs.c
@@ -21,6 +21,7 @@
#include "t42error.h"
#include FT_INTERNAL_DEBUG_H
#include FT_LIST_H
+#include FT_TRUETYPE_IDS_H
#undef FT_COMPONENT
@@ -330,39 +331,42 @@
charmap.face = root;
/* first of all, try to synthesize a Unicode charmap */
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+ charmap.platform_id = TT_PLATFORM_MICROSOFT;
+ charmap.encoding_id = TT_MS_ID_UNICODE_CS;
charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
+ if ( error && FT_Err_No_Unicode_Glyph_Name != error )
+ goto Exit;
+ error = FT_Err_Ok;
/* now, generate an Adobe Standard encoding when appropriate */
- charmap.platform_id = 7;
+ charmap.platform_id = TT_PLATFORM_ADOBE;
clazz = NULL;
switch ( type1->encoding_type )
{
case T1_ENCODING_TYPE_STANDARD:
charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
- charmap.encoding_id = 0;
+ charmap.encoding_id = TT_ADOBE_ID_STANDARD;
clazz = cmap_classes->standard;
break;
case T1_ENCODING_TYPE_EXPERT:
charmap.encoding = FT_ENCODING_ADOBE_EXPERT;
- charmap.encoding_id = 1;
+ charmap.encoding_id = TT_ADOBE_ID_EXPERT;
clazz = cmap_classes->expert;
break;
case T1_ENCODING_TYPE_ARRAY:
charmap.encoding = FT_ENCODING_ADOBE_CUSTOM;
- charmap.encoding_id = 2;
+ charmap.encoding_id = TT_ADOBE_ID_CUSTOM;
clazz = cmap_classes->custom;
break;
case T1_ENCODING_TYPE_ISOLATIN1:
charmap.encoding = FT_ENCODING_ADOBE_LATIN_1;
- charmap.encoding_id = 3;
+ charmap.encoding_id = TT_ADOBE_ID_LATIN_1;
clazz = cmap_classes->unicode;
break;
@@ -371,7 +375,7 @@
}
if ( clazz )
- FT_CMap_New( clazz, NULL, &charmap, NULL );
+ error = FT_CMap_New( clazz, NULL, &charmap, NULL );
#if 0
/* Select default charmap */
diff --git a/3party/freetype/type42/t42objs.h b/3party/freetype/src/type42/t42objs.h
index 289dedcc69..289dedcc69 100644
--- a/3party/freetype/type42/t42objs.h
+++ b/3party/freetype/src/type42/t42objs.h
diff --git a/3party/freetype/type42/t42parse.c b/3party/freetype/src/type42/t42parse.c
index 13bda64c83..577426917b 100644
--- a/3party/freetype/type42/t42parse.c
+++ b/3party/freetype/src/type42/t42parse.c
@@ -4,7 +4,7 @@
/* */
/* Type 42 font parser (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
/* Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -52,7 +52,8 @@
/* as Type42 fonts have no Private dict, */
/* we set the last argument of T1_FIELD_XXX to 0 */
static const
- T1_FieldRec t42_keywords[] = {
+ T1_FieldRec t42_keywords[] =
+ {
#undef FT_STRUCTURE
#define FT_STRUCTURE T1_FontInfo
@@ -268,7 +269,8 @@
temp_scale ) >> 16 );
/* we need to scale the values by 1.0/temp_scale */
- if ( temp_scale != 0x10000L ) {
+ if ( temp_scale != 0x10000L )
+ {
temp[0] = FT_DivFix( temp[0], temp_scale );
temp[1] = FT_DivFix( temp[1], temp_scale );
temp[2] = FT_DivFix( temp[2], temp_scale );
@@ -575,6 +577,12 @@
}
string_size = T1_ToInt( parser );
+ if ( string_size < 0 )
+ {
+ FT_ERROR(( "t42_parse_sfnts: invalid string size\n" ));
+ error = T42_Err_Invalid_File_Format;
+ goto Fail;
+ }
T1_Skip_PS_Token( parser ); /* `RD' */
if ( parser->root.error )
@@ -582,13 +590,14 @@
string_buf = parser->root.cursor + 1; /* one space after `RD' */
- parser->root.cursor += string_size + 1;
- if ( parser->root.cursor >= limit )
+ if ( limit - parser->root.cursor < string_size )
{
FT_ERROR(( "t42_parse_sfnts: too many binary data\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
+ else
+ parser->root.cursor += string_size + 1;
}
if ( !string_buf )
diff --git a/3party/freetype/type42/t42parse.h b/3party/freetype/src/type42/t42parse.h
index f77ec4af4f..f77ec4af4f 100644
--- a/3party/freetype/type42/t42parse.h
+++ b/3party/freetype/src/type42/t42parse.h
diff --git a/3party/freetype/type42/t42types.h b/3party/freetype/src/type42/t42types.h
index c7c2db490d..c7c2db490d 100644
--- a/3party/freetype/type42/t42types.h
+++ b/3party/freetype/src/type42/t42types.h
diff --git a/3party/freetype/type42/type42.c b/3party/freetype/src/type42/type42.c
index d13df56b10..d13df56b10 100644
--- a/3party/freetype/type42/type42.c
+++ b/3party/freetype/src/type42/type42.c
diff --git a/3party/freetype/winfonts/Jamfile b/3party/freetype/src/winfonts/Jamfile
index 71cf5678e8..71cf5678e8 100644
--- a/3party/freetype/winfonts/Jamfile
+++ b/3party/freetype/src/winfonts/Jamfile
diff --git a/3party/freetype/winfonts/fnterrs.h b/3party/freetype/src/winfonts/fnterrs.h
index ea80909715..ea80909715 100644
--- a/3party/freetype/winfonts/fnterrs.h
+++ b/3party/freetype/src/winfonts/fnterrs.h
diff --git a/3party/freetype/src/winfonts/module.mk b/3party/freetype/src/winfonts/module.mk
new file mode 100644
index 0000000000..b44d7f0570
--- /dev/null
+++ b/3party/freetype/src/winfonts/module.mk
@@ -0,0 +1,23 @@
+#
+# FreeType 2 Windows FNT/FON module definition
+#
+
+
+# Copyright 1996-2000, 2006 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.
+
+
+FTMODULE_H_COMMANDS += WINDOWS_DRIVER
+
+define WINDOWS_DRIVER
+$(OPEN_DRIVER) FT_Driver_ClassRec, winfnt_driver_class $(CLOSE_DRIVER)
+$(ECHO_DRIVER)winfnt $(ECHO_DRIVER_DESC)Windows bitmap fonts with extension *.fnt or *.fon$(ECHO_DRIVER_DONE)
+endef
+
+# EOF
diff --git a/3party/freetype/src/winfonts/rules.mk b/3party/freetype/src/winfonts/rules.mk
new file mode 100644
index 0000000000..71a7df2d8a
--- /dev/null
+++ b/3party/freetype/src/winfonts/rules.mk
@@ -0,0 +1,65 @@
+#
+# FreeType 2 Windows FNT/FON driver configuration rules
+#
+
+
+# Copyright 1996-2000, 2001, 2003 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.
+
+
+# Windows driver directory
+#
+FNT_DIR := $(SRC_DIR)/winfonts
+
+
+FNT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(FNT_DIR))
+
+
+# Windows driver sources (i.e., C files)
+#
+FNT_DRV_SRC := $(FNT_DIR)/winfnt.c
+
+# Windows driver headers
+#
+FNT_DRV_H := $(FNT_DRV_SRC:%.c=%.h) \
+ $(FNT_DIR)/fnterrs.h
+
+
+# Windows driver object(s)
+#
+# FNT_DRV_OBJ_M is used during `multi' builds
+# FNT_DRV_OBJ_S is used during `single' builds
+#
+FNT_DRV_OBJ_M := $(FNT_DRV_SRC:$(FNT_DIR)/%.c=$(OBJ_DIR)/%.$O)
+FNT_DRV_OBJ_S := $(OBJ_DIR)/winfnt.$O
+
+# Windows driver source file for single build
+#
+FNT_DRV_SRC_S := $(FNT_DIR)/winfnt.c
+
+
+# Windows driver - single object
+#
+$(FNT_DRV_OBJ_S): $(FNT_DRV_SRC_S) $(FNT_DRV_SRC) $(FREETYPE_H) $(FNT_DRV_H)
+ $(FNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(FNT_DRV_SRC_S))
+
+
+# Windows driver - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(FNT_DIR)/%.c $(FREETYPE_H) $(FNT_DRV_H)
+ $(FNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(FNT_DRV_OBJ_S)
+DRV_OBJS_M += $(FNT_DRV_OBJ_M)
+
+
+# EOF
diff --git a/3party/freetype/winfonts/winfnt.c b/3party/freetype/src/winfonts/winfnt.c
index 6b3a4e17f2..ee17d16659 100644
--- a/3party/freetype/winfonts/winfnt.c
+++ b/3party/freetype/src/winfonts/winfnt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 2003 Huw D M Davies for Codeweavers */
/* Copyright 2007 Dmitry Timoshkov for Codeweavers */
@@ -23,6 +23,7 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_TRUETYPE_IDS_H
#include "winfnt.h"
#include "fnterrs.h"
@@ -802,15 +803,16 @@
charmap.encoding = FT_ENCODING_NONE;
- charmap.platform_id = 0;
- charmap.encoding_id = 0;
+ /* initial platform/encoding should indicate unset status? */
+ charmap.platform_id = TT_PLATFORM_APPLE_UNICODE;
+ charmap.encoding_id = TT_APPLE_ID_DEFAULT;
charmap.face = root;
if ( font->header.charset == FT_WinFNT_ID_MAC )
{
charmap.encoding = FT_ENCODING_APPLE_ROMAN;
- charmap.platform_id = 1;
-/* charmap.encoding_id = 0; */
+ charmap.platform_id = TT_PLATFORM_MACINTOSH;
+/* charmap.encoding_id = TT_MAC_ID_ROMAN; */
}
error = FT_CMap_New( fnt_cmap_class,
@@ -942,7 +944,7 @@
FT_Int32 load_flags )
{
FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );
- FNT_Font font = face->font;
+ FNT_Font font;
FT_Error error = FNT_Err_Ok;
FT_Byte* p;
FT_Int len;
@@ -953,7 +955,15 @@
FT_UNUSED( load_flags );
- if ( !face || !font ||
+ if ( !face )
+ {
+ error = FNT_Err_Invalid_Argument;
+ goto Exit;
+ }
+
+ font = face->font;
+
+ if ( !font ||
glyph_index >= (FT_UInt)( FT_FACE( face )->num_glyphs ) )
{
error = FNT_Err_Invalid_Argument;
diff --git a/3party/freetype/winfonts/winfnt.h b/3party/freetype/src/winfonts/winfnt.h
index 70a90861ab..70a90861ab 100644
--- a/3party/freetype/winfonts/winfnt.h
+++ b/3party/freetype/src/winfonts/winfnt.h
diff --git a/3party/freetype/version.sed b/3party/freetype/version.sed
new file mode 100644
index 0000000000..c281ff506b
--- /dev/null
+++ b/3party/freetype/version.sed
@@ -0,0 +1,5 @@
+#! /usr/bin/sed -nf
+
+s/^#define *FREETYPE_MAJOR *\([^ ][^ ]*\).*$/freetype_major="\1" ;/p
+s/^#define *FREETYPE_MINOR *\([^ ][^ ]*\).*$/freetype_minor=".\1" ;/p
+s/^#define *FREETYPE_PATCH *\([^ ][^ ]*\).*$/freetype_patch=".\1" ;/p
diff --git a/3party/freetype/vms_make.com b/3party/freetype/vms_make.com
new file mode 100644
index 0000000000..1aa83e7e30
--- /dev/null
+++ b/3party/freetype/vms_make.com
@@ -0,0 +1,1286 @@
+$! make Freetype2 under OpenVMS
+$!
+$! Copyright 2003, 2004, 2006, 2007 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.
+$!
+$!
+$! External libraries (like Freetype, XPM, etc.) are supported via the
+$! config file VMSLIB.DAT. Please check the sample file, which is part of this
+$! distribution, for the information you need to provide
+$!
+$! This procedure currently does support the following commandline options
+$! in arbitrary order
+$!
+$! * DEBUG - Compile modules with /noopt/debug and link shareable image
+$! with /debug
+$! * LOPTS - Options to be passed to the link command
+$! * CCOPT - Options to be passed to the C compiler
+$!
+$! In case of problems with the install you might contact me at
+$! zinser@zinser.no-ip.info(preferred) or
+$! zinser@sysdev.deutsche-boerse.com (work)
+$!
+$! Make procedure history for Freetype2
+$!
+$!------------------------------------------------------------------------------
+$! Version history
+$! 0.01 20040401 First version to receive a number
+$! 0.02 20041030 Add error handling, Freetype 2.1.9
+$!
+$ on error then goto err_exit
+$ true = 1
+$ false = 0
+$ tmpnam = "temp_" + f$getjpi("","pid")
+$ tt = tmpnam + ".txt"
+$ tc = tmpnam + ".c"
+$ th = tmpnam + ".h"
+$ its_decc = false
+$ its_vaxc = false
+$ its_gnuc = false
+$!
+$! Setup variables holding "config" information
+$!
+$ Make = ""
+$ ccopt = "/name=as_is/float=ieee"
+$ lopts = ""
+$ dnsrl = ""
+$ aconf_in_file = "config.hin"
+$ name = "Freetype2"
+$ mapfile = name + ".map"
+$ optfile = name + ".opt"
+$ s_case = false
+$ liblist = ""
+$!
+$ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL")
+$ mydef = F$parse(whoami,,,"DEVICE")
+$ mydir = f$parse(whoami,,,"DIRECTORY") - "]["
+$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type")
+$!
+$! Check for MMK/MMS
+$!
+$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
+$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
+$!
+$! Which command parameters were given
+$!
+$ gosub check_opts
+$!
+$! Create option file
+$!
+$ open/write optf 'optfile'
+$!
+$! Pull in external libraries
+$!
+$ create libs.opt
+$ open/write libsf libs.opt
+$ gosub check_create_vmslib
+$!
+$! Create objects
+$!
+$ if libdefs .nes. ""
+$ then
+$ ccopt = ccopt + "/define=(" + f$extract(0,f$length(libdefs)-1,libdefs) + ")"
+$ endif
+$!
+$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
+ then s_case = true
+$ gosub crea_mms
+$!
+$ 'Make' /macro=(comp_flags="''ccopt'")
+$ purge/nolog [...]descrip.mms
+$!
+$! Add them to options
+$!
+$FLOOP:
+$ file = f$edit(f$search("[...]*.obj"),"UPCASE")
+$ if (file .nes. "")
+$ then
+$ if f$locate("DEMOS",file) .eqs. f$length(file) then write optf file
+$ goto floop
+$ endif
+$!
+$ close optf
+$!
+$!
+$! Alpha gets a shareable image
+$!
+$ If f$getsyi("HW_MODEL") .gt. 1024
+$ Then
+$ write sys$output "Creating freetype2shr.exe"
+$ call anal_obj_axp 'optfile' _link.opt
+$ open/append optf 'optfile'
+$ if s_case then WRITE optf "case_sensitive=YES"
+$ close optf
+$ LINK_/NODEB/SHARE=[.lib]freetype2shr.exe -
+ 'optfile'/opt,libs.opt/opt,_link.opt/opt
+$ endif
+$!
+$ exit
+$!
+$
+$ERR_LIB:
+$ write sys$output "Error reading config file vmslib.dat"
+$ goto err_exit
+$FT2_ERR:
+$ write sys$output "Could not locate Freetype 2 include files"
+$ goto err_exit
+$ERR_EXIT:
+$ set message/facil/ident/sever/text
+$ close/nolog optf
+$ close/nolog out
+$ close/nolog libdata
+$ close/nolog in
+$ close/nolog atmp
+$ close/nolog xtmp
+$ write sys$output "Exiting..."
+$ exit 2
+$!
+$!------------------------------------------------------------------------------
+$!
+$! If MMS/MMK are available dump out the descrip.mms if required
+$!
+$CREA_MMS:
+$ write sys$output "Creating descrip.mms files ..."
+$ write sys$output "... Main directory"
+$ create descrip.mms
+$ open/append out descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 build system -- top-level Makefile for OpenVMS
+#
+
+
+# Copyright 2001 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.
+$ EOD
+$ write out "CFLAGS = ", ccopt
+$ copy sys$input: out
+$ deck
+
+
+all :
+ define freetype [--.include.freetype]
+ define psaux [-.psaux]
+ define autofit [-.autofit]
+ define autohint [-.autohint]
+ define base [-.base]
+ define cache [-.cache]
+ define cff [-.cff]
+ define cid [-.cid]
+ define pcf [-.pcf]
+ define psnames [-.psnames]
+ define raster [-.raster]
+ define sfnt [-.sfnt]
+ define smooth [-.smooth]
+ define truetype [-.truetype]
+ define type1 [-.type1]
+ define winfonts [-.winfonts]
+ if f$search("lib.dir") .eqs. "" then create/directory [.lib]
+ set default [.builds.vms]
+ $(MMS)$(MMSQUALIFIERS)
+# set default [--.src.autofit]
+# $(MMS)$(MMSQUALIFIERS)
+ set default [--.src.autohint]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.base]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.bdf]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.cache]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.cff]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.cid]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.gzip]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.lzw]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.otvalid]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.pcf]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.pfr]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.psaux]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.pshinter]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.psnames]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.raster]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.sfnt]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.smooth]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.truetype]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.type1]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.type42]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.winfonts]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [--]
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.builds.vms] directory"
+$ create [.builds.vms]descrip.mms
+$ open/append out [.builds.vms]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 system rules for VMS
+#
+
+
+# Copyright 2001 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([],[--.include],[--.src.base])
+
+OBJS=ftsystem.obj
+
+all : $(OBJS)
+ library/create [--.lib]freetype.olb $(OBJS)
+
+ftsystem.obj : ftsystem.c ftconfig.h
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.autofit] directory"
+$ create [.src.autofit]descrip.mms
+$ open/append out [.src.autofit]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 auto-fit module compilation rules for VMS
+#
+
+
+# Copyright 2002 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.
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.autofit])
+
+OBJS=afangles.obj,afhints.obj,aflatin.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.autohint] directory"
+$ create [.src.autohint]descrip.mms
+$ open/append out [.src.autohint]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 auto-hinter module compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002 Catharon Productions Inc.
+#
+# This file is part of the Catharon Typography Project and shall only
+# be used, modified, and distributed under the terms of the Catharon
+# Open Source License that should come with this file under the name
+# `CatharonLicense.txt'. By continuing to use, modify, or distribute
+# this file you indicate that you have read the license and
+# understand and accept it fully.
+#
+# Note that this license is compatible with the FreeType license.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/incl=([--.include],[--.src.autohint])
+
+OBJS=autohint.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.base] directory"
+$ create [.src.base]descrip.mms
+$ open/append out [.src.base]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 base layer compilation rules for VMS
+#
+
+
+# Copyright 2001, 2003 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base])
+
+OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftbdf.obj,ftmm.obj,\
+ fttype1.obj,ftxf86.obj,ftpfr.obj,ftstroke.obj,ftwinfnt.obj,ftbbox.obj,\
+ ftbitmap.obj ftlcdfil.obj ftgasp.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.bdf] directory"
+$ create [.src.bdf]descrip.mms
+$ open/append out [.src.bdf]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 BDF driver compilation rules for VMS
+#
+
+
+# Copyright 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.bdf])
+
+OBJS=bdf.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.cache] directory"
+$ create [.src.cache]descrip.mms
+$ open/append out [.src.cache]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 Cache compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002, 2003, 2004 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cache])
+
+OBJS=ftcache.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+ftcache.obj : ftcache.c ftcbasic.c ftccache.c ftccmap.c ftcglyph.c ftcimage.c \
+ ftcmanag.c ftcmru.c ftcsbits.c
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.cff] directory"
+$ create [.src.cff]descrip.mms
+$ open/append out [.src.cff]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 OpenType/CFF driver compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cff])
+
+OBJS=cff.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.cid] directory"
+$ create [.src.cid]descrip.mms
+$ open/append out [.src.cid]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 CID driver compilation rules for VMS
+#
+
+
+# Copyright 2001 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cid])
+
+OBJS=type1cid.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.gzip] directory"
+$ create [.src.gzip]descrip.mms
+$ open/append out [.src.gzip]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 GZip support compilation rules for VMS
+#
+
+
+# Copyright 2002 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.
+$EOD
+$ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", ","
+$ write out "COMP_FLAGS = ", ccopt
+$ copy sys$input: out
+$ deck
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.gzip])
+
+OBJS=ftgzip.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.lzw] directory"
+$ create [.src.lzw]descrip.mms
+$ open/append out [.src.lzw]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 LZW support compilation rules for VMS
+#
+
+
+# Copyright 2004 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+$EOD
+$ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", ","
+$ write out "COMP_FLAGS = ", ccopt
+$ copy sys$input: out
+$ deck
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.lzw])
+
+OBJS=ftlzw.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.otlayout] directory"
+$ create [.src.otlayout]descrip.mms
+$ open/append out [.src.otlayout]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 OT layout compilation rules for VMS
+#
+
+
+# Copyright 2004 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.otlayout])
+
+OBJS=otlbase.obj,otlcommn.obj,otlgdef.obj,otlgpos.obj,otlgsub.obj,\
+ otljstf.obj,otlparse.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.otvalid] directory"
+$ create [.src.otvalid]descrip.mms
+$ open/append out [.src.otvalid]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 OpenType validation module compilation rules for VMS
+#
+
+
+# Copyright 2004 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.otvalid])
+
+OBJS=otvalid.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.pcf] directory"
+$ create [.src.pcf]descrip.mms
+$ open/append out [.src.pcf]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 pcf driver compilation rules for VMS
+#
+
+
+# Copyright (C) 2001, 2002 by
+# Francesco Zappa Nardelli
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pcf])
+
+OBJS=pcf.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.pfr] directory"
+$ create [.src.pfr]descrip.mms
+$ open/append out [.src.pfr]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 PFR driver compilation rules for VMS
+#
+
+
+# Copyright 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pfr])
+
+OBJS=pfr.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.psaux] directory"
+$ create [.src.psaux]descrip.mms
+$ open/append out [.src.psaux]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 PSaux driver compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psaux])
+
+OBJS=psaux.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.pshinter] directory"
+$ create [.src.pshinter]descrip.mms
+$ open/append out [.src.pshinter]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 PSHinter driver compilation rules for OpenVMS
+#
+
+
+# Copyright 2001, 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames])
+
+OBJS=pshinter.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.psnames] directory"
+$ create [.src.psnames]descrip.mms
+$ open/append out [.src.psnames]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 PSNames driver compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames])
+
+OBJS=psnames.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.raster] directory"
+$ create [.src.raster]descrip.mms
+$ open/append out [.src.raster]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 renderer module compilation rules for VMS
+#
+
+
+# Copyright 2001 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.raster])
+
+OBJS=raster.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.sfnt] directory"
+$ create [.src.sfnt]descrip.mms
+$ open/append out [.src.sfnt]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 SFNT driver compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.sfnt])
+
+OBJS=sfnt.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.smooth] directory"
+$ create [.src.smooth]descrip.mms
+$ open/append out [.src.smooth]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 smooth renderer module compilation rules for VMS
+#
+
+
+# Copyright 2001 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.smooth])
+
+OBJS=smooth.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.truetype] directory"
+$ create [.src.truetype]descrip.mms
+$ open/append out [.src.truetype]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 TrueType driver compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.truetype])
+
+OBJS=truetype.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.type1] directory"
+$ create [.src.type1]descrip.mms
+$ open/append out [.src.type1]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 Type1 driver compilation rules for VMS
+#
+
+
+# Copyright 1996-2000, 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type1])
+
+OBJS=type1.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+type1.obj : type1.c t1parse.c t1load.c t1objs.c t1driver.c t1gload.c t1afm.c
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.type42] directory"
+$ create [.src.type42]descrip.mms
+$ open/append out [.src.type42]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 Type 42 driver compilation rules for VMS
+#
+
+
+# Copyright 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type42])
+
+OBJS=type42.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.winfonts] directory"
+$ create [.src.winfonts]descrip.mms
+$ open/append out [.src.winfonts]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 Windows FNT/FON driver compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002 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.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.winfonts])
+
+OBJS=winfnt.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ return
+$!------------------------------------------------------------------------------
+$!
+$! Check command line options and set symbols accordingly
+$!
+$ CHECK_OPTS:
+$ i = 1
+$ OPT_LOOP:
+$ if i .lt. 9
+$ then
+$ cparm = f$edit(p'i',"upcase")
+$ if cparm .eqs. "DEBUG"
+$ then
+$ ccopt = ccopt + "/noopt/deb"
+$ lopts = lopts + "/deb"
+$ endif
+$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
+$ then
+$ start = f$locate("=",cparm) + 1
+$ len = f$length(cparm) - start
+$ ccopt = ccopt + f$extract(start,len,cparm)
+$ endif
+$ if cparm .eqs. "LINK" then linkonly = true
+$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
+$ then
+$ start = f$locate("=",cparm) + 1
+$ len = f$length(cparm) - start
+$ lopts = lopts + f$extract(start,len,cparm)
+$ endif
+$ if f$locate("CC=",cparm) .lt. f$length(cparm)
+$ then
+$ start = f$locate("=",cparm) + 1
+$ len = f$length(cparm) - start
+$ cc_com = f$extract(start,len,cparm)
+ if (cc_com .nes. "DECC") .and. -
+ (cc_com .nes. "VAXC") .and. -
+ (cc_com .nes. "GNUC")
+$ then
+$ write sys$output "Unsupported compiler choice ''cc_com' ignored"
+$ write sys$output "Use DECC, VAXC, or GNUC instead"
+$ else
+$ if cc_com .eqs. "DECC" then its_decc = true
+$ if cc_com .eqs. "VAXC" then its_vaxc = true
+$ if cc_com .eqs. "GNUC" then its_gnuc = true
+$ endif
+$ endif
+$ if f$locate("MAKE=",cparm) .lt. f$length(cparm)
+$ then
+$ start = f$locate("=",cparm) + 1
+$ len = f$length(cparm) - start
+$ mmks = f$extract(start,len,cparm)
+$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
+$ then
+$ make = mmks
+$ else
+$ write sys$output "Unsupported make choice ''mmks' ignored"
+$ write sys$output "Use MMK or MMS instead"
+$ endif
+$ endif
+$ i = i + 1
+$ goto opt_loop
+$ endif
+$ return
+$!------------------------------------------------------------------------------
+$!
+$! Take care of driver file with information about external libraries
+$!
+$! Version history
+$! 0.01 20040220 First version to receive a number
+$! 0.02 20040229 Echo current procedure name; use general error exit handler
+$! Remove xpm hack -> Replaced by more general dnsrl handling
+$CHECK_CREATE_VMSLIB:
+$!
+$ if f$search("VMSLIB.DAT") .eqs. ""
+$ then
+$ type/out=vmslib.dat sys$input
+!
+! This is a simple driver file with information used by vms_make.com to
+! check if external libraries (like t1lib and freetype) are available on
+! the system.
+!
+! Layout of the file:
+!
+! - Lines starting with ! are treated as comments
+! - Elements in a data line are separated by # signs
+! - The elements need to be listed in the following order
+! 1.) Name of the Library (only used for informative messages
+! from vms_make.com)
+! 2.) Location where the object library can be found
+! 3.) Location where the include files for the library can be found
+! 4.) Include file used to verify library location
+! 5.) CPP define to pass to the build to indicate availability of
+! the library
+!
+! Example: The following lines show how definitions
+! might look like. They are site specific and the locations of the
+! library and include files need almost certainly to be changed.
+!
+! Location: All of the libaries can be found at the following addresses
+!
+! ZLIB: http://zinser.no-ip.info/vms/sw/zlib.htmlx
+!
+ZLIB # sys$library:libz.olb # sys$library: # zlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB
+$ write sys$output "New driver file vmslib.dat created."
+$ write sys$output "Please customize libary locations for your site"
+$ write sys$output "and afterwards re-execute ''myproc'"
+$ goto err_exit
+$ endif
+$!
+$! Init symbols used to hold CPP definitions and include path
+$!
+$ libdefs = ""
+$ libincs = ""
+$!
+$! Open data file with location of libraries
+$!
+$ open/read/end=end_lib/err=err_lib libdata VMSLIB.DAT
+$LIB_LOOP:
+$ read/end=end_lib libdata libline
+$ libline = f$edit(libline, "UNCOMMENT,COLLAPSE")
+$ if libline .eqs. "" then goto LIB_LOOP ! Comment line
+$ libname = f$edit(f$element(0,"#",libline),"UPCASE")
+$ write sys$output "Processing ''libname' setup ..."
+$ libloc = f$element(1,"#",libline)
+$ libsrc = f$element(2,"#",libline)
+$ testinc = f$element(3,"#",libline)
+$ cppdef = f$element(4,"#",libline)
+$ old_cpp = f$locate("=1",cppdef)
+$ if old_cpp.lt.f$length(cppdef) then cppdef = f$extract(0,old_cpp,cppdef)
+$ if f$search("''libloc'").eqs. ""
+$ then
+$ write sys$output "Can not find library ''libloc' - Skipping ''libname'"
+$ goto LIB_LOOP
+$ endif
+$ libsrc_elem = 0
+$ libsrc_found = false
+$LIBSRC_LOOP:
+$ libsrcdir = f$element(libsrc_elem,",",libsrc)
+$ if (libsrcdir .eqs. ",") then goto END_LIBSRC
+$ if f$search("''libsrcdir'''testinc'") .nes. "" then libsrc_found = true
+$ libsrc_elem = libsrc_elem + 1
+$ goto LIBSRC_LOOP
+$END_LIBSRC:
+$ if .not. libsrc_found
+$ then
+$ write sys$output "Can not find includes at ''libsrc' - Skipping ''libname'"
+$ goto LIB_LOOP
+$ endif
+$ if (cppdef .nes. "") then libdefs = libdefs + cppdef + ","
+$ libincs = libincs + "," + libsrc
+$ lqual = "/lib"
+$ libtype = f$edit(f$parse(libloc,,,"TYPE"),"UPCASE")
+$ if f$locate("EXE",libtype) .lt. f$length(libtype) then lqual = "/share"
+$ write optf libloc , lqual
+$ if (f$trnlnm("topt") .nes. "") then write topt libloc , lqual
+$!
+$! Nasty hack to get the freetype includes to work
+$!
+$ ft2def = false
+$ if ((libname .eqs. "FREETYPE") .and. -
+ (f$locate("FREETYPE2",cppdef) .lt. f$length(cppdef)))
+$ then
+$ if ((f$search("freetype:freetype.h") .nes. "") .and. -
+ (f$search("freetype:[internal]ftobjs.h") .nes. ""))
+$ then
+$ write sys$output "Will use local definition of freetype logical"
+$ else
+$ ft2elem = 0
+$FT2_LOOP:
+$ ft2srcdir = f$element(ft2elem,",",libsrc)
+$ if f$search("''ft2srcdir'''testinc'") .nes. ""
+$ then
+$ if f$search("''ft2srcdir'internal.dir") .nes. ""
+$ then
+$ ft2dev = f$parse("''ft2srcdir'",,,"device","no_conceal")
+$ ft2dir = f$parse("''ft2srcdir'",,,"directory","no_conceal")
+$ ft2conc = f$locate("][",ft2dir)
+$ ft2len = f$length(ft2dir)
+$ if ft2conc .lt. ft2len
+$ then
+$ ft2dir = f$extract(0,ft2conc,ft2dir) + -
+ f$extract(ft2conc+2,ft2len-2,ft2dir)
+$ endif
+$ ft2dir = ft2dir - "]" + ".]"
+$ define freetype 'ft2dev''ft2dir','ft2srcdir'
+$ ft2def = true
+$ else
+$ goto ft2_err
+$ endif
+$ else
+$ ft2elem = ft2elem + 1
+$ goto ft2_loop
+$ endif
+$ endif
+$ endif
+$ goto LIB_LOOP
+$END_LIB:
+$ close libdata
+$ return
+$!------------------------------------------------------------------------------
+$!
+$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
+$! information to build a symbol vector for a shareable image
+$! All the "brains" of this logic was suggested by Hartmut Becker
+$! (Hartmut.Becker@compaq.com). All the bugs were introduced by me
+$! (zinser@decus.de), so if you do have problem reports please do not
+$! bother Hartmut/HP, but get in touch with me
+$!
+$! Version history
+$! 0.01 20040006 Skip over shareable images in option file
+$!
+$ ANAL_OBJ_AXP: Subroutine
+$ V = 'F$Verify(0)
+$ SAY := "WRITE_ SYS$OUTPUT"
+$
+$ IF F$SEARCH("''P1'") .EQS. ""
+$ THEN
+$ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available"
+$ goto exit_aa
+$ ENDIF
+$ IF "''P2'" .EQS. ""
+$ THEN
+$ SAY "ANAL_OBJ_AXP: Error, no output file provided"
+$ goto exit_aa
+$ ENDIF
+$
+$ open/read in 'p1
+$ create a.tmp
+$ open/append atmp a.tmp
+$ loop:
+$ read/end=end_loop in line
+$ if f$locate("/SHARE",f$edit(line,"upcase")) .lt. f$length(line)
+$ then
+$ write sys$output "ANAL_SKP_SHR-i-skipshare, ''line'"
+$ goto loop
+$ endif
+$ if f$locate("/LIB",f$edit(line,"upcase")) .lt. f$length(line)
+$ then
+$ write libsf line
+$ write sys$output "ANAL_SKP_LIB-i-skiplib, ''line'"
+$ goto loop
+$ endif
+$ f= f$search(line)
+$ if f .eqs. ""
+$ then
+$ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
+$ goto loop
+$ endif
+$ def/user sys$output nl:
+$ def/user sys$error nl:
+$ anal/obj/gsd 'f /out=x.tmp
+$ open/read xtmp x.tmp
+$ XLOOP:
+$ read/end=end_xloop xtmp xline
+$ xline = f$edit(xline,"compress")
+$ write atmp xline
+$ goto xloop
+$ END_XLOOP:
+$ close xtmp
+$ goto loop
+$ end_loop:
+$ close in
+$ close atmp
+$ if f$search("a.tmp") .eqs. "" -
+ then $ exit
+$ ! all global definitions
+$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp
+$ ! all procedures
+$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp
+$ search c.tmp "symbol:"/out=d.tmp
+$ def/user sys$output nl:
+$ edito/edt/command=sys$input d.tmp
+sub/symbol: "/symbol_vector=(/whole
+sub/"/=PROCEDURE)/whole
+exit
+$ ! all data
+$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp
+$ search e.tmp "symbol:"/out=f.tmp
+$ def/user sys$output nl:
+$ edito/edt/command=sys$input f.tmp
+sub/symbol: "/symbol_vector=(/whole
+sub/"/=DATA)/whole
+exit
+$ sort/nodupl d.tmp,f.tmp 'p2'
+$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*
+$ if f$search("x.tmp") .nes. "" -
+ then $ delete x.tmp;*
+$!
+$ close libsf
+$ EXIT_AA:
+$ if V then set verify
+$ endsubroutine